@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
package/dist/styles.css CHANGED
@@ -2,27 +2,42 @@
2
2
  @layer theme, base, comark, components, utilities;
3
3
  /* comark-chat also adds these on mount; importing them keeps server-rendered messages from shifting. */
4
4
  @import "comark-chat/style.css";
5
+ /* xterm.js needs its own rules for the WorkspaceTerminal rows, cursor, and helper textarea. */
6
+ @import "@xterm/xterm/css/xterm.css" layer(components);
7
+ /* Share the theme's wrapper focus ring without requiring its palette or fonts. */
8
+ @import "./theme-focus-ring.css";
9
+ /* Comment pins, areas, and highlights. The ViteHub pill and Drop's page frame load the same file without a framework. */
10
+ @import "./comment-marks.css" layer(components);
11
+ /* The cross-fade of CopyButton's icons. Drop's page frame loads the same file without a framework. */
12
+ @import "./icon-swap.css" layer(components);
5
13
 
6
- :root {
14
+ /*
15
+ * Theme tokens. Set `--vh-ui-*` on any element to change the parts inside it; the package sets none of them. The parts
16
+ * read `--vh-*`, which each element of a part resolves from `--vh-ui-*` and else from Nuxt UI's `--ui-*` as that element
17
+ * sees them. So a surface that resets `--ui-*`, such as `<div class="dark">` on a light page, needs nothing else.
18
+ * The selector covers the elements of the parts: their `data-slot` attributes and `vh-*` classes.
19
+ */
20
+ :where(:root, [data-slot], [class^="vh-"], [class*=" vh-"]) {
7
21
  /* Nuxt UI's --ui-radius is its smallest step (rounded-sm). Every radius here derives from rounded-lg, twice that step, so a part follows the app's --ui-radius. */
8
- --vh-ui-radius: calc(var(--ui-radius, 0.25rem) * 2);
9
- --vh-ui-border: var(--ui-border, color-mix(in oklab, currentColor 14%, transparent));
10
- --vh-ui-muted: var(--ui-text-muted, color-mix(in oklab, currentColor 68%, transparent));
11
- --vh-ui-dimmed: var(--ui-text-muted, color-mix(in oklab, currentColor 68%, transparent));
12
- --vh-ui-text: var(--ui-text, currentColor);
13
- --vh-ui-bg: var(--ui-bg, Canvas);
14
- --vh-ui-bg-muted: var(--ui-bg-muted, color-mix(in oklab, Canvas 94%, currentColor));
15
- --vh-ui-bg-elevated: var(--ui-bg-elevated, color-mix(in oklab, Canvas 96%, currentColor));
16
- --vh-ui-bg-accented: var(--ui-bg-accented, color-mix(in oklab, Canvas 90%, currentColor));
17
- --vh-ui-highlighted: var(--ui-text-highlighted, currentColor);
18
- --vh-ui-error: var(--ui-error, #df3030);
19
- --vh-ui-info: var(--ui-info, #2563eb);
20
- --vh-ui-success: var(--ui-success, #16a34a);
21
- --vh-ui-warning: var(--ui-warning, #ad6500);
22
- --vh-ui-highlighted: var(--ui-text-highlighted, currentColor);
23
- --vh-ui-inverted: var(--ui-text-inverted, Canvas);
24
- --vh-ui-primary: var(--ui-primary, #2563eb);
25
- --vh-ui-ring: color-mix(in oklab, var(--vh-ui-primary) 50%, transparent);
22
+ --vh-radius: var(--vh-ui-radius, calc(var(--ui-radius, 0.25rem) * 2));
23
+ --vh-border: var(--vh-ui-border, var(--ui-border, color-mix(in oklab, currentColor 14%, transparent)));
24
+ --vh-border-accented: var(--vh-ui-border-accented, var(--ui-border-accented, color-mix(in oklab, currentColor 24%, transparent)));
25
+ --vh-muted: var(--vh-ui-muted, var(--ui-text-muted, color-mix(in oklab, currentColor 68%, transparent)));
26
+ --vh-dimmed: var(--vh-ui-dimmed, var(--ui-text-dimmed, color-mix(in oklab, currentColor 68%, transparent)));
27
+ --vh-text: var(--vh-ui-text, var(--ui-text, currentColor));
28
+ --vh-bg: var(--vh-ui-bg, var(--ui-bg, Canvas));
29
+ --vh-bg-muted: var(--vh-ui-bg-muted, var(--ui-bg-muted, color-mix(in oklab, Canvas 94%, currentColor)));
30
+ --vh-bg-elevated: var(--vh-ui-bg-elevated, var(--ui-bg-elevated, color-mix(in oklab, Canvas 96%, currentColor)));
31
+ --vh-bg-accented: var(--vh-ui-bg-accented, var(--ui-bg-accented, color-mix(in oklab, Canvas 90%, currentColor)));
32
+ --vh-highlighted: var(--vh-ui-highlighted, var(--ui-text-highlighted, currentColor));
33
+ --vh-inverted: var(--vh-ui-inverted, var(--ui-text-inverted, Canvas));
34
+ --vh-primary: var(--vh-ui-primary, var(--ui-primary, var(--vh-highlighted)));
35
+ --vh-ring: var(--vh-ui-ring, color-mix(in oklab, var(--vh-primary) 50%, transparent));
36
+ /* Without Nuxt UI there are no status colors, so a status falls back to the ink and its text names the state. */
37
+ --vh-error: var(--vh-ui-error, var(--ui-error, var(--vh-highlighted)));
38
+ --vh-info: var(--vh-ui-info, var(--ui-info, var(--vh-highlighted)));
39
+ --vh-success: var(--vh-ui-success, var(--ui-success, var(--vh-highlighted)));
40
+ --vh-warning: var(--vh-ui-warning, var(--ui-warning, var(--vh-highlighted)));
26
41
  }
27
42
 
28
43
  /*
@@ -36,12 +51,12 @@
36
51
 
37
52
  .vh-chat__scroll-button {
38
53
  align-items: center;
39
- background: var(--vh-ui-bg-elevated);
40
- border: 1px solid var(--vh-ui-border);
54
+ background: var(--vh-bg-elevated);
55
+ border: 0;
41
56
  border-radius: 999px;
42
57
  bottom: 1rem;
43
- box-shadow: 0 1px 3px color-mix(in oklab, black 14%, transparent);
44
- color: var(--vh-ui-muted);
58
+ box-shadow: var(--vh-shadow-floating, 0 0 0 1px var(--vh-border));
59
+ color: var(--vh-muted);
45
60
  cursor: pointer;
46
61
  display: flex;
47
62
  gap: 0.375rem;
@@ -57,7 +72,7 @@
57
72
 
58
73
  @media (hover: hover) {
59
74
  .vh-chat__scroll-button:hover {
60
- color: var(--vh-ui-text);
75
+ color: var(--vh-text);
61
76
  }
62
77
  }
63
78
 
@@ -105,22 +120,22 @@
105
120
  .vh-typeset :where(code):not(pre code) {
106
121
  background: color-mix(in oklab, currentColor 8%, transparent);
107
122
  border: 1px solid color-mix(in oklab, currentColor 10%, transparent);
108
- border-radius: calc(var(--vh-ui-radius) * 0.65);
123
+ border-radius: calc(var(--vh-radius) * 0.65);
109
124
  font-size: 0.875em;
110
125
  padding: 0.1em 0.35em;
111
126
  }
112
127
 
113
128
  .vh-typeset :where(pre) {
114
- border: 1px solid var(--vh-ui-border);
115
- border-radius: var(--vh-ui-radius);
129
+ border: 1px solid var(--vh-border);
130
+ border-radius: var(--vh-radius);
116
131
  max-width: 100%;
117
132
  overflow: auto;
118
133
  padding: 0.875rem 1rem;
119
134
  }
120
135
 
121
136
  .vh-typeset :where(blockquote) {
122
- border-inline-start: 2px solid var(--vh-ui-border);
123
- color: var(--vh-ui-muted);
137
+ border-inline-start: 2px solid var(--vh-border);
138
+ color: var(--vh-muted);
124
139
  padding-inline-start: 1rem;
125
140
  }
126
141
 
@@ -130,6 +145,22 @@
130
145
  text-underline-offset: 0.2em;
131
146
  }
132
147
 
148
+ .vh-agent-session .vh-typeset :where(code):not(pre code) {
149
+ -webkit-box-decoration-break: clone;
150
+ background: color-mix(in oklab, currentColor 10%, transparent);
151
+ border: 0;
152
+ border-radius: 0.25rem;
153
+ box-decoration-break: clone;
154
+ font-size: 0.85em;
155
+ }
156
+ .vh-agent-session .vh-typeset :where(h1, h2, h3, h4) {
157
+ font-size: 1em;
158
+ font-weight: 600;
159
+ }
160
+ .vh-agent-session .vh-typeset :where(h1) {
161
+ font-size: 1.125em;
162
+ }
163
+
133
164
  .vh-typeset-chat > :first-child {
134
165
  margin-block-start: 0;
135
166
  }
@@ -144,8 +175,12 @@
144
175
  vertical-align: top;
145
176
  }
146
177
 
178
+ /*
179
+ * The image dialog darkens the page with the media scrim of the theme, at 80% so the toolbar text stays readable. Without
180
+ * the theme it uses the Nuxt UI overlay, and the toolbar takes the ink color instead of white.
181
+ */
147
182
  .vh-image-overlay {
148
- background: rgb(0 0 0 / 80%);
183
+ background: rgb(from var(--vh-media-scrim, var(--vh-bg-elevated)) r g b / 80%);
149
184
  z-index: 59;
150
185
  }
151
186
 
@@ -161,12 +196,12 @@
161
196
  }
162
197
 
163
198
  .vh-image-dialog__action {
164
- color: white;
199
+ color: var(--vh-on-media, var(--vh-highlighted));
165
200
  flex: none;
166
201
  }
167
202
 
168
203
  .vh-image-dialog__action:hover {
169
- background: rgb(255 255 255 / 10%);
204
+ background: color-mix(in oklab, var(--vh-on-media, var(--vh-highlighted)) 10%, transparent);
170
205
  }
171
206
 
172
207
  /*
@@ -189,8 +224,8 @@
189
224
  }
190
225
 
191
226
  .vh-primitive-rail__surface {
192
- background: var(--vh-ui-bg-muted);
193
- border-inline-end: 1px solid var(--vh-ui-border);
227
+ background: var(--vh-bg-muted);
228
+ border-inline-end: 1px solid var(--vh-border);
194
229
  box-sizing: border-box;
195
230
  display: flex;
196
231
  flex-direction: column;
@@ -207,10 +242,6 @@
207
242
  width: 13.5rem;
208
243
  }
209
244
 
210
- .dark .vh-primitive-rail__surface {
211
- background: #000;
212
- }
213
-
214
245
  .vh-primitive-rail__header,
215
246
  .vh-primitive-rail__footer {
216
247
  display: flex;
@@ -248,7 +279,7 @@
248
279
 
249
280
  /* The rule stays centered under the icons when the rail expands. */
250
281
  .vh-primitive-rail__group + .vh-primitive-rail__group::before {
251
- background: var(--vh-ui-border);
282
+ background: var(--vh-border);
252
283
  content: "";
253
284
  height: 1px;
254
285
  inset-block-start: 0;
@@ -263,9 +294,9 @@
263
294
  appearance: none;
264
295
  background: transparent;
265
296
  border: 0;
266
- border-radius: calc(var(--vh-ui-radius) * 0.75);
297
+ border-radius: calc(var(--vh-radius) * 0.75);
267
298
  box-sizing: border-box;
268
- color: var(--vh-ui-muted);
299
+ color: var(--vh-muted);
269
300
  cursor: pointer;
270
301
  display: flex;
271
302
  flex: none;
@@ -323,15 +354,9 @@
323
354
  transition: none;
324
355
  }
325
356
 
326
- .vh-primitive-rail__item:focus-visible {
327
- color: var(--vh-ui-highlighted);
328
- outline: 2px solid var(--vh-ui-highlighted);
329
- outline-offset: -2px;
330
- }
331
-
332
357
  .vh-primitive-rail__item[aria-current="page"] {
333
- background: var(--vh-ui-bg-accented);
334
- color: var(--vh-ui-highlighted);
358
+ background: var(--vh-bg-accented);
359
+ color: var(--vh-highlighted);
335
360
  }
336
361
 
337
362
  .vh-primitive-rail__item:disabled {
@@ -341,12 +366,12 @@
341
366
 
342
367
  @media (hover: hover) {
343
368
  .vh-primitive-rail__item:hover {
344
- background: var(--vh-ui-bg-elevated);
345
- color: var(--vh-ui-highlighted);
369
+ background: var(--vh-bg-elevated);
370
+ color: var(--vh-highlighted);
346
371
  }
347
372
 
348
373
  .vh-primitive-rail__item[aria-current="page"]:hover {
349
- background: var(--vh-ui-bg-accented);
374
+ background: var(--vh-bg-accented);
350
375
  }
351
376
  }
352
377
 
@@ -364,20 +389,20 @@
364
389
  width: 1.125rem;
365
390
  }
366
391
 
367
- .vh-primitive-icon__motion {
392
+ .vh-primitive-icon [data-motion] {
368
393
  transform-box: view-box;
369
394
  transform-origin: var(--vh-primitive-icon-origin, 12px 12px);
370
395
  }
371
396
 
372
397
  /* Each icon moves once when a pointer enters or keyboard focus arrives. Nothing moves while idle. */
373
398
  @media (prefers-reduced-motion: no-preference) {
374
- .vh-primitive-rail__item:focus-visible .vh-primitive-icon__motion {
399
+ .vh-primitive-rail__item:focus-visible .vh-primitive-icon [data-motion] {
375
400
  animation: vh-primitive-icon 320ms cubic-bezier(0.22, 1, 0.36, 1);
376
401
  }
377
402
  }
378
403
 
379
404
  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
380
- .vh-primitive-rail__item:hover .vh-primitive-icon__motion {
405
+ .vh-primitive-rail__item:hover .vh-primitive-icon [data-motion] {
381
406
  animation: vh-primitive-icon 320ms cubic-bezier(0.22, 1, 0.36, 1);
382
407
  }
383
408
  }
@@ -391,7 +416,7 @@
391
416
 
392
417
  .vh-primitive-icon[data-icon="agent"] {
393
418
  --vh-primitive-icon-motion: scaleY(0.2);
394
- --vh-primitive-icon-origin: 12px 14.5px;
419
+ --vh-primitive-icon-origin: 12px 14px;
395
420
  }
396
421
 
397
422
  .vh-primitive-icon[data-icon="auth"] {
@@ -406,14 +431,46 @@
406
431
  --vh-primitive-icon-motion: translate(1.5px, 1.5px);
407
432
  }
408
433
 
409
- .vh-primitive-icon[data-icon="channel"] {
434
+ .vh-primitive-icon[data-icon="bundle"] {
435
+ --vh-primitive-icon-motion: translateY(-1px);
436
+ }
437
+
438
+ .vh-primitive-icon[data-icon="cache"] {
439
+ --vh-primitive-icon-motion: translateY(-1.5px);
440
+ }
441
+
442
+ .vh-primitive-icon[data-icon="channels"] {
443
+ --vh-primitive-icon-motion: translateX(1.5px);
444
+ }
445
+
446
+ .vh-primitive-icon[data-icon="cli"] {
447
+ --vh-primitive-icon-opacity: 0;
448
+ }
449
+
450
+ .vh-primitive-icon[data-icon="cms"] {
451
+ --vh-primitive-icon-motion: translate(-1px, -1px);
452
+ }
453
+
454
+ .vh-primitive-icon[data-icon="codemods"] {
455
+ --vh-primitive-icon-motion: translateX(1.5px);
456
+ }
457
+
458
+ .vh-primitive-icon[data-icon="comments"] {
410
459
  --vh-primitive-icon-motion: translateX(1.5px);
411
460
  }
412
461
 
413
- .vh-primitive-icon[data-icon="connection"] {
462
+ .vh-primitive-icon[data-icon="compare"] {
463
+ --vh-primitive-icon-motion: translateX(-1.5px);
464
+ }
465
+
466
+ .vh-primitive-icon[data-icon="connections"] {
414
467
  --vh-primitive-icon-motion: translateY(1.5px);
415
468
  }
416
469
 
470
+ .vh-primitive-icon[data-icon="console"] {
471
+ --vh-primitive-icon-motion: translateX(1px);
472
+ }
473
+
417
474
  .vh-primitive-icon[data-icon="content"] {
418
475
  --vh-primitive-icon-motion: translateX(1.5px);
419
476
  }
@@ -422,34 +479,79 @@
422
479
  --vh-primitive-icon-motion: translateY(-1.5px);
423
480
  }
424
481
 
482
+ .vh-primitive-icon[data-icon="choices"] {
483
+ --vh-primitive-icon-motion: translate(1px, -1px);
484
+ }
485
+
425
486
  .vh-primitive-icon[data-icon="development"] {
426
487
  --vh-primitive-icon-motion: rotate(14deg);
427
488
  }
428
489
 
490
+ .vh-primitive-icon[data-icon="docs"] {
491
+ --vh-primitive-icon-motion: skewY(-6deg);
492
+ --vh-primitive-icon-origin: 12px 12px;
493
+ }
494
+
429
495
  .vh-primitive-icon[data-icon="email"] {
430
496
  --vh-primitive-icon-motion: translateY(1.5px);
431
497
  }
432
498
 
433
499
  .vh-primitive-icon[data-icon="env"] {
434
500
  --vh-primitive-icon-motion: rotate(-16deg);
435
- --vh-primitive-icon-origin: 8px 16px;
501
+ --vh-primitive-icon-origin: 7.5px 16.5px;
502
+ }
503
+
504
+ .vh-primitive-icon[data-icon="forge"] {
505
+ --vh-primitive-icon-motion: translateX(-1px);
506
+ }
507
+
508
+ .vh-primitive-icon[data-icon="forms"] {
509
+ --vh-primitive-icon-motion: translateY(1px);
510
+ }
511
+
512
+ .vh-primitive-icon[data-icon="gateways"] {
513
+ --vh-primitive-icon-motion: translateX(1.5px);
514
+ }
515
+
516
+ .vh-primitive-icon[data-icon="guides"] {
517
+ --vh-primitive-icon-motion: rotate(45deg);
436
518
  }
437
519
 
438
520
  .vh-primitive-icon[data-icon="hosts"] {
439
521
  --vh-primitive-icon-motion: translateY(-1.5px);
440
522
  }
441
523
 
524
+ .vh-primitive-icon[data-icon="i18n"] {
525
+ --vh-primitive-icon-motion: translateY(-1.5px);
526
+ }
527
+
442
528
  .vh-primitive-icon[data-icon="kv"] {
443
529
  --vh-primitive-icon-motion: translateX(1.5px);
444
530
  }
445
531
 
532
+ .vh-primitive-icon[data-icon="logs"] {
533
+ --vh-primitive-icon-motion: translateX(1.5px);
534
+ }
535
+
536
+ .vh-primitive-icon[data-icon="mcp"] {
537
+ --vh-primitive-icon-motion: translateY(-1px);
538
+ }
539
+
540
+ .vh-primitive-icon[data-icon="markdown-template"] {
541
+ --vh-primitive-icon-motion: translateY(1.5px);
542
+ }
543
+
544
+ .vh-primitive-icon[data-icon="presets"] {
545
+ --vh-primitive-icon-motion: translate(-1px, -1px);
546
+ }
547
+
446
548
  .vh-primitive-icon[data-icon="queue"] {
447
549
  --vh-primitive-icon-motion: translateX(2px);
448
550
  }
449
551
 
450
552
  .vh-primitive-icon[data-icon="rate-limit"] {
451
553
  --vh-primitive-icon-motion: rotate(-70deg);
452
- --vh-primitive-icon-origin: 12px 15px;
554
+ --vh-primitive-icon-origin: 12px 16px;
453
555
  }
454
556
 
455
557
  .vh-primitive-icon[data-icon="realtime"] {
@@ -458,8 +560,11 @@
458
560
  }
459
561
 
460
562
  .vh-primitive-icon[data-icon="reference"] {
461
- --vh-primitive-icon-motion: skewY(-8deg);
462
- --vh-primitive-icon-origin: 12px 12px;
563
+ --vh-primitive-icon-motion: translateX(1.5px);
564
+ }
565
+
566
+ .vh-primitive-icon[data-icon="runtime"] {
567
+ --vh-primitive-icon-motion: scale(0.6);
463
568
  }
464
569
 
465
570
  .vh-primitive-icon[data-icon="sandbox"] {
@@ -474,13 +579,17 @@
474
579
  --vh-primitive-icon-opacity: 0;
475
580
  }
476
581
 
582
+ .vh-primitive-icon[data-icon="skills"] {
583
+ --vh-primitive-icon-motion: translateY(1.5px);
584
+ }
585
+
477
586
  .vh-primitive-icon[data-icon="source"] {
478
587
  --vh-primitive-icon-motion: translateY(1.5px);
479
588
  }
480
589
 
481
590
  .vh-primitive-icon[data-icon="start"] {
482
591
  --vh-primitive-icon-motion: skewY(-10deg);
483
- --vh-primitive-icon-origin: 6px 8px;
592
+ --vh-primitive-icon-origin: 5px 8.5px;
484
593
  }
485
594
 
486
595
  .vh-primitive-icon[data-icon="ui"] {
@@ -489,7 +598,15 @@
489
598
 
490
599
  .vh-primitive-icon[data-icon="usage"] {
491
600
  --vh-primitive-icon-motion: scaleY(0.75);
492
- --vh-primitive-icon-origin: 12px 16px;
601
+ --vh-primitive-icon-origin: 12px 17px;
602
+ }
603
+
604
+ .vh-primitive-icon[data-icon="web-container"] {
605
+ --vh-primitive-icon-motion: translateY(-1px);
606
+ }
607
+
608
+ .vh-primitive-icon[data-icon="webhooks"] {
609
+ --vh-primitive-icon-motion: translate(1px, -1px);
493
610
  }
494
611
 
495
612
  .vh-primitive-icon[data-icon="workflow"] {
@@ -500,6 +617,27 @@
500
617
  --vh-primitive-icon-motion: translateY(-1px);
501
618
  }
502
619
 
620
+ /* A picture's Remove button in a comment box is a 20px round badge in the inverted color, as in Drop. The button is a
621
+ Nuxt UI button, so this rule stays outside a layer to win over its classes. */
622
+ [data-slot="comment-composer"] [data-slot="attachment"]:has(> [data-slot="attachment-media"][data-variant="image"]) [data-slot="attachment-actions"] > button {
623
+ background: var(--vh-highlighted);
624
+ border: 0;
625
+ border-radius: 9999px;
626
+ box-shadow: 0 1px 3px color-mix(in oklab, var(--vh-highlighted) 10%, transparent), 0 1px 2px -1px color-mix(in oklab, var(--vh-highlighted) 10%, transparent);
627
+ color: var(--vh-inverted);
628
+ display: grid;
629
+ height: 1.25rem;
630
+ min-width: 0;
631
+ padding: 0;
632
+ place-items: center;
633
+ width: 1.25rem;
634
+
635
+ & :is(svg, .iconify) {
636
+ height: 0.75rem;
637
+ width: 0.75rem;
638
+ }
639
+ }
640
+
503
641
  /*
504
642
  * shadcn/ui agentic parts: Message, Bubble, Marker, Trace, and Attachment.
505
643
  * These rules translate the default classes of https://ui.shadcn.com/docs/components/trace and its siblings to Nuxt UI tokens:
@@ -536,7 +674,7 @@
536
674
  [data-slot="message-avatar"] {
537
675
  align-items: center;
538
676
  align-self: flex-end;
539
- background: var(--vh-ui-bg-elevated);
677
+ background: var(--vh-bg-elevated);
540
678
  border-radius: 9999px;
541
679
  display: flex;
542
680
  flex-shrink: 0;
@@ -565,7 +703,7 @@
565
703
 
566
704
  :is([data-slot="message-header"], [data-slot="message-footer"]) {
567
705
  align-items: center;
568
- color: var(--vh-ui-muted);
706
+ color: var(--vh-muted);
569
707
  display: flex;
570
708
  font-size: 0.75rem;
571
709
  font-weight: 500;
@@ -606,7 +744,7 @@
606
744
 
607
745
  [data-slot="bubble-content"] {
608
746
  border: 1px solid transparent;
609
- border-radius: calc(var(--vh-ui-radius) * 1.5);
747
+ border-radius: calc(var(--vh-radius) * 1.5);
610
748
  font-size: 0.875rem;
611
749
  line-height: 1.625;
612
750
  max-width: 100%;
@@ -625,58 +763,52 @@
625
763
  color: inherit;
626
764
  cursor: pointer;
627
765
  font: inherit;
628
- outline: none;
629
766
  text-align: left;
630
767
  text-decoration: none;
631
768
  transition: background-color 150ms, color 150ms;
632
769
  }
633
770
 
634
- :is(a, button)[data-slot="bubble-content"]:focus-visible {
635
- border-color: var(--vh-ui-primary);
636
- box-shadow: 0 0 0 3px var(--vh-ui-ring);
637
- }
638
-
639
771
  [data-slot="bubble"][data-variant="default"] > [data-slot="bubble-content"] {
640
- background: var(--vh-ui-primary);
641
- color: var(--vh-ui-inverted);
772
+ background: var(--vh-primary);
773
+ color: var(--vh-inverted);
642
774
  }
643
775
 
644
776
  /* Hover colors apply only where a pointer can hover, so a tap on a touch screen does not leave them on, as on the primitive rail. */
645
777
  @media (hover: hover) {
646
778
  [data-slot="bubble"][data-variant="default"] > :is(a, button)[data-slot="bubble-content"]:hover {
647
- background: color-mix(in oklab, var(--vh-ui-primary) 80%, transparent);
779
+ background: color-mix(in oklab, var(--vh-primary) 80%, transparent);
648
780
  }
649
781
  }
650
782
 
651
783
  [data-slot="bubble"][data-variant="secondary"] > [data-slot="bubble-content"] {
652
- background: var(--vh-ui-bg-elevated);
653
- color: var(--vh-ui-highlighted);
784
+ background: var(--vh-bg-elevated);
785
+ color: var(--vh-highlighted);
654
786
  }
655
787
 
656
788
  [data-slot="bubble"][data-variant="muted"] > [data-slot="bubble-content"] {
657
- background: var(--vh-ui-bg-muted);
789
+ background: var(--vh-bg-muted);
658
790
  }
659
791
 
660
792
  @media (hover: hover) {
661
793
  [data-slot="bubble"]:is([data-variant="secondary"], [data-variant="muted"]) > :is(a, button)[data-slot="bubble-content"]:hover {
662
- background: color-mix(in oklab, var(--vh-ui-bg-elevated), var(--vh-ui-highlighted) 5%);
794
+ background: color-mix(in oklab, var(--vh-bg-elevated), var(--vh-highlighted) 5%);
663
795
  }
664
796
  }
665
797
 
666
798
  [data-slot="bubble"][data-variant="tinted"] > [data-slot="bubble-content"] {
667
- background: color-mix(in oklab, var(--vh-ui-primary) 14%, var(--vh-ui-bg));
668
- color: var(--vh-ui-highlighted);
799
+ background: color-mix(in oklab, var(--vh-primary) 14%, var(--vh-bg));
800
+ color: var(--vh-highlighted);
669
801
  }
670
802
 
671
803
  @media (hover: hover) {
672
804
  [data-slot="bubble"][data-variant="tinted"] > :is(a, button)[data-slot="bubble-content"]:hover {
673
- background: color-mix(in oklab, var(--vh-ui-primary) 22%, var(--vh-ui-bg));
805
+ background: color-mix(in oklab, var(--vh-primary) 22%, var(--vh-bg));
674
806
  }
675
807
  }
676
808
 
677
809
  [data-slot="bubble"][data-variant="outline"] > [data-slot="bubble-content"] {
678
- background: var(--vh-ui-bg);
679
- border-color: var(--vh-ui-border);
810
+ background: var(--vh-bg);
811
+ border-color: var(--vh-border);
680
812
  }
681
813
 
682
814
  [data-slot="bubble"][data-variant="ghost"] > [data-slot="bubble-content"] {
@@ -688,27 +820,27 @@
688
820
 
689
821
  @media (hover: hover) {
690
822
  [data-slot="bubble"]:is([data-variant="outline"], [data-variant="ghost"]) > :is(a, button)[data-slot="bubble-content"]:hover {
691
- background: var(--vh-ui-bg-elevated);
692
- color: var(--vh-ui-highlighted);
823
+ background: var(--vh-bg-elevated);
824
+ color: var(--vh-highlighted);
693
825
  }
694
826
  }
695
827
 
696
828
  [data-slot="bubble"][data-variant="destructive"] > [data-slot="bubble-content"] {
697
- background: color-mix(in oklab, var(--vh-ui-error) 12%, transparent);
698
- color: var(--vh-ui-error);
829
+ background: color-mix(in oklab, var(--vh-error) 12%, transparent);
830
+ color: var(--vh-error);
699
831
  }
700
832
 
701
833
  @media (hover: hover) {
702
834
  [data-slot="bubble"][data-variant="destructive"] > :is(a, button)[data-slot="bubble-content"]:hover {
703
- background: color-mix(in oklab, var(--vh-ui-error) 20%, transparent);
835
+ background: color-mix(in oklab, var(--vh-error) 20%, transparent);
704
836
  }
705
837
  }
706
838
 
707
839
  [data-slot="bubble-reactions"] {
708
840
  align-items: center;
709
- background: var(--vh-ui-bg-elevated);
841
+ background: var(--vh-bg-elevated);
710
842
  border-radius: 9999px;
711
- box-shadow: 0 0 0 3px var(--vh-ui-bg);
843
+ box-shadow: 0 0 0 3px var(--vh-bg);
712
844
  display: flex;
713
845
  flex-shrink: 0;
714
846
  font-size: 0.875rem;
@@ -746,7 +878,7 @@
746
878
 
747
879
  [data-slot="marker"] {
748
880
  align-items: center;
749
- color: var(--vh-ui-muted);
881
+ color: var(--vh-muted);
750
882
  display: flex;
751
883
  font-size: 0.875rem;
752
884
  gap: 0.5rem;
@@ -772,13 +904,13 @@
772
904
 
773
905
  @media (hover: hover) {
774
906
  :is(a[data-slot="marker"], [data-slot="marker-content"] > a):hover {
775
- color: var(--vh-ui-highlighted);
907
+ color: var(--vh-highlighted);
776
908
  }
777
909
  }
778
910
 
779
911
  [data-slot="marker"][data-variant="separator"]::before,
780
912
  [data-slot="marker"][data-variant="separator"]::after {
781
- background: var(--vh-ui-border);
913
+ background: var(--vh-border);
782
914
  content: "";
783
915
  flex: 1;
784
916
  height: 1px;
@@ -794,7 +926,7 @@
794
926
  }
795
927
 
796
928
  [data-slot="marker"][data-variant="border"] {
797
- border-bottom: 1px solid var(--vh-ui-border);
929
+ border-bottom: 1px solid var(--vh-border);
798
930
  padding-bottom: 0.5rem;
799
931
  }
800
932
 
@@ -819,22 +951,17 @@
819
951
  }
820
952
 
821
953
  [data-slot="trace"] > :has(> [data-slot="trace-line"]) {
822
- border-radius: calc(var(--vh-ui-radius) * 0.75);
954
+ border-radius: calc(var(--vh-radius) * 0.75);
823
955
  display: flex;
824
956
  max-width: 100%;
825
957
  min-width: 0;
826
- outline: none;
827
958
  text-align: left;
828
959
  width: fit-content;
829
960
  }
830
961
 
831
- [data-slot="trace"] > :has(> [data-slot="trace-line"]):focus-visible {
832
- box-shadow: 0 0 0 3px var(--vh-ui-ring);
833
- }
834
-
835
962
  [data-slot="trace-line"] {
836
963
  align-items: center;
837
- color: var(--vh-ui-muted);
964
+ color: var(--vh-muted);
838
965
  display: flex;
839
966
  font-size: 0.875rem;
840
967
  gap: 0.5rem;
@@ -851,13 +978,13 @@
851
978
 
852
979
  @media (hover: hover) {
853
980
  :is(a, button):hover [data-slot="trace-line"] {
854
- color: var(--vh-ui-highlighted);
981
+ color: var(--vh-highlighted);
855
982
  }
856
983
  }
857
984
 
858
985
  [data-slot="trace-line"][data-status="error"],
859
986
  :is(a, button):hover [data-slot="trace-line"][data-status="error"] {
860
- color: var(--vh-ui-error);
987
+ color: var(--vh-error);
861
988
  }
862
989
 
863
990
  [data-slot="trace-line"][data-status="pending"] {
@@ -894,7 +1021,7 @@
894
1021
  }
895
1022
 
896
1023
  [data-slot="trace-description"] {
897
- color: color-mix(in oklab, var(--vh-ui-muted) 70%, transparent);
1024
+ color: color-mix(in oklab, var(--vh-muted) 70%, transparent);
898
1025
  flex-shrink: 0;
899
1026
  font-variant-numeric: tabular-nums;
900
1027
  }
@@ -910,15 +1037,14 @@
910
1037
  align-items: center;
911
1038
  background: transparent;
912
1039
  border: 0;
913
- border-radius: calc(var(--vh-ui-radius) * 0.75);
914
- color: var(--vh-ui-muted);
1040
+ border-radius: calc(var(--vh-radius) * 0.75);
1041
+ color: var(--vh-muted);
915
1042
  cursor: pointer;
916
1043
  display: flex;
917
1044
  font: inherit;
918
1045
  gap: 0.25rem;
919
1046
  max-width: 100%;
920
1047
  min-width: 0;
921
- outline: none;
922
1048
  padding: 0;
923
1049
  text-align: left;
924
1050
  transition: color 150ms;
@@ -927,16 +1053,12 @@
927
1053
 
928
1054
  @media (hover: hover) {
929
1055
  [data-slot="trace-collapsible-trigger"]:hover {
930
- color: var(--vh-ui-highlighted);
1056
+ color: var(--vh-highlighted);
931
1057
  }
932
1058
  }
933
1059
 
934
- [data-slot="trace-collapsible-trigger"]:focus-visible {
935
- box-shadow: 0 0 0 3px var(--vh-ui-ring);
936
- }
937
-
938
1060
  [data-slot="trace-collapsible-trigger"]:has([data-status="error"]) {
939
- color: var(--vh-ui-error);
1061
+ color: var(--vh-error);
940
1062
  }
941
1063
 
942
1064
  [data-trace-chevron] svg {
@@ -954,11 +1076,11 @@
954
1076
  overflow: hidden;
955
1077
  }
956
1078
 
957
- [data-slot="trace-collapsible-content"][data-state="open"] {
1079
+ [data-slot="trace-collapsible-content"][data-open] {
958
1080
  animation: vh-trace-open 200ms ease-out;
959
1081
  }
960
1082
 
961
- [data-slot="trace-collapsible-content"][data-state="closed"] {
1083
+ [data-slot="trace-collapsible-content"][data-closed] {
962
1084
  animation: vh-trace-close 200ms ease-out;
963
1085
  }
964
1086
 
@@ -967,13 +1089,13 @@
967
1089
  height: 0;
968
1090
  }
969
1091
  to {
970
- height: var(--reka-collapsible-content-height);
1092
+ height: var(--collapsible-panel-height);
971
1093
  }
972
1094
  }
973
1095
 
974
1096
  @keyframes vh-trace-close {
975
1097
  from {
976
- height: var(--reka-collapsible-content-height);
1098
+ height: var(--collapsible-panel-height);
977
1099
  }
978
1100
  to {
979
1101
  height: 0;
@@ -987,8 +1109,8 @@
987
1109
  }
988
1110
 
989
1111
  [data-slot="trace-collapsible-content-inner"] {
990
- border-left: 1px solid var(--vh-ui-border);
991
- color: var(--vh-ui-muted);
1112
+ border-left: 1px solid var(--vh-border);
1113
+ color: var(--vh-muted);
992
1114
  line-height: 1.625;
993
1115
  margin: 0.5rem 0 0.25rem calc(0.5rem - 1px);
994
1116
  min-width: 0;
@@ -1000,10 +1122,10 @@
1000
1122
  /* Attachment */
1001
1123
 
1002
1124
  [data-slot="attachment"] {
1003
- background: var(--vh-ui-bg);
1004
- border: 1px solid var(--vh-ui-border);
1005
- border-radius: calc(var(--vh-ui-radius) * 1.5);
1006
- color: var(--vh-ui-text);
1125
+ background: var(--vh-bg);
1126
+ border: 1px solid var(--vh-border);
1127
+ border-radius: calc(var(--vh-radius) * 1.5);
1128
+ color: var(--vh-text);
1007
1129
  display: flex;
1008
1130
  flex-shrink: 0;
1009
1131
  flex-wrap: wrap;
@@ -1014,17 +1136,12 @@
1014
1136
  width: fit-content;
1015
1137
  }
1016
1138
 
1017
- /* The trigger covers the attachment and hides its own outline, so the attachment shows the ring of the other parts. */
1018
- [data-slot="attachment"]:has([data-slot="attachment-trigger"]:focus-visible) {
1019
- box-shadow: 0 0 0 3px var(--vh-ui-ring);
1020
- }
1021
-
1022
1139
  [data-slot="attachment"]:has(> a, > button):hover {
1023
- background: color-mix(in oklab, var(--vh-ui-bg-elevated) 50%, var(--vh-ui-bg));
1140
+ background: color-mix(in oklab, var(--vh-bg-elevated) 50%, var(--vh-bg));
1024
1141
  }
1025
1142
 
1026
1143
  [data-slot="attachment"][data-state="error"] {
1027
- border-color: color-mix(in oklab, var(--vh-ui-error) 30%, transparent);
1144
+ border-color: color-mix(in oklab, var(--vh-error) 30%, transparent);
1028
1145
  }
1029
1146
 
1030
1147
  [data-slot="attachment"][data-state="idle"] {
@@ -1060,7 +1177,7 @@
1060
1177
  }
1061
1178
 
1062
1179
  [data-slot="attachment"][data-size="xs"] {
1063
- border-radius: var(--vh-ui-radius);
1180
+ border-radius: var(--vh-radius);
1064
1181
  font-size: 0.75rem;
1065
1182
  gap: 0.375rem;
1066
1183
  line-height: 1rem;
@@ -1091,9 +1208,9 @@
1091
1208
  [data-slot="attachment-media"] {
1092
1209
  align-items: center;
1093
1210
  aspect-ratio: 1;
1094
- background: var(--vh-ui-bg-elevated);
1095
- border-radius: var(--vh-ui-radius);
1096
- color: var(--vh-ui-highlighted);
1211
+ background: var(--vh-bg-elevated);
1212
+ border-radius: var(--vh-radius);
1213
+ color: var(--vh-highlighted);
1097
1214
  display: flex;
1098
1215
  flex-shrink: 0;
1099
1216
  justify-content: center;
@@ -1111,13 +1228,13 @@
1111
1228
  }
1112
1229
 
1113
1230
  [data-slot="attachment"][data-size="xs"] [data-slot="attachment-media"] {
1114
- border-radius: calc(var(--vh-ui-radius) * 0.75);
1231
+ border-radius: calc(var(--vh-radius) * 0.75);
1115
1232
  width: 1.75rem;
1116
1233
  }
1117
1234
 
1118
1235
  [data-slot="attachment"][data-state="error"] [data-slot="attachment-media"] {
1119
- background: color-mix(in oklab, var(--vh-ui-error) 10%, transparent);
1120
- color: var(--vh-ui-error);
1236
+ background: color-mix(in oklab, var(--vh-error) 10%, transparent);
1237
+ color: var(--vh-error);
1121
1238
  }
1122
1239
 
1123
1240
  [data-slot="attachment-media"] svg {
@@ -1175,7 +1292,7 @@
1175
1292
  }
1176
1293
 
1177
1294
  [data-slot="attachment-description"] {
1178
- color: var(--vh-ui-muted);
1295
+ color: var(--vh-muted);
1179
1296
  display: block;
1180
1297
  font-size: 0.75rem;
1181
1298
  line-height: 1rem;
@@ -1188,7 +1305,7 @@
1188
1305
  }
1189
1306
 
1190
1307
  [data-slot="attachment"][data-state="error"] [data-slot="attachment-description"] {
1191
- color: color-mix(in oklab, var(--vh-ui-error) 80%, transparent);
1308
+ color: color-mix(in oklab, var(--vh-error) 80%, transparent);
1192
1309
  }
1193
1310
 
1194
1311
  [data-slot="attachment-actions"] {
@@ -1212,7 +1329,6 @@
1212
1329
  border-radius: inherit;
1213
1330
  cursor: pointer;
1214
1331
  inset: 0;
1215
- outline: none;
1216
1332
  padding: 0;
1217
1333
  position: absolute;
1218
1334
  z-index: 10;
@@ -1241,9 +1357,9 @@
1241
1357
  /* Code Block */
1242
1358
 
1243
1359
  [data-slot="code-block"] {
1244
- border: 1px solid var(--vh-ui-border);
1245
- border-radius: var(--vh-ui-radius);
1246
- color: var(--vh-ui-highlighted);
1360
+ border: 1px solid var(--vh-border);
1361
+ border-radius: var(--vh-radius);
1362
+ color: var(--vh-highlighted);
1247
1363
  display: flex;
1248
1364
  flex-direction: column;
1249
1365
  font-size: 0.875rem;
@@ -1255,12 +1371,7 @@
1255
1371
  }
1256
1372
 
1257
1373
  :root.dark [data-slot="code-block"] {
1258
- background: color-mix(in oklab, var(--vh-ui-bg-elevated) 40%, transparent);
1259
- }
1260
-
1261
- [data-slot="code-block"]:has(> [data-slot="code-block-content"]:focus-visible) {
1262
- border-color: var(--vh-ui-primary);
1263
- box-shadow: 0 0 0 3px var(--vh-ui-ring);
1374
+ background: color-mix(in oklab, var(--vh-bg-elevated) 40%, transparent);
1264
1375
  }
1265
1376
 
1266
1377
  [data-slot="code-block"][data-size="sm"] {
@@ -1269,14 +1380,14 @@
1269
1380
  }
1270
1381
 
1271
1382
  [data-slot="code-block"][data-variant="destructive"] {
1272
- border-color: color-mix(in oklab, var(--vh-ui-error) 30%, transparent);
1273
- color: var(--vh-ui-error);
1383
+ border-color: color-mix(in oklab, var(--vh-error) 30%, transparent);
1384
+ color: var(--vh-error);
1274
1385
  }
1275
1386
 
1276
1387
  [data-slot="code-block-header"],
1277
1388
  [data-slot="code-block-footer"] {
1278
1389
  align-items: center;
1279
- color: var(--vh-ui-muted);
1390
+ color: var(--vh-muted);
1280
1391
  display: flex;
1281
1392
  flex-shrink: 0;
1282
1393
  gap: 0.5rem;
@@ -1305,11 +1416,11 @@
1305
1416
  }
1306
1417
 
1307
1418
  [data-slot="code-block"][data-variant="destructive"] :is([data-slot="code-block-header"], [data-slot="code-block-title"]) {
1308
- color: var(--vh-ui-error);
1419
+ color: var(--vh-error);
1309
1420
  }
1310
1421
 
1311
1422
  [data-slot="code-block-title"] {
1312
- color: var(--vh-ui-highlighted);
1423
+ color: var(--vh-highlighted);
1313
1424
  font-family: var(--font-sans, inherit);
1314
1425
  font-size: 0.875rem;
1315
1426
  font-weight: 500;
@@ -1372,17 +1483,8 @@
1372
1483
  }
1373
1484
 
1374
1485
  [data-slot="code-block"] > [data-slot="code-block-actions"] > button {
1375
- background: var(--vh-ui-bg);
1376
- box-shadow: 0 0 0 1px color-mix(in oklab, var(--vh-ui-highlighted) 10%, transparent);
1377
- }
1378
-
1379
- [data-slot="code-block-copy-status"] {
1380
- clip-path: inset(50%);
1381
- height: 1px;
1382
- overflow: hidden;
1383
- position: absolute;
1384
- white-space: nowrap;
1385
- width: 1px;
1486
+ background: var(--vh-bg);
1487
+ box-shadow: 0 0 0 1px color-mix(in oklab, var(--vh-highlighted) 10%, transparent);
1386
1488
  }
1387
1489
 
1388
1490
  [data-slot="code-block-content"] {
@@ -1391,7 +1493,6 @@
1391
1493
  margin: 0;
1392
1494
  min-height: 0;
1393
1495
  min-width: 0;
1394
- outline: none;
1395
1496
  overflow: auto;
1396
1497
  padding: 0.75rem;
1397
1498
  scrollbar-width: thin;
@@ -1452,13 +1553,13 @@
1452
1553
  }
1453
1554
 
1454
1555
  [data-slot="code-block-line"]::before {
1455
- color: var(--vh-ui-muted);
1556
+ color: var(--vh-muted);
1456
1557
  min-width: 1.5rem;
1457
1558
  text-align: end;
1458
1559
  }
1459
1560
 
1460
1561
  [data-slot="code-block-line"]::after {
1461
- color: var(--vh-ui-muted);
1562
+ color: var(--vh-muted);
1462
1563
  left: 0.25rem;
1463
1564
  position: absolute;
1464
1565
  top: 0;
@@ -1480,7 +1581,7 @@
1480
1581
  }
1481
1582
 
1482
1583
  [data-slot="code-block-line"]:is([data-variant="added"], [data-variant="highlighted"]) {
1483
- background: var(--vh-ui-bg-elevated);
1584
+ background: var(--vh-bg-elevated);
1484
1585
  }
1485
1586
 
1486
1587
  [data-slot="code-block-line"][data-variant="added"]::after {
@@ -1488,11 +1589,11 @@
1488
1589
  }
1489
1590
 
1490
1591
  [data-slot="code-block-line"][data-variant="removed"] {
1491
- background: color-mix(in oklab, var(--vh-ui-error) 10%, transparent);
1592
+ background: color-mix(in oklab, var(--vh-error) 10%, transparent);
1492
1593
  }
1493
1594
 
1494
1595
  [data-slot="code-block-line"][data-variant="removed"]::after {
1495
- color: var(--vh-ui-error);
1596
+ color: var(--vh-error);
1496
1597
  content: "−";
1497
1598
  }
1498
1599
 
@@ -1547,11 +1648,11 @@
1547
1648
 
1548
1649
  [data-slot="message-scroller-button"] {
1549
1650
  align-items: center;
1550
- background: var(--vh-ui-bg);
1551
- border: 1px solid var(--vh-ui-border);
1552
- border-radius: var(--vh-ui-radius);
1651
+ background: var(--vh-bg);
1652
+ border: 1px solid var(--vh-border);
1653
+ border-radius: var(--vh-radius);
1553
1654
  bottom: 1rem;
1554
- color: var(--vh-ui-highlighted);
1655
+ color: var(--vh-highlighted);
1555
1656
  cursor: pointer;
1556
1657
  display: flex;
1557
1658
  height: 2rem;
@@ -1565,15 +1666,10 @@
1565
1666
 
1566
1667
  @media (hover: hover) {
1567
1668
  [data-slot="message-scroller-button"]:hover {
1568
- background: var(--vh-ui-bg-elevated);
1669
+ background: var(--vh-bg-elevated);
1569
1670
  }
1570
1671
  }
1571
1672
 
1572
- [data-slot="message-scroller-button"]:focus-visible {
1573
- box-shadow: 0 0 0 3px var(--vh-ui-ring);
1574
- outline: none;
1575
- }
1576
-
1577
1673
  [data-slot="message-scroller-button"][hidden] {
1578
1674
  display: none;
1579
1675
  }
@@ -1586,18 +1682,12 @@
1586
1682
  }
1587
1683
 
1588
1684
  [data-slot="prompt-input-group"] {
1589
- background: var(--vh-ui-bg);
1590
- border: 1px solid var(--vh-ui-border);
1591
- border-radius: calc(var(--vh-ui-radius) * 2);
1685
+ background: var(--vh-bg);
1686
+ border: 1px solid var(--vh-border);
1687
+ border-radius: calc(var(--vh-radius) * 2);
1592
1688
  display: flex;
1593
1689
  flex-direction: column;
1594
1690
  min-width: 0;
1595
- transition: border-color 150ms ease, box-shadow 150ms ease;
1596
- }
1597
-
1598
- [data-slot="prompt-input-group"]:has([data-slot="prompt-input-textarea"]:focus-visible) {
1599
- border-color: color-mix(in oklab, var(--vh-ui-highlighted) 28%, transparent);
1600
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--vh-ui-highlighted) 6%, transparent);
1601
1691
  }
1602
1692
 
1603
1693
  [data-slot="prompt-input-attachments"] {
@@ -1607,14 +1697,13 @@
1607
1697
  [data-slot="prompt-input-textarea"] {
1608
1698
  background: transparent;
1609
1699
  border: 0;
1610
- color: var(--vh-ui-highlighted);
1700
+ color: var(--vh-highlighted);
1611
1701
  field-sizing: content;
1612
1702
  font: inherit;
1613
1703
  font-size: 0.875rem;
1614
1704
  line-height: 1.5rem;
1615
1705
  max-height: 12rem;
1616
1706
  min-height: 3.5rem;
1617
- outline: none;
1618
1707
  padding: 0.75rem 0.875rem 0.25rem;
1619
1708
  resize: none;
1620
1709
  width: 100%;
@@ -1628,7 +1717,7 @@
1628
1717
  }
1629
1718
 
1630
1719
  [data-slot="prompt-input-textarea"]::placeholder {
1631
- color: var(--vh-ui-muted);
1720
+ color: var(--vh-muted);
1632
1721
  }
1633
1722
 
1634
1723
  [data-slot="prompt-input-toolbar"] {
@@ -1642,6 +1731,38 @@
1642
1731
  [data-slot="prompt-input-spacer"] {
1643
1732
  flex: 1;
1644
1733
  }
1734
+
1735
+ [data-slot="prompt-input-toolbar"] button:active:not(:disabled) {
1736
+ scale: 0.96;
1737
+ }
1738
+
1739
+ /* On a phone the Send button sends, so it gets a 48px target around its 32px circle without a larger circle. */
1740
+ @media (pointer: coarse) {
1741
+ [data-slot="prompt-input-toolbar"] button {
1742
+ position: relative;
1743
+ }
1744
+
1745
+ [data-slot="prompt-input-toolbar"] button::before {
1746
+ content: "";
1747
+ inset: -8px;
1748
+ position: absolute;
1749
+ }
1750
+ }
1751
+ }
1752
+
1753
+ /* Choices: FilterSearch puts the error under the input. */
1754
+ @layer components {
1755
+ .vh-filter-search {
1756
+ display: flex;
1757
+ flex-direction: column;
1758
+ gap: 0.375rem;
1759
+ }
1760
+
1761
+ .vh-filter-search-error {
1762
+ color: var(--vh-error);
1763
+ font-size: 0.75rem;
1764
+ line-height: 1rem;
1765
+ }
1645
1766
  }
1646
1767
 
1647
1768
  /* Collaboration: AvatarStack, ConnectionStatus, SyncStatus, and the carets of TipTap's CollaborationCaret. */
@@ -1663,10 +1784,10 @@
1663
1784
 
1664
1785
  :is([data-slot="avatar-stack-item"], [data-slot="avatar-stack-count"]) {
1665
1786
  align-items: center;
1666
- background: var(--vh-ui-bg-accented);
1787
+ background: var(--vh-bg-accented);
1667
1788
  border-radius: 9999px;
1668
- box-shadow: 0 0 0 2px var(--vh-ui-bg);
1669
- color: var(--vh-ui-highlighted);
1789
+ box-shadow: 0 0 0 2px var(--vh-bg);
1790
+ color: var(--vh-highlighted);
1670
1791
  display: inline-flex;
1671
1792
  flex: none;
1672
1793
  font-size: calc(var(--vh-avatar-size) * 0.4);
@@ -1684,13 +1805,13 @@
1684
1805
  }
1685
1806
 
1686
1807
  [data-slot="avatar-stack-count"] {
1687
- color: var(--vh-ui-muted);
1808
+ color: var(--vh-muted);
1688
1809
  font-size: calc(var(--vh-avatar-size) * 0.34);
1689
1810
  }
1690
1811
 
1691
1812
  /* The outline ring takes the person's presence color, so each face matches its caret. */
1692
1813
  [data-slot="avatar-stack"][data-variant="outline"] [data-slot="avatar-stack-item"] {
1693
- box-shadow: 0 0 0 2px var(--vh-ui-bg), 0 0 0 4px var(--vh-avatar-color, var(--vh-ui-border));
1814
+ box-shadow: 0 0 0 2px var(--vh-bg), 0 0 0 4px var(--vh-avatar-color, var(--vh-border));
1694
1815
  }
1695
1816
 
1696
1817
  [data-slot="avatar-stack"][data-variant="outline"] :is([data-slot="avatar-stack-item"], [data-slot="avatar-stack-count"]) + :is([data-slot="avatar-stack-item"], [data-slot="avatar-stack-count"]) {
@@ -1705,7 +1826,7 @@
1705
1826
 
1706
1827
  :is([data-slot="connection-status"], [data-slot="sync-status"]) {
1707
1828
  align-items: center;
1708
- color: var(--vh-ui-muted);
1829
+ color: var(--vh-muted);
1709
1830
  display: inline-flex;
1710
1831
  font-size: 0.75rem;
1711
1832
  gap: 0.375rem;
@@ -1714,7 +1835,7 @@
1714
1835
  }
1715
1836
 
1716
1837
  :is([data-slot="connection-status-indicator"], [data-slot="sync-status-indicator"]) {
1717
- background: var(--vh-ui-dimmed);
1838
+ background: var(--vh-dimmed);
1718
1839
  border-radius: 9999px;
1719
1840
  flex: none;
1720
1841
  height: 0.5rem;
@@ -1723,19 +1844,19 @@
1723
1844
  }
1724
1845
 
1725
1846
  :is([data-slot="connection-status-indicator"][data-status="connected"], [data-slot="sync-status-indicator"][data-status="synchronized"]) {
1726
- background: var(--vh-ui-success);
1847
+ background: var(--vh-success);
1727
1848
  }
1728
1849
 
1729
1850
  :is([data-slot="connection-status-indicator"][data-status="reconnecting"], [data-slot="sync-status-indicator"][data-status="synchronizing"]) {
1730
- background: var(--vh-ui-warning);
1851
+ background: var(--vh-warning);
1731
1852
  }
1732
1853
 
1733
1854
  [data-slot="sync-status-indicator"][data-status="error"] {
1734
- background: var(--vh-ui-error);
1855
+ background: var(--vh-error);
1735
1856
  }
1736
1857
 
1737
1858
  :is([data-slot="connection-status"][data-status="reconnecting"], [data-slot="sync-status"][data-status="error"]) {
1738
- color: var(--vh-ui-highlighted);
1859
+ color: var(--vh-highlighted);
1739
1860
  }
1740
1861
 
1741
1862
  /* A pending state pings, as Kibo UI's StatusIndicator does. */
@@ -1762,6 +1883,90 @@
1762
1883
  }
1763
1884
  }
1764
1885
 
1886
+ /* RelativeTime, and the time of a comment reply that renders it. Digits keep one width, so the label does not jump when the clock moves. */
1887
+ :is([data-slot="relative-time"], [data-slot="comment-reply-time"]) {
1888
+ font-variant-numeric: tabular-nums;
1889
+ }
1890
+
1891
+ /* Status: a 6px dot in the brighter status color and a label. A colored label uses the darker text shade of theme.css. */
1892
+ [data-slot="status"] {
1893
+ align-items: center;
1894
+ display: inline-flex;
1895
+ font-size: 0.75rem;
1896
+ gap: 0.375rem;
1897
+ line-height: 1rem;
1898
+ min-width: 0;
1899
+ }
1900
+
1901
+ [data-slot="status"][data-size="md"] {
1902
+ font-size: 0.875rem;
1903
+ line-height: 1.25rem;
1904
+ }
1905
+
1906
+ [data-slot="status-indicator"] {
1907
+ background: var(--vh-dimmed);
1908
+ border-radius: 9999px;
1909
+ flex: none;
1910
+ height: 0.375rem;
1911
+ position: relative;
1912
+ width: 0.375rem;
1913
+ }
1914
+
1915
+ [data-slot="status"][data-tone="success"] > [data-slot="status-indicator"] {
1916
+ background: var(--vh-success);
1917
+ }
1918
+
1919
+ [data-slot="status"][data-tone="warning"] > [data-slot="status-indicator"] {
1920
+ background: var(--vh-warning);
1921
+ }
1922
+
1923
+ [data-slot="status"][data-tone="error"] > [data-slot="status-indicator"] {
1924
+ background: var(--vh-error);
1925
+ }
1926
+
1927
+ [data-slot="status"][data-tone="info"] > [data-slot="status-indicator"] {
1928
+ background: var(--vh-info);
1929
+ }
1930
+
1931
+ [data-slot="status"][data-colored][data-tone="success"] {
1932
+ color: var(--vh-text-success, var(--vh-success));
1933
+ }
1934
+
1935
+ [data-slot="status"][data-colored][data-tone="warning"] {
1936
+ color: var(--vh-text-warning, var(--vh-warning));
1937
+ }
1938
+
1939
+ [data-slot="status"][data-colored][data-tone="error"] {
1940
+ color: var(--vh-text-error, var(--vh-error));
1941
+ }
1942
+
1943
+ [data-slot="status"][data-colored][data-tone="info"] {
1944
+ color: var(--vh-text-info, var(--vh-info));
1945
+ }
1946
+
1947
+ [data-slot="status-label"] {
1948
+ min-width: 0;
1949
+ overflow: hidden;
1950
+ text-overflow: ellipsis;
1951
+ white-space: nowrap;
1952
+ }
1953
+
1954
+ /* A live or pending status pings, as the connection dot does. */
1955
+ [data-slot="status-indicator"][data-pulse]::after {
1956
+ animation: vh-status-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
1957
+ background: inherit;
1958
+ border-radius: inherit;
1959
+ content: "";
1960
+ inset: 0;
1961
+ position: absolute;
1962
+ }
1963
+
1964
+ @media (prefers-reduced-motion: reduce) {
1965
+ [data-slot="status-indicator"][data-pulse]::after {
1966
+ animation: none;
1967
+ }
1968
+ }
1969
+
1765
1970
  /* TipTap's CollaborationCaret markup, which Realtime's RealtimeCaret also renders. The inline style sets the color. */
1766
1971
  .collaboration-carets__caret {
1767
1972
  border-inline: 1px solid;
@@ -1772,8 +1977,9 @@
1772
1977
  }
1773
1978
 
1774
1979
  .collaboration-carets__label {
1775
- border-radius: calc(var(--vh-ui-radius) * 0.5) calc(var(--vh-ui-radius) * 0.5) calc(var(--vh-ui-radius) * 0.5) 0;
1776
- color: #fff;
1980
+ border-radius: calc(var(--vh-radius) * 0.5) calc(var(--vh-radius) * 0.5) calc(var(--vh-radius) * 0.5) 0;
1981
+ /* The label fill is the person's color. Its text is inverted, as on a solid Nuxt UI badge. */
1982
+ color: var(--vh-inverted);
1777
1983
  font-size: 0.75rem;
1778
1984
  font-style: normal;
1779
1985
  font-weight: 600;
@@ -1807,96 +2013,264 @@
1807
2013
  position: absolute;
1808
2014
  }
1809
2015
 
1810
- [data-slot="comment-layer-item"] {
2016
+ /* The look of the area that a drag in comment mode draws, and of its corners, is in comment-marks.css. */
2017
+ [data-slot="comment-layer-area-size"] {
2018
+ background: color-mix(in oklab, var(--vh-comment-mark), black 10%);
2019
+ border-radius: 0.25rem;
2020
+ color: var(--vh-on-media, white);
2021
+ font: 500 0.6875rem/1rem ui-monospace, SFMono-Regular, Menlo, monospace;
2022
+ font-variant-numeric: tabular-nums;
2023
+ left: -2px;
2024
+ padding: 0.0625rem 0.3125rem;
2025
+ position: absolute;
2026
+ top: calc(100% + 0.375rem);
2027
+ white-space: nowrap;
2028
+ }
2029
+
2030
+ /* Margin placement: a column of cards on the right edge, each level with its pin. Opening one shows its thread there. */
2031
+ [data-slot="comment-margin"] {
1811
2032
  pointer-events: none;
1812
2033
  position: absolute;
2034
+ right: 1rem;
2035
+ top: 0;
2036
+ width: 18rem;
1813
2037
  }
1814
2038
 
1815
- [data-slot="comment-layer-item"] > * {
2039
+ [data-slot="comment-margin-card"] {
2040
+ background: var(--vh-bg);
2041
+ border: 0;
2042
+ border-radius: calc(var(--vh-radius) * 1.5);
2043
+ box-shadow: var(--vh-shadow-floating, 0 0 0 1px var(--vh-border));
2044
+ box-sizing: border-box;
2045
+ color: var(--vh-text);
2046
+ font: inherit;
2047
+ font-size: 0.875rem;
2048
+ left: 0;
1816
2049
  pointer-events: auto;
2050
+ position: absolute;
2051
+ right: 0;
2052
+ text-align: start;
2053
+ transition: top 160ms ease;
1817
2054
  }
1818
2055
 
1819
- [data-slot="comment-pin"] {
1820
- align-items: center;
1821
- background: var(--vh-ui-primary);
1822
- border: 2px solid var(--vh-ui-bg);
1823
- border-radius: 9999px 9999px 9999px 0;
1824
- box-shadow: 0 1px 4px rgb(0 0 0 / 0.3);
1825
- color: var(--vh-ui-inverted);
2056
+ button[data-slot="comment-margin-card"] {
2057
+ align-items: flex-start;
1826
2058
  cursor: pointer;
1827
- display: grid;
1828
- height: 2rem;
1829
- padding: 0;
1830
- place-items: center;
1831
- position: absolute;
1832
- transform: translateY(-100%);
1833
- transform-origin: bottom left;
1834
- transition: scale 120ms ease;
1835
- width: 2rem;
2059
+ display: flex;
2060
+ gap: 0.5rem;
2061
+ padding: 0.625rem 0.75rem;
1836
2062
  }
1837
2063
 
1838
- [data-slot="comment-pin"]:is(:hover, :focus-visible, [data-active="true"]) {
1839
- scale: 1.1;
2064
+ button[data-slot="comment-margin-card"]:hover {
2065
+ background: var(--vh-bg-elevated);
1840
2066
  }
1841
2067
 
1842
- [data-slot="comment-pin"]:focus-visible {
1843
- outline: 2px solid var(--vh-ui-ring);
1844
- outline-offset: 2px;
2068
+ button[data-slot="comment-margin-card"][data-status="resolved"] {
2069
+ opacity: 0.65;
1845
2070
  }
1846
2071
 
1847
- [data-slot="comment-pin"] [data-slot="avatar-stack"] {
1848
- --vh-avatar-size: 1.625rem;
2072
+ /* The open thread and the new comment's box in the margin: the layer's own card, fixed to the right edge at its top. */
2073
+ [data-slot="comment-layer-item"] > [data-slot="comment-layer-popover"][data-margin="true"][data-margin-key] {
2074
+ bottom: auto;
2075
+ left: auto;
2076
+ position: fixed;
2077
+ right: 1rem;
2078
+ transition: top 160ms ease;
2079
+ width: 18rem;
2080
+ z-index: 1;
1849
2081
  }
1850
2082
 
1851
- [data-slot="comment-pin"] [data-slot="avatar-stack-item"] {
1852
- border-radius: inherit;
1853
- box-shadow: none;
2083
+ /* A long thread in the margin keeps inside the screen: its messages scroll, and the reply box stays in view. */
2084
+ [data-slot="comment-layer-popover"][data-margin="true"][data-margin-key] {
2085
+ display: flex;
2086
+ flex-direction: column;
2087
+ max-height: calc(100dvh - 2rem);
1854
2088
  }
1855
2089
 
1856
- [data-slot="comment-pin-number"] {
1857
- background: var(--vh-ui-highlighted);
1858
- border-radius: 9999px;
1859
- color: var(--vh-ui-inverted);
1860
- font-size: 0.625rem;
1861
- font-weight: 600;
1862
- line-height: 1;
1863
- min-width: 1rem;
1864
- padding: 0.15rem 0.25rem;
1865
- position: absolute;
1866
- right: -0.4rem;
1867
- text-align: center;
1868
- top: -0.4rem;
2090
+ [data-slot="comment-layer-popover"][data-margin="true"] > [data-slot="comment-thread"] {
2091
+ display: flex;
2092
+ flex: 1 1 auto;
2093
+ flex-direction: column;
2094
+ min-height: 0;
1869
2095
  }
1870
2096
 
1871
- [data-slot="comment-pin"][data-status="resolved"] {
1872
- filter: grayscale(1);
1873
- opacity: 0.6;
2097
+ [data-slot="comment-layer-popover"][data-margin="true"] [data-slot="comment-thread-messages"] {
2098
+ flex: 1 1 auto;
2099
+ max-height: none;
2100
+ min-height: 0;
1874
2101
  }
1875
2102
 
1876
- [data-slot="comment-pin"][data-draft="true"] {
1877
- outline: 2px dashed var(--vh-ui-primary);
1878
- outline-offset: 2px;
2103
+ [data-slot="comment-margin-card"] [data-slot="comment-list-text"] {
2104
+ -webkit-line-clamp: 3;
1879
2105
  }
1880
2106
 
1881
- [data-slot="comment-layer-popover"] {
1882
- background: var(--vh-ui-bg);
1883
- border: 1px solid var(--vh-ui-border);
1884
- border-radius: calc(var(--vh-ui-radius) * 1.5);
1885
- box-shadow: 0 8px 24px rgb(0 0 0 / 0.16);
1886
- color: var(--vh-ui-text);
1887
- font-size: 0.875rem;
1888
- left: 0.5rem;
1889
- max-height: min(32rem, calc(100dvh - 2rem));
1890
- max-width: calc(100vw - 1rem);
1891
- overflow-y: auto;
2107
+ @media (prefers-reduced-motion: reduce) {
2108
+ [data-slot="comment-margin-card"], [data-slot="comment-layer-popover"][data-margin="true"] { transition: none; }
2109
+ }
2110
+
2111
+ [data-slot="comment-layer-item"] {
2112
+ pointer-events: none;
2113
+ position: absolute;
2114
+ }
2115
+
2116
+ [data-slot="comment-layer-item"] > * {
2117
+ pointer-events: auto;
2118
+ }
2119
+
2120
+ /* The pin's look is Drop's, in comment-marks.css. Here its bottom-left corner sits on the spot. */
2121
+ [data-slot="comment-pin"] {
2122
+ transform: translateY(-100%);
2123
+ }
2124
+
2125
+ [data-slot="comment-pin"] [data-slot="avatar-stack"] {
2126
+ --vh-avatar-size: var(--vh-comment-pin-size);
2127
+ border-radius: inherit;
2128
+ }
2129
+
2130
+ /* Initials sit on the pin's own color, so they show without the app's theme colors. */
2131
+ [data-slot="comment-pin"] [data-slot="avatar-stack-item"] {
2132
+ background: none;
2133
+ border-radius: inherit;
2134
+ box-shadow: none;
2135
+ color: inherit;
2136
+ font-size: inherit;
2137
+ font-weight: inherit;
2138
+ }
2139
+
2140
+ [data-slot="comment-pin-number"] {
2141
+ background: var(--vh-highlighted);
2142
+ border-radius: 9999px;
2143
+ color: var(--vh-inverted);
2144
+ font-size: 0.625rem;
2145
+ font-weight: 600;
2146
+ line-height: 1;
2147
+ min-width: 1rem;
2148
+ padding: 0.15rem 0.25rem;
2149
+ position: absolute;
2150
+ right: -0.4rem;
2151
+ text-align: center;
2152
+ top: -0.4rem;
2153
+ }
2154
+
2155
+ /* The bar over selected text: a flat surface in the ink color, so it is dark on a light page and light on a dark one.
2156
+ It floats over any page, such as in the ViteHub pill's shadow root, so its sizes are in px and do not follow the
2157
+ page's root font size: the page places it by its fixed 38px height. */
2158
+ [data-slot="comment-selection-bar"] {
2159
+ --vh-selection-bar-text: color-mix(in oklab, var(--vh-inverted) 82%, var(--vh-highlighted));
2160
+ align-items: center;
2161
+ animation: vh-comment-selection-bar-in 140ms cubic-bezier(0.23, 1, 0.32, 1);
2162
+ background: var(--vh-highlighted);
2163
+ border: 1px solid color-mix(in oklab, var(--vh-inverted) 12%, transparent);
2164
+ border-radius: 12px;
2165
+ box-shadow: 0 8px 24px color-mix(in oklab, black 25%, transparent);
2166
+ display: flex;
2167
+ font-size: 12px;
2168
+ font-weight: 500;
2169
+ -webkit-font-smoothing: antialiased;
2170
+ gap: 4px;
2171
+ line-height: 1;
2172
+ padding: 4px;
2173
+ transform-origin: 50% 100%;
2174
+ width: max-content;
2175
+ }
2176
+
2177
+ [data-slot="comment-selection-bar"][data-side="bottom"] {
2178
+ transform-origin: 50% 0;
2179
+ }
2180
+
2181
+ [data-slot="comment-selection-bar-action"] {
2182
+ align-items: center;
2183
+ background: none;
2184
+ border: 0;
2185
+ border-radius: 8px;
2186
+ color: var(--vh-selection-bar-text);
2187
+ cursor: pointer;
2188
+ display: inline-flex;
2189
+ font: inherit;
2190
+ gap: 6px;
2191
+ height: 28px;
2192
+ padding: 0 10px;
2193
+ position: relative;
2194
+ touch-action: manipulation;
2195
+ transition-duration: 150ms;
2196
+ transition-property: background-color, color, scale;
2197
+ transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
2198
+ white-space: nowrap;
2199
+ }
2200
+
2201
+ /* 28px to sit in the bar, with a 44px hit area for fingers. The 4px gap keeps the hit areas of two buttons apart. */
2202
+ [data-slot="comment-selection-bar-action"]::before {
2203
+ content: "";
2204
+ inset: -8px -2px;
2205
+ position: absolute;
2206
+ }
2207
+
2208
+ [data-slot="comment-selection-bar-action"] > :first-child {
2209
+ flex: none;
2210
+ height: 14px;
2211
+ width: 14px;
2212
+ }
2213
+
2214
+ /* Only a real pointer hovers, so a tap does not leave the button lit. */
2215
+ @media (hover: hover) and (pointer: fine) {
2216
+ [data-slot="comment-selection-bar-action"]:hover {
2217
+ background: color-mix(in oklab, var(--vh-inverted) 8%, transparent);
2218
+ color: var(--vh-inverted);
2219
+ }
2220
+ }
2221
+
2222
+ [data-slot="comment-selection-bar-action"]:active {
2223
+ scale: 0.96;
2224
+ }
2225
+
2226
+ [data-slot="comment-selection-bar-kbd"] {
2227
+ font: inherit;
2228
+ margin-inline-start: 6px;
2229
+ opacity: 0.6;
2230
+ }
2231
+
2232
+ @keyframes vh-comment-selection-bar-in {
2233
+ from {
2234
+ opacity: 0;
2235
+ scale: 0.96;
2236
+ }
2237
+ }
2238
+
2239
+ @media (prefers-reduced-motion: reduce) {
2240
+ [data-slot="comment-selection-bar"] {
2241
+ animation: none;
2242
+ }
2243
+
2244
+ [data-slot="comment-selection-bar-action"] {
2245
+ transition-property: background-color, color;
2246
+ }
2247
+
2248
+ [data-slot="comment-selection-bar-action"]:active {
2249
+ scale: none;
2250
+ }
2251
+ }
2252
+
2253
+ /* Floating surfaces take the layered shadow of the theme, which draws their hairline too. Without the theme, the hairline stays. */
2254
+ [data-slot="comment-layer-popover"] {
2255
+ --vh-comment-card-width: 22.5rem;
2256
+ background: var(--vh-bg);
2257
+ border-radius: calc(var(--vh-radius) * 1.5);
2258
+ box-shadow: var(--vh-shadow-floating, 0 0 0 1px var(--vh-border));
2259
+ color: var(--vh-text);
2260
+ font-size: 0.875rem;
2261
+ left: 0.5rem;
2262
+ max-width: calc(100vw - 1rem);
2263
+ /* The messages scroll inside the thread, so the mention menu of a box can open past the card's edge. */
2264
+ overflow: visible;
1892
2265
  position: absolute;
1893
2266
  top: 0.5rem;
1894
- width: 22.5rem;
2267
+ width: var(--vh-comment-card-width);
1895
2268
  }
1896
2269
 
2270
+ /* `--vh-comment-x` is the x of the spot on the screen. On a narrow screen the card moves so that it stays on screen. */
1897
2271
  [data-slot="comment-layer-item"][data-flip-x="true"] > [data-slot="comment-layer-popover"] {
1898
2272
  left: auto;
1899
- right: 0.5rem;
2273
+ right: clamp(calc(var(--vh-comment-x, 0px) + 0.5rem - 100vw), 0.5rem, calc(var(--vh-comment-x, 100vw) - min(var(--vh-comment-card-width), 100vw - 1rem) - 0.5rem));
1900
2274
  }
1901
2275
 
1902
2276
  [data-slot="comment-layer-item"][data-flip-y="true"] > [data-slot="comment-layer-popover"] {
@@ -1904,6 +2278,84 @@
1904
2278
  top: auto;
1905
2279
  }
1906
2280
 
2281
+ /* An sm thread beside its pin is Drop's card: 340px wide, and its messages fill the card up to its height before they
2282
+ scroll, so the reply box stays in view. The corner nearest the pin is small, so the card points at it. */
2283
+ [data-slot="comment-layer-popover"]:not([data-margin], [data-preview]):has(> [data-slot="comment-thread"][data-size="sm"]) {
2284
+ --vh-comment-card-radius: 1rem;
2285
+ --vh-comment-card-width: 21.25rem;
2286
+ display: flex;
2287
+ flex-direction: column;
2288
+ max-height: min(28rem, 60dvh);
2289
+
2290
+ & > [data-slot="comment-thread"] {
2291
+ flex: 1 1 auto;
2292
+ min-height: 0;
2293
+ }
2294
+
2295
+ & [data-slot="comment-thread-messages"] {
2296
+ flex: 1 1 auto;
2297
+ max-height: none;
2298
+ min-height: 0;
2299
+ }
2300
+ }
2301
+
2302
+ [data-slot="comment-layer-item"] > [data-slot="comment-layer-popover"]:not([data-margin], [data-floating], [data-preview]):has(> [data-slot="comment-thread"][data-size="sm"]) {
2303
+ border-radius: 0.375rem var(--vh-comment-card-radius) var(--vh-comment-card-radius);
2304
+ }
2305
+
2306
+ [data-slot="comment-layer-item"][data-flip-x="true"] > [data-slot="comment-layer-popover"]:not([data-margin], [data-floating], [data-preview]):has(> [data-slot="comment-thread"][data-size="sm"]) {
2307
+ border-radius: var(--vh-comment-card-radius) 0.375rem var(--vh-comment-card-radius) var(--vh-comment-card-radius);
2308
+ }
2309
+
2310
+ [data-slot="comment-layer-item"][data-flip-y="true"] > [data-slot="comment-layer-popover"]:not([data-margin], [data-floating], [data-preview]):has(> [data-slot="comment-thread"][data-size="sm"]) {
2311
+ border-radius: var(--vh-comment-card-radius) var(--vh-comment-card-radius) var(--vh-comment-card-radius) 0.375rem;
2312
+ }
2313
+
2314
+ [data-slot="comment-layer-item"][data-flip-x="true"][data-flip-y="true"] > [data-slot="comment-layer-popover"]:not([data-margin], [data-floating], [data-preview]):has(> [data-slot="comment-thread"][data-size="sm"]) {
2315
+ border-radius: var(--vh-comment-card-radius) var(--vh-comment-card-radius) 0.375rem;
2316
+ }
2317
+
2318
+ /* With CSS anchor positioning, the browser puts a thread's card and its preview on the side of the spot that has
2319
+ room for their real size: under it to the right, then to the left, then above the pin, then under or above it,
2320
+ moved inside the screen. Without it, `data-flip-x` and `data-flip-y` guess the side from the card's usual size.
2321
+ The box of a new comment keeps its own placement, because its corners point at the pin. The `@position-try`
2322
+ rules stay outside `@supports`, where Firefox ignores them. */
2323
+ @position-try --vh-comment-above {
2324
+ margin: 0 0 2.5rem 0.5rem;
2325
+ position-area: top right;
2326
+ }
2327
+
2328
+ @position-try --vh-comment-above-left {
2329
+ margin: 0 0.5rem 2.5rem 0;
2330
+ position-area: top left;
2331
+ }
2332
+
2333
+ @position-try --vh-comment-below-inside {
2334
+ margin: 0.5rem 0.5rem 0;
2335
+ position-area: bottom span-all;
2336
+ }
2337
+
2338
+ @position-try --vh-comment-above-inside {
2339
+ margin: 0 0.5rem 2.5rem;
2340
+ position-area: top span-all;
2341
+ }
2342
+
2343
+ @supports (anchor-name: --a) {
2344
+ [data-slot="comment-layer-item"] {
2345
+ anchor-name: --vh-comment-spot;
2346
+ anchor-scope: --vh-comment-spot;
2347
+ }
2348
+
2349
+ [data-slot="comment-layer-item"]:not([data-draft]) > [data-slot="comment-layer-popover"]:not([data-margin], [data-floating]) {
2350
+ inset: auto;
2351
+ margin: 0.5rem 0 0 0.5rem;
2352
+ position: fixed;
2353
+ position-anchor: --vh-comment-spot;
2354
+ position-area: bottom right;
2355
+ position-try-fallbacks: flip-inline, --vh-comment-above, --vh-comment-above-left, --vh-comment-below-inside, --vh-comment-above-inside;
2356
+ }
2357
+ }
2358
+
1907
2359
  [data-slot="comment-layer-popover"][data-preview="true"] {
1908
2360
  pointer-events: none;
1909
2361
  width: 18rem;
@@ -1917,6 +2369,61 @@
1917
2369
  top: auto;
1918
2370
  }
1919
2371
 
2372
+ /* A new comment is one line beside its pin, as in Drop: no card around a field, a hairline and a soft shadow instead
2373
+ of a border, and the corner nearest the pin kept small so the bubble points at it. The 1.4375rem radius is the send
2374
+ button's 1rem plus the 0.4375rem between it and the edge, so a one-line bubble is a capsule. It pops in from that
2375
+ corner. The bubble is the field's frame (`frame="none"`), so its hairline grows firmer while the field has the focus. */
2376
+ [data-slot="comment-layer-item"][data-draft="true"] > [data-slot="comment-layer-popover"] {
2377
+ --vh-bubble-edge: color-mix(in oklab, var(--vh-highlighted) 8%, transparent);
2378
+ --vh-bubble-radius: 1.4375rem;
2379
+ animation: vh-comment-bubble-in 150ms cubic-bezier(0.23, 1, 0.32, 1);
2380
+ border: 0;
2381
+ border-radius: 0.375rem var(--vh-bubble-radius) var(--vh-bubble-radius);
2382
+ box-shadow:
2383
+ 0 0 0 1px var(--vh-bubble-edge),
2384
+ 0 2px 4px color-mix(in oklab, var(--vh-highlighted) 6%, transparent),
2385
+ 0 10px 24px -6px color-mix(in oklab, var(--vh-highlighted) 18%, transparent);
2386
+ transform-origin: top left;
2387
+ width: 18rem;
2388
+ }
2389
+
2390
+ /* The sm box has 28px buttons, so its bubble has 18px corners, as Drop's. */
2391
+ [data-slot="comment-layer-item"][data-draft="true"] > [data-slot="comment-layer-popover"]:has(> [data-slot="comment-composer"][data-size="sm"]) {
2392
+ --vh-bubble-radius: 1.125rem;
2393
+ }
2394
+
2395
+ [data-slot="comment-layer-popover"]:has([data-slot="comment-composer"][data-frame="none"] [data-slot="prompt-input-textarea"]:focus-visible) {
2396
+ --vh-bubble-edge: color-mix(in oklab, var(--vh-highlighted) 22%, transparent);
2397
+ }
2398
+
2399
+ [data-slot="comment-layer-item"][data-draft="true"][data-flip-x="true"] > [data-slot="comment-layer-popover"] {
2400
+ border-radius: var(--vh-bubble-radius) 0.375rem var(--vh-bubble-radius) var(--vh-bubble-radius);
2401
+ transform-origin: top right;
2402
+ }
2403
+
2404
+ [data-slot="comment-layer-item"][data-draft="true"][data-flip-y="true"] > [data-slot="comment-layer-popover"] {
2405
+ border-radius: var(--vh-bubble-radius) var(--vh-bubble-radius) var(--vh-bubble-radius) 0.375rem;
2406
+ transform-origin: bottom left;
2407
+ }
2408
+
2409
+ [data-slot="comment-layer-item"][data-draft="true"][data-flip-x="true"][data-flip-y="true"] > [data-slot="comment-layer-popover"] {
2410
+ border-radius: var(--vh-bubble-radius) var(--vh-bubble-radius) 0.375rem;
2411
+ transform-origin: bottom right;
2412
+ }
2413
+
2414
+ @keyframes vh-comment-bubble-in {
2415
+ from {
2416
+ opacity: 0;
2417
+ scale: 0.96;
2418
+ }
2419
+ }
2420
+
2421
+ @media (prefers-reduced-motion: reduce) {
2422
+ [data-slot="comment-layer-item"][data-draft="true"] > [data-slot="comment-layer-popover"] {
2423
+ animation: none;
2424
+ }
2425
+ }
2426
+
1920
2427
  [data-slot="comment-composer"] {
1921
2428
  align-items: flex-start;
1922
2429
  display: flex;
@@ -1966,8 +2473,8 @@
1966
2473
  @keyframes vh-comment-flash {
1967
2474
  0%,
1968
2475
  60% {
1969
- border-color: var(--vh-ui-error);
1970
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--vh-ui-error) 25%, transparent);
2476
+ border-color: var(--vh-error);
2477
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--vh-error) 25%, transparent);
1971
2478
  }
1972
2479
  }
1973
2480
 
@@ -1975,17 +2482,12 @@
1975
2482
  [data-slot="comment-composer"][data-shake="shake"] {
1976
2483
  animation: none;
1977
2484
  }
1978
-
1979
- [data-slot="comment-pin"] {
1980
- transition: none;
1981
- }
1982
2485
  }
1983
2486
 
1984
2487
  [data-slot="comment-composer-mentions"] {
1985
- background: var(--vh-ui-bg);
1986
- border: 1px solid var(--vh-ui-border);
1987
- border-radius: var(--vh-ui-radius);
1988
- box-shadow: 0 4px 16px rgb(0 0 0 / 0.12);
2488
+ background: var(--vh-bg);
2489
+ border-radius: calc(var(--vh-radius) * 1.5);
2490
+ box-shadow: var(--vh-shadow-floating, 0 0 0 1px var(--vh-border));
1989
2491
  left: 0;
1990
2492
  list-style: none;
1991
2493
  margin: 0.25rem 0 0;
@@ -1997,21 +2499,39 @@
1997
2499
  }
1998
2500
 
1999
2501
  [data-slot="comment-composer-mention"] {
2000
- border-radius: calc(var(--vh-ui-radius) * 0.75);
2502
+ border-radius: calc(var(--vh-radius) * 0.75);
2001
2503
  cursor: pointer;
2002
2504
  padding: 0.375rem 0.5rem;
2003
2505
  }
2004
2506
 
2005
2507
  [data-slot="comment-composer-mention"][aria-selected="true"] {
2006
- background: var(--vh-ui-bg-accented);
2508
+ background: var(--vh-bg-accented);
2509
+ }
2510
+
2511
+ /* The line of a mention menu that has no one to show. It is not an option, so it has no hover or pointer. */
2512
+ [data-slot="comment-composer-mention-empty"] {
2513
+ color: var(--vh-muted);
2514
+ margin: 0;
2515
+ padding: 0.375rem 0.5rem;
2007
2516
  }
2008
2517
 
2009
2518
  [data-slot="comment-composer-error"] {
2010
- color: var(--vh-ui-error);
2519
+ color: var(--vh-error);
2011
2520
  font-size: 0.75rem;
2012
2521
  margin: 0.375rem 0 0;
2013
2522
  }
2014
2523
 
2524
+ /* "Press Esc again to discard." after an Esc in a box with text. It takes no room while it is empty. */
2525
+ [data-slot="comment-composer-status"] {
2526
+ color: var(--vh-muted);
2527
+ font-size: 0.75rem;
2528
+ margin: 0;
2529
+ }
2530
+
2531
+ [data-slot="comment-composer-status"]:not(:empty) {
2532
+ padding: 0.25rem 0.625rem 0.125rem;
2533
+ }
2534
+
2015
2535
  [data-slot="comment-thread"] {
2016
2536
  display: flex;
2017
2537
  flex-direction: column;
@@ -2019,14 +2539,23 @@
2019
2539
 
2020
2540
  [data-slot="comment-thread-header"] {
2021
2541
  align-items: center;
2022
- border-block-end: 1px solid var(--vh-ui-border);
2542
+ border-block-end: 1px solid var(--vh-border);
2023
2543
  display: flex;
2024
2544
  gap: 0.25rem;
2025
2545
  padding: 0.375rem 0.5rem 0.375rem 0.75rem;
2026
2546
  }
2027
2547
 
2548
+ /* The header and message buttons are 24px for a mouse. A touch screen gets 44px targets; the icons keep their size. */
2549
+ @media (pointer: coarse) {
2550
+ :is([data-slot="comment-thread-header"], [data-slot="comment-reply-actions"]) > :is(button, a) {
2551
+ justify-content: center;
2552
+ min-height: 2.75rem;
2553
+ min-width: 2.75rem;
2554
+ }
2555
+ }
2556
+
2028
2557
  [data-slot="comment-thread-title"] {
2029
- color: var(--vh-ui-highlighted);
2558
+ color: var(--vh-highlighted);
2030
2559
  font-weight: 600;
2031
2560
  }
2032
2561
 
@@ -2042,14 +2571,14 @@
2042
2571
  }
2043
2572
 
2044
2573
  [data-slot="comment-thread-quote"] {
2045
- border-inline-start: 2px solid var(--vh-ui-border);
2046
- color: var(--vh-ui-muted);
2574
+ border-inline-start: 2px solid var(--vh-border);
2575
+ color: var(--vh-muted);
2047
2576
  margin: 0.75rem 0.75rem 0;
2048
2577
  padding-inline-start: 0.625rem;
2049
2578
  }
2050
2579
 
2051
2580
  :is([data-slot="comment-thread-detached"], [data-slot="comment-thread-count"]) {
2052
- color: var(--vh-ui-muted);
2581
+ color: var(--vh-muted);
2053
2582
  font-size: 0.75rem;
2054
2583
  margin: 0.5rem 0.75rem 0;
2055
2584
  }
@@ -2065,20 +2594,30 @@
2065
2594
  min-width: 0;
2066
2595
  }
2067
2596
 
2597
+ /* The avatar, the name, and the time share one row, as in the list and the composer. The text sits under the name. */
2068
2598
  [data-slot="comment-reply-header"] {
2069
- align-items: baseline;
2599
+ align-items: center;
2070
2600
  display: flex;
2071
2601
  flex-wrap: wrap;
2072
2602
  gap: 0.375rem;
2603
+ min-height: 1.5rem;
2604
+ }
2605
+
2606
+ [data-slot="comment-reply-header"] > [data-slot="avatar-stack"] {
2607
+ margin-inline-end: 0.125rem;
2608
+ }
2609
+
2610
+ [data-slot="comment-reply-content"] > :not([data-slot="comment-reply-header"]) {
2611
+ margin-inline-start: 2rem;
2073
2612
  }
2074
2613
 
2075
2614
  [data-slot="comment-reply-author"] {
2076
- color: var(--vh-ui-highlighted);
2615
+ color: var(--vh-highlighted);
2077
2616
  font-weight: 500;
2078
2617
  }
2079
2618
 
2080
- :is([data-slot="comment-reply-time"], [data-slot="comment-reply-edited"], [data-slot="comment-reply-actor"]) {
2081
- color: var(--vh-ui-muted);
2619
+ :is([data-slot="comment-reply-time"], [data-slot="comment-reply-edited"]) {
2620
+ color: var(--vh-muted);
2082
2621
  font-size: 0.75rem;
2083
2622
  }
2084
2623
 
@@ -2116,11 +2655,10 @@
2116
2655
 
2117
2656
  [data-slot="comment-toolbar"] {
2118
2657
  align-items: center;
2119
- background: var(--vh-ui-bg);
2120
- border: 1px solid var(--vh-ui-border);
2658
+ background: var(--vh-bg);
2121
2659
  border-radius: 9999px;
2122
2660
  bottom: 1rem;
2123
- box-shadow: 0 4px 16px rgb(0 0 0 / 0.16);
2661
+ box-shadow: var(--vh-shadow-floating, 0 0 0 1px var(--vh-border));
2124
2662
  display: flex;
2125
2663
  gap: 0.25rem;
2126
2664
  left: 50%;
@@ -2136,10 +2674,10 @@
2136
2674
  }
2137
2675
 
2138
2676
  [data-slot="comment-list"] {
2139
- background: var(--vh-ui-bg);
2140
- border-inline-start: 1px solid var(--vh-ui-border);
2677
+ background: var(--vh-bg);
2678
+ border-inline-start: 1px solid var(--vh-border);
2141
2679
  bottom: 0;
2142
- color: var(--vh-ui-text);
2680
+ color: var(--vh-text);
2143
2681
  display: flex;
2144
2682
  flex-direction: column;
2145
2683
  font-size: 0.875rem;
@@ -2152,7 +2690,7 @@
2152
2690
  }
2153
2691
 
2154
2692
  [data-slot="comment-list-header"] {
2155
- border-block-end: 1px solid var(--vh-ui-border);
2693
+ border-block-end: 1px solid var(--vh-border);
2156
2694
  display: flex;
2157
2695
  flex-direction: column;
2158
2696
  gap: 0.5rem;
@@ -2165,7 +2703,7 @@
2165
2703
  }
2166
2704
 
2167
2705
  [data-slot="comment-list-empty"] {
2168
- color: var(--vh-ui-muted);
2706
+ color: var(--vh-muted);
2169
2707
  margin: 0;
2170
2708
  padding: 1rem 0.75rem;
2171
2709
  }
@@ -2178,7 +2716,7 @@
2178
2716
 
2179
2717
  [data-slot="comment-list-item"] {
2180
2718
  align-items: flex-start;
2181
- border-block-end: 1px solid var(--vh-ui-border);
2719
+ border-block-end: 1px solid var(--vh-border);
2182
2720
  color: inherit;
2183
2721
  display: flex;
2184
2722
  gap: 0.5rem;
@@ -2186,8 +2724,8 @@
2186
2724
  text-decoration: none;
2187
2725
  }
2188
2726
 
2189
- [data-slot="comment-list-item"]:is(:hover, :focus-visible, [aria-current="true"]) {
2190
- background: var(--vh-ui-bg-elevated);
2727
+ [data-slot="comment-list-item"]:is(:hover, [aria-current="true"]) {
2728
+ background: var(--vh-bg-elevated);
2191
2729
  }
2192
2730
 
2193
2731
  [data-slot="comment-list-item"][data-status="resolved"] {
@@ -2195,7 +2733,7 @@
2195
2733
  }
2196
2734
 
2197
2735
  [data-slot="comment-list-number"] {
2198
- color: var(--vh-ui-muted);
2736
+ color: var(--vh-muted);
2199
2737
  flex: none;
2200
2738
  font-size: 0.75rem;
2201
2739
  min-width: 1.25rem;
@@ -2219,7 +2757,7 @@
2219
2757
  }
2220
2758
 
2221
2759
  [data-slot="comment-list-meta"] {
2222
- color: var(--vh-ui-muted);
2760
+ color: var(--vh-muted);
2223
2761
  display: flex;
2224
2762
  flex-wrap: wrap;
2225
2763
  font-size: 0.75rem;
@@ -2228,11 +2766,6 @@
2228
2766
  }
2229
2767
 
2230
2768
  @layer components {
2231
- [data-slot="comment-thread"]:focus-visible {
2232
- outline: 2px solid var(--vh-ui-ring);
2233
- outline-offset: -2px;
2234
- }
2235
-
2236
2769
  [data-slot="comment-reply-confirm"] {
2237
2770
  align-items: center;
2238
2771
  display: flex;
@@ -2247,416 +2780,1872 @@
2247
2780
  }
2248
2781
 
2249
2782
  [data-slot="comment-reply-error"] {
2250
- color: var(--vh-ui-error);
2783
+ color: var(--vh-error);
2251
2784
  font-size: 0.75rem;
2252
2785
  margin: 0.375rem 0 0;
2253
2786
  }
2254
- }
2255
2787
 
2256
- /*
2257
- * Chat, session, Markdown typeset, image preview, file views, primitive rail, and tool list.
2258
- * They live in the components layer, so a utility class on a component, such as `<Chat class="h-96">`, overrides them.
2259
- */
2260
- @layer components {
2261
- .vh-chat {
2262
- display: grid;
2263
- grid-template-rows: minmax(0, 1fr);
2264
- height: 100%;
2265
- min-height: 0;
2266
- min-width: 0;
2267
- overflow: hidden;
2268
- position: relative;
2269
- width: 100%;
2788
+ [data-slot="comment-mention"] {
2789
+ background: var(--vh-comment-mention-bg, color-mix(in oklab, var(--vh-bg-accented) 80%, transparent));
2790
+ border-radius: calc(var(--vh-radius) * 0.5);
2791
+ color: var(--vh-highlighted);
2792
+ font-weight: 500;
2793
+ padding: 0 0.125rem;
2270
2794
  }
2271
2795
 
2272
- .vh-session {
2273
- display: grid;
2274
- grid-template-rows: auto minmax(0, 1fr) auto;
2275
- height: 100%;
2276
- min-height: 0;
2277
- min-width: 0;
2278
- overflow: hidden;
2279
- width: 100%;
2796
+ [data-slot="comment-mention"][data-self="true"] {
2797
+ background: var(--vh-comment-mention-self-bg, color-mix(in oklab, var(--vh-warning) 25%, transparent));
2280
2798
  }
2281
2799
 
2282
- .vh-session__header {
2283
- border-block-end: 1px solid var(--vh-ui-border);
2284
- padding: 0.75rem 1rem;
2800
+ [data-slot="comment-composer-extra"] {
2801
+ margin-block-end: 0.375rem;
2285
2802
  }
2286
2803
 
2287
- .vh-session__title {
2288
- font-size: 0.9375rem;
2289
- font-weight: 600;
2290
- margin: 0;
2804
+ [data-slot="comment-composer-mention"] {
2805
+ align-items: center;
2806
+ display: flex;
2807
+ gap: 0.5rem;
2291
2808
  }
2292
2809
 
2293
- .vh-session__chat {
2294
- height: 100%;
2295
- min-height: 0;
2810
+ [data-slot="comment-composer-mention"] [data-slot="avatar-stack"] {
2811
+ --vh-avatar-size: 1.25rem;
2296
2812
  }
2297
2813
 
2298
- .vh-chat__viewport {
2299
- height: 100%;
2300
- min-height: 0;
2301
- overflow-y: auto;
2302
- overscroll-behavior-y: contain;
2303
- scrollbar-gutter: stable;
2814
+ [data-slot="comment-composer"][data-dragging="true"] [data-slot="prompt-input-group"] {
2815
+ border-color: var(--vh-primary);
2816
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--vh-primary) 20%, transparent);
2304
2817
  }
2305
2818
 
2306
- .vh-chat__content {
2307
- display: flex;
2308
- flex-direction: column;
2309
- gap: 1.25rem;
2310
- margin-inline: auto;
2311
- max-width: 48rem;
2312
- min-height: 100%;
2313
- padding: var(--vh-chat-content-padding, 1.5rem 1rem 6rem);
2819
+ /* The files in a comment box wrap, as in Drop, so the Remove badge on a picture's corner is not cut off. */
2820
+ [data-slot="comment-composer"] [data-slot="prompt-input-attachments"] {
2821
+ flex-wrap: wrap;
2822
+ gap: 0.375rem;
2823
+ overflow: visible;
2314
2824
  }
2315
2825
 
2316
- .vh-chat__composer {
2317
- bottom: 0;
2318
- inset-inline: 0;
2319
- padding: var(--vh-chat-composer-padding, 1rem);
2320
- pointer-events: none;
2321
- position: absolute;
2322
- z-index: 3;
2323
- }
2826
+ /* A picture in a comment box is a 40px square, as in Drop: no name, and the Remove button on its top right corner.
2827
+ The name stays for a screen reader. Other files keep their chip with the name. */
2828
+ [data-slot="comment-composer"] [data-slot="attachment"]:has(> [data-slot="attachment-media"][data-variant="image"]) {
2829
+ background: none;
2830
+ border: 0;
2831
+ border-radius: calc(var(--vh-radius) * 0.75);
2832
+ min-width: 0;
2833
+ padding: 0;
2324
2834
 
2325
- .vh-chat__composer::before {
2326
- background: color-mix(in oklab, var(--vh-ui-bg) 96%, transparent);
2327
- border-block-start: 1px solid var(--vh-ui-border);
2328
- content: "";
2329
- inset: 0;
2330
- pointer-events: none;
2331
- position: absolute;
2332
- }
2835
+ & > [data-slot="attachment-media"] {
2836
+ border-radius: inherit;
2837
+ outline: 1px solid color-mix(in oklab, var(--vh-highlighted) 10%, transparent);
2838
+ outline-offset: -1px;
2839
+ width: 2.5rem;
2840
+ }
2333
2841
 
2334
- .vh-chat__composer > * {
2335
- margin-inline: auto;
2336
- max-width: 48rem;
2337
- pointer-events: auto;
2338
- position: relative;
2339
- width: 100%;
2842
+ & > [data-slot="attachment-content"] {
2843
+ clip-path: inset(50%);
2844
+ height: 1px;
2845
+ overflow: hidden;
2846
+ position: absolute;
2847
+ white-space: nowrap;
2848
+ width: 1px;
2849
+ }
2850
+
2851
+ & > [data-slot="attachment-actions"] {
2852
+ position: absolute;
2853
+ right: -0.375rem;
2854
+ top: -0.375rem;
2855
+ }
2340
2856
  }
2341
2857
 
2342
- /* comark-chat draws message parts with the `--comark-*` tokens, so they take ViteHub's colors. */
2343
- .vh-message-parts {
2344
- --comark-accent: var(--vh-ui-bg-elevated);
2345
- --comark-background: var(--vh-ui-bg);
2346
- --comark-border: var(--vh-ui-border);
2347
- --comark-font: inherit;
2348
- --comark-foreground: var(--vh-ui-text);
2349
- --comark-muted: var(--vh-ui-muted);
2350
- --comark-ring: var(--vh-ui-ring);
2858
+ [data-slot="comment-reply-attachments"] {
2859
+ flex-wrap: wrap;
2860
+ margin-top: 0.5rem;
2351
2861
  }
2352
2862
 
2353
- .vh-typeset {
2354
- --vh-typeset-flow: 0.85em;
2355
- --vh-typeset-leading: 1.65;
2356
- font-size: 0.9375rem;
2357
- line-height: var(--vh-typeset-leading);
2358
- min-width: 0;
2359
- overflow-wrap: anywhere;
2863
+ /* With groups, the groups scroll together, and each list is as tall as its rows. */
2864
+ [data-slot="comment-panel-groups"] {
2865
+ flex: 1;
2866
+ min-height: 0;
2867
+ overflow-y: auto;
2360
2868
  }
2361
2869
 
2362
- .vh-image-preview {
2363
- appearance: none;
2364
- aspect-ratio: 4 / 3;
2365
- background: var(--vh-ui-bg-elevated);
2366
- border: 1px solid var(--vh-ui-border);
2367
- border-radius: var(--vh-ui-radius);
2368
- color: var(--vh-ui-muted);
2369
- cursor: zoom-in;
2370
- display: inline-flex;
2371
- align-items: center;
2372
- justify-content: center;
2373
- max-width: 100%;
2374
- overflow: hidden;
2375
- padding: 0;
2376
- vertical-align: top;
2377
- width: 13rem;
2870
+ [data-slot="comment-panel-groups"] [data-slot="comment-panel-items"] {
2871
+ flex: none;
2872
+ overflow: visible;
2378
2873
  }
2379
2874
 
2380
- .vh-image-preview:focus-visible {
2381
- outline: 2px solid currentColor;
2382
- outline-offset: 3px;
2875
+ [data-slot="comment-panel-group-header"] {
2876
+ border-block-start: 1px solid var(--vh-border);
2877
+ color: var(--vh-muted);
2878
+ font-size: 0.75rem;
2879
+ font-weight: 500;
2880
+ margin: 0;
2881
+ padding: 0.75rem 0.75rem 0.25rem;
2383
2882
  }
2384
2883
 
2385
- .vh-image-preview img {
2386
- display: block;
2387
- height: 100%;
2388
- object-fit: cover;
2389
- width: 100%;
2390
- }
2884
+ [data-slot="comment-reply-images"] {
2885
+ display: flex;
2886
+ flex-wrap: wrap;
2887
+ gap: 0.5rem;
2888
+ margin-top: 0.5rem;
2391
2889
 
2392
- .vh-image-preview--compact {
2393
- aspect-ratio: 1;
2394
- border: 0;
2395
- height: 100%;
2396
- width: 100%;
2397
- }
2890
+ /* A comment's image keeps its own shape, up to 10rem tall, so a wide screenshot shows whole instead of a 4:3 crop. */
2891
+ & .vh-image-preview {
2892
+ aspect-ratio: auto;
2893
+ max-height: 10rem;
2894
+ max-width: 100%;
2895
+ width: auto;
2896
+ }
2398
2897
 
2399
- .vh-image-unavailable {
2400
- font-size: 0.75rem;
2401
- overflow-wrap: anywhere;
2402
- padding: 0.5rem;
2898
+ & .vh-image-preview img {
2899
+ height: auto;
2900
+ max-height: 10rem;
2901
+ max-width: 100%;
2902
+ object-fit: contain;
2903
+ width: auto;
2904
+ }
2403
2905
  }
2404
2906
 
2405
- .vh-image-dialog__toolbar {
2907
+ [data-slot="comment-thread-actions"] {
2406
2908
  align-items: center;
2407
- border: 0;
2408
- color: white;
2409
2909
  display: flex;
2410
- flex: none;
2411
2910
  gap: 0.25rem;
2412
- padding-bottom: 0.5rem;
2413
- }
2414
-
2415
- .vh-image-dialog__name {
2416
- flex: 1;
2417
- font-size: 0.75rem;
2418
- min-width: 0;
2419
- overflow: hidden;
2420
- text-overflow: ellipsis;
2421
- white-space: nowrap;
2422
2911
  }
2423
2912
 
2424
- .vh-image-dialog__image {
2425
- border-radius: var(--vh-ui-radius);
2426
- display: block;
2427
- max-height: calc(92dvh - 3rem);
2428
- max-width: 92vw;
2429
- object-fit: contain;
2913
+ [data-slot="comment-thread-after"] {
2914
+ padding: 0 0.75rem 0.75rem;
2430
2915
  }
2431
2916
 
2432
- .vh-image-dialog__error {
2433
- background: black;
2434
- border-radius: var(--vh-ui-radius);
2435
- color: white;
2917
+ /* CommentPanel: the list, one thread, and the page box in one surface. */
2918
+ [data-slot="comment-panel"] {
2919
+ background: var(--vh-bg);
2920
+ color: var(--vh-text);
2921
+ display: flex;
2922
+ flex-direction: column;
2436
2923
  font-size: 0.875rem;
2437
- max-width: 24rem;
2438
- padding: 2rem;
2924
+ min-height: 0;
2439
2925
  }
2440
2926
 
2441
- [data-slot="invocation"] [data-activity-id][data-selected="true"] {
2442
- background: color-mix(in oklab, var(--vh-ui-info) 9%, transparent);
2443
- border-radius: calc(var(--vh-ui-radius) * 0.85);
2444
- outline: 2px solid color-mix(in oklab, var(--vh-ui-info) 42%, transparent);
2445
- outline-offset: 2px;
2446
- scroll-margin-block: 5rem;
2927
+ [data-slot="comment-panel"][data-variant="docked"] {
2928
+ border-inline-start: 1px solid var(--vh-border);
2929
+ height: 100%;
2447
2930
  }
2448
2931
 
2449
- .vh-code-view,
2450
- .vh-diff,
2451
- .vh-file,
2452
- .vh-unresolved-file,
2453
- .vh-file-tree {
2454
- border: 1px solid var(--vh-ui-border);
2455
- border-radius: var(--vh-ui-radius);
2456
- display: block;
2932
+ [data-slot="comment-panel"][data-variant="floating"] {
2933
+ border-radius: calc(var(--vh-radius) * 1.5);
2934
+ box-shadow: var(--vh-shadow-floating, 0 0 0 1px var(--vh-border));
2935
+ max-height: min(36rem, calc(100dvh - 2rem));
2457
2936
  overflow: hidden;
2937
+ width: min(22.5rem, calc(100vw - 1rem));
2458
2938
  }
2459
2939
 
2460
- .vh-code-view,
2461
- .vh-diff,
2462
- .vh-file,
2463
- .vh-unresolved-file {
2464
- --diffs-addition-base: var(--vh-ui-success);
2465
- --diffs-bg: var(--vh-ui-bg);
2466
- --diffs-bg-addition: color-mix(in oklab, var(--vh-ui-success) 12%, var(--vh-ui-bg));
2467
- --diffs-bg-addition-emphasis: color-mix(in oklab, var(--vh-ui-success) 22%, var(--vh-ui-bg));
2468
- --diffs-bg-buffer: var(--vh-ui-bg-muted);
2469
- --diffs-bg-context: var(--vh-ui-bg);
2470
- --diffs-bg-context-gutter: color-mix(in oklab, var(--vh-ui-bg-muted) 72%, var(--vh-ui-bg));
2471
- --diffs-bg-deletion: color-mix(in oklab, var(--vh-ui-error) 12%, var(--vh-ui-bg));
2472
- --diffs-bg-deletion-emphasis: color-mix(in oklab, var(--vh-ui-error) 22%, var(--vh-ui-bg));
2473
- --diffs-bg-separator: var(--vh-ui-bg-muted);
2474
- --diffs-deletion-base: var(--vh-ui-error);
2475
- --diffs-fg: var(--vh-ui-text);
2476
- --diffs-fg-conflict-marker: var(--vh-ui-muted);
2477
- --diffs-fg-number: var(--vh-ui-dimmed);
2478
- --diffs-font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
2479
- --diffs-font-size: 0.8125rem;
2480
- --diffs-header-font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);
2481
- --diffs-modified-base: var(--vh-ui-info);
2482
- background: var(--vh-ui-bg);
2483
- color: var(--vh-ui-text);
2484
- min-height: 4rem;
2485
- }
2486
-
2487
- .vh-code-view {
2488
- min-height: 12rem;
2940
+ [data-slot="comment-panel-header"] {
2941
+ align-items: center;
2942
+ border-block-end: 1px solid var(--vh-border);
2943
+ display: flex;
2944
+ gap: 0.5rem;
2945
+ justify-content: space-between;
2946
+ padding: 0.5rem 0.5rem 0.5rem 0.75rem;
2489
2947
  }
2490
2948
 
2491
- .vh-file-tree {
2492
- height: 24rem;
2949
+ [data-slot="comment-panel-title"] {
2950
+ color: var(--vh-highlighted);
2951
+ font-size: inherit;
2952
+ font-weight: 600;
2953
+ margin: 0;
2493
2954
  }
2494
2955
 
2495
- .vh-visually-hidden {
2496
- clip: rect(0 0 0 0);
2497
- clip-path: inset(50%);
2498
- height: 1px;
2499
- overflow: hidden;
2500
- position: absolute;
2501
- white-space: nowrap;
2502
- width: 1px;
2956
+ [data-slot="comment-panel-filters"] {
2957
+ display: flex;
2958
+ flex: 1;
2959
+ gap: 0.25rem;
2503
2960
  }
2504
2961
 
2505
- @media (prefers-reduced-motion: reduce) {
2506
- .vh-chat__viewport {
2507
- scroll-behavior: auto;
2508
- }
2962
+ [data-slot="comment-panel-actions"] {
2963
+ align-items: center;
2964
+ display: flex;
2965
+ gap: 0.25rem;
2966
+ margin-block: -0.25rem;
2509
2967
  }
2510
2968
 
2511
- .vh-agent-tool-list {
2512
- grid-template-columns: minmax(0, 1fr);
2513
- display: grid;
2514
- gap: 0.125rem;
2515
- margin-block-start: 0.45rem;
2969
+ [data-slot="comment-panel-items"] {
2970
+ flex: 1;
2971
+ list-style: none;
2972
+ margin: 0;
2973
+ min-height: 0;
2974
+ overflow-y: auto;
2975
+ padding: 0;
2516
2976
  }
2517
2977
 
2518
- .vh-agent-tool-list__item,
2519
- .vh-agent-tool-list__disclosure > summary {
2520
- align-items: center;
2521
- border-radius: calc(var(--vh-ui-radius) * 0.8);
2978
+ [data-slot="comment-panel-item"] {
2979
+ align-items: flex-start;
2980
+ background: none;
2981
+ border: 0;
2982
+ border-block-end: 1px solid var(--vh-border);
2983
+ color: inherit;
2984
+ cursor: pointer;
2522
2985
  display: flex;
2986
+ font: inherit;
2523
2987
  gap: 0.5rem;
2524
- min-height: 1.8rem;
2525
- padding: 0.3rem 0.45rem;
2988
+ padding: 0.625rem 0.75rem;
2989
+ text-align: start;
2990
+ width: 100%;
2526
2991
  }
2527
2992
 
2528
- .vh-agent-tool-list__item code,
2529
- .vh-agent-tool-list__disclosure > summary code {
2530
- flex: 0 1 auto;
2531
- min-width: 0;
2532
- font-size: 0.6875rem;
2533
- overflow-wrap: anywhere;
2993
+ [data-slot="comment-panel-item"]:hover {
2994
+ background: var(--vh-bg-elevated);
2534
2995
  }
2535
2996
 
2536
- .vh-agent-tool-list__disclosure > summary {
2537
- cursor: pointer;
2538
- list-style: none;
2997
+ [data-slot="comment-panel-empty"] {
2998
+ color: var(--vh-muted);
2999
+ flex: 1;
3000
+ margin: 0;
3001
+ padding: 1rem 0.75rem;
2539
3002
  }
2540
3003
 
2541
- .vh-agent-tool-list__disclosure > summary::-webkit-details-marker {
2542
- display: none;
3004
+ [data-slot="comment-panel-composer"],
3005
+ [data-slot="comment-thread"] > [data-slot="comment-composer"] {
3006
+ border-block-start: 1px solid var(--vh-border);
2543
3007
  }
2544
3008
 
2545
- .vh-agent-tool-list__disclosure > summary:hover {
2546
- background: color-mix(in oklab, var(--vh-ui-bg-elevated) 70%, transparent);
2547
- }
3009
+ /* A row box is one line under its card's divider: attach, the text, send. The divider already bounds it, so the field
3010
+ shows its edge only while it has the focus. The 2rem round buttons sit 0.125rem and the border inside that edge, so
3011
+ its corners are concentric with them. */
3012
+ [data-slot="comment-composer"][data-layout="row"] {
3013
+ padding: 0.25rem;
2548
3014
 
2549
- .vh-agent-tool-list__disclosure > summary:focus-visible {
2550
- outline: 2px solid color-mix(in oklab, var(--ui-primary, #2563eb) 55%, transparent);
2551
- outline-offset: 2px;
2552
- }
3015
+ & [data-slot="prompt-input-group"] {
3016
+ align-items: flex-end;
3017
+ background: transparent;
3018
+ border-color: transparent;
3019
+ border-radius: calc(1rem + 0.125rem + 1px);
3020
+ box-shadow: none;
3021
+ flex-flow: row wrap;
3022
+ gap: 0.25rem;
3023
+ padding: 0.125rem;
3024
+ }
2553
3025
 
2554
- .vh-agent-tool-list__item small,
2555
- .vh-agent-tool-list__disclosure > summary small {
2556
- color: var(--vh-ui-dimmed);
2557
- flex: 1;
2558
- font-size: 0.625rem;
2559
- min-width: 0;
2560
- overflow: hidden;
2561
- text-overflow: ellipsis;
2562
- white-space: nowrap;
2563
- }
3026
+ & [data-slot="prompt-input-attachments"] {
3027
+ flex-basis: 100%;
3028
+ padding: 0.25rem 0.25rem 0;
3029
+ }
2564
3030
 
2565
- .vh-agent-tool-list__icon {
2566
- color: var(--vh-ui-muted);
2567
- display: inline-flex;
2568
- flex: none;
3031
+ & [data-slot="prompt-input-textarea"] {
3032
+ flex: 1;
3033
+ min-height: 2rem;
3034
+ min-width: 0;
3035
+ order: 1;
3036
+ padding: 0.25rem;
3037
+ width: auto;
3038
+ }
3039
+
3040
+ & [data-slot="prompt-input-toolbar"] {
3041
+ display: contents;
3042
+ }
3043
+
3044
+ & [data-slot="prompt-input-spacer"] {
3045
+ display: none;
3046
+ }
3047
+
3048
+ & [data-slot="prompt-input-toolbar"] > button:last-child {
3049
+ order: 2;
3050
+ }
3051
+
3052
+ /* The buttons are as tall as one line of the field, 2rem, whatever size the button component draws. So the
3053
+ placeholder and the first line sit on the buttons' center line. */
3054
+ & [data-slot="prompt-input-toolbar"] > button {
3055
+ height: 2rem;
3056
+ justify-content: center;
3057
+ min-width: 2rem;
3058
+ }
2569
3059
  }
2570
3060
 
2571
- .vh-agent-tool-list__icon > * {
2572
- height: 0.875rem;
2573
- width: 0.875rem;
3061
+ /* The sm size, for a thread in a small floating card: 14px text on a 1.5 line, tighter rows, and a shorter box. */
3062
+ [data-slot="comment-thread"][data-size="sm"] {
3063
+ font-size: 0.875rem;
3064
+ line-height: 1.25rem;
2574
3065
  }
2575
3066
 
2576
- .vh-agent-tool-list > [data-used="false"] {
2577
- opacity: 0.66;
3067
+ [data-slot="comment-thread"][data-size="sm"] [data-slot="comment-thread-quote"] {
3068
+ margin-top: 0.5rem;
2578
3069
  }
2579
3070
 
2580
- .vh-agent-tool-list__count {
2581
- appearance: none;
2582
- background: transparent;
2583
- border: 0;
2584
- color: var(--vh-ui-dimmed);
2585
- flex: none;
2586
- font: inherit;
2587
- font-size: 0.6875rem;
2588
- margin-inline-start: auto;
2589
- padding: 0;
2590
- white-space: nowrap;
3071
+ /* The sm reply box is a soft filled field with no divider above it: the card's edge already bounds it, and a line over
3072
+ a field read as two borders. Its border shows only while it has the focus, in theme-focus-ring.css. */
3073
+ [data-slot="comment-thread"][data-size="sm"] > [data-slot="comment-composer"] {
3074
+ border-block-start: 0;
3075
+
3076
+ & [data-slot="prompt-input-group"] {
3077
+ background: var(--vh-bg-elevated);
3078
+ border-color: transparent;
3079
+ box-shadow: none;
3080
+ }
2591
3081
  }
2592
3082
 
2593
- .vh-agent-tool-list > [data-used="true"] .vh-agent-tool-list__count {
2594
- color: var(--vh-ui-muted);
3083
+ [data-slot="comment-reply"][data-size="sm"] {
3084
+ padding: 0.5rem 0.75rem;
3085
+ position: relative;
3086
+
3087
+ /* The 14px name and the 12px time share a baseline. The avatar stays centered on the name's line. */
3088
+ & [data-slot="comment-reply-header"] {
3089
+ align-items: baseline;
3090
+ }
3091
+
3092
+ & [data-slot="comment-reply-header"] > [data-slot="avatar-stack"] {
3093
+ align-self: center;
3094
+ }
3095
+
3096
+ & [data-slot="comment-reply-author"] {
3097
+ font-size: 0.875rem;
3098
+ line-height: 1.5rem;
3099
+ }
3100
+
3101
+ & [data-slot="comment-reply-body"] {
3102
+ --vh-typeset-leading: 1.5;
3103
+ font-size: 0.875rem;
3104
+ }
2595
3105
  }
2596
3106
 
2597
- button.vh-agent-tool-list__count {
2598
- cursor: pointer;
2599
- text-decoration: underline dotted;
2600
- text-underline-offset: 0.2rem;
3107
+ /* With a mouse, Edit and Delete show over the end of the name's row on hover, so the text uses the full width of a
3108
+ narrow card. A touch screen always shows them, so they keep their own column there. */
3109
+ @media not (any-pointer: coarse) {
3110
+ [data-slot="comment-reply"][data-size="sm"] [data-slot="comment-reply-actions"] {
3111
+ background: var(--vh-bg);
3112
+ border-radius: var(--vh-radius);
3113
+ position: absolute;
3114
+ right: 0.5rem;
3115
+ top: 0.375rem;
3116
+ }
2601
3117
  }
2602
3118
 
2603
- button.vh-agent-tool-list__count:hover,
2604
- button.vh-agent-tool-list__count:focus-visible {
2605
- color: var(--vh-ui-text);
3119
+ [data-slot="comment-composer"][data-size="sm"] [data-slot="prompt-input-textarea"] {
3120
+ min-height: 2rem;
3121
+ padding: 0.375rem 0.625rem 0;
2606
3122
  }
2607
3123
 
2608
- .vh-agent-tool-list__chevron {
2609
- height: 0.8rem;
2610
- stroke: currentColor;
2611
- stroke-width: 2;
2612
- transition: transform 150ms ease;
2613
- width: 0.8rem;
3124
+ [data-slot="comment-composer"][data-size="sm"][data-layout="row"] {
3125
+ & [data-slot="prompt-input-group"] {
3126
+ border-radius: calc(0.875rem + 0.125rem + 1px);
3127
+ }
3128
+
3129
+ /* 14px text on a 21px line, with 3.5px above and below, so one line sits on the center line of the 28px buttons. */
3130
+ & [data-slot="prompt-input-textarea"] {
3131
+ line-height: 1.3125rem;
3132
+ min-height: 1.75rem;
3133
+ padding: 0.21875rem 0.25rem;
3134
+ }
3135
+
3136
+ & [data-slot="prompt-input-toolbar"] > button {
3137
+ height: 1.75rem;
3138
+ min-width: 1.75rem;
3139
+ }
2614
3140
  }
2615
3141
 
2616
- .vh-agent-tool-list__disclosure[open] > summary .vh-agent-tool-list__chevron {
2617
- transform: rotate(180deg);
3142
+ /* Once the text of a row box wraps, the text takes the full width and attach and send move to a row under it, at its
3143
+ two ends. Without this, every line of a narrow box starts after the attach button. */
3144
+ [data-slot="comment-composer"][data-layout="row"][data-multiline="true"] {
3145
+ & [data-slot="prompt-input-textarea"] {
3146
+ flex-basis: 100%;
3147
+ order: 0;
3148
+ padding-inline: 0.5rem;
3149
+ }
3150
+
3151
+ & [data-slot="prompt-input-spacer"] {
3152
+ display: block;
3153
+ }
2618
3154
  }
2619
3155
 
2620
- .vh-agent-tool-list__body {
2621
- grid-template-columns: minmax(0, 1fr);
2622
- display: grid;
2623
- gap: 0.65rem;
2624
- padding: 0.35rem 0.45rem 0.75rem;
3156
+ /* The page box and the reply box sit at the bottom, so their mention menus open upward. */
3157
+ [data-slot="comment-panel-composer"] [data-slot="comment-composer-mentions"],
3158
+ [data-slot="comment-thread"] > [data-slot="comment-composer"] [data-slot="comment-composer-mentions"] {
3159
+ bottom: 100%;
3160
+ margin: 0 0 0.25rem;
3161
+ top: auto;
2625
3162
  }
2626
3163
 
2627
- .vh-agent-tool-list__body > p {
2628
- color: var(--vh-ui-muted);
2629
- font-size: 0.75rem;
2630
- line-height: 1.55;
2631
- margin: 0;
3164
+ [data-slot="comment-panel"] > [data-slot="comment-thread"] {
3165
+ flex: 1;
3166
+ min-height: 0;
2632
3167
  }
2633
3168
 
2634
- .vh-agent-tool-list__schema strong {
2635
- color: var(--vh-ui-dimmed);
2636
- display: block;
2637
- font-size: 0.625rem;
2638
- margin-block-end: 0.35rem;
2639
- text-transform: uppercase;
3169
+ [data-slot="comment-panel"] > [data-slot="comment-thread"] [data-slot="comment-thread-messages"] {
3170
+ flex: 1;
3171
+ max-height: none;
2640
3172
  }
3173
+ }
2641
3174
 
2642
- .vh-agent-tool-list__schema pre {
2643
- background: color-mix(in oklab, var(--vh-ui-bg-elevated) 65%, transparent);
2644
- border: 1px solid var(--vh-ui-border);
2645
- border-radius: calc(var(--vh-ui-radius) * 0.8);
2646
- color: var(--vh-ui-muted);
2647
- font-size: 0.625rem;
2648
- line-height: 1.55;
3175
+ /*
3176
+ * Chat, session, Markdown typeset, image preview, file views, primitive rail, and tool list.
3177
+ * They live in the components layer, so a utility class on a component, such as `<Chat class="h-96">`, overrides them.
3178
+ */
3179
+ @layer components {
3180
+ .vh-chat {
3181
+ display: grid;
3182
+ grid-template-rows: minmax(0, 1fr);
3183
+ height: 100%;
3184
+ min-height: 0;
3185
+ min-width: 0;
3186
+ overflow: hidden;
3187
+ position: relative;
3188
+ width: 100%;
3189
+ }
3190
+
3191
+ .vh-session {
3192
+ display: grid;
3193
+ grid-template-rows: auto minmax(0, 1fr) auto;
3194
+ height: 100%;
3195
+ min-height: 0;
3196
+ min-width: 0;
3197
+ overflow: hidden;
3198
+ width: 100%;
3199
+ }
3200
+
3201
+ .vh-session__header {
3202
+ border-block-end: 1px solid var(--vh-border);
3203
+ padding: 0.75rem 1rem;
3204
+ }
3205
+
3206
+ .vh-session__title {
3207
+ font-size: 0.9375rem;
3208
+ font-weight: 600;
3209
+ margin: 0;
3210
+ }
3211
+
3212
+ .vh-session__chat {
3213
+ height: 100%;
3214
+ min-height: 0;
3215
+ }
3216
+
3217
+ .vh-chat__viewport {
3218
+ height: 100%;
3219
+ min-height: 0;
3220
+ overflow-y: auto;
3221
+ overscroll-behavior-y: contain;
3222
+ scrollbar-gutter: stable;
3223
+ }
3224
+
3225
+ .vh-chat__content {
3226
+ display: flex;
3227
+ flex-direction: column;
3228
+ gap: 1.25rem;
3229
+ margin-inline: auto;
3230
+ max-width: 48rem;
3231
+ min-height: 100%;
3232
+ padding: var(--vh-chat-content-padding, 1.5rem 1rem 6rem);
3233
+ }
3234
+
3235
+ .vh-chat__composer {
3236
+ bottom: 0;
3237
+ inset-inline: 0;
3238
+ padding: var(--vh-chat-composer-padding, 1rem);
3239
+ pointer-events: none;
3240
+ position: absolute;
3241
+ z-index: 3;
3242
+ }
3243
+
3244
+ .vh-chat__composer::before {
3245
+ background: color-mix(in oklab, var(--vh-bg) 96%, transparent);
3246
+ border-block-start: 1px solid var(--vh-border);
3247
+ content: "";
3248
+ inset: 0;
3249
+ pointer-events: none;
3250
+ position: absolute;
3251
+ }
3252
+
3253
+ .vh-chat__composer > * {
3254
+ margin-inline: auto;
3255
+ max-width: 48rem;
3256
+ pointer-events: auto;
3257
+ position: relative;
3258
+ width: 100%;
3259
+ }
3260
+
3261
+ /* It reads like a step of the message's trace: a muted line with a dot. It does not move, so it needs no reduced-motion rule. */
3262
+ .vh-chat__status {
3263
+ align-items: center;
3264
+ color: var(--vh-muted);
3265
+ display: flex;
3266
+ font-size: 0.875rem;
3267
+ gap: 0.5rem;
3268
+ line-height: 1.25rem;
3269
+ margin: -0.75rem 0 0;
3270
+ min-width: 0;
3271
+ }
3272
+
3273
+ .vh-chat__status-dot {
3274
+ background: currentColor;
3275
+ border-radius: 50%;
3276
+ flex: none;
3277
+ height: 0.375rem;
3278
+ opacity: 0.5;
3279
+ width: 0.375rem;
3280
+ }
3281
+
3282
+ .vh-chat__status-label {
3283
+ min-width: 0;
3284
+ overflow: hidden;
3285
+ text-overflow: ellipsis;
3286
+ white-space: nowrap;
3287
+ }
3288
+
3289
+ /* comark-chat draws message parts with the `--comark-*` tokens, so they take ViteHub's colors. */
3290
+ .vh-message-parts {
3291
+ --comark-accent: var(--vh-bg-elevated);
3292
+ --comark-background: var(--vh-bg);
3293
+ --comark-border: var(--vh-border);
3294
+ --comark-font: inherit;
3295
+ --comark-foreground: var(--vh-text);
3296
+ --comark-muted: var(--vh-muted);
3297
+ --comark-ring: var(--vh-ring);
3298
+ }
3299
+
3300
+ .vh-typeset {
3301
+ --vh-typeset-flow: 0.85em;
3302
+ --vh-typeset-leading: 1.65;
3303
+ font-size: 0.9375rem;
3304
+ line-height: var(--vh-typeset-leading);
3305
+ min-width: 0;
3306
+ overflow-wrap: anywhere;
3307
+ }
3308
+
3309
+ .vh-image-preview {
3310
+ appearance: none;
3311
+ aspect-ratio: 4 / 3;
3312
+ background: var(--vh-bg-elevated);
3313
+ border: 1px solid var(--vh-border);
3314
+ border-radius: var(--vh-radius);
3315
+ color: var(--vh-muted);
3316
+ cursor: zoom-in;
3317
+ display: inline-flex;
3318
+ align-items: center;
3319
+ justify-content: center;
3320
+ max-width: 100%;
3321
+ overflow: hidden;
3322
+ padding: 0;
3323
+ vertical-align: top;
3324
+ width: 13rem;
3325
+ }
3326
+
3327
+ .vh-image-preview img {
3328
+ display: block;
3329
+ height: 100%;
3330
+ object-fit: cover;
3331
+ width: 100%;
3332
+ }
3333
+
3334
+ .vh-image-preview--compact {
3335
+ aspect-ratio: 1;
3336
+ border: 0;
3337
+ height: 100%;
3338
+ width: 100%;
3339
+ }
3340
+
3341
+ .vh-image-unavailable {
3342
+ font-size: 0.75rem;
3343
+ overflow-wrap: anywhere;
3344
+ padding: 0.5rem;
3345
+ }
3346
+
3347
+ .vh-image-dialog__toolbar {
3348
+ align-items: center;
3349
+ border: 0;
3350
+ color: var(--vh-on-media, var(--vh-highlighted));
3351
+ display: flex;
3352
+ flex: none;
3353
+ gap: 0.25rem;
3354
+ padding-bottom: 0.5rem;
3355
+ }
3356
+
3357
+ .vh-image-dialog__name {
3358
+ flex: 1;
3359
+ font-size: 0.75rem;
3360
+ min-width: 0;
3361
+ overflow: hidden;
3362
+ text-overflow: ellipsis;
3363
+ white-space: nowrap;
3364
+ }
3365
+
3366
+ .vh-image-dialog__image {
3367
+ border-radius: var(--vh-radius);
3368
+ display: block;
3369
+ max-height: calc(92dvh - 3rem);
3370
+ max-width: 92vw;
3371
+ object-fit: contain;
3372
+ }
3373
+
3374
+ .vh-image-dialog__error {
3375
+ background: var(--vh-media-scrim, var(--vh-bg-elevated));
3376
+ border-radius: var(--vh-radius);
3377
+ color: var(--vh-on-media, var(--vh-highlighted));
3378
+ font-size: 0.875rem;
3379
+ max-width: 24rem;
3380
+ padding: 2rem;
3381
+ }
3382
+
3383
+ /* The selected activity is a filled row, as selected items are everywhere. Blue marks focus only. */
3384
+ [data-slot="invocation"] [data-activity-id][data-selected="true"] {
3385
+ background: var(--vh-bg-elevated);
3386
+ border-radius: calc(var(--vh-radius) * 0.85);
3387
+ scroll-margin-block: 5rem;
3388
+ }
3389
+
3390
+ .vh-code-view,
3391
+ .vh-diff,
3392
+ .vh-file,
3393
+ .vh-unresolved-file,
3394
+ .vh-file-tree {
3395
+ border: 1px solid var(--vh-border);
3396
+ border-radius: var(--vh-radius);
3397
+ display: block;
3398
+ overflow: hidden;
3399
+ }
3400
+
3401
+ .vh-code-view,
3402
+ .vh-diff,
3403
+ .vh-file,
3404
+ .vh-unresolved-file {
3405
+ --diffs-addition-base: var(--vh-success);
3406
+ --diffs-bg: var(--vh-bg);
3407
+ --diffs-bg-addition: color-mix(in oklab, var(--vh-success) 12%, var(--vh-bg));
3408
+ --diffs-bg-addition-emphasis: color-mix(in oklab, var(--vh-success) 22%, var(--vh-bg));
3409
+ --diffs-bg-buffer: var(--vh-bg-muted);
3410
+ --diffs-bg-context: var(--vh-bg);
3411
+ --diffs-bg-context-gutter: color-mix(in oklab, var(--vh-bg-muted) 72%, var(--vh-bg));
3412
+ --diffs-bg-deletion: color-mix(in oklab, var(--vh-error) 12%, var(--vh-bg));
3413
+ --diffs-bg-deletion-emphasis: color-mix(in oklab, var(--vh-error) 22%, var(--vh-bg));
3414
+ --diffs-bg-separator: var(--vh-bg-muted);
3415
+ --diffs-deletion-base: var(--vh-error);
3416
+ --diffs-fg: var(--vh-text);
3417
+ --diffs-fg-conflict-marker: var(--vh-muted);
3418
+ --diffs-fg-number: var(--vh-dimmed);
3419
+ --diffs-font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
3420
+ --diffs-font-size: 0.8125rem;
3421
+ --diffs-header-font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);
3422
+ --diffs-modified-base: var(--vh-info);
3423
+ background: var(--vh-bg);
3424
+ color: var(--vh-text);
3425
+ min-height: 4rem;
3426
+ }
3427
+
3428
+ .vh-code-view {
3429
+ min-height: 12rem;
3430
+ }
3431
+
3432
+ .vh-file-tree {
3433
+ height: 24rem;
3434
+ }
3435
+
3436
+ /* Text for screen readers only, as ui-sdk writes it: `<span data-slot="visually-hidden">`. */
3437
+ [data-slot="visually-hidden"] {
3438
+ position: absolute;
3439
+ width: 1px;
3440
+ height: 1px;
3441
+ overflow: hidden;
3442
+ clip-path: inset(50%);
3443
+ white-space: nowrap;
3444
+ }
3445
+
3446
+ @media (prefers-reduced-motion: reduce) {
3447
+ .vh-chat__viewport {
3448
+ scroll-behavior: auto;
3449
+ }
3450
+ }
3451
+
3452
+ .vh-agent-tool-list {
3453
+ grid-template-columns: minmax(0, 1fr);
3454
+ display: grid;
3455
+ gap: 0.125rem;
3456
+ margin-block-start: 0.45rem;
3457
+ }
3458
+
3459
+ .vh-agent-tool-list__item,
3460
+ .vh-agent-tool-list__disclosure > summary {
3461
+ align-items: center;
3462
+ border-radius: calc(var(--vh-radius) * 0.8);
3463
+ display: flex;
3464
+ gap: 0.5rem;
3465
+ min-height: 1.8rem;
3466
+ padding: 0.3rem 0.45rem;
3467
+ }
3468
+
3469
+ .vh-agent-tool-list__item code,
3470
+ .vh-agent-tool-list__disclosure > summary code {
3471
+ flex: 0 1 auto;
3472
+ min-width: 0;
3473
+ font-size: 0.6875rem;
3474
+ overflow-wrap: anywhere;
3475
+ }
3476
+
3477
+ .vh-agent-tool-list__disclosure > summary {
3478
+ cursor: pointer;
3479
+ list-style: none;
3480
+ }
3481
+
3482
+ .vh-agent-tool-list__disclosure > summary::-webkit-details-marker {
3483
+ display: none;
3484
+ }
3485
+
3486
+ .vh-agent-tool-list__disclosure > summary:hover {
3487
+ background: color-mix(in oklab, var(--vh-bg-elevated) 70%, transparent);
3488
+ }
3489
+
3490
+ .vh-agent-tool-list__item small,
3491
+ .vh-agent-tool-list__disclosure > summary small {
3492
+ color: var(--vh-dimmed);
3493
+ flex: 1;
3494
+ font-size: 0.625rem;
3495
+ min-width: 0;
3496
+ overflow: hidden;
3497
+ text-overflow: ellipsis;
3498
+ white-space: nowrap;
3499
+ }
3500
+
3501
+ .vh-agent-tool-list__icon {
3502
+ color: var(--vh-muted);
3503
+ display: inline-flex;
3504
+ flex: none;
3505
+ }
3506
+
3507
+ .vh-agent-tool-list__icon > * {
3508
+ height: 0.875rem;
3509
+ width: 0.875rem;
3510
+ }
3511
+
3512
+ .vh-agent-tool-list > [data-used="false"] {
3513
+ opacity: 0.66;
3514
+ }
3515
+
3516
+ .vh-agent-tool-list__count {
3517
+ appearance: none;
3518
+ background: transparent;
3519
+ border: 0;
3520
+ color: var(--vh-dimmed);
3521
+ flex: none;
3522
+ font: inherit;
3523
+ font-size: 0.6875rem;
3524
+ margin-inline-start: auto;
3525
+ padding: 0;
3526
+ white-space: nowrap;
3527
+ }
3528
+
3529
+ .vh-agent-tool-list > [data-used="true"] .vh-agent-tool-list__count {
3530
+ color: var(--vh-muted);
3531
+ }
3532
+
3533
+ button.vh-agent-tool-list__count {
3534
+ cursor: pointer;
3535
+ text-decoration: underline dotted;
3536
+ text-underline-offset: 0.2rem;
3537
+ }
3538
+
3539
+ button.vh-agent-tool-list__count:hover {
3540
+ color: var(--vh-text);
3541
+ }
3542
+
3543
+ .vh-agent-tool-list__chevron {
3544
+ height: 0.8rem;
3545
+ stroke: currentColor;
3546
+ stroke-width: 2;
3547
+ transition: transform 150ms ease;
3548
+ width: 0.8rem;
3549
+ }
3550
+
3551
+ .vh-agent-tool-list__disclosure[open] > summary .vh-agent-tool-list__chevron {
3552
+ transform: rotate(180deg);
3553
+ }
3554
+
3555
+ .vh-agent-tool-list__body {
3556
+ grid-template-columns: minmax(0, 1fr);
3557
+ display: grid;
3558
+ gap: 0.65rem;
3559
+ padding: 0.35rem 0.45rem 0.75rem;
3560
+ }
3561
+
3562
+ .vh-agent-tool-list__body > p {
3563
+ color: var(--vh-muted);
3564
+ font-size: 0.75rem;
3565
+ line-height: 1.55;
3566
+ margin: 0;
3567
+ }
3568
+
3569
+ .vh-agent-tool-list__schema strong {
3570
+ color: var(--vh-dimmed);
3571
+ display: block;
3572
+ font-size: 0.625rem;
3573
+ margin-block-end: 0.35rem;
3574
+ text-transform: uppercase;
3575
+ }
3576
+
3577
+ .vh-agent-tool-list__schema pre {
3578
+ background: color-mix(in oklab, var(--vh-bg-elevated) 65%, transparent);
3579
+ border: 1px solid var(--vh-border);
3580
+ border-radius: calc(var(--vh-radius) * 0.8);
3581
+ color: var(--vh-muted);
3582
+ font-size: 0.625rem;
3583
+ line-height: 1.55;
3584
+ margin: 0;
3585
+ max-height: 18rem;
3586
+ overflow: auto;
3587
+ padding: 0.6rem 0.65rem;
3588
+ white-space: pre;
3589
+ }
3590
+ .vh-agent-tool-list__body > p { white-space: pre-wrap; overflow-wrap: anywhere; }
3591
+
3592
+ .vh-agent-tool-list__properties { width: 100%; border-collapse: collapse; font-size: 0.6875rem; text-align: start; table-layout: fixed; }
3593
+ .vh-agent-tool-list__properties td, .vh-agent-tool-list__properties th { border-bottom: 1px solid var(--vh-border); padding: 0.375rem; vertical-align: top; overflow-wrap: anywhere; }
3594
+ .vh-agent-tool-list__properties small { display: block; color: var(--vh-muted); }
3595
+ .vh-agent-tool-list__schema pre { white-space: pre-wrap; overflow-wrap: anywhere; }
3596
+ .vh-agent-tool-list__unavailable { color: var(--vh-muted); font-size: 0.6875rem; }
3597
+ }
3598
+
3599
+ /*
3600
+ * Workspace: the shell, editor, terminal, preview, boot checklist, Connect panel, and browser notice.
3601
+ * Neutral monochrome. State shows with ink, not hue. The editor and the terminal sit on the page surface; only the
3602
+ * syntax colors have a hue, and codemirror.ts reads them from the Pierre themes of FileView. Each workspace element
3603
+ * resolves these variables itself, so a `.dark` subtree on a light page needs nothing else.
3604
+ */
3605
+ @layer components {
3606
+ :where(:root, [class^="vh-ws-"], [class*=" vh-ws-"]) {
3607
+ --vh-ws-font-mono: var(--font-mono, "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace);
3608
+ --vh-ws-code-bg: var(--vh-bg);
3609
+ --vh-ws-code-fg: var(--vh-highlighted);
3610
+ --vh-ws-code-cursor: var(--vh-highlighted);
3611
+ --vh-ws-code-selection: color-mix(in oklab, var(--vh-highlighted) 14%, transparent);
3612
+ /* Translucent, because CodeMirror draws the selection under the line. */
3613
+ --vh-ws-code-line: color-mix(in oklab, var(--vh-highlighted) 4%, transparent);
3614
+ --vh-ws-code-gutter: var(--vh-dimmed);
3615
+ --vh-ws-code-gutter-active: var(--vh-text);
3616
+ --vh-ws-code-comment: var(--vh-dimmed);
3617
+ --vh-ws-code-punctuation: var(--vh-muted);
3618
+ /* The terminal shares the editor surface, so the panel under the editor reads as one pane. */
3619
+ --vh-ws-terminal-bg: var(--vh-ws-code-bg);
3620
+ --vh-ws-terminal-fg: var(--vh-text);
3621
+ /* System colors, not currentColor: a currentColor fill under inverted text would take the text color and vanish. */
3622
+ --vh-ws-ink: var(--ui-text-highlighted, CanvasText);
3623
+ --vh-ws-ink-inverted: var(--ui-bg, Canvas);
3624
+ }
3625
+ }
3626
+
3627
+ @layer components {
3628
+ .vh-ws-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
3629
+ .vh-ws-icon { width: 1rem; height: 1rem; flex: none; }
3630
+ .vh-ws-logo { width: 1.25rem; height: 1.25rem; flex: none; color: var(--vh-highlighted); }
3631
+ .vh-ws-muted { color: var(--vh-muted); }
3632
+
3633
+ .vh-ws-button {
3634
+ align-items: center; background: var(--vh-bg); border: 1px solid var(--vh-border); border-radius: calc(var(--vh-radius) * 0.75);
3635
+ color: var(--vh-text); cursor: pointer; display: inline-flex; font: inherit; font-size: 0.8125rem; font-weight: 500; gap: 0.375rem;
3636
+ min-height: 2rem; padding: 0 0.75rem; text-decoration: none; white-space: nowrap;
3637
+ }
3638
+ .vh-ws-button:disabled, .vh-ws-button[aria-disabled="true"] { cursor: default; opacity: 0.5; }
3639
+ .vh-ws-button--primary { background: var(--vh-ws-ink); border-color: var(--vh-ws-ink); color: var(--vh-ws-ink-inverted); }
3640
+ .vh-ws-button .vh-ws-icon { width: 0.875rem; height: 0.875rem; }
3641
+ @media (hover: hover) {
3642
+ .vh-ws-button:not(:disabled):hover { border-color: var(--vh-muted); }
3643
+ .vh-ws-button--primary:not(:disabled):hover { opacity: 0.88; }
3644
+ }
3645
+ .vh-ws-icon-button {
3646
+ align-items: center; background: none; border: 0; border-radius: calc(var(--vh-radius) * 0.75); color: var(--vh-muted);
3647
+ cursor: pointer; display: inline-flex; flex: none; height: 2.75rem; justify-content: center; width: 2.75rem;
3648
+ }
3649
+ .vh-ws-icon-button:disabled, .vh-ws-icon-button[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
3650
+ @media (hover: hover) { .vh-ws-icon-button:hover { color: var(--vh-highlighted); } }
3651
+ .vh-ws-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
3652
+ .vh-ws-link { color: var(--vh-highlighted); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 2px; }
3653
+
3654
+ /* Shell */
3655
+ .vh-ws-shell {
3656
+ background: var(--vh-bg); border: 1px solid var(--vh-border); border-radius: var(--vh-radius); color: var(--vh-text);
3657
+ display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; position: relative;
3658
+ }
3659
+ .vh-ws-toolbar { align-items: center; border-bottom: 1px solid var(--vh-border); display: flex; flex: none; gap: 0.5rem; min-height: 2.75rem; padding: 0 0.5rem; }
3660
+ .vh-ws-body { display: flex; flex: 1; min-height: 0; min-width: 0; }
3661
+ .vh-ws-body--row { flex-direction: row; }
3662
+ .vh-ws-body--column { flex-direction: column; }
3663
+ .vh-ws-row { display: flex; flex-shrink: 0; min-height: 0; }
3664
+ .vh-ws-stack { display: flex; flex-direction: column; height: 100%; min-height: 0; }
3665
+ .vh-ws-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; position: relative; }
3666
+ .vh-ws-pane--files { flex-grow: 0; flex-shrink: 0; }
3667
+ .vh-ws-pane--editor, .vh-ws-pane--center, .vh-ws-pane--terminal, .vh-ws-pane--panels { flex: 1; }
3668
+ .vh-ws-stack > .vh-ws-pane:first-child { flex-grow: 0; flex-shrink: 0; }
3669
+ .vh-ws-pane--side { flex-grow: 0; flex-shrink: 0; }
3670
+ .vh-ws-separator { background: var(--vh-border); flex: none; position: relative; touch-action: none; z-index: 1; }
3671
+ .vh-ws-separator--vertical { cursor: col-resize; width: 1px; }
3672
+ .vh-ws-separator--horizontal { cursor: row-resize; height: 1px; }
3673
+ /* A wider hit area than the 1px line. */
3674
+ .vh-ws-separator::after { content: ""; inset: -4px; position: absolute; }
3675
+ @media (hover: hover) { .vh-ws-separator:hover { background: var(--vh-muted); } }
3676
+ .vh-ws-overlay { background: var(--vh-bg); display: grid; inset: 0; overflow: auto; padding: 1.5rem; place-items: center; position: absolute; z-index: 2; }
3677
+
3678
+ .vh-ws-tabs { display: flex; flex: 1; flex-direction: column; min-height: 0; }
3679
+ /* UTabs draws the strip, its divider, and its underline. */
3680
+ .vh-ws-tab-list { flex: none; }
3681
+ .vh-ws-tab-panels { flex: 1; min-height: 0; position: relative; }
3682
+ .vh-ws-tab-panel { display: flex; flex-direction: column; inset: 0; overflow: auto; position: absolute; }
3683
+ /* Hidden panels stay mounted, so the terminal keeps its output and the preview keeps its page. */
3684
+ .vh-ws-tab-panel.is-hidden { visibility: hidden; }
3685
+
3686
+ /* File tree, editor, terminal */
3687
+ .vh-ws-file-tree { border: 0; border-radius: 0; height: 100%; }
3688
+ .vh-ws-editor { background: var(--vh-ws-code-bg); flex: 1; height: 100%; min-height: 0; overflow: hidden; }
3689
+ .vh-ws-editor .cm-editor { height: 100%; }
3690
+ .vh-ws-editor-fallback { color: var(--vh-ws-code-fg); font-family: var(--vh-ws-font-mono); font-size: 13px; line-height: 1.6; margin: 0; overflow: auto; padding: 8px 12px 8px 3.5rem; white-space: pre; }
3691
+ .vh-ws-terminal { background: var(--vh-ws-terminal-bg); flex: 1; height: 100%; min-height: 0; padding: 0.5rem 0 0 0.75rem; }
3692
+ .vh-ws-terminal .xterm, .vh-ws-terminal .xterm-viewport { background: var(--vh-ws-terminal-bg) !important; }
3693
+
3694
+ /* Preview */
3695
+ .vh-ws-preview { display: flex; flex: 1; flex-direction: column; height: 100%; min-height: 0; }
3696
+ .vh-ws-preview-bar { align-items: center; border-bottom: 1px solid var(--vh-border); display: flex; flex: none; gap: 0.25rem; padding: 0 0.25rem; }
3697
+ /* UInput draws the path field and its focus. */
3698
+ .vh-ws-preview-path { flex: 1; min-width: 0; }
3699
+ .vh-ws-preview-devices { align-items: center; display: flex; flex: none; }
3700
+ .vh-ws-preview-devices .vh-ws-icon-button[aria-pressed="true"] { background: var(--vh-bg-elevated); color: var(--vh-highlighted); }
3701
+ /* A pointer needs no 44px target, so the browser frame stays one dense row. */
3702
+ @media (pointer: fine) {
3703
+ .vh-ws-preview-bar .vh-ws-icon-button { height: 1.75rem; width: 1.75rem; }
3704
+ }
3705
+ :is(.vh-ws-preview-path, .vh-ws-input) input { font-family: var(--vh-ws-font-mono); }
3706
+ /* The frame paints the light canvas, so its page must not take the dark scheme of this page and draw white text. */
3707
+ .vh-ws-preview-frame { background: Canvas; border: 0; color-scheme: light; flex: 1; width: 100%; }
3708
+ .vh-ws-empty { align-content: center; display: grid; flex: 1; gap: 0.25rem; justify-items: center; padding: 2rem; text-align: center; }
3709
+ .vh-ws-empty p { font-size: 0.875rem; margin: 0; }
3710
+ .vh-ws-empty-title { color: var(--vh-highlighted); font-weight: 600; }
3711
+
3712
+ /* Boot checklist */
3713
+ .vh-ws-boot { display: grid; gap: 1rem; max-width: 26rem; width: 100%; }
3714
+ .vh-ws-boot-title { color: var(--vh-highlighted); font-size: 0.9375rem; font-weight: 600; margin: 0; }
3715
+ .vh-ws-steps { display: grid; gap: 0.125rem; list-style: none; margin: 0; padding: 0; }
3716
+ .vh-ws-step { align-items: center; color: var(--vh-muted); display: grid; font-size: 0.875rem; gap: 0.75rem; grid-template-columns: 1rem 1fr auto; min-height: 2rem; }
3717
+ .vh-ws-step[data-state="running"], .vh-ws-step[data-state="failed"] { color: var(--vh-highlighted); font-weight: 600; }
3718
+ .vh-ws-step[data-state="done"] { color: var(--vh-text); }
3719
+ .vh-ws-step[data-state="skipped"] .vh-ws-step-label { text-decoration: line-through; }
3720
+ .vh-ws-step-icon { width: 1rem; height: 1rem; }
3721
+ .vh-ws-step-dot { border: 1.5px solid currentColor; border-radius: 50%; height: 0.625rem; justify-self: center; opacity: 0.6; width: 0.625rem; }
3722
+ .vh-ws-step-dot.is-running { background: currentColor; opacity: 1; animation: vh-ws-pulse 1.2s ease-in-out infinite; }
3723
+ .vh-ws-step-time { font-family: var(--vh-ws-font-mono); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
3724
+ .vh-ws-boot-hint, .vh-ws-failure-body { font-size: 0.8125rem; margin: 0; }
3725
+ .vh-ws-failure { border-top: 1px solid var(--vh-border); display: grid; gap: 0.75rem; padding-top: 1rem; }
3726
+ .vh-ws-failure-body { overflow-wrap: anywhere; white-space: pre-wrap; }
3727
+ .vh-ws-notice { align-items: flex-start; border: 1px solid var(--vh-border); border-radius: calc(var(--vh-radius) * 0.75); display: flex; font-size: 0.8125rem; gap: 0.5rem; margin: 0; padding: 0.625rem 0.75rem; }
3728
+ @keyframes vh-ws-pulse { 50% { opacity: 0.35; } }
3729
+ @media (prefers-reduced-motion: reduce) { .vh-ws-step-dot.is-running { animation: none; } }
3730
+
3731
+ /* Connect */
3732
+ .vh-ws-connect { display: grid; gap: 1.25rem; padding: 1rem; }
3733
+ .vh-ws-connect-heading { color: var(--vh-muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; margin: 0 0 0.25rem; text-transform: uppercase; }
3734
+ .vh-ws-providers { list-style: none; margin: 0; padding: 0; }
3735
+ .vh-ws-provider { border-bottom: 1px solid var(--vh-border); padding: 0.625rem 0; }
3736
+ .vh-ws-provider:last-child { border-bottom: 0; }
3737
+ .vh-ws-provider-row { align-items: center; display: grid; gap: 0.75rem; grid-template-columns: 1.25rem 1fr auto; }
3738
+ .vh-ws-provider-text { display: grid; min-width: 0; }
3739
+ .vh-ws-provider-label { color: var(--vh-highlighted); font-size: 0.875rem; font-weight: 500; }
3740
+ .vh-ws-provider-status { color: var(--vh-muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3741
+ .vh-ws-provider-action { display: flex; gap: 0.375rem; }
3742
+ .vh-ws-connected { align-items: center; color: var(--vh-text); display: inline-flex; gap: 0.25rem; }
3743
+ .vh-ws-connected .vh-ws-icon { width: 0.875rem; height: 0.875rem; }
3744
+ .vh-ws-error { color: var(--vh-highlighted); font-weight: 500; }
3745
+ .vh-ws-env { font-family: var(--vh-ws-font-mono); font-size: 0.75rem; }
3746
+ .vh-ws-token-form { display: grid; gap: 0.375rem; margin-top: 0.625rem; padding-left: 2rem; }
3747
+ .vh-ws-token-label { color: var(--vh-text); font-size: 0.8125rem; font-weight: 500; }
3748
+ .vh-ws-token-row { display: flex; gap: 0.375rem; }
3749
+ .vh-ws-input { flex: 1; min-width: 0; }
3750
+ .vh-ws-connect-footer { align-items: flex-start; border-top: 1px solid var(--vh-border); color: var(--vh-muted); display: grid; font-size: 0.8125rem; gap: 0.5rem 0.625rem; grid-template-columns: 1rem 1fr; padding-top: 1rem; }
3751
+ .vh-ws-connect-footer p { margin: 0; }
3752
+ .vh-ws-connect-footer .vh-ws-button { grid-column: 2; justify-self: start; }
3753
+ .vh-ws-connect--empty { align-items: center; color: var(--vh-muted); font-size: 0.875rem; gap: 0.5rem; grid-template-columns: 1rem 1fr; }
3754
+ .vh-ws-connect--empty p { margin: 0; }
3755
+
3756
+ /* PlaygroundContainer: a toolbar over the shell, and the cards that show when the device cannot run the workspace. */
3757
+ .vh-pc { display: flex; flex-direction: column; height: 100%; min-height: 0; }
3758
+ .vh-pc-session { display: flex; flex: 1; flex-direction: column; min-height: 0; }
3759
+ .vh-pc-session > .vh-ws-shell { border: 0; border-radius: 0; flex: 1; }
3760
+ .vh-pc-toolbar { align-items: center; border-bottom: 1px solid var(--vh-border); display: flex; flex: none; gap: 0.25rem; height: 2.75rem; padding: 0 0.5rem; }
3761
+ .vh-pc-spacer { flex: 1; }
3762
+ .vh-pc-muted { color: var(--vh-muted); }
3763
+ .vh-pc-strong { color: var(--vh-highlighted); font-weight: 500; }
3764
+ .vh-pc-bar { align-items: center; background: var(--vh-bg-elevated); border-bottom: 1px solid var(--vh-border); display: flex; flex: none; font-size: 0.8125rem; gap: 0.5rem; padding: 0.5rem 0.75rem; }
3765
+ .vh-pc-run-state { color: var(--vh-muted); display: inline-flex; font-size: 0.8125rem; margin-inline-start: 0.25rem; white-space: nowrap; }
3766
+
3767
+ /* Panes side by side have the same header row, so they line up with the preview bar. */
3768
+ .vh-pc-pane { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; }
3769
+ .vh-pc-pane-header, .vh-pc .vh-ws-preview-bar { align-items: center; border-bottom: 1px solid var(--vh-border); display: flex; flex: none; gap: 0.5rem; height: 2.25rem; padding: 0 0.75rem; }
3770
+ .vh-pc .vh-ws-preview-bar { padding: 0 0.25rem; }
3771
+ .vh-pc .vh-ws-tab-list [data-slot="trigger"] { min-height: 2.25rem; }
3772
+ .vh-pc-pane-body { display: flex; flex: 1; flex-direction: column; min-height: 0; position: relative; }
3773
+ .vh-pc-pane-title { color: var(--vh-muted); font-size: 0.75rem; font-weight: 500; }
3774
+ .vh-pc-pane-header .vh-pc-muted { font-size: 0.75rem; }
3775
+ .vh-pc-path { color: var(--vh-text); font-family: var(--vh-ws-font-mono); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3776
+ /* The file column is one tinted surface, header included. */
3777
+ .vh-pc-files { background: var(--vh-bg-muted); }
3778
+ .vh-pc-files .vh-ws-file-tree { --trees-bg-override: var(--vh-bg-muted); }
3779
+ .vh-pc-tree { flex: 1; min-height: 0; overflow: auto; padding: 0.25rem 0; }
3780
+ .vh-pc-scroll { height: 100%; overflow: auto; }
3781
+ /* The checklist sits in the middle of the preview, with room on every side. */
3782
+ .vh-pc-boot { align-items: center; display: flex; flex: 1; justify-content: center; overflow: auto; padding: 2rem 1.5rem; }
3783
+ .vh-pc-modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; width: 100%; }
3784
+
3785
+ .vh-pc-card { border: 1px solid var(--vh-border); border-radius: var(--vh-radius); margin-top: 1.5rem; padding: 1rem; }
3786
+ .vh-pc-card p { font-size: 0.875rem; margin: 0; }
3787
+ .vh-pc-unsupported { margin-top: 1.5rem; }
3788
+ .vh-pc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
3789
+ .vh-pc-placeholder { display: none; }
3790
+ /* Before mount, phones see their card, tablets see nothing yet, and desktops see where the workspace starts. */
3791
+ @media (min-width: 48rem) {
3792
+ .vh-pc-gate[data-state="pending"] .vh-pc-phone { display: none; }
3793
+ }
3794
+ @media (min-width: 64rem) {
3795
+ .vh-pc-gate[data-state="pending"] { display: flex; flex: 1; flex-direction: column; }
3796
+ .vh-pc-gate[data-state="pending"] .vh-pc-gate-content { display: none; }
3797
+ .vh-pc-gate[data-state="pending"] .vh-pc-placeholder { align-items: center; display: flex; flex: 1; flex-direction: column; justify-content: center; min-height: 0; }
3798
+ .vh-pc-placeholder-bar { align-self: stretch; border-bottom: 1px solid var(--vh-border); height: 2.75rem; margin-bottom: auto; }
3799
+ .vh-pc-placeholder p { font-size: 0.875rem; margin: 0 0 auto; }
3800
+ }
3801
+
3802
+ /* Browser support notice */
3803
+ .vh-ws-support { align-items: flex-start; background: var(--vh-bg-muted); border: 1px solid var(--vh-border); border-radius: var(--vh-radius); color: var(--vh-text); display: grid; gap: 0.75rem; grid-template-columns: 1.25rem 1fr; padding: 1rem; }
3804
+ .vh-ws-support-icon { color: var(--vh-highlighted); width: 1.25rem; height: 1.25rem; }
3805
+ .vh-ws-support-text { display: grid; gap: 0.5rem; }
3806
+ .vh-ws-support-text p { font-size: 0.875rem; margin: 0; }
3807
+ .vh-ws-support-title { color: var(--vh-highlighted); font-weight: 600; }
3808
+ .vh-ws-support .vh-ws-button { min-height: 2.75rem; }
3809
+ .vh-ws-popover-anchor { position: relative; }
3810
+ .vh-ws-popover {
3811
+ background: var(--vh-bg); border: 1px solid var(--vh-border); border-radius: calc(var(--vh-radius) * 0.75); font-size: 0.8125rem;
3812
+ inset-block-start: calc(100% + 0.375rem); inset-inline-start: 0; margin: 0; padding: 0.625rem 0.75rem; position: absolute; width: min(18rem, 80vw); z-index: 3;
3813
+ }
3814
+ }
3815
+
3816
+ /* PlaygroundRender: the examples, the editor, and the preview side by side. The textarea of each pane sits over a
3817
+ colored copy of its text in one grid cell. The copy sets the height and the pane scrolls. */
3818
+ @layer components {
3819
+ .vh-pg {
3820
+ background: var(--vh-bg); border: 1px solid var(--vh-border); border-radius: var(--vh-radius); color: var(--vh-text);
3821
+ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 100%; min-height: 0; overflow: hidden;
3822
+ }
3823
+ .vh-pg:has(> .vh-pg-presets) { grid-template-columns: 14rem minmax(0, 1fr) minmax(0, 1fr); }
3824
+ .vh-pg-presets { border-inline-end: 1px solid var(--vh-border); display: grid; align-content: start; gap: 1rem; min-height: 0; overflow-y: auto; padding: 0.75rem 0.5rem; }
3825
+ .vh-pg-group ul { display: grid; gap: 0.125rem; list-style: none; margin: 0; padding: 0; }
3826
+ .vh-pg-group-title { color: var(--vh-muted); font-size: 0.75rem; font-weight: 600; margin: 0 0 0.25rem; padding: 0 0.5rem; }
3827
+ .vh-pg-preset {
3828
+ background: none; border: 0; border-radius: calc(var(--vh-radius) * 0.75); color: var(--vh-muted); cursor: pointer; display: block;
3829
+ font: inherit; font-size: 0.8125rem; padding: 0.375rem 0.5rem; text-align: start; width: 100%;
3830
+ }
3831
+ .vh-pg-preset[aria-current="true"] { background: var(--vh-bg-muted); color: var(--vh-highlighted); font-weight: 500; }
3832
+ @media (hover: hover) { .vh-pg-preset:hover { color: var(--vh-highlighted); } }
3833
+
3834
+ .vh-pg-editor { border-inline-end: 1px solid var(--vh-border); display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
3835
+ .vh-pg-bar { align-items: center; border-bottom: 1px solid var(--vh-border); display: flex; flex: none; gap: 0.5rem; justify-content: space-between; min-height: 2.75rem; padding: 0 0.25rem 0 0.5rem; }
3836
+ .vh-pg-tabs { display: flex; gap: 0.125rem; }
3837
+ .vh-pg-tab {
3838
+ background: none; border: 0; border-radius: calc(var(--vh-radius) * 0.75); color: var(--vh-muted); cursor: pointer;
3839
+ font: inherit; font-size: 0.8125rem; font-weight: 500; min-height: 2rem; padding: 0 0.625rem;
3840
+ }
3841
+ .vh-pg-tab[aria-pressed="true"] { background: var(--vh-bg-muted); color: var(--vh-highlighted); }
3842
+ .vh-pg-title { color: var(--vh-highlighted); font-size: 0.8125rem; font-weight: 500; padding: 0 0.25rem; }
3843
+ .vh-pg-actions { align-items: center; display: flex; gap: 0.25rem; }
3844
+ .vh-pg-icon-button { height: 2rem; width: 2rem; }
3845
+
3846
+ .vh-pg-pane { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: auto; }
3847
+ .vh-pg-pane[hidden] { display: none; }
3848
+ .vh-pg-code { display: grid; flex: 1; background: var(--vh-ws-code-bg, var(--vh-bg-muted)); }
3849
+ .vh-pg-code > *, .vh-pg-paint pre { grid-area: 1 / 1; }
3850
+ .vh-pg-paint { display: grid; pointer-events: none; }
3851
+ .vh-pg-paint pre, .vh-pg-code textarea {
3852
+ background: none !important; border: 0; border-radius: 0; box-shadow: none; color: var(--vh-text); font: 0.8125rem/1.65 var(--vh-ws-font-mono);
3853
+ margin: 0; overflow: visible; overflow-wrap: anywhere; padding: 1rem; tab-size: 2; white-space: pre-wrap;
3854
+ }
3855
+ .vh-pg-paint code { font: inherit; }
3856
+ :root.dark .vh-pg-paint span { color: var(--shiki-dark) !important; }
3857
+ .vh-pg-code textarea { caret-color: var(--vh-text); color: transparent; overflow: hidden; resize: none; }
3858
+ .vh-pg-code textarea::selection { background: var(--vh-selection, color-mix(in oklab, var(--vh-text) 18%, transparent)); }
3859
+
3860
+ .vh-pg-notice { border-top: 1px solid var(--vh-border); color: var(--vh-highlighted); flex: none; font-size: 0.8125rem; margin: 0; padding: 0.625rem 1rem; }
3861
+ .vh-pg-issues { border-top: 1px solid var(--vh-border); color: var(--vh-warning); flex: none; font-size: 0.8125rem; list-style: none; margin: 0; max-height: 30%; overflow-y: auto; padding: 0.625rem 1rem; }
3862
+ .vh-pg-issues[hidden] { display: none; }
3863
+ .vh-pg-issues li + li { margin-top: 0.375rem; }
3864
+ .vh-pg-issue-line { font-family: var(--vh-ws-font-mono); font-weight: 600; margin-inline-end: 0.5rem; }
3865
+
3866
+ .vh-pg-confirm { background: var(--vh-bg); border: 1px solid var(--vh-border); border-radius: var(--vh-radius); color: var(--vh-text); max-width: 22rem; padding: 1rem; }
3867
+ .vh-pg-confirm form { display: grid; gap: 0.5rem; }
3868
+ .vh-pg-confirm p { font-size: 0.875rem; margin: 0; }
3869
+ .vh-pg-confirm-title { color: var(--vh-highlighted); font-weight: 600; }
3870
+ .vh-pg-confirm .vh-ws-actions { justify-content: end; margin-top: 0.5rem; }
3871
+
3872
+ /* The frame paints the light canvas, so its page must not take the dark scheme of this page and draw white text. */
3873
+ .vh-pg-preview { background: Canvas; border: 0; color-scheme: light; height: 100%; width: 100%; }
3874
+
3875
+ @media (max-width: 60rem) {
3876
+ .vh-pg, .vh-pg:has(> .vh-pg-presets) { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(18rem, 1fr) minmax(18rem, 1fr); }
3877
+ .vh-pg:has(> .vh-pg-presets) { grid-template-rows: auto minmax(18rem, 1fr) minmax(18rem, 1fr); }
3878
+ .vh-pg-presets { border-bottom: 1px solid var(--vh-border); border-inline-end: 0; display: flex; overflow-x: auto; }
3879
+ .vh-pg-group { flex: none; }
3880
+ .vh-pg-group ul { display: flex; }
3881
+ .vh-pg-preset { white-space: nowrap; }
3882
+ .vh-pg-editor { border-bottom: 1px solid var(--vh-border); border-inline-end: 0; }
3883
+ /* Smaller text makes iOS zoom into the field. */
3884
+ .vh-pg-paint pre, .vh-pg-code textarea { font-size: 1rem; }
3885
+ }
3886
+ }
3887
+
3888
+ /* MarkdownEditor: the text takes the comark typeset. The editor has no frame, so its caret shows focus. */
3889
+ @layer components {
3890
+ .vh-markdown-editor-content .ProseMirror {
3891
+ min-height: 100%;
3892
+ outline: none;
3893
+ }
3894
+ }
3895
+
3896
+ /*
3897
+ * The editor parts of the ui-sdk set (`uiSdkComponents`). The kit style family draws their ui-sdk parts, and these
3898
+ * rules give them the shape of Nuxt UI's editor parts. Nuxt UI's parts carry none of these classes.
3899
+ */
3900
+ @layer components {
3901
+ /* The bubble toolbar floats as a popup does: a ring and a soft shadow, no border. */
3902
+ .vh-editor-toolbar[data-layout="bubble"] {
3903
+ background: var(--popover, var(--vh-bg));
3904
+ border-width: 0;
3905
+ box-shadow: var(--shadow-popover, 0 0 0 1px var(--vh-border));
3906
+ color: var(--popover-foreground, var(--vh-text));
3907
+ padding: 0.25rem;
3908
+ }
3909
+ .vh-editor-toolbar-root { z-index: 50; }
3910
+
3911
+ /* The "/" list is one popup: Nuxt UI's width, and at most 24rem tall. */
3912
+ .vh-editor-suggestion-menu {
3913
+ max-height: min(24rem, var(--available-height));
3914
+ max-width: 15rem;
3915
+ min-width: 12rem;
3916
+ }
3917
+ /* web.css styles a menu's group labels and separators, but not a trigger menu's. These match the menu's. */
3918
+ .vh-editor-suggestion-menu [data-slot="trigger-menu-group-label"] {
3919
+ color: var(--ui-muted-foreground, var(--vh-muted));
3920
+ font-size: 0.75rem;
3921
+ padding: 0.375rem 0.5rem 0.25rem;
3922
+ }
3923
+ .vh-editor-suggestion-menu [data-slot="trigger-menu-separator"] {
3924
+ background: var(--ui-border, var(--vh-border));
3925
+ height: 1px;
3926
+ margin: 0.25rem -0.25rem;
3927
+ }
3928
+ [data-slot="editor-suggestion-text"] { display: flex; flex: 1; flex-direction: column; min-width: 0; }
3929
+ :is([data-slot="editor-suggestion-label"], [data-slot="editor-suggestion-description"]) {
3930
+ overflow: hidden;
3931
+ text-overflow: ellipsis;
3932
+ white-space: nowrap;
3933
+ }
3934
+ [data-slot="editor-suggestion-description"] { color: var(--muted-foreground, var(--vh-muted)); font-size: 0.75rem; }
3935
+ /* Screen readers hear the count from the status. It takes no room. */
3936
+ .vh-editor-suggestion-menu__status {
3937
+ block-size: 1px;
3938
+ clip-path: inset(50%);
3939
+ inline-size: 1px;
3940
+ overflow: hidden;
3941
+ position: absolute;
3942
+ white-space: nowrap;
3943
+ }
3944
+
3945
+ /* The handle glides to the block under the pointer. A narrow screen has no room beside the text, as in Nuxt UI. */
3946
+ .vh-editor-drag-handle {
3947
+ align-items: center;
3948
+ display: flex;
3949
+ justify-content: center;
3950
+ transition: top 200ms ease-out, left 200ms ease-out;
3951
+ }
3952
+ .vh-editor-drag-handle__handle { cursor: grab; padding-inline: 0.25rem; }
3953
+ @media (prefers-reduced-motion: reduce) {
3954
+ .vh-editor-drag-handle { transition: none; }
3955
+ }
3956
+ @media (max-width: 639.98px) {
3957
+ .vh-editor-drag-handle { display: none; }
3958
+ }
3959
+ }
3960
+
3961
+ /*
3962
+ * AgentSession: T3 Code's thread layout (MIT, T3 Tools Inc.). A 52px header, a timeline lane of at most 46rem, a 17.5rem
3963
+ * details card at the top right (flat, not T3's glass, like every Console surface), and a right panel of surface tabs whose toggle stays in the top right corner.
3964
+ */
3965
+ @layer components {
3966
+ .vh-agent-session {
3967
+ --vh-agent-topbar: 52px;
3968
+ --vh-agent-control: 1.75rem;
3969
+ --vh-agent-lane: 46rem;
3970
+ --vh-agent-details-width: 17.5rem;
3971
+ --vh-agent-hover: color-mix(in oklab, var(--vh-text) 6%, transparent);
3972
+ --vh-agent-pressed: color-mix(in oklab, var(--vh-text) 9%, transparent);
3973
+ --vh-agent-message: color-mix(in oklab, var(--vh-bg) 93%, var(--vh-text));
3974
+ --vh-agent-hairline: color-mix(in oklab, var(--vh-border) 65%, transparent);
3975
+ /* The typeset grain would mark each answer as a box on the timeline. */
3976
+ --comark-grain: none;
3977
+ background: var(--vh-bg);
3978
+ color: var(--vh-text);
3979
+ display: flex;
3980
+ font-size: 0.875rem;
3981
+ height: 100%;
3982
+ isolation: isolate;
3983
+ min-height: 0;
3984
+ min-width: 0;
3985
+ overflow: hidden;
3986
+ position: relative;
3987
+ }
3988
+ /* A user turn stands one step off the canvas: lighter on a dark page, darker on a light one. */
3989
+ :where(.dark) .vh-agent-session { --vh-agent-message: color-mix(in oklab, var(--vh-bg) 88%, var(--vh-text)); }
3990
+ .vh-agent-session :where(button) { font: inherit; }
3991
+ .vh-agent-session__sr {
3992
+ block-size: 1px; clip-path: inset(50%); inline-size: 1px; overflow: hidden; position: absolute; white-space: nowrap;
3993
+ }
3994
+
3995
+ .vh-agent-session__main { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; min-width: 0; }
3996
+ .vh-agent-session[data-maximized] .vh-agent-session__main { display: none; }
3997
+
3998
+ .vh-agent-session__header {
3999
+ align-items: center;
4000
+ display: flex;
4001
+ flex: none;
4002
+ gap: 0.75rem;
4003
+ height: var(--vh-agent-topbar);
4004
+ padding-inline: 1.25rem 0.75rem;
4005
+ }
4006
+ .vh-agent-session__heading { align-items: baseline; display: flex; flex: 1 1 0; gap: 0.5rem; min-width: 0; }
4007
+ .vh-agent-session__title {
4008
+ color: var(--vh-highlighted);
4009
+ flex: none;
4010
+ font-size: 0.875rem;
4011
+ font-weight: 500;
4012
+ margin: 0;
4013
+ max-width: 100%;
4014
+ min-width: 0;
4015
+ overflow: hidden;
4016
+ text-overflow: ellipsis;
4017
+ white-space: nowrap;
4018
+ }
4019
+ .vh-agent-session__subtitle {
4020
+ color: var(--vh-muted);
4021
+ flex: 0 1000 auto;
4022
+ font-size: 0.8125rem;
4023
+ font-variant-numeric: tabular-nums;
4024
+ min-width: 0;
4025
+ overflow: hidden;
4026
+ text-overflow: ellipsis;
4027
+ white-space: nowrap;
4028
+ }
4029
+ .vh-agent-session__controls { align-items: center; display: flex; flex: none; gap: 0.25rem; }
4030
+
4031
+ .vh-agent-session__toggle {
4032
+ align-items: center;
4033
+ background: transparent;
4034
+ border: 0;
4035
+ border-radius: 0.5rem;
4036
+ color: var(--vh-muted);
4037
+ cursor: pointer;
4038
+ display: inline-flex;
4039
+ flex: none;
4040
+ height: var(--vh-agent-control);
4041
+ justify-content: center;
4042
+ padding: 0;
4043
+ transition: background-color 150ms ease-out, color 150ms ease-out, scale 150ms ease-out;
4044
+ width: var(--vh-agent-control);
4045
+ }
4046
+ .vh-agent-session__toggle > * { height: 1rem; width: 1rem; }
4047
+ .vh-agent-session__toggle:hover { background: var(--vh-agent-hover); color: var(--vh-text); }
4048
+ .vh-agent-session__toggle[aria-pressed="true"] { background: var(--vh-agent-pressed); color: var(--vh-highlighted); }
4049
+ .vh-agent-session__toggle:active { scale: 0.96; }
4050
+
4051
+ .vh-agent-session__body { display: flex; flex: 1 1 0; min-height: 0; position: relative; }
4052
+ .vh-agent-session__scroll { flex: 1 1 0; min-width: 0; overflow-y: auto; scrollbar-gutter: stable; }
4053
+ .vh-agent-session[data-details="inline"] { --vh-agent-session-inset-end: calc(var(--vh-agent-details-width) + 1.5rem); }
4054
+ .vh-agent-session__scroll { padding-inline-end: var(--vh-agent-session-inset-end, 0); }
4055
+ .vh-agent-session__lane {
4056
+ box-sizing: content-box;
4057
+ margin-inline: auto;
4058
+ max-width: var(--vh-agent-lane);
4059
+ padding: 0.5rem 0.75rem 6rem;
4060
+ }
4061
+ @media (min-width: 640px) {
4062
+ .vh-agent-session__lane { padding-inline: 3rem; }
4063
+ }
4064
+
4065
+ .vh-agent-session__details {
4066
+ inset-block-start: 0;
4067
+ inset-inline-end: 0.75rem;
4068
+ max-height: calc(100% - 0.75rem);
4069
+ position: absolute;
4070
+ width: var(--vh-agent-details-width);
4071
+ z-index: 20;
4072
+ }
4073
+ /* On a narrow column the card is a native popover in the top layer. CSS anchor positioning puts it where the inline
4074
+ card goes, over the top end corner of the body. Where that fails, AgentSession places it from the body's box. */
4075
+ .vh-agent-session__details[popover] {
4076
+ background: none;
4077
+ border: 0;
4078
+ color: inherit;
4079
+ max-height: calc(100dvh - 2rem);
4080
+ overflow: visible;
4081
+ padding: 0;
4082
+ position: fixed;
4083
+ z-index: auto;
4084
+ }
4085
+ @supports (anchor-name: --a) {
4086
+ .vh-agent-session { anchor-scope: --vh-agent-session-body; }
4087
+ .vh-agent-session__body { anchor-name: --vh-agent-session-body; }
4088
+ .vh-agent-session__details[popover] {
4089
+ inset: auto;
4090
+ inset-block-start: anchor(start);
4091
+ inset-inline-end: calc(anchor(end) + 0.75rem);
4092
+ margin: 0;
4093
+ max-height: calc(anchor-size(block) - 0.75rem);
4094
+ position-anchor: --vh-agent-session-body;
4095
+ }
4096
+ }
4097
+ .vh-agent-session__details-card {
4098
+ background: var(--vh-bg-elevated);
4099
+ border: 1px solid color-mix(in srgb, var(--vh-text) 10%, transparent);
4100
+ border-radius: 1rem;
4101
+ box-shadow: var(--vh-shadow-floating, 0 0 0 1px var(--vh-border));
4102
+ max-height: 100%;
4103
+ overflow-y: auto;
4104
+ overscroll-behavior: contain;
4105
+ }
4106
+ .vh-agent-session[data-details="popover"] .vh-agent-session__details-card {
4107
+ box-shadow: var(--vh-shadow-dialog, 0 0 0 1px var(--vh-border));
4108
+ }
4109
+ .vh-agent-session__section { padding: 0.5rem 0.5rem 0.625rem; }
4110
+ .vh-agent-session__section + .vh-agent-session__section { border-top: 1px solid var(--vh-agent-hairline); }
4111
+ .vh-agent-session__section-heading {
4112
+ align-items: center;
4113
+ display: flex;
4114
+ gap: 0.5rem;
4115
+ justify-content: space-between;
4116
+ margin-block-end: 0.25rem;
4117
+ min-height: 2rem;
4118
+ padding-inline: 0.625rem;
4119
+ }
4120
+ .vh-agent-session__section-heading h3 {
4121
+ color: var(--vh-muted);
4122
+ font-size: 0.6875rem;
4123
+ font-weight: 500;
2649
4124
  margin: 0;
2650
- max-height: 18rem;
4125
+ overflow: hidden;
4126
+ text-overflow: ellipsis;
4127
+ user-select: none;
4128
+ white-space: nowrap;
4129
+ }
4130
+ .vh-agent-session__section-actions { align-items: center; display: flex; gap: 0.25rem; }
4131
+ .vh-agent-session__section-rows { display: flex; flex-direction: column; }
4132
+ .vh-agent-session__row {
4133
+ align-items: center;
4134
+ background: transparent;
4135
+ border: 1px solid transparent;
4136
+ border-radius: 0.5rem;
4137
+ box-sizing: border-box;
4138
+ color: color-mix(in oklab, var(--vh-text) 80%, transparent);
4139
+ display: flex;
4140
+ font-size: 0.8125rem;
4141
+ font-weight: 500;
4142
+ gap: 0.625rem;
4143
+ min-height: 2rem;
4144
+ min-width: 0;
4145
+ padding: 0.25rem 0.625rem;
4146
+ text-align: start;
4147
+ text-decoration: none;
4148
+ width: 100%;
4149
+ }
4150
+ .vh-agent-session__row[data-interactive] { cursor: pointer; transition: background-color 150ms ease-out, scale 150ms ease-out; }
4151
+ .vh-agent-session__row[data-interactive]:hover { background: var(--vh-agent-hover); }
4152
+ .vh-agent-session__row[data-interactive]:active { scale: 0.98; }
4153
+ .vh-agent-session__row-icon { color: var(--vh-muted); flex: none; height: 1rem; width: 1rem; }
4154
+ .vh-agent-session__row-label { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
4155
+ .vh-agent-session__row-value {
4156
+ color: var(--vh-muted);
4157
+ flex: none;
4158
+ font-variant-numeric: tabular-nums;
4159
+ max-width: 60%;
4160
+ overflow: hidden;
4161
+ text-overflow: ellipsis;
4162
+ white-space: nowrap;
4163
+ }
4164
+ .vh-agent-session__row[data-tone="success"] .vh-agent-session__row-value { color: var(--vh-success); }
4165
+ .vh-agent-session__row[data-tone="error"] .vh-agent-session__row-value { color: var(--vh-error); }
4166
+ .vh-agent-session__row[data-tone="info"] .vh-agent-session__row-value { color: var(--vh-info); }
4167
+ .vh-agent-session__row[data-tone="muted"] { color: var(--vh-muted); }
4168
+
4169
+ .vh-agent-session__timeline { display: flex; flex-direction: column; gap: 1rem; line-height: 1.625; }
4170
+ .vh-agent-session__user { align-items: flex-end; display: flex; flex-direction: column; }
4171
+ .vh-agent-session__bubble {
4172
+ background: var(--vh-agent-message);
4173
+ border-radius: 1rem;
4174
+ color: var(--vh-text);
4175
+ max-width: 80%;
4176
+ min-width: 0;
4177
+ overflow-wrap: anywhere;
4178
+ padding: 0.75rem;
4179
+ white-space: pre-wrap;
4180
+ }
4181
+ .vh-agent-session__bubble[data-folded] .vh-agent-session__bubble-text {
4182
+ -webkit-mask-image: linear-gradient(to bottom, currentColor calc(100% - 2lh), transparent);
4183
+ mask-image: linear-gradient(to bottom, currentColor calc(100% - 2lh), transparent);
4184
+ max-height: 10lh;
4185
+ overflow: hidden;
4186
+ }
4187
+ .vh-agent-session__bubble-more {
4188
+ background: transparent;
4189
+ border: 0;
4190
+ border-radius: 0.25rem;
4191
+ color: var(--vh-muted);
4192
+ cursor: pointer;
4193
+ font-size: 0.8125rem;
4194
+ margin-block-start: 0.375rem;
4195
+ padding: 0;
4196
+ }
4197
+ .vh-agent-session__bubble-more:hover { color: var(--vh-text); }
4198
+ .vh-agent-session__assistant { min-width: 0; padding: 0.125rem 0.25rem; }
4199
+ /* The timeline reads at one size. */
4200
+ .vh-agent-session__assistant .vh-typeset {
4201
+ --typeset-flow: 0.875em;
4202
+ --typeset-leading: 1.625;
4203
+ --vh-typeset-flow: 0.875em;
4204
+ --vh-typeset-leading: 1.625;
4205
+ font-size: 0.875rem;
4206
+ }
4207
+ .vh-agent-session__divider {
4208
+ align-items: center;
4209
+ color: var(--vh-muted);
4210
+ display: flex;
4211
+ font-size: 0.75rem;
4212
+ gap: 0.75rem;
4213
+ padding-inline: 0.25rem;
4214
+ }
4215
+ .vh-agent-session__divider::before,
4216
+ .vh-agent-session__divider::after { background: var(--vh-agent-hairline); content: ""; flex: 1 1 0; height: 1px; }
4217
+
4218
+ .vh-agent-session__work { display: flex; flex-direction: column; min-width: 0; }
4219
+ .vh-agent-session__work-summary {
4220
+ align-items: center;
4221
+ align-self: flex-start;
4222
+ background: transparent;
4223
+ border: 0;
4224
+ border-radius: 0.375rem;
4225
+ color: var(--vh-muted);
4226
+ cursor: pointer;
4227
+ display: inline-flex;
4228
+ font-variant-numeric: tabular-nums;
4229
+ gap: 0.375rem;
4230
+ min-height: 1.5rem;
4231
+ padding: 0 0.25rem;
4232
+ }
4233
+ .vh-agent-session__work-summary:hover { color: var(--vh-text); }
4234
+ .vh-agent-session__work-count { color: var(--vh-muted); font-size: 0.75rem; }
4235
+ .vh-agent-session__work-failed { color: var(--vh-error); }
4236
+ .vh-agent-session__work-chevron { height: 0.875rem; transition: rotate 150ms ease-out; width: 0.875rem; }
4237
+ .vh-agent-session__work[data-open] .vh-agent-session__work-chevron { rotate: 180deg; }
4238
+ .vh-agent-session__work[data-open] .vh-agent-session__work-summary {
4239
+ align-self: stretch;
4240
+ border-block-end: 1px solid var(--vh-agent-hairline);
4241
+ border-radius: 0;
4242
+ padding-block-end: 0.5rem;
4243
+ }
4244
+ .vh-agent-session__work-list { display: flex; flex-direction: column; padding-block: 0.125rem 0.25rem; }
4245
+ .vh-agent-session__work-row { border-radius: 0.375rem; min-width: 0; padding-inline: 0.125rem; }
4246
+ .vh-agent-session__work-line {
4247
+ align-items: center;
4248
+ background: transparent;
4249
+ border: 0;
4250
+ border-radius: 0.375rem;
4251
+ color: var(--vh-muted);
4252
+ display: flex;
4253
+ gap: 0.375rem;
4254
+ min-height: 1.5rem;
4255
+ padding: 0;
4256
+ text-align: start;
4257
+ user-select: none;
4258
+ width: 100%;
4259
+ }
4260
+ button.vh-agent-session__work-line { cursor: pointer; }
4261
+ button.vh-agent-session__work-line:hover .vh-agent-session__work-title { color: var(--vh-text); }
4262
+ .vh-agent-session__work-icon {
4263
+ align-items: center;
4264
+ color: var(--vh-muted);
4265
+ display: inline-flex;
4266
+ flex: none;
4267
+ height: 1.5rem;
4268
+ justify-content: center;
4269
+ width: 1.5rem;
4270
+ }
4271
+ .vh-agent-session__work-icon > * { height: 1rem; width: 1rem; }
4272
+ .vh-agent-session__work-icon[data-status="error"] { color: var(--vh-error); }
4273
+ .vh-agent-session__work-label { display: flex; flex: 1 1 0; gap: 0.375rem; min-width: 0; overflow: hidden; white-space: nowrap; }
4274
+ .vh-agent-session__work-title { flex: none; font-size: 0.8125rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
4275
+ .vh-agent-session__work-row[data-kind="command"] .vh-agent-session__work-title,
4276
+ .vh-agent-session__work-row[data-kind="edit"] .vh-agent-session__work-title,
4277
+ .vh-agent-session__work-row[data-kind="read"] .vh-agent-session__work-title {
4278
+ font-family: var(--vh-font-mono, var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace));
4279
+ font-size: 0.75rem;
4280
+ }
4281
+ .vh-agent-session__work-preview { color: var(--vh-muted); font-size: 0.8125rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
4282
+ .vh-agent-session__work-trailing { color: var(--vh-muted); flex: none; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
4283
+ .vh-agent-session__work-detail {
4284
+ border-inline-start: 1px solid var(--vh-agent-hairline);
4285
+ color: color-mix(in oklab, var(--vh-text) 80%, transparent);
4286
+ font-family: var(--vh-font-mono, var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace));
4287
+ font-size: 0.75rem;
4288
+ line-height: 1.6;
4289
+ margin: 0.125rem 0 0.375rem 0.75rem;
4290
+ max-height: 24rem;
2651
4291
  overflow: auto;
2652
- padding: 0.6rem 0.65rem;
2653
- white-space: pre;
4292
+ padding: 0.25rem 0 0.25rem 1rem;
4293
+ white-space: pre-wrap;
2654
4294
  }
2655
- .vh-agent-tool-list__body > p { white-space: pre-wrap; overflow-wrap: anywhere; }
2656
4295
 
2657
- .vh-agent-tool-list__properties { width: 100%; border-collapse: collapse; font-size: 0.6875rem; text-align: start; table-layout: fixed; }
2658
- .vh-agent-tool-list__properties td, .vh-agent-tool-list__properties th { border-bottom: 1px solid var(--vh-ui-border); padding: 0.375rem; vertical-align: top; overflow-wrap: anywhere; }
2659
- .vh-agent-tool-list__properties small { display: block; color: var(--vh-ui-muted); }
2660
- .vh-agent-tool-list__schema pre { white-space: pre-wrap; overflow-wrap: anywhere; }
2661
- .vh-agent-tool-list__unavailable { color: var(--vh-ui-muted); font-size: 0.6875rem; }
4296
+ .vh-agent-session__resizer {
4297
+ cursor: col-resize;
4298
+ flex: none;
4299
+ margin-inline: -3px;
4300
+ position: relative;
4301
+ touch-action: none;
4302
+ width: 7px;
4303
+ z-index: 30;
4304
+ }
4305
+ .vh-agent-session__resizer::after {
4306
+ background: var(--vh-border);
4307
+ content: "";
4308
+ inset-block: 0;
4309
+ inset-inline-start: 3px;
4310
+ position: absolute;
4311
+ transition: background-color 150ms ease-out;
4312
+ width: 1px;
4313
+ }
4314
+ .vh-agent-session__resizer:hover::after,
4315
+ .vh-agent-session__resizer:focus-visible::after { background: var(--vh-ring); }
4316
+ .vh-agent-session[data-maximized] .vh-agent-session__resizer { display: none; }
4317
+
4318
+ .vh-agent-session__panel {
4319
+ display: flex;
4320
+ flex: none;
4321
+ flex-direction: column;
4322
+ max-width: calc(100% - 34rem);
4323
+ min-height: 0;
4324
+ min-width: 20rem;
4325
+ width: var(--vh-agent-panel-width);
4326
+ }
4327
+ .vh-agent-session[data-maximized] .vh-agent-session__panel { flex: 1 1 0; max-width: none; width: auto; }
4328
+ .vh-agent-session__panel-header {
4329
+ align-items: center;
4330
+ display: flex;
4331
+ flex: none;
4332
+ gap: 0.25rem;
4333
+ height: var(--vh-agent-topbar);
4334
+ padding-inline: 0.5rem 0.75rem;
4335
+ }
4336
+ .vh-agent-session__tabs { align-items: center; display: flex; flex: 1 1 0; gap: 0.25rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
4337
+ .vh-agent-session__tab {
4338
+ align-items: center;
4339
+ border-radius: 0.375rem;
4340
+ position: relative;
4341
+ color: var(--vh-muted);
4342
+ display: flex;
4343
+ flex: none;
4344
+ font-size: 0.75rem;
4345
+ height: 1.5rem;
4346
+ max-width: 9rem;
4347
+ transition: background-color 150ms ease-out, color 150ms ease-out;
4348
+ }
4349
+ .vh-agent-session__tab:hover { background: var(--vh-agent-hover); color: var(--vh-text); }
4350
+ .vh-agent-session__tab[data-active] { background: var(--vh-agent-pressed); color: var(--vh-highlighted); }
4351
+ .vh-agent-session__tab-button {
4352
+ align-items: center;
4353
+ background: transparent;
4354
+ border: 0;
4355
+ color: inherit;
4356
+ cursor: pointer;
4357
+ display: flex;
4358
+ font-size: inherit;
4359
+ gap: 0.25rem;
4360
+ height: 100%;
4361
+ min-width: 0;
4362
+ padding: 0 0.5rem;
4363
+ }
4364
+ .vh-agent-session__tab[data-closable] .vh-agent-session__tab-button { padding-inline-end: 1.375rem; }
4365
+ .vh-agent-session__tab-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
4366
+ .vh-agent-session__tab-icon { flex: none; height: 0.75rem; width: 0.75rem; }
4367
+ .vh-agent-session__tab-close {
4368
+ align-items: center;
4369
+ background: color-mix(in oklab, var(--vh-text) 6%, var(--vh-bg));
4370
+ border: 0;
4371
+ border-radius: 0.25rem;
4372
+ color: inherit;
4373
+ cursor: pointer;
4374
+ display: flex;
4375
+ height: 1rem;
4376
+ inset-block-start: 50%;
4377
+ inset-inline-end: 0.25rem;
4378
+ justify-content: center;
4379
+ opacity: 0;
4380
+ padding: 0;
4381
+ position: absolute;
4382
+ translate: 0 -50%;
4383
+ width: 1rem;
4384
+ }
4385
+ .vh-agent-session__tab[data-active] .vh-agent-session__tab-close { background: color-mix(in oklab, var(--vh-text) 9%, var(--vh-bg)); }
4386
+ .vh-agent-session__tab-close > * { height: 0.75rem; width: 0.75rem; }
4387
+ .vh-agent-session__tab:hover .vh-agent-session__tab-close,
4388
+ .vh-agent-session__tab:focus-within .vh-agent-session__tab-close,
4389
+ .vh-agent-session__tab[data-active] .vh-agent-session__tab-close { opacity: 1; }
4390
+ .vh-agent-session__tab-close:hover { background: color-mix(in oklab, var(--vh-text) 15%, var(--vh-bg)); }
4391
+ .vh-agent-session__new-tab { height: 1.5rem; width: 1.5rem; }
4392
+ .vh-agent-session__new-tab > * { height: 0.875rem; width: 0.875rem; }
4393
+ .vh-agent-session__new-tab[aria-pressed="true"] { background: transparent; color: var(--vh-muted); }
4394
+ .vh-agent-session__panel-body { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; overflow: hidden; }
4395
+
4396
+ .vh-agent-session__launcher {
4397
+ align-items: center;
4398
+ display: flex;
4399
+ flex: 1 1 0;
4400
+ justify-content: center;
4401
+ outline: none;
4402
+ overflow-y: auto;
4403
+ padding: 0 1.5rem var(--vh-agent-topbar);
4404
+ }
4405
+ .vh-agent-session__launcher-inner { max-width: 20rem; padding-block: 1.5rem; width: 100%; }
4406
+ .vh-agent-session__launcher-title {
4407
+ color: var(--vh-highlighted);
4408
+ font-size: 0.875rem;
4409
+ font-weight: 500;
4410
+ margin: 0 0 0.75rem;
4411
+ text-align: center;
4412
+ }
4413
+ .vh-agent-session__launcher-list { display: flex; flex-direction: column; gap: 0.125rem; }
4414
+ .vh-agent-session__launcher-item {
4415
+ align-items: center;
4416
+ background: transparent;
4417
+ border: 0;
4418
+ border-radius: 0.5rem;
4419
+ color: var(--vh-text);
4420
+ cursor: pointer;
4421
+ display: flex;
4422
+ font-size: 0.875rem;
4423
+ gap: 0.625rem;
4424
+ height: 2rem;
4425
+ padding-inline: 0.625rem;
4426
+ text-align: start;
4427
+ transition: background-color 150ms ease-out;
4428
+ width: 100%;
4429
+ }
4430
+ .vh-agent-session__launcher-item:hover { background: var(--vh-agent-hover); }
4431
+ .vh-agent-session__launcher-item > :first-child { color: var(--vh-muted); flex: none; height: 1rem; width: 1rem; }
4432
+ .vh-agent-session__launcher-label { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
4433
+ .vh-agent-session__kbd {
4434
+ align-items: center;
4435
+ background: var(--vh-agent-hover);
4436
+ border-radius: 0.25rem;
4437
+ color: var(--vh-muted);
4438
+ display: inline-flex;
4439
+ font-family: inherit;
4440
+ font-size: 0.6875rem;
4441
+ font-weight: 500;
4442
+ height: 1.25rem;
4443
+ justify-content: center;
4444
+ min-width: 1.25rem;
4445
+ padding-inline: 0.25rem;
4446
+ }
4447
+
4448
+ @media (max-width: 767px) {
4449
+ .vh-agent-session[data-panel-open] .vh-agent-session__main { display: none; }
4450
+ .vh-agent-session[data-panel-open] .vh-agent-session__panel { flex: 1 1 0; max-width: none; min-width: 0; width: auto; }
4451
+ .vh-agent-session[data-panel-open] .vh-agent-session__resizer { display: none; }
4452
+ }
4453
+ @media (prefers-reduced-motion: reduce) {
4454
+ .vh-agent-session * { transition: none !important; }
4455
+ }
4456
+ }
4457
+
4458
+ /* Surfaces inside AgentSession fill the panel and follow its theme, as T3 Code themes its Pierre tree. */
4459
+ @layer components {
4460
+ .vh-agent-session__panel-body :is(.vh-file-tree, .vh-diff, .vh-file, .vh-code-view) { border: 0; border-radius: 0; }
4461
+ /* Code in the panel reads at T3's 12px, so a 30rem panel still fits a typical line. */
4462
+ .vh-agent-session__panel-body :is(.vh-diff, .vh-file, .vh-code-view) {
4463
+ --diffs-addition-base: var(--vh-success);
4464
+ --diffs-bg-addition: color-mix(in oklab, var(--vh-success) 10%, var(--vh-bg));
4465
+ --diffs-bg-addition-emphasis: color-mix(in oklab, var(--vh-success) 20%, var(--vh-bg));
4466
+ --diffs-font-size: 0.75rem;
4467
+ }
4468
+ .vh-agent-session__panel-body .vh-file-tree {
4469
+ --trees-bg-override: transparent;
4470
+ --trees-fg-override: var(--vh-text);
4471
+ --trees-selected-bg-override: color-mix(in srgb, currentColor 12%, transparent);
4472
+ --trees-hover-bg-override: color-mix(in srgb, currentColor 7%, transparent);
4473
+ --trees-border-color-override: color-mix(in srgb, currentColor 14%, transparent);
4474
+ --trees-font-family-override: var(--vh-font-sans, var(--font-sans, ui-sans-serif, system-ui, sans-serif));
4475
+ --trees-font-size-override: 0.75rem;
4476
+ color: var(--vh-text);
4477
+ color-scheme: inherit;
4478
+ height: auto;
4479
+ }
4480
+ }
4481
+
4482
+ /* DeviceFrame: a page at a device's size on a muted stage, with Chrome's device toolbar above it. */
4483
+ @layer components {
4484
+ .vh-device-frame {
4485
+ --vh-device-frame-control: 1.75rem;
4486
+ color: var(--vh-text);
4487
+ container-type: inline-size;
4488
+ display: flex;
4489
+ flex: 1 1 0;
4490
+ flex-direction: column;
4491
+ font-size: 0.8125rem;
4492
+ min-height: 0;
4493
+ min-width: 0;
4494
+ position: relative;
4495
+ }
4496
+ .vh-device-frame__select-label { font-weight: 500; white-space: nowrap; }
4497
+ .vh-device-frame__bar {
4498
+ align-items: center;
4499
+ background: var(--vh-bg);
4500
+ border-block-end: 1px solid var(--vh-border);
4501
+ display: flex;
4502
+ flex: none;
4503
+ gap: 0.375rem;
4504
+ min-height: 2.5rem;
4505
+ min-width: 0;
4506
+ overflow-x: auto;
4507
+ padding-inline: 0.75rem;
4508
+ scrollbar-width: none;
4509
+ }
4510
+ .vh-device-frame :where(button, input, select) {
4511
+ color: inherit;
4512
+ font: inherit;
4513
+ touch-action: manipulation;
4514
+ }
4515
+ .vh-device-frame__icon { flex: none; height: 1rem; width: 1rem; }
4516
+ .vh-device-frame__select {
4517
+ align-items: center;
4518
+ border-radius: calc(var(--vh-radius) * 0.75);
4519
+ color: var(--vh-highlighted);
4520
+ display: inline-flex;
4521
+ flex: none;
4522
+ gap: 0.375rem;
4523
+ height: var(--vh-device-frame-control);
4524
+ padding-inline: 0.5rem 0.375rem;
4525
+ position: relative;
4526
+ }
4527
+ /* The native select lies invisible over its label: the label shows the device, and the platform's own list opens. */
4528
+ .vh-device-frame__select select {
4529
+ appearance: none;
4530
+ background: transparent;
4531
+ border: 0;
4532
+ cursor: pointer;
4533
+ font-weight: 500;
4534
+ inset: 0;
4535
+ opacity: 0;
4536
+ position: absolute;
4537
+ width: 100%;
4538
+ }
4539
+ .vh-device-frame__chevron { color: var(--vh-muted); height: 0.875rem; width: 0.875rem; }
4540
+ .vh-device-frame__number {
4541
+ appearance: textfield;
4542
+ background: var(--vh-bg);
4543
+ border: 1px solid var(--vh-border);
4544
+ border-radius: calc(var(--vh-radius) * 0.75);
4545
+ font-variant-numeric: tabular-nums;
4546
+ height: var(--vh-device-frame-control);
4547
+ padding-inline: 0.375rem;
4548
+ text-align: center;
4549
+ width: 3.75rem;
4550
+ }
4551
+ .vh-device-frame__number::-webkit-inner-spin-button,
4552
+ .vh-device-frame__number::-webkit-outer-spin-button { appearance: none; margin: 0; }
4553
+ .vh-device-frame__times { color: var(--vh-dimmed); font-size: 0.75rem; }
4554
+ .vh-device-frame__button {
4555
+ align-items: center;
4556
+ background: transparent;
4557
+ border: 0;
4558
+ border-radius: calc(var(--vh-radius) * 0.75);
4559
+ color: var(--vh-text);
4560
+ cursor: pointer;
4561
+ display: inline-flex;
4562
+ flex: none;
4563
+ gap: 0.375rem;
4564
+ height: var(--vh-device-frame-control);
4565
+ padding-inline: 0.5rem;
4566
+ transition: background-color 150ms ease-out, color 150ms ease-out;
4567
+ }
4568
+ .vh-device-frame__button[aria-pressed="true"] { background: var(--vh-bg-elevated); color: var(--vh-highlighted); }
4569
+ .vh-device-frame__icon-button { justify-content: center; padding: 0; width: var(--vh-device-frame-control); }
4570
+ .vh-device-frame__bands { align-items: center; border-inline-start: 1px solid var(--vh-border); display: none; gap: 0.25rem; margin-inline-start: 0.25rem; padding-inline-start: 0.625rem; }
4571
+ @container (min-width: 56rem) {
4572
+ .vh-device-frame__bands { display: flex; }
4573
+ }
4574
+ .vh-device-frame__band {
4575
+ background: transparent;
4576
+ border: 1px solid var(--vh-border);
4577
+ border-radius: calc(var(--vh-radius) * 0.75);
4578
+ color: var(--vh-muted);
4579
+ cursor: pointer;
4580
+ font-size: 0.75rem;
4581
+ font-variant-numeric: tabular-nums;
4582
+ height: 1.5rem;
4583
+ padding-inline: 0.375rem;
4584
+ transition: background-color 150ms ease-out, color 150ms ease-out;
4585
+ }
4586
+ .vh-device-frame__band[data-within] { background: var(--vh-bg-elevated); border-color: var(--vh-bg-accented); color: var(--vh-highlighted); }
4587
+ .vh-device-frame__band[aria-pressed="true"] { background: var(--vh-highlighted); border-color: var(--vh-highlighted); color: var(--vh-inverted); }
4588
+ @media (hover: hover) and (pointer: fine) {
4589
+ .vh-device-frame__button:hover,
4590
+ .vh-device-frame__select:hover { background: var(--vh-bg-elevated); color: var(--vh-highlighted); }
4591
+ .vh-device-frame__band:not([aria-pressed="true"]):hover { background: var(--vh-bg-elevated); color: var(--vh-highlighted); }
4592
+ }
4593
+ .vh-device-frame__end { align-items: center; display: flex; flex: none; gap: 0.25rem; margin-inline-start: auto; }
4594
+ .vh-device-frame__zoom { align-items: center; color: var(--vh-muted); display: inline-flex; gap: 0.25rem; }
4595
+ .vh-device-frame__zoom .vh-device-frame__number { width: 3.25rem; }
4596
+
4597
+ /* Off, the stage and the page are plain flex boxes, so the content fills the frame. */
4598
+ .vh-device-frame__stage { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
4599
+ .vh-device-frame__footprint { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; position: relative; }
4600
+ .vh-device-frame__page { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; }
4601
+ .vh-device-frame[data-on] .vh-device-frame__stage { background: var(--vh-bg-muted); overflow: auto; padding: 1rem 1.5rem; }
4602
+ .vh-device-frame[data-on] .vh-device-frame__footprint { flex: none; margin-inline: auto; }
4603
+ .vh-device-frame[data-on] .vh-device-frame__page {
4604
+ background: var(--vh-bg);
4605
+ box-shadow: var(--vh-shadow-dialog, 0 0 0 1px var(--vh-border));
4606
+ flex: none;
4607
+ inset-block-start: 0;
4608
+ inset-inline-start: 0;
4609
+ overflow: hidden;
4610
+ position: absolute;
4611
+ transform-origin: top left;
4612
+ }
4613
+ .vh-device-frame[data-dragging] .vh-device-frame__page { pointer-events: none; }
4614
+ @media (prefers-reduced-motion: no-preference) {
4615
+ .vh-device-frame[data-on]:not([data-dragging]) .vh-device-frame__footprint { transition: width 200ms ease-out, height 200ms ease-out; }
4616
+ .vh-device-frame[data-on]:not([data-dragging]) .vh-device-frame__page { transition: transform 200ms ease-out; }
4617
+ }
4618
+ .vh-device-frame__readout {
4619
+ background: var(--vh-highlighted);
4620
+ border-radius: calc(var(--vh-radius) * 0.75);
4621
+ color: var(--vh-inverted);
4622
+ font-size: 0.75rem;
4623
+ font-variant-numeric: tabular-nums;
4624
+ inset-block-start: 0.5rem;
4625
+ inset-inline-start: 50%;
4626
+ margin: 0;
4627
+ padding: 0.25rem 0.5rem;
4628
+ pointer-events: none;
4629
+ position: absolute;
4630
+ translate: -50% 0;
4631
+ }
4632
+ .vh-device-frame__handle { display: grid; outline: none; place-items: center; position: absolute; touch-action: none; }
4633
+ .vh-device-frame__handle[data-edge="x"] { cursor: ew-resize; height: 100%; inset-block-start: 0; inset-inline-end: -0.75rem; width: 0.75rem; }
4634
+ .vh-device-frame__handle[data-edge="y"] { cursor: ns-resize; height: 0.75rem; inset-block-end: -0.75rem; inset-inline-start: 0; width: 100%; }
4635
+ .vh-device-frame__handle[data-edge="xy"] { cursor: nwse-resize; height: 0.75rem; inset-block-end: -0.75rem; inset-inline-end: -0.75rem; width: 0.75rem; }
4636
+ .vh-device-frame__grip { background: var(--vh-bg-accented); border-radius: 999px; transition: background-color 150ms ease-out; }
4637
+ .vh-device-frame__handle[data-edge="x"] .vh-device-frame__grip { height: 2rem; width: 0.25rem; }
4638
+ .vh-device-frame__handle[data-edge="y"] .vh-device-frame__grip { height: 0.25rem; width: 2rem; }
4639
+ .vh-device-frame__handle:focus-visible .vh-device-frame__grip,
4640
+ .vh-device-frame[data-dragging] .vh-device-frame__grip { background: var(--vh-muted); }
4641
+ @media (hover: hover) and (pointer: fine) {
4642
+ .vh-device-frame__handle:hover .vh-device-frame__grip { background: var(--vh-muted); }
4643
+ }
4644
+ /* A thumb needs a 44px target; the controls keep their look and grow their hit area. */
4645
+ @media (pointer: coarse) {
4646
+ .vh-device-frame { --vh-device-frame-control: 2.75rem; }
4647
+ .vh-device-frame__handle[data-edge="x"] { inset-inline-end: -1.5rem; width: 1.5rem; }
4648
+ .vh-device-frame__handle[data-edge="y"] { height: 1.5rem; inset-block-end: -1.5rem; }
4649
+ .vh-device-frame__handle[data-edge="xy"] { height: 1.5rem; inset-block-end: -1.5rem; inset-inline-end: -1.5rem; width: 1.5rem; }
4650
+ }
2662
4651
  }