@vite-hub/ui 0.4.1 → 0.5.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 (360) hide show
  1. package/README.md +102 -76
  2. package/dist/andromeeda-DaUPZ4_A.js +147 -0
  3. package/dist/announce-B0DLwflT.js +31 -0
  4. package/dist/{attachments-BzTwqRTU.js → attachments-DgwoQZKY.js} +3 -5
  5. package/dist/aurora-x-B5RPZ9i5.js +162 -0
  6. package/dist/{avatar-stack-DPRFuezh.d.ts → avatar-stack-C0IKwj6g.d.ts} +1 -3
  7. package/dist/ayu-dark-DXTaGA7I.js +137 -0
  8. package/dist/ayu-light-BCYi80Fe.js +137 -0
  9. package/dist/ayu-mirage-CgbXz-N5.js +137 -0
  10. package/dist/catppuccin-frappe-MV2xzv44.js +266 -0
  11. package/dist/catppuccin-latte-CL6jjlVD.js +266 -0
  12. package/dist/catppuccin-macchiato-Bp6oZJVK.js +266 -0
  13. package/dist/catppuccin-mocha-DOHrQ4dw.js +266 -0
  14. package/dist/{choices-input-ByXJvDn1.d.ts → choices-input-BUf-QqGj.d.ts} +0 -2
  15. package/dist/{code-view-DsU-xzic.js → code-view-Cg4nyTNA.js} +6 -8
  16. package/dist/{colors-BghReA9C-CjF9gnmy.js → colors-BghReA9C-DEq4bhEP.js} +1 -2
  17. package/dist/{comment-attachments-C4yNbcx5.js → comment-attachments-CMpYOJod.js} +1 -2
  18. package/dist/{comment-composer-fINL5bxo.d.ts → comment-composer-BI6CNJyO.d.ts} +3 -5
  19. package/dist/{comment-composer-jYv2ULNP.js → comment-composer-CzU7DdfD.js} +260 -16
  20. package/dist/{comment-layer-C_sbPIR5.d.ts → comment-layer-DyVstrs-.d.ts} +5 -7
  21. package/dist/{comment-list-BcSaLngS.d.ts → comment-list-CSK5o-Ua.d.ts} +3 -5
  22. package/dist/comment-marks.css +18 -22
  23. package/dist/{comment-panel-CfvdRUMX.d.ts → comment-panel-CEvOI3gk.d.ts} +3 -5
  24. package/dist/{comment-person-CLPlW_SS.js → comment-person-D_IyIjXo.js} +1 -2
  25. package/dist/{comment-pin-DHOdRvUw.d.ts → comment-pin-C5UeLPTa.d.ts} +1 -3
  26. package/dist/{comment-row-Bn3nr8l5.js → comment-row-DPMWI5Z0.js} +3 -4
  27. package/dist/{comment-selection-bar-CyVBNYl9.d.ts → comment-selection-bar-CVuS-FNL.d.ts} +0 -2
  28. package/dist/comment-send-DPzV9B8S.js +275 -0
  29. package/dist/comment-send-MmxFsOQf.d.ts +23 -0
  30. package/dist/comment-send.css +267 -0
  31. package/dist/comment-thread-CbPtoi8-.js +796 -0
  32. package/dist/{comment-thread-DKJjmWN0.d.ts → comment-thread-DGm1cGJt.d.ts} +4 -8
  33. package/dist/{comment-visibility-DsVuVndP.d.ts → comment-visibility-CYctacNx.d.ts} +0 -2
  34. package/dist/{comments-D0d26ghV.js → comments-C0OdHh_F.js} +5 -8
  35. package/dist/{comments-D8hulVPy.d.ts → comments-DrE9DU-E.d.ts} +1 -3
  36. package/dist/{comments-context-C2lOZyQ5.js → comments-context-CrjhleVA.js} +4 -5
  37. package/dist/{config-Dk67emQt.js → config-DztmAYYn.js} +9 -3
  38. package/dist/{config-DgxBW013.d.ts → config-xL4EBeXw.d.ts} +11 -4
  39. package/dist/dark-plus-CXEBSjk4.js +148 -0
  40. package/dist/dracula-Bvyz6eCo.js +165 -0
  41. package/dist/dracula-soft-a9indxAQ.js +115 -0
  42. package/dist/{draw-DzSmD7uo-Dwz8zoH2.js → draw-DzSmD7uo-Cb7s9kxJ.js} +359 -708
  43. package/dist/drop-field-CNZgwFVO.js +162 -0
  44. package/dist/{editor-C_wt4RRV.js → editor-CGiEVOnB.js} +44 -6
  45. package/dist/effects-g4QucvgO.js +2955 -0
  46. package/dist/{error-diagnostics-SXtnk6bz.js → error-diagnostics-BlgA9rI2.js} +1 -2
  47. package/dist/everforest-dark-9sVAxG7I.js +99 -0
  48. package/dist/everforest-light-BocTn_Hd.js +99 -0
  49. package/dist/{file-tree-C4OYgbV-.js → file-tree-CRFIdtzw.js} +58 -116
  50. package/dist/{file-tree-DlT9RGhu.d.ts → file-tree-DOtkeBaq.d.ts} +0 -14
  51. package/dist/{format-orwcdZL_.js → format-Bc9m7-r0.js} +1 -2
  52. package/dist/{getSingularPatch-Dsb8EgxR.js → getSingularPatch-C7LmmBrW.js} +375 -79
  53. package/dist/github-dark-BO9SXswM.js +142 -0
  54. package/dist/github-dark-default-XB_RHfBI.js +90 -0
  55. package/dist/github-dark-dimmed-BoGxaWUQ.js +137 -0
  56. package/dist/github-dark-high-contrast-B3X6t2fG.js +137 -0
  57. package/dist/github-light-D7VHHlUH.js +142 -0
  58. package/dist/github-light-default-BuDsGtcR.js +137 -0
  59. package/dist/github-light-high-contrast-GodZiAwh.js +137 -0
  60. package/dist/gruvbox-dark-hard-CU4LuKJc.js +140 -0
  61. package/dist/gruvbox-dark-medium-DjAsuXuH.js +140 -0
  62. package/dist/gruvbox-dark-soft-D3Zttj6R.js +140 -0
  63. package/dist/gruvbox-light-hard-4M_9onwE.js +140 -0
  64. package/dist/gruvbox-light-medium-D9QwS4kQ.js +140 -0
  65. package/dist/gruvbox-light-soft-DhYcfQql.js +140 -0
  66. package/dist/{handlers-DMl-Na3x.js → handlers-CnbkvXjX.js} +1 -2
  67. package/dist/headless.d.ts +4 -4
  68. package/dist/headless.js +1 -1
  69. package/dist/highlights-C2AbEdDI.js +2630 -0
  70. package/dist/hold-to-delete-BSMrpE-i.d.ts +49 -0
  71. package/dist/hold-to-delete-Cludb56v.js +433 -0
  72. package/dist/horizon-bright-B9u59onx.js +97 -0
  73. package/dist/horizon-tItY9ATR.js +97 -0
  74. package/dist/houston-BqKrKNQv.js +207 -0
  75. package/dist/icon-XZaCUZTG.d.ts +29 -0
  76. package/dist/{image-preview-C9tdkmEj.js → image-preview-DrLXrHpp.js} +3 -4
  77. package/dist/{index-CNY1uNTh.d.ts → index-B2cbt3py.d.ts} +3945 -2445
  78. package/dist/{index-BYRFQfCd.d.ts → index-B_PSX-5h.d.ts} +5 -11
  79. package/dist/index.d.ts +35 -32
  80. package/dist/index.js +71 -73
  81. package/dist/install-Ba9mkkqI.js +16 -0
  82. package/dist/kanagawa-dragon-BH1K3aMw.js +159 -0
  83. package/dist/kanagawa-lotus-C-4JB2io.js +159 -0
  84. package/dist/kanagawa-wave-DTQqNe5k.js +159 -0
  85. package/dist/laserwave-BkV0uIaG.js +84 -0
  86. package/dist/light-plus-CxYgEz7U.js +149 -0
  87. package/dist/list-DUTAo0uC.js +270 -0
  88. package/dist/loader-CYMEjzwc.js +79 -0
  89. package/dist/{markdown-editor-CMbNZOdN.js → markdown-editor-3gY9MLvy.js} +237 -38
  90. package/dist/{markdown-editor-wQF0yD5o.d.ts → markdown-editor-B7gD60tp.d.ts} +0 -6
  91. package/dist/markdown-editor.d.ts +1 -5
  92. package/dist/markdown-editor.js +2 -2
  93. package/dist/markdown-renderer-DFS1vf1h.js +26578 -0
  94. package/dist/material-theme-Xdm37UUJ.js +105 -0
  95. package/dist/material-theme-darker-Blaz0cgN.js +105 -0
  96. package/dist/material-theme-lighter-BddVxBVA.js +105 -0
  97. package/dist/material-theme-ocean-C4qhfFHi.js +105 -0
  98. package/dist/material-theme-palenight-ChHDqoiA.js +105 -0
  99. package/dist/{message-scroller-jrYN9dG9.d.ts → message-scroller-a6qaYHno.d.ts} +2 -4
  100. package/dist/min-dark-DpGSNjaW.js +125 -0
  101. package/dist/min-light-BMfJUsU2.js +122 -0
  102. package/dist/monokai-DW19E-zg.js +162 -0
  103. package/dist/motion/core.d.ts +4 -0
  104. package/dist/motion/core.js +11 -0
  105. package/dist/motion-core-DNl7TR1T.d.ts +402 -0
  106. package/dist/motion.d.ts +14 -0
  107. package/dist/motion.js +13 -0
  108. package/dist/night-owl-B7Of8ee9.js +188 -0
  109. package/dist/night-owl-light-Vu9tTNpS.js +189 -0
  110. package/dist/nord-CDzJumeN.js +128 -0
  111. package/dist/nuxt-ui-7ByUrymx.js +43 -0
  112. package/dist/nuxt.d.ts +1 -7
  113. package/dist/nuxt.js +16 -11
  114. package/dist/one-dark-pro-hS_sNo5p.js +124 -0
  115. package/dist/one-light-CD4ItzSC.js +153 -0
  116. package/dist/opt-out-D66l60sg.js +205 -0
  117. package/dist/parts/components/agent-session.d.ts +1 -3
  118. package/dist/parts/components/agent-session.js +3 -4
  119. package/dist/parts/components/attachment.d.ts +2 -4
  120. package/dist/parts/components/attachment.js +3 -4
  121. package/dist/parts/components/avatar-stack.d.ts +1 -1
  122. package/dist/parts/components/avatar-stack.js +4 -4
  123. package/dist/parts/components/bubble.d.ts +2 -4
  124. package/dist/parts/components/bubble.js +2 -3
  125. package/dist/parts/components/chat-message.d.ts +1 -3
  126. package/dist/parts/components/chat-message.js +1 -2
  127. package/dist/parts/components/chat-session.d.ts +2 -4
  128. package/dist/parts/components/chat-session.js +1 -2
  129. package/dist/parts/components/chat.d.ts +1 -3
  130. package/dist/parts/components/chat.js +4 -5
  131. package/dist/parts/components/code-block.d.ts +2 -4
  132. package/dist/parts/components/code-block.js +3 -4
  133. package/dist/parts/components/code-view.d.ts +1 -3
  134. package/dist/parts/components/code-view.js +1 -2
  135. package/dist/parts/components/comment-composer.d.ts +1 -1
  136. package/dist/parts/components/comment-composer.js +1 -2
  137. package/dist/parts/components/comment-layer.d.ts +1 -1
  138. package/dist/parts/components/comment-layer.js +28 -11
  139. package/dist/parts/components/comment-list.d.ts +1 -1
  140. package/dist/parts/components/comment-list.js +13 -9
  141. package/dist/parts/components/comment-panel.d.ts +1 -1
  142. package/dist/parts/components/comment-panel.js +27 -14
  143. package/dist/parts/components/comment-pin.d.ts +1 -1
  144. package/dist/parts/components/comment-pin.js +2 -3
  145. package/dist/parts/components/comment-selection-bar.d.ts +1 -1
  146. package/dist/parts/components/comment-selection-bar.js +4 -4
  147. package/dist/parts/components/comment-send.d.ts +2 -0
  148. package/dist/parts/components/comment-send.js +1 -0
  149. package/dist/parts/components/comment-thread.d.ts +1 -1
  150. package/dist/parts/components/comment-thread.js +2 -597
  151. package/dist/parts/components/comments.d.ts +9 -8
  152. package/dist/parts/components/comments.js +7 -6
  153. package/dist/parts/components/connection-status.d.ts +1 -3
  154. package/dist/parts/components/connection-status.js +1 -2
  155. package/dist/parts/components/copy-button.d.ts +14 -6
  156. package/dist/parts/components/copy-button.js +225 -1
  157. package/dist/parts/components/device-frame.d.ts +3 -5
  158. package/dist/parts/components/device-frame.js +1 -2
  159. package/dist/parts/components/drop-field.d.ts +67 -0
  160. package/dist/parts/components/drop-field.js +76 -0
  161. package/dist/parts/components/file-tree.d.ts +1 -1
  162. package/dist/parts/components/file-tree.js +1 -2
  163. package/dist/parts/components/filter-search.d.ts +2 -4
  164. package/dist/parts/components/filter-search.js +2 -3
  165. package/dist/parts/components/hold-to-delete.d.ts +80 -0
  166. package/dist/parts/components/hold-to-delete.js +75 -0
  167. package/dist/parts/components/markdown-editor.d.ts +1 -1
  168. package/dist/parts/components/markdown-editor.js +1 -2
  169. package/dist/parts/components/markdown-renderer.d.ts +1 -3
  170. package/dist/parts/components/markdown-renderer.js +1 -23077
  171. package/dist/parts/components/markdown.d.ts +1 -3
  172. package/dist/parts/components/markdown.js +2 -3
  173. package/dist/parts/components/marker.d.ts +2 -4
  174. package/dist/parts/components/marker.js +2 -3
  175. package/dist/parts/components/message-parts.d.ts +1 -3
  176. package/dist/parts/components/message-parts.js +14 -7
  177. package/dist/parts/components/message.d.ts +1 -3
  178. package/dist/parts/components/message.js +2 -3
  179. package/dist/parts/components/motion-list.d.ts +40 -0
  180. package/dist/parts/components/motion-list.js +41 -0
  181. package/dist/parts/components/motion.d.ts +122 -0
  182. package/dist/parts/components/motion.js +171 -0
  183. package/dist/parts/components/patch-parsers.d.ts +1 -1
  184. package/dist/parts/components/patch-parsers.js +1 -2
  185. package/dist/parts/components/progress.d.ts +39 -0
  186. package/dist/parts/components/progress.js +53 -0
  187. package/dist/parts/components/prompt-input.d.ts +5 -7
  188. package/dist/parts/components/prompt-input.js +5 -6
  189. package/dist/parts/components/relative-time.d.ts +1 -3
  190. package/dist/parts/components/relative-time.js +1 -2
  191. package/dist/parts/components/status.d.ts +1 -3
  192. package/dist/parts/components/status.js +1 -2
  193. package/dist/parts/components/sync-status.d.ts +1 -3
  194. package/dist/parts/components/sync-status.js +3 -3
  195. package/dist/parts/components/tool-list.d.ts +2 -4
  196. package/dist/parts/components/tool-list.js +2 -3
  197. package/dist/parts/components/trace-run.d.ts +2 -4
  198. package/dist/parts/components/trace-run.js +4 -5
  199. package/dist/parts/components/trace.d.ts +2 -4
  200. package/dist/parts/components/trace.js +2 -3
  201. package/dist/parts/composables/attachments.d.ts +1 -3
  202. package/dist/parts/composables/attachments.js +1 -2
  203. package/dist/parts/composables/highlighted-code.d.ts +1 -3
  204. package/dist/parts/composables/highlighted-code.js +1 -2
  205. package/dist/parts/headless/choices-input.d.ts +1 -1
  206. package/dist/parts/headless/choices-input.js +3 -4
  207. package/dist/parts/headless/comment-visibility.d.ts +1 -1
  208. package/dist/parts/headless/comment-visibility.js +1 -2
  209. package/dist/parts/headless/comments.d.ts +1 -1
  210. package/dist/parts/headless/comments.js +1 -2
  211. package/dist/parts/headless/message-scroller.d.ts +1 -1
  212. package/dist/parts/headless/message-scroller.js +2 -3
  213. package/dist/parts/playground/paths.d.ts +1 -3
  214. package/dist/parts/playground/paths.js +1 -2
  215. package/dist/parts/playground/share.d.ts +34 -2
  216. package/dist/parts/playground/share.js +1 -2
  217. package/dist/parts/playground/zip.d.ts +1 -3
  218. package/dist/parts/playground/zip.js +2 -3
  219. package/dist/parts/workspace/browser-support-notice.d.ts +2 -4
  220. package/dist/parts/workspace/browser-support-notice.js +13 -6
  221. package/dist/parts/workspace/codemirror.d.ts +10 -3
  222. package/dist/parts/workspace/codemirror.js +40 -8
  223. package/dist/parts/workspace/connect-panel.d.ts +2 -4
  224. package/dist/parts/workspace/connect-panel.js +2 -3
  225. package/dist/parts/workspace/connect-store.d.ts +1 -3
  226. package/dist/parts/workspace/connect-store.js +1 -2
  227. package/dist/parts/workspace/file-icons.d.ts +14 -0
  228. package/dist/parts/workspace/file-icons.js +81 -0
  229. package/dist/parts/workspace/icons.d.ts +2 -2
  230. package/dist/parts/workspace/icons.js +2 -2
  231. package/dist/parts/workspace/runners/render.d.ts +24 -0
  232. package/dist/parts/workspace/runners/render.js +123 -0
  233. package/dist/parts/workspace/runners/web-container.d.ts +27 -0
  234. package/dist/parts/workspace/runners/web-container.js +185 -0
  235. package/dist/parts/workspace/workspace-bar.d.ts +49 -0
  236. package/dist/parts/workspace/workspace-bar.js +50 -0
  237. package/dist/parts/workspace/workspace-boot-status.d.ts +1 -2
  238. package/dist/parts/workspace/workspace-boot-status.js +2 -3
  239. package/dist/parts/workspace/workspace-editor-head.d.ts +45 -0
  240. package/dist/parts/workspace/workspace-editor-head.js +65 -0
  241. package/dist/parts/workspace/workspace-editor.d.ts +18 -3
  242. package/dist/parts/workspace/workspace-editor.js +30 -5
  243. package/dist/parts/workspace/workspace-examples.d.ts +72 -0
  244. package/dist/parts/workspace/workspace-examples.js +71 -0
  245. package/dist/parts/workspace/workspace-file-link.d.ts +33 -0
  246. package/dist/parts/workspace/workspace-file-link.js +38 -0
  247. package/dist/parts/workspace/workspace-file-tree.d.ts +9 -11
  248. package/dist/parts/workspace/workspace-file-tree.js +28 -22
  249. package/dist/parts/workspace/workspace-guide.d.ts +50 -0
  250. package/dist/parts/workspace/workspace-guide.js +90 -0
  251. package/dist/parts/workspace/workspace-issues.d.ts +44 -0
  252. package/dist/parts/workspace/workspace-issues.js +48 -0
  253. package/dist/parts/workspace/workspace-preview.d.ts +1 -3
  254. package/dist/parts/workspace/workspace-preview.js +2 -3
  255. package/dist/parts/workspace/workspace-shell.d.ts +2 -88
  256. package/dist/parts/workspace/workspace-shell.js +132 -80
  257. package/dist/parts/workspace/workspace-sidebar.d.ts +73 -0
  258. package/dist/parts/workspace/workspace-sidebar.js +131 -0
  259. package/dist/parts/workspace/workspace-start.d.ts +45 -0
  260. package/dist/parts/workspace/workspace-start.js +59 -0
  261. package/dist/parts/workspace/workspace-status.d.ts +67 -0
  262. package/dist/parts/workspace/workspace-status.js +73 -0
  263. package/dist/parts/workspace/workspace-steps.d.ts +2 -0
  264. package/dist/parts/workspace/workspace-steps.js +127 -0
  265. package/dist/parts/workspace/workspace-task.d.ts +18 -0
  266. package/dist/parts/workspace/workspace-task.js +19 -0
  267. package/dist/parts/workspace/workspace-terminal.d.ts +1 -3
  268. package/dist/parts/workspace/workspace-terminal.js +1 -2
  269. package/dist/parts/workspace/workspace.d.ts +249 -0
  270. package/dist/parts/workspace/workspace.js +664 -0
  271. package/dist/{payload-text-sjkYAwvw.js → payload-text-DQNRbJY5.js} +1 -2
  272. package/dist/{pierre-code-view-NE35tkmR.js → pierre-code-view-C49BVDrc.js} +11333 -6718
  273. package/dist/pierre-dark-BtKHt2e4.js +166 -0
  274. package/dist/pierre-dark-CXW3KeKO.js +5 -0
  275. package/dist/pierre-dark-protanopia-deuteranopia-CS0Gs25Q.js +166 -0
  276. package/dist/pierre-dark-protanopia-deuteranopia-DajNv_A3.js +3 -0
  277. package/dist/pierre-dark-soft-BUFoeBEf.js +3 -0
  278. package/dist/pierre-dark-soft-D__0FtYP.js +166 -0
  279. package/dist/pierre-dark-tritanopia-C6fHROmA.js +166 -0
  280. package/dist/pierre-dark-tritanopia-oa3gpgIR.js +3 -0
  281. package/dist/pierre-dark-vibrant-COXpyAHb.js +166 -0
  282. package/dist/pierre-dark-vibrant-CYRHyDoW.js +3 -0
  283. package/dist/pierre-light-BD28C_vh.js +166 -0
  284. package/dist/pierre-light-BN0rL1e5.js +5 -0
  285. package/dist/pierre-light-protanopia-deuteranopia-CYsDHJt0.js +3 -0
  286. package/dist/pierre-light-protanopia-deuteranopia-CwWH1xGL.js +166 -0
  287. package/dist/pierre-light-soft-BkKY4pMj.js +166 -0
  288. package/dist/pierre-light-soft-F2QIpNbb.js +3 -0
  289. package/dist/pierre-light-tritanopia-BbKKIkua.js +3 -0
  290. package/dist/pierre-light-tritanopia-Mpubahl7.js +166 -0
  291. package/dist/pierre-light-vibrant-CdV9Besm.js +3 -0
  292. package/dist/pierre-light-vibrant-x11J3_aO.js +166 -0
  293. package/dist/plastic-BQnXkmvK.js +137 -0
  294. package/dist/playground.d.ts +1 -1
  295. package/dist/poimandres-DEfG-8RI.js +124 -0
  296. package/dist/progress-DL9k-ERG.js +265 -0
  297. package/dist/red-BfKrAjYG.js +169 -0
  298. package/dist/registry-DAIjCjWd.js +77 -0
  299. package/dist/{relative-time-BVmjOsYG.js → relative-time-DJnw45tr.js} +5 -8
  300. package/dist/ring-BN4d8vtw.js +173 -0
  301. package/dist/{rolldown-runtime-C9mWXvCC.js → rolldown-runtime-CahUhzF3.js} +2 -3
  302. package/dist/rose-pine-D0rhGGFg.js +136 -0
  303. package/dist/rose-pine-dawn-7jVaYUiD.js +136 -0
  304. package/dist/rose-pine-moon-CFyS0Mvu.js +136 -0
  305. package/dist/runtime/nuxt-plugin.d.ts +0 -2
  306. package/dist/runtime/nuxt-plugin.js +3 -4
  307. package/dist/{sankey-CAYwt82B-D4uDQoMR.js → sankey-CAYwt82B-BAAk7WkJ.js} +147 -151
  308. package/dist/shiki-CbfEu_Az.js +607 -0
  309. package/dist/slack-dark-Bv-KFSBD.js +87 -0
  310. package/dist/slack-ochin-Dg2BAv1D.js +107 -0
  311. package/dist/{slot-part-Doic71uh.js → slot-part-BWHvQ3mK.js} +1 -2
  312. package/dist/snazzy-light-sYDdR9rx.js +93 -0
  313. package/dist/solarized-dark-COt2tTmN.js +160 -0
  314. package/dist/solarized-light-BJrwFarZ.js +160 -0
  315. package/dist/stream-tokenizer-ByC3l0HQ.js +263 -0
  316. package/dist/styles.css +590 -573
  317. package/dist/synthwave-84-NUDBykTM.js +410 -0
  318. package/dist/{temml-BilSAAws.js → temml-m3ad3bfq.js} +2 -3
  319. package/dist/text-BWzZFnGY.js +822 -0
  320. package/dist/theme.d.ts +44 -3
  321. package/dist/theme.js +23 -9
  322. package/dist/themes-DKugPHlg.js +323 -0
  323. package/dist/tokyo-night-DD3B2QcO.js +153 -0
  324. package/dist/travel-CwVhU_GS.js +180 -0
  325. package/dist/tween-Dv3IIIQG.js +61 -0
  326. package/dist/{types-Dj7vp0lZ.d.ts → types-Ceh7h7NT.d.ts} +1 -3
  327. package/dist/vesper-oVQYrv8Y.js +99 -0
  328. package/dist/visual-copy-CHHBfJ6O.js +14 -0
  329. package/dist/vite.d.ts +1 -3
  330. package/dist/vite.js +13 -3
  331. package/dist/vitesse-black-D84DQZAP.js +196 -0
  332. package/dist/vitesse-dark-CMZ6olk_.js +196 -0
  333. package/dist/vitesse-light-D9d8hLOY.js +196 -0
  334. package/dist/{vue-DGstVdGn.js → vue-BlknIGIm.js} +43 -34
  335. package/dist/{vue-BDmSCtay.js → vue-kCdzBu0N.js} +4 -7
  336. package/dist/workspace-shell-ChCwWPyv.d.ts +110 -0
  337. package/dist/workspace-steps-BKByX9DW.d.ts +70 -0
  338. package/dist/workspace.d.ts +16 -5
  339. package/dist/workspace.js +16 -3
  340. package/package.json +66 -55
  341. package/dist/copy-button-CRN3kmSD.js +0 -253
  342. package/dist/icon-swap.css +0 -69
  343. package/dist/nuxt-ui-DSQFzq3s.js +0 -38
  344. package/dist/parts/playground/highlight.d.ts +0 -5
  345. package/dist/parts/playground/highlight.js +0 -23
  346. package/dist/parts/playground/playground-render.d.ts +0 -126
  347. package/dist/parts/playground/playground-render.js +0 -356
  348. package/dist/parts/workspace/playground-container.d.ts +0 -192
  349. package/dist/parts/workspace/playground-container.js +0 -603
  350. package/dist/pierre-dark-CzUmjETS.js +0 -6
  351. package/dist/pierre-dark-protanopia-deuteranopia-C35UMuvO.js +0 -4
  352. package/dist/pierre-dark-soft-Bb-4-biO.js +0 -4
  353. package/dist/pierre-dark-tritanopia-CIJISGWF.js +0 -4
  354. package/dist/pierre-dark-vibrant-8oZzB3gw.js +0 -4
  355. package/dist/pierre-light-Dn6E0sWv.js +0 -6
  356. package/dist/pierre-light-protanopia-deuteranopia-u0U7N4Hn.js +0 -4
  357. package/dist/pierre-light-soft-BCU6fuhO.js +0 -4
  358. package/dist/pierre-light-tritanopia-3c8Yx3co.js +0 -4
  359. package/dist/pierre-light-vibrant-Cwh332o_.js +0 -4
  360. package/dist/share-DM4eNy4q.d.ts +0 -37
@@ -1,16 +1,21 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-DSQFzq3s.js";
1
+ import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
2
2
  import { computed, defineComponent, h, onMounted, ref, watch } from "vue";
3
- //#region src/workspace/workspace-shell.ts
3
+ // src/workspace/workspace-shell.ts
4
4
  const defaultSplits = {
5
- playground: {
6
- files: 200,
7
- main: 68,
8
- side: 40
5
+ "side": {
6
+ files: 199,
7
+ code: 50,
8
+ guide: 46
9
9
  },
10
- tutorial: {
11
- files: 180,
12
- main: 55,
13
- side: 45
10
+ "guide-top": {
11
+ files: 199,
12
+ code: 54,
13
+ guide: 46
14
+ },
15
+ "guide-side": {
16
+ files: 199,
17
+ code: 50,
18
+ guide: 46
14
19
  }
15
20
  };
16
21
  const limits = {
@@ -19,17 +24,18 @@ const limits = {
19
24
  420,
20
25
  16
21
26
  ],
22
- main: [
23
- 20,
24
- 80,
27
+ code: [
28
+ 25,
29
+ 75,
25
30
  5
26
31
  ],
27
- side: [
28
- 25,
32
+ guide: [
33
+ 15,
29
34
  75,
30
35
  5
31
36
  ]
32
37
  };
38
+ const editorReserve = 120;
33
39
  const builtInTabs = [
34
40
  {
35
41
  label: "Preview",
@@ -44,6 +50,16 @@ const builtInTabs = [
44
50
  value: "connect"
45
51
  }
46
52
  ];
53
+ const layoutSlots = /* @__PURE__ */ new Set([
54
+ "banner",
55
+ "bar",
56
+ "editor",
57
+ "editor-head",
58
+ "files",
59
+ "guide",
60
+ "overlay",
61
+ "status"
62
+ ]);
47
63
  function clamp(key, value) {
48
64
  const [min, max] = limits[key];
49
65
  return Math.round(Math.min(max, Math.max(min, value)));
@@ -67,7 +83,9 @@ function readSplits(key, layout) {
67
83
  */
68
84
  function separator(options) {
69
85
  const { name, orientation, splits } = options;
70
- const [min, max, step] = limits[name];
86
+ const [defaultMin, defaultMax, step] = limits[name];
87
+ const max = options.max ?? defaultMax;
88
+ const min = Math.min(defaultMin, max);
71
89
  const decrease = orientation === "vertical" ? "ArrowLeft" : "ArrowUp";
72
90
  const increase = orientation === "vertical" ? "ArrowRight" : "ArrowDown";
73
91
  return h("div", {
@@ -108,11 +126,17 @@ function separator(options) {
108
126
  }
109
127
  });
110
128
  }
129
+ /**
130
+ * The frame of a workspace. Slots: `bar` (44px, over everything), `banner` (under the bar, such as a notice), `files`,
131
+ * `editor-head` (32px, over the editor), `editor`, `status` (24px, under the editor), `guide`, one slot per tab
132
+ * (`preview`, `terminal`, `connect`, or `tab-<value>` for a custom tab), and `overlay` (over the body). The tab bar is
133
+ * 32px too, so its bottom line meets the bottom line of `editor-head`.
134
+ */
111
135
  const WorkspaceShell = defineComponent({
112
136
  name: "WorkspaceShell",
113
137
  props: {
114
138
  layout: {
115
- default: "tutorial",
139
+ default: "side",
116
140
  type: String
117
141
  },
118
142
  /** The visible tab. Use `v-model:tab`. */
@@ -121,8 +145,7 @@ const WorkspaceShell = defineComponent({
121
145
  type: String
122
146
  },
123
147
  /**
124
- * The tabs of the panel group, in order. Each tab shows the slot with the name of its `value`. Defaults to Preview,
125
- * Terminal, and Connect, for the slots that are set. A playground shows the preview at the side, never as a tab.
148
+ * The tabs of the output, in order. Defaults to Preview, Terminal, and Connect, for the slots that are set.
126
149
  */
127
150
  tabs: {
128
151
  default: void 0,
@@ -137,11 +160,17 @@ const WorkspaceShell = defineComponent({
137
160
  label: {
138
161
  default: "Workspace",
139
162
  type: String
163
+ },
164
+ covered: {
165
+ default: false,
166
+ type: Boolean
140
167
  }
141
168
  },
142
169
  emits: { "update:tab": (tab) => typeof tab === "string" },
143
170
  setup(props, { emit, slots }) {
144
171
  const root = ref(null);
172
+ const codePane = ref(null);
173
+ const filesMax = ref(limits.files[1]);
145
174
  const key = computed(() => props.storageKey === false ? false : props.storageKey ?? `vitehub:workspace:${props.layout}`);
146
175
  const splits = ref({ ...defaultSplits[props.layout] });
147
176
  const localTab = ref();
@@ -151,17 +180,31 @@ const WorkspaceShell = defineComponent({
151
180
  watch(() => props.layout, () => {
152
181
  splits.value = readSplits(key.value, props.layout);
153
182
  });
183
+ watch(codePane, (pane, _, onCleanup) => {
184
+ if (!pane || typeof ResizeObserver === "undefined") return;
185
+ const measure = (width) => {
186
+ const available = width - Math.min(editorReserve, width / 2) - 1;
187
+ filesMax.value = Math.max(0, Math.min(limits.files[1], Math.floor(available)));
188
+ };
189
+ measure(pane.clientWidth);
190
+ const observer = new ResizeObserver(([entry]) => {
191
+ if (entry) measure(entry.contentRect.width);
192
+ });
193
+ observer.observe(pane);
194
+ onCleanup(() => observer.disconnect());
195
+ }, { flush: "post" });
154
196
  function set(name, value) {
197
+ const size = clamp(name, value);
155
198
  splits.value = {
156
199
  ...splits.value,
157
- [name]: clamp(name, value)
200
+ [name]: name === "files" ? Math.min(filesMax.value, size) : size
158
201
  };
159
202
  if (!key.value) return;
160
203
  try {
161
204
  window.localStorage.setItem(key.value, JSON.stringify(splits.value));
162
205
  } catch {}
163
206
  }
164
- const items = computed(() => (props.tabs ?? builtInTabs.filter((item) => slots[item.value])).filter((item) => props.layout !== "playground" || item.value !== "preview"));
207
+ const items = computed(() => props.tabs ?? builtInTabs.filter((item) => slots[item.value]));
165
208
  const tabs = computed(() => items.value.map((item) => item.value));
166
209
  const active = computed(() => {
167
210
  const wanted = props.tab ?? localTab.value;
@@ -178,7 +221,12 @@ const WorkspaceShell = defineComponent({
178
221
  showTab: select
179
222
  });
180
223
  const UTabs = useUIComponent("UTabs");
181
- function tabList() {
224
+ function panelContent(name) {
225
+ const custom = slots[`tab-${name}`];
226
+ if (custom) return custom(slotProps());
227
+ if (!layoutSlots.has(name) && !name.startsWith("tab-")) return renderSlot(slots, name, slotProps());
228
+ }
229
+ function output() {
182
230
  if (tabs.value.length === 0) return void 0;
183
231
  const panels = tabs.value.map((name) => h("div", {
184
232
  "aria-label": items.value.find((item) => item.value === name)?.label,
@@ -187,8 +235,8 @@ const WorkspaceShell = defineComponent({
187
235
  inert: active.value === name ? void 0 : "",
188
236
  key: name,
189
237
  role: "tabpanel"
190
- }, renderSlot(slots, name, slotProps())));
191
- return h("div", { class: "vh-ws-tabs" }, [h(UTabs, {
238
+ }, panelContent(name)));
239
+ return h("div", { class: "vh-ws-pane vh-ws-pane--output" }, [h(UTabs, {
192
240
  "aria-label": "Workspace panels",
193
241
  class: "vh-ws-tab-list",
194
242
  content: false,
@@ -205,80 +253,85 @@ const WorkspaceShell = defineComponent({
205
253
  }), h("div", { class: "vh-ws-tab-panels" }, panels)]);
206
254
  }
207
255
  return () => {
208
- const s = splits.value;
209
- const container = () => root.value?.querySelector(".vh-ws-body") ?? null;
210
- const filesSplit = slots.files ? [h("div", {
256
+ const s = {
257
+ ...splits.value,
258
+ files: Math.min(splits.value.files, filesMax.value)
259
+ };
260
+ const layout = props.layout;
261
+ const body = () => root.value?.querySelector(".vh-ws-body") ?? null;
262
+ const code = (style) => h("div", {
263
+ class: "vh-ws-pane vh-ws-code",
264
+ ref: codePane,
265
+ style
266
+ }, [...slots.files ? [h("div", {
211
267
  class: "vh-ws-pane vh-ws-pane--files",
212
268
  style: { flexBasis: `${s.files}px` }
213
269
  }, renderSlot(slots, "files", slotProps())), separator({
214
- container,
270
+ container: () => codePane.value,
215
271
  label: "Resize files",
272
+ max: filesMax.value,
216
273
  measure: (event, rect) => event.clientX - rect.left,
217
274
  name: "files",
218
275
  orientation: "vertical",
219
276
  set,
220
277
  splits: s
221
- })] : [];
222
- const editor = h("div", { class: "vh-ws-pane vh-ws-pane--editor" }, renderSlot(slots, "editor", slotProps()));
223
- let body;
224
- if (props.layout === "playground") {
225
- const panels = tabList();
226
- const center = panels ? h("div", { class: "vh-ws-stack" }, [
227
- h("div", {
228
- class: "vh-ws-pane",
229
- style: { flexBasis: `${s.main}%` }
230
- }, [editor]),
278
+ })] : [], h("div", { class: "vh-ws-pane vh-ws-pane--editor" }, [
279
+ slots["editor-head"] ? h("div", { class: "vh-ws-head vh-ws-editor-head" }, renderSlot(slots, "editor-head", slotProps())) : void 0,
280
+ h("div", { class: "vh-ws-pane vh-ws-editor-body" }, renderSlot(slots, "editor", slotProps())),
281
+ slots.status ? h("div", { class: "vh-ws-status" }, renderSlot(slots, "status", slotProps())) : void 0
282
+ ])]);
283
+ const guide = (style) => slots.guide ? h("div", {
284
+ class: "vh-ws-pane vh-ws-guide",
285
+ style
286
+ }, renderSlot(slots, "guide", slotProps())) : void 0;
287
+ const codeSeparator = () => separator({
288
+ container: body,
289
+ label: "Resize code",
290
+ measure: (event, rect) => (event.clientX - rect.left) / rect.width * 100,
291
+ name: "code",
292
+ orientation: "vertical",
293
+ set,
294
+ splits: s
295
+ });
296
+ let children;
297
+ if (layout === "guide-side") children = [guide(), h("div", { class: "vh-ws-pane vh-ws-stack" }, [output(), code()])];
298
+ else {
299
+ const panels = output();
300
+ const width = panels ? { flex: `0 0 ${s.code}%` } : void 0;
301
+ const column = layout === "guide-top" && slots.guide ? h("div", {
302
+ class: "vh-ws-pane vh-ws-column",
303
+ style: width
304
+ }, [
305
+ guide({ flex: `0 0 ${s.guide}%` }),
231
306
  separator({
232
- container: () => root.value?.querySelector(".vh-ws-stack") ?? null,
233
- label: "Resize panels",
307
+ container: () => root.value?.querySelector(".vh-ws-column") ?? null,
308
+ label: "Resize guide",
234
309
  measure: (event, rect) => (event.clientY - rect.top) / rect.height * 100,
235
- name: "main",
310
+ name: "guide",
236
311
  orientation: "horizontal",
237
312
  set,
238
313
  splits: s
239
314
  }),
240
- h("div", { class: "vh-ws-pane vh-ws-pane--panels" }, [panels])
241
- ]) : editor;
242
- body = h("div", { class: "vh-ws-body vh-ws-body--row" }, [
243
- ...filesSplit,
244
- h("div", { class: "vh-ws-pane vh-ws-pane--center" }, [center]),
245
- ...slots.preview ? [separator({
246
- container,
247
- label: "Resize preview",
248
- measure: (event, rect) => (rect.right - event.clientX) / rect.width * 100,
249
- name: "side",
250
- orientation: "vertical",
251
- set,
252
- splits: s
253
- }), h("div", {
254
- class: "vh-ws-pane vh-ws-pane--side",
255
- style: { flexBasis: `${s.side}%` }
256
- }, renderSlot(slots, "preview", slotProps()))] : []
257
- ]);
258
- } else body = h("div", { class: "vh-ws-body vh-ws-body--column" }, [
259
- h("div", {
260
- class: "vh-ws-row",
261
- style: { flexBasis: `${s.main}%` }
262
- }, [...filesSplit, editor]),
263
- separator({
264
- container,
265
- label: "Resize editor",
266
- measure: (event, rect) => (event.clientY - rect.top) / rect.height * 100,
267
- name: "main",
268
- orientation: "horizontal",
269
- set,
270
- splits: s
271
- }),
272
- h("div", { class: "vh-ws-pane vh-ws-pane--panels" }, [tabList()])
273
- ]);
315
+ code()
316
+ ]) : code(width);
317
+ children = panels ? [
318
+ column,
319
+ codeSeparator(),
320
+ panels
321
+ ] : [column];
322
+ }
274
323
  return h("section", {
275
324
  "aria-label": props.label,
276
- class: ["vh-ws-shell", `vh-ws-shell--${props.layout}`],
277
- "data-layout": props.layout,
325
+ class: ["vh-ws-shell", `vh-ws-shell--${layout}`],
326
+ "data-layout": layout,
278
327
  ref: root
279
328
  }, [
280
- slots.toolbar ? h("div", { class: "vh-ws-toolbar" }, renderSlot(slots, "toolbar", slotProps())) : void 0,
281
- body,
329
+ slots.bar ? h("div", { class: "vh-ws-bar" }, renderSlot(slots, "bar", slotProps())) : void 0,
330
+ slots.banner ? h("div", { class: "vh-ws-banner" }, renderSlot(slots, "banner", slotProps())) : void 0,
331
+ h("div", {
332
+ class: "vh-ws-body",
333
+ inert: props.covered ? "" : void 0
334
+ }, children),
282
335
  slots.overlay ? h("div", { class: "vh-ws-overlay" }, renderSlot(slots, "overlay", slotProps())) : void 0
283
336
  ]);
284
337
  };
@@ -287,5 +340,4 @@ const WorkspaceShell = defineComponent({
287
340
  function renderSlot(slots, name, props) {
288
341
  return slots[name]?.(props);
289
342
  }
290
- //#endregion
291
343
  export { WorkspaceShell };
@@ -0,0 +1,73 @@
1
+ import { PropType, SlotsType, VNode } from "vue";
2
+ /** An action at the bottom of the sidebar. */
3
+ export type WorkspaceSidebarAction = "reset" | "download" | "copy-link";
4
+ /**
5
+ * A panel that opens over the workspace from the sidebar button of `WorkspaceBar`, under the bar. It does not push the
6
+ * workspace. Focus moves into it when it opens and back to the button when it closes. Escape and a click outside close
7
+ * it. Reset, Download and Copy link sit at the bottom. Put it in the box of the bar, such as the `bar` slot of
8
+ * `WorkspaceShell`.
9
+ */
10
+ export declare const WorkspaceSidebar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
+ open: {
12
+ default: boolean;
13
+ type: BooleanConstructor;
14
+ };
15
+ id: {
16
+ default: undefined;
17
+ type: StringConstructor;
18
+ };
19
+ label: {
20
+ default: string;
21
+ type: StringConstructor;
22
+ };
23
+ actions: {
24
+ default: () => string[];
25
+ type: PropType<readonly WorkspaceSidebarAction[]>;
26
+ };
27
+ copied: {
28
+ default: boolean;
29
+ type: BooleanConstructor;
30
+ };
31
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
32
+ [key: string]: any;
33
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
+ "update:open": (open: boolean) => boolean;
35
+ reset: () => true;
36
+ download: () => true;
37
+ "copy-link": () => true;
38
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
39
+ open: {
40
+ default: boolean;
41
+ type: BooleanConstructor;
42
+ };
43
+ id: {
44
+ default: undefined;
45
+ type: StringConstructor;
46
+ };
47
+ label: {
48
+ default: string;
49
+ type: StringConstructor;
50
+ };
51
+ actions: {
52
+ default: () => string[];
53
+ type: PropType<readonly WorkspaceSidebarAction[]>;
54
+ };
55
+ copied: {
56
+ default: boolean;
57
+ type: BooleanConstructor;
58
+ };
59
+ }>> & Readonly<{
60
+ onReset?: (() => any) | undefined;
61
+ onDownload?: (() => any) | undefined;
62
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
63
+ "onCopy-link"?: (() => any) | undefined;
64
+ }>, {
65
+ label: string;
66
+ open: boolean;
67
+ actions: readonly WorkspaceSidebarAction[];
68
+ id: string;
69
+ copied: boolean;
70
+ }, SlotsType<{
71
+ default?: () => VNode[];
72
+ footer?: () => VNode[];
73
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,131 @@
1
+ import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
2
+ import { t as ring } from "../../ring-BN4d8vtw.js";
3
+ import { defineComponent, h, nextTick, onBeforeUnmount, onMounted, ref, useId, watch } from "vue";
4
+ // src/workspace/workspace-sidebar.ts
5
+ const tabbable = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])";
6
+ /**
7
+ * A panel that opens over the workspace from the sidebar button of `WorkspaceBar`, under the bar. It does not push the
8
+ * workspace. Focus moves into it when it opens and back to the button when it closes. Escape and a click outside close
9
+ * it. Reset, Download and Copy link sit at the bottom. Put it in the box of the bar, such as the `bar` slot of
10
+ * `WorkspaceShell`.
11
+ */
12
+ const WorkspaceSidebar = defineComponent({
13
+ name: "WorkspaceSidebar",
14
+ props: {
15
+ open: {
16
+ default: false,
17
+ type: Boolean
18
+ },
19
+ id: {
20
+ default: void 0,
21
+ type: String
22
+ },
23
+ label: {
24
+ default: "Sidebar",
25
+ type: String
26
+ },
27
+ actions: {
28
+ default: () => [
29
+ "reset",
30
+ "download",
31
+ "copy-link"
32
+ ],
33
+ type: Array
34
+ },
35
+ copied: {
36
+ default: false,
37
+ type: Boolean
38
+ }
39
+ },
40
+ emits: {
41
+ "update:open": (open) => typeof open === "boolean",
42
+ reset: () => true,
43
+ download: () => true,
44
+ "copy-link": () => true
45
+ },
46
+ slots: Object,
47
+ setup(props, { emit, slots }) {
48
+ const UButton = useUIComponent("UButton");
49
+ const fallbackId = useId();
50
+ const id = () => props.id ?? fallbackId;
51
+ const panel = ref();
52
+ const copyButton = ref();
53
+ let previous;
54
+ function enter() {
55
+ const active = document.activeElement;
56
+ previous = active instanceof HTMLElement ? active : void 0;
57
+ nextTick(() => {
58
+ (panel.value?.querySelector(tabbable) ?? panel.value)?.focus();
59
+ });
60
+ }
61
+ watch(() => props.open, (open) => {
62
+ if (open) return enter();
63
+ const active = document.activeElement;
64
+ const inside = !active || active === document.body || !!panel.value?.contains(active);
65
+ const target = previous?.isConnected && previous !== document.body ? previous : document.querySelector(`[aria-controls="${CSS.escape(id())}"]`);
66
+ if (inside) target?.focus();
67
+ previous = void 0;
68
+ }, { flush: "pre" });
69
+ watch(() => props.copied, (copied) => {
70
+ const target = copyButton.value instanceof HTMLElement ? copyButton.value : copyButton.value?.$el;
71
+ if (copied && target instanceof HTMLElement) ring(target);
72
+ });
73
+ function outside(event) {
74
+ if (!props.open) return;
75
+ const path = event.composedPath();
76
+ if (panel.value && path.includes(panel.value)) return;
77
+ if (path.some((node) => node instanceof Element && node.getAttribute("aria-controls") === id())) return;
78
+ emit("update:open", false);
79
+ }
80
+ onMounted(() => {
81
+ document.addEventListener("pointerdown", outside, true);
82
+ if (props.open) enter();
83
+ });
84
+ onBeforeUnmount(() => document.removeEventListener("pointerdown", outside, true));
85
+ const button = (action) => {
86
+ const shared = {
87
+ class: "vh-ws-sidebar-action",
88
+ color: "neutral",
89
+ key: action,
90
+ variant: "ghost"
91
+ };
92
+ if (action === "reset") return h(UButton, {
93
+ ...shared,
94
+ icon: "i-lucide-rotate-ccw",
95
+ label: "Reset",
96
+ onClick: () => emit("reset")
97
+ });
98
+ if (action === "download") return h(UButton, {
99
+ ...shared,
100
+ icon: "i-lucide-download",
101
+ label: "Download",
102
+ onClick: () => emit("download")
103
+ });
104
+ return h(UButton, {
105
+ ...shared,
106
+ icon: props.copied ? "i-lucide-check" : "i-lucide-link",
107
+ label: props.copied ? "Link copied" : "Copy link",
108
+ ref: copyButton,
109
+ onClick: () => emit("copy-link")
110
+ });
111
+ };
112
+ return () => {
113
+ const footer = slots.footer?.() ?? (props.actions.length ? props.actions.map(button) : void 0);
114
+ return h("aside", {
115
+ "aria-label": props.label,
116
+ class: "vh-ws-sidebar",
117
+ "data-open": props.open ? "" : void 0,
118
+ id: id(),
119
+ inert: !props.open,
120
+ ref: panel,
121
+ tabindex: -1,
122
+ onKeydown: (event) => {
123
+ if (event.key !== "Escape" || event.defaultPrevented) return;
124
+ event.preventDefault();
125
+ emit("update:open", false);
126
+ }
127
+ }, [h("div", { class: "vh-ws-sidebar-body" }, slots.default?.()), footer ? h("div", { class: "vh-ws-sidebar-footer" }, footer) : void 0]);
128
+ };
129
+ }
130
+ });
131
+ export { WorkspaceSidebar };
@@ -0,0 +1,45 @@
1
+ import { WorkspaceExample } from "./workspace-examples.js";
2
+ import { PropType, SlotsType, VNode } from "vue";
3
+ /**
4
+ * The start screen of a first visit: the examples as cards over the workspace, under the bar. A pick emits `pick` with
5
+ * the id of the example. Show it only when the page opens without a share link, so a link opens its files at once.
6
+ * Put it in the box of the bar, as `WorkspaceSidebar`.
7
+ */
8
+ export declare const WorkspaceStart: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
+ examples: {
10
+ required: true;
11
+ type: PropType<readonly WorkspaceExample[]>;
12
+ };
13
+ title: {
14
+ default: string;
15
+ type: StringConstructor;
16
+ };
17
+ description: {
18
+ default: string;
19
+ type: StringConstructor;
20
+ };
21
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
22
+ [key: string]: any;
23
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ pick: (id: string) => boolean;
25
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
+ examples: {
27
+ required: true;
28
+ type: PropType<readonly WorkspaceExample[]>;
29
+ };
30
+ title: {
31
+ default: string;
32
+ type: StringConstructor;
33
+ };
34
+ description: {
35
+ default: string;
36
+ type: StringConstructor;
37
+ };
38
+ }>> & Readonly<{
39
+ onPick?: ((id: string) => any) | undefined;
40
+ }>, {
41
+ title: string;
42
+ description: string;
43
+ }, SlotsType<{
44
+ footer?: () => VNode[];
45
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,59 @@
1
+ import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
2
+ import { defineComponent, h, useId } from "vue";
3
+ // src/workspace/workspace-start.ts
4
+ /**
5
+ * The start screen of a first visit: the examples as cards over the workspace, under the bar. A pick emits `pick` with
6
+ * the id of the example. Show it only when the page opens without a share link, so a link opens its files at once.
7
+ * Put it in the box of the bar, as `WorkspaceSidebar`.
8
+ */
9
+ const WorkspaceStart = defineComponent({
10
+ name: "WorkspaceStart",
11
+ props: {
12
+ examples: {
13
+ required: true,
14
+ type: Array
15
+ },
16
+ title: {
17
+ default: "Start from an example",
18
+ type: String
19
+ },
20
+ description: {
21
+ default: "Each one runs in this tab. Edit it, then copy a link or download the files.",
22
+ type: String
23
+ }
24
+ },
25
+ emits: { pick: (id) => typeof id === "string" },
26
+ slots: Object,
27
+ setup(props, { emit, slots }) {
28
+ const UIcon = useUIComponent("UIcon");
29
+ const titleId = useId();
30
+ const count = (files) => {
31
+ const length = files ? Object.keys(files).length : 0;
32
+ return files ? h("span", { class: "vh-ws-start-files" }, length === 1 ? "1 file" : `${length} files`) : void 0;
33
+ };
34
+ return () => h("section", {
35
+ "aria-labelledby": titleId,
36
+ class: "vh-ws-start"
37
+ }, h("div", { class: "vh-ws-start-content" }, [
38
+ h("h2", {
39
+ class: "vh-ws-start-title",
40
+ id: titleId
41
+ }, props.title),
42
+ h("p", { class: "vh-ws-start-description" }, props.description),
43
+ h("ul", { class: "vh-ws-start-grid" }, props.examples.map((example) => h("li", { key: example.id }, h("button", {
44
+ class: "vh-ws-start-card",
45
+ type: "button",
46
+ onClick: () => emit("pick", example.id)
47
+ }, [
48
+ h("span", { class: "vh-ws-start-label" }, example.label),
49
+ example.description ? h("span", { class: "vh-ws-start-text" }, example.description) : void 0,
50
+ count(example.files)
51
+ ])))),
52
+ h("div", { class: "vh-ws-start-foot" }, slots.footer?.() ?? [h(UIcon, {
53
+ class: "vh-ws-icon",
54
+ name: "i-lucide-link"
55
+ }), "Opened from a share link? The files open at once, without this screen."])
56
+ ]));
57
+ }
58
+ });
59
+ export { WorkspaceStart };