@vite-hub/ui 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +106 -46
  2. package/dist/AttachmentTitle-BWw0ck0T.js +110 -0
  3. package/dist/BubbleContent-B1a4e3vE.js +45 -0
  4. package/dist/Chat-CuSthJVg.js +112 -0
  5. package/dist/ChatMessage-CFQs0v4N.js +94 -0
  6. package/dist/CodeBlockContent-BjXJm8lO.js +92 -0
  7. package/dist/CodeBlockTitle-DIu8Ef3V.js +99 -0
  8. package/dist/CommentRow-XY3FNp30.js +86 -0
  9. package/dist/CopyButton-Bs6DT-Z8.js +188 -0
  10. package/dist/Markdown-Da5t-931.js +70 -0
  11. package/dist/MarkdownCodeBlock-BWDLOWPO.js +127 -0
  12. package/dist/MarkdownImage-CJN3myt4.js +111 -0
  13. package/dist/MessageHeader-CJ9eBHSS.js +61 -0
  14. package/dist/MessageParts-CyJLG34y.js +57 -0
  15. package/dist/MessageScrollerViewport-BaTlWLki.js +142 -0
  16. package/dist/MorphText-B6MWdeIv.js +36 -0
  17. package/dist/RollNumber-CnF52zJM.js +49 -0
  18. package/dist/SwapIcon-CUIq1TU5.js +67 -0
  19. package/dist/TraceTitle-Cp0y7RRD.js +133 -0
  20. package/dist/agent-session-2j2gbGpp.js +875 -0
  21. package/dist/agent-session-BwZSMi4S.d.ts +312 -0
  22. package/dist/appendItems-hQ4aBd9Q.js +4047 -0
  23. package/dist/attachment-BllgHx9Q.d.ts +124 -0
  24. package/dist/attachment-DQMJNfj0.js +35 -0
  25. package/dist/avatar-stack-Bj1xUkzY.d.ts +4 -0
  26. package/dist/avatar-stack-CoLlsmwJ.js +72 -0
  27. package/dist/bubble-D3M2_InY.js +32 -0
  28. package/dist/bubble-DmplVxLr.d.ts +64 -0
  29. package/dist/chat-DWdyMSuj.d.ts +13 -0
  30. package/dist/chat-message-QLHnX_ED.d.ts +11 -0
  31. package/dist/chat-session-BOj5L3Ey.d.ts +29 -0
  32. package/dist/chat-session-cxUzvwdj.js +43 -0
  33. package/dist/choices-input-DqgXl5a-.d.ts +97 -0
  34. package/dist/{vue-d2Td6uu2.js → client-BG-oCUtv-5i4sRwXP.js} +4156 -4156
  35. package/dist/code-block-BqOEVWPh.d.ts +182 -0
  36. package/dist/code-block-CMERLfew.js +14 -0
  37. package/dist/code-view-26RY6dX8.js +137 -0
  38. package/dist/code-view-D8yYdFUc.d.ts +184 -0
  39. package/dist/{comment-composer-DmDM3XYP.d.ts → comment-composer-CsVOvG9j.d.ts} +6 -6
  40. package/dist/{comment-composer-X7vJKh5b.js → comment-composer-D_mcH3Ts.js} +175 -37
  41. package/dist/{comment-layer-KnnVfdRV.d.ts → comment-layer-C3xmg-0_.d.ts} +14 -5
  42. package/dist/comment-layer-Ci6ipGi2.js +1206 -0
  43. package/dist/{comment-panel-DoLDOw3E.d.ts → comment-panel-DxN21VoY.d.ts} +24 -17
  44. package/dist/comment-selection-bar-B_bchB2O.d.ts +33 -0
  45. package/dist/comment-selection-bar-DZAtiRZ9.js +144 -0
  46. package/dist/{comment-thread-DPV2kqA4.d.ts → comment-thread-BmsqcjVQ.d.ts} +9 -8
  47. package/dist/{comment-thread-jqPx6aJ8.js → comment-thread-BzOZVqF2.js} +74 -49
  48. package/dist/comments-BU8cTt5o.d.ts +50 -0
  49. package/dist/{comments-9MDSNm-9.js → comments-BaSrroRV.js} +32 -4
  50. package/dist/{comments-OWjNidkP.d.ts → comments-ZfV6IZs8.d.ts} +9 -2
  51. package/dist/components-B_2Q0dJ3.js +269 -0
  52. package/dist/{config-LRonN53j.js → config-BDQYUjjp.js} +10 -29
  53. package/dist/{config-COSdO-ay.d.ts → config-JmsTI7gs.d.ts} +20 -33
  54. package/dist/connection-status-BVSH2ZVo.js +72 -0
  55. package/dist/connection-status-g62BTn44.d.ts +37 -0
  56. package/dist/copy-button-CRiXUFsl.d.ts +17 -0
  57. package/dist/device-frame-BW6IjB6P.d.ts +78 -0
  58. package/dist/device-frame-DDWoyB-G.js +515 -0
  59. package/dist/diffs-BTKaVnsb.d.ts +272 -0
  60. package/dist/diffs.d.ts +3 -0
  61. package/dist/{pierre-code-view-C49BVDrc.js → diffs.js} +147 -4223
  62. package/dist/drop-field-C0bXv1J-.d.ts +35 -0
  63. package/dist/drop-field-DeIvKoJs.js +77 -0
  64. package/dist/editor-BsOTjnnN.d.ts +540 -0
  65. package/dist/{markdown-editor-D1irG9Xl.js → editor-hXea1i46.js} +833 -106
  66. package/dist/editor.d.ts +2 -0
  67. package/dist/editor.js +3 -0
  68. package/dist/element-BpjNQvZ0.js +6 -0
  69. package/dist/{file-tree-CRFIdtzw.js → file-tree-B4JKbp4r.js} +19 -18
  70. package/dist/{file-tree-DOtkeBaq.d.ts → file-tree-BdnKA6UA.d.ts} +33 -8
  71. package/dist/file-tree-DDSIafDn.d.ts +22 -0
  72. package/dist/file-tree-DS5shGSL.js +46 -0
  73. package/dist/file-tree.d.ts +2 -0
  74. package/dist/file-tree.js +1 -0
  75. package/dist/files-cuVXzWlx.js +30 -0
  76. package/dist/filter-search-C9e6sGij.d.ts +28 -0
  77. package/dist/filter-search-COZsoRiR.js +73 -0
  78. package/dist/formatCSSVariablePrefix-DLS1Ed1_.js +5 -0
  79. package/dist/headless-2IcUWHMq.d.ts +51 -0
  80. package/dist/headless.d.ts +7 -4
  81. package/dist/headless.js +5 -3
  82. package/dist/highlight.d.ts +2 -0
  83. package/dist/highlight.js +1 -0
  84. package/dist/{highlights-C2AbEdDI.js → highlights-8Al0-h-v.js} +3 -2
  85. package/dist/{hold-to-delete-BSMrpE-i.d.ts → hold-to-delete-CQc1JaG_.d.ts} +7 -0
  86. package/dist/{hold-to-delete-Cludb56v.js → hold-to-delete-D1Vy40w5.js} +138 -20
  87. package/dist/hold-to-delete-DazElJT2.js +85 -0
  88. package/dist/hold-to-delete-ksBE7wxc.d.ts +58 -0
  89. package/dist/index-CffOzibW.d.ts +77 -0
  90. package/dist/{index-B2cbt3py.d.ts → index-D3-uYBqH.d.ts} +1 -1
  91. package/dist/index.d.ts +165 -52
  92. package/dist/index.js +126 -670
  93. package/dist/markdown-BLALLOc0.d.ts +45 -0
  94. package/dist/{parts/components/markdown-renderer.d.ts → markdown-DkDxdpMU.d.ts} +10 -7
  95. package/dist/{markdown-renderer-DMyYKeil.js → markdown-_0HhbsOo.js} +125 -127
  96. package/dist/markdown-editor.d.ts +51 -98
  97. package/dist/markdown-editor.js +70 -3
  98. package/dist/markdown.d.ts +2 -0
  99. package/dist/markdown.js +1 -0
  100. package/dist/marker-CvcWZ3Zp.d.ts +59 -0
  101. package/dist/marker-DNL6QR3L.js +63 -0
  102. package/dist/message-BwivYIEl.js +13 -0
  103. package/dist/message-DEq4K5cQ.d.ts +72 -0
  104. package/dist/message-parts-B1BZFVKe.d.ts +3 -0
  105. package/dist/message-parts-CG3gNWn8.d.ts +11 -0
  106. package/dist/message-parts.d.ts +2 -0
  107. package/dist/message-parts.js +1 -0
  108. package/dist/message-scroller-D7AvM31v.d.ts +41 -0
  109. package/dist/motion/core.d.ts +4 -4
  110. package/dist/motion/core.js +5 -11
  111. package/dist/motion-BH6ShUam.d.ts +12 -0
  112. package/dist/{install-C4LwcJda.js → motion-BhARaNBB.js} +1 -1
  113. package/dist/{effects-C1zYpSpg.js → motion-core-JZZiPKEk.js} +1829 -120
  114. package/dist/{motion-core-Dh20n5Se.d.ts → motion-core-gfsTPLbh.d.ts} +35 -74
  115. package/dist/motion-list-9vD1hSS0.js +49 -0
  116. package/dist/motion.d.ts +5 -14
  117. package/dist/motion.js +6 -13
  118. package/dist/nuxt-ui-D3Qda35W.js +22 -0
  119. package/dist/nuxt.d.ts +9 -5
  120. package/dist/nuxt.js +28 -33
  121. package/dist/parts/components/agent-session.d.ts +2 -295
  122. package/dist/parts/components/agent-session.js +1 -659
  123. package/dist/parts/components/attachment.d.ts +2 -85
  124. package/dist/parts/components/attachment.js +3 -72
  125. package/dist/parts/components/avatar-stack.d.ts +3 -2
  126. package/dist/parts/components/avatar-stack.js +1 -60
  127. package/dist/parts/components/bubble.d.ts +2 -69
  128. package/dist/parts/components/bubble.js +3 -52
  129. package/dist/parts/components/chat-message.d.ts +3 -25
  130. package/dist/parts/components/chat-message.js +1 -50
  131. package/dist/parts/components/chat-session.d.ts +2 -26
  132. package/dist/parts/components/chat-session.js +1 -37
  133. package/dist/parts/components/chat.d.ts +3 -52
  134. package/dist/parts/components/chat.js +1 -105
  135. package/dist/parts/components/code-block.d.ts +2 -102
  136. package/dist/parts/components/code-block.js +4 -109
  137. package/dist/parts/components/code-view.d.ts +3 -268
  138. package/dist/parts/components/code-view.js +1 -1
  139. package/dist/parts/components/comment-composer.d.ts +1 -1
  140. package/dist/parts/components/comment-composer.js +1 -1
  141. package/dist/parts/components/comment-layer.d.ts +1 -1
  142. package/dist/parts/components/comment-layer.js +1 -634
  143. package/dist/parts/components/comment-panel.d.ts +2 -2
  144. package/dist/parts/components/comment-panel.js +22 -16
  145. package/dist/parts/components/comment-selection-bar.d.ts +2 -2
  146. package/dist/parts/components/comment-selection-bar.js +1 -116
  147. package/dist/parts/components/comment-thread.d.ts +1 -1
  148. package/dist/parts/components/comment-thread.js +1 -3
  149. package/dist/parts/components/comments.d.ts +8 -9
  150. package/dist/parts/components/comments.js +5 -9
  151. package/dist/parts/components/connection-status.d.ts +2 -36
  152. package/dist/parts/components/connection-status.js +1 -64
  153. package/dist/parts/components/copy-button.d.ts +3 -126
  154. package/dist/parts/components/copy-button.js +1 -226
  155. package/dist/parts/components/device-frame.d.ts +2 -128
  156. package/dist/parts/components/device-frame.js +1 -470
  157. package/dist/parts/components/drop-field.d.ts +2 -67
  158. package/dist/parts/components/drop-field.js +1 -76
  159. package/dist/parts/components/file-tree.d.ts +3 -2
  160. package/dist/parts/components/file-tree.js +3 -1
  161. package/dist/parts/components/filter-search.d.ts +2 -45
  162. package/dist/parts/components/filter-search.js +1 -57
  163. package/dist/parts/components/hold-to-delete.d.ts +2 -80
  164. package/dist/parts/components/hold-to-delete.js +1 -75
  165. package/dist/parts/components/markdown.d.ts +3 -45
  166. package/dist/parts/components/markdown.js +1 -46
  167. package/dist/parts/components/marker.d.ts +2 -32
  168. package/dist/parts/components/marker.js +1 -22
  169. package/dist/parts/components/message-parts.d.ts +3 -25
  170. package/dist/parts/components/message-parts.js +1 -45
  171. package/dist/parts/components/message.d.ts +2 -32
  172. package/dist/parts/components/message.js +3 -22
  173. package/dist/parts/components/motion-list.d.ts +2 -40
  174. package/dist/parts/components/motion-list.js +1 -41
  175. package/dist/parts/components/motion.d.ts +5 -118
  176. package/dist/parts/components/motion.js +5 -163
  177. package/dist/parts/components/patch-parsers.d.ts +1 -1
  178. package/dist/parts/components/progress.d.ts +2 -39
  179. package/dist/parts/components/progress.js +1 -53
  180. package/dist/parts/components/prompt-input.d.ts +2 -134
  181. package/dist/parts/components/prompt-input.js +1 -253
  182. package/dist/parts/components/relative-time.d.ts +2 -71
  183. package/dist/parts/components/relative-time.js +1 -1
  184. package/dist/parts/components/status.d.ts +2 -58
  185. package/dist/parts/components/status.js +1 -47
  186. package/dist/parts/components/sync-status.d.ts +2 -22
  187. package/dist/parts/components/sync-status.js +1 -48
  188. package/dist/parts/components/tool-list.d.ts +2 -28
  189. package/dist/parts/components/tool-list.js +1 -118
  190. package/dist/parts/components/trace-run.d.ts +2 -25
  191. package/dist/parts/components/trace-run.js +1 -89
  192. package/dist/parts/components/trace.d.ts +2 -59
  193. package/dist/parts/components/trace.js +1 -76
  194. package/dist/parts/composables/attachments.js +75 -1
  195. package/dist/parts/headless/choices-input.d.ts +2 -2
  196. package/dist/parts/headless/choices-input.js +49 -37
  197. package/dist/parts/headless/comments.d.ts +1 -1
  198. package/dist/parts/headless/comments.js +1 -1
  199. package/dist/parts/headless/message-scroller.d.ts +2 -2
  200. package/dist/parts/headless/message-scroller.js +211 -309
  201. package/dist/parts/headless/relative-time.d.ts +2 -0
  202. package/dist/parts/headless/relative-time.js +1 -0
  203. package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
  204. package/dist/parts/workspace/browser-support-notice.js +6 -5
  205. package/dist/parts/workspace/connect-panel.js +1 -1
  206. package/dist/parts/workspace/runners/web-container.js +2 -2
  207. package/dist/parts/workspace/workspace-bar.d.ts +1 -1
  208. package/dist/parts/workspace/workspace-bar.js +1 -1
  209. package/dist/parts/workspace/workspace-boot-status.d.ts +1 -1
  210. package/dist/parts/workspace/workspace-boot-status.js +1 -206
  211. package/dist/parts/workspace/workspace-editor-head.d.ts +1 -1
  212. package/dist/parts/workspace/workspace-editor-head.js +1 -1
  213. package/dist/parts/workspace/workspace-editor.d.ts +2 -2
  214. package/dist/parts/workspace/workspace-examples.js +1 -1
  215. package/dist/parts/workspace/workspace-file-tree.d.ts +1 -1
  216. package/dist/parts/workspace/workspace-file-tree.js +3 -2
  217. package/dist/parts/workspace/workspace-guide.d.ts +1 -1
  218. package/dist/parts/workspace/workspace-guide.js +1 -1
  219. package/dist/parts/workspace/workspace-preview.d.ts +1 -1
  220. package/dist/parts/workspace/workspace-preview.js +14 -12
  221. package/dist/parts/workspace/workspace-shell.d.ts +1 -1
  222. package/dist/parts/workspace/workspace-shell.js +11 -11
  223. package/dist/parts/workspace/workspace-sidebar.d.ts +2 -2
  224. package/dist/parts/workspace/workspace-sidebar.js +2 -2
  225. package/dist/parts/workspace/workspace-start.d.ts +1 -1
  226. package/dist/parts/workspace/workspace-start.js +1 -1
  227. package/dist/parts/workspace/workspace-steps.js +1 -1
  228. package/dist/parts/workspace/workspace.d.ts +3 -3
  229. package/dist/parts/workspace/workspace.js +5 -5
  230. package/dist/press-BuEC-XvZ.d.ts +83 -0
  231. package/dist/progress-8P8RLYMy.js +47 -0
  232. package/dist/progress-Ch0fA-bf.d.ts +8 -0
  233. package/dist/prompt-input-CRXEJBAK.js +412 -0
  234. package/dist/prompt-input-j4OFTF5p.d.ts +116 -0
  235. package/dist/relative-time-BnJfjeEm.js +131 -0
  236. package/dist/relative-time-BuP-Gvzn.d.ts +43 -0
  237. package/dist/{relative-time-DJnw45tr.js → relative-time-Dz2DR4eb.js} +64 -114
  238. package/dist/relative-time-grHFu1kY.d.ts +11 -0
  239. package/dist/{ring-GaJsg32c.js → ring-B0nZBnU0.js} +1 -2
  240. package/dist/runtime/nuxt-plugin.js +2 -5
  241. package/dist/{shiki-CbfEu_Az.js → shiki-CxzM_xNo.js} +3 -2
  242. package/dist/stand-ins-CuKM1UH1.js +339 -0
  243. package/dist/status-B2Yhrwv8.js +67 -0
  244. package/dist/status-ySiRa-8O.d.ts +38 -0
  245. package/dist/{stream-tokenizer-ByC3l0HQ.js → stream-tokenizer-BsjV6wxW.js} +1 -1
  246. package/dist/styles.css +4348 -3410
  247. package/dist/sync-status-B29eG_n-.js +59 -0
  248. package/dist/sync-status-D4KdGO6y.d.ts +35 -0
  249. package/dist/theme.css +3 -0
  250. package/dist/theme.d.ts +14 -0
  251. package/dist/theme.js +19 -8
  252. package/dist/{themes-DKugPHlg.js → themes-B0_ioVT0.js} +1 -1
  253. package/dist/tool-list-DDaCqpR6.js +209 -0
  254. package/dist/tool-list-DMRPM0Yi.d.ts +50 -0
  255. package/dist/trace-KCBvOsw_.d.ts +113 -0
  256. package/dist/trace-run-Dk962P5a.d.ts +49 -0
  257. package/dist/trace-run-nh6FIsl6.js +202 -0
  258. package/dist/{opt-out-D66l60sg.js → tween-1W-LlKk9.js} +65 -2
  259. package/dist/types-CMU8Vmew.d.ts +71 -0
  260. package/dist/types-CTk3aNb5.d.ts +15 -0
  261. package/dist/types-D0a3i4Fw.d.ts +21 -0
  262. package/dist/types-DTecvcsZ.d.ts +35 -0
  263. package/dist/types-D_BWab7g.d.ts +75 -0
  264. package/dist/types-RHaQ4gj1.d.ts +27 -0
  265. package/dist/ui-components-CKQAPI-W.js +7 -0
  266. package/dist/unwrapDefault-CExq-4rm.js +5 -0
  267. package/dist/utils-hi9-xROt.js +37 -0
  268. package/dist/vite.d.ts +0 -1
  269. package/dist/vite.js +8 -14
  270. package/dist/{vue-vUGpdMct.js → vue-BdA18K5-.js} +1 -1
  271. package/dist/workspace-boot-status-CyGlJS06.js +216 -0
  272. package/dist/{workspace-shell-ChCwWPyv.d.ts → workspace-shell-B4A7CINd.d.ts} +1 -1
  273. package/dist/workspace.d.ts +1 -1
  274. package/dist/workspace.js +1 -2
  275. package/package.json +46 -15
  276. package/dist/announce-B0DLwflT.js +0 -31
  277. package/dist/attachments-DgwoQZKY.js +0 -88
  278. package/dist/avatar-stack-C0IKwj6g.d.ts +0 -57
  279. package/dist/choices-input-BUf-QqGj.d.ts +0 -92
  280. package/dist/code-view-Cg4nyTNA.js +0 -172
  281. package/dist/comment-attachments-DAzUbRmJ.js +0 -23
  282. package/dist/comment-list-ncwaCSVX.d.ts +0 -60
  283. package/dist/comment-person-D_IyIjXo.js +0 -39
  284. package/dist/comment-pin-hBJFiSYW.d.ts +0 -66
  285. package/dist/comment-row-DPMWI5Z0.js +0 -38
  286. package/dist/comment-selection-bar-CVuS-FNL.d.ts +0 -40
  287. package/dist/comment-send-CUkL3TbZ.js +0 -275
  288. package/dist/comment-send-MmxFsOQf.d.ts +0 -23
  289. package/dist/comment-send.css +0 -267
  290. package/dist/comment-status-nsCdrRk_.js +0 -20
  291. package/dist/drop-field-CNZgwFVO.js +0 -162
  292. package/dist/editor-Dmk3k6f6.js +0 -620
  293. package/dist/format-CPipR1FP.js +0 -19
  294. package/dist/handlers-CnbkvXjX.js +0 -181
  295. package/dist/icon-XZaCUZTG.d.ts +0 -29
  296. package/dist/image-preview-BKVUtfwQ.js +0 -104
  297. package/dist/index-B_PSX-5h.d.ts +0 -69
  298. package/dist/list-DUTAo0uC.js +0 -270
  299. package/dist/markdown-editor-B7gD60tp.d.ts +0 -189
  300. package/dist/message-scroller-BZqS63IX.d.ts +0 -173
  301. package/dist/nuxt-ui-7ByUrymx.js +0 -43
  302. package/dist/parts/components/comment-list.d.ts +0 -2
  303. package/dist/parts/components/comment-list.js +0 -173
  304. package/dist/parts/components/comment-pin.d.ts +0 -2
  305. package/dist/parts/components/comment-pin.js +0 -74
  306. package/dist/parts/components/comment-send.d.ts +0 -2
  307. package/dist/parts/components/comment-send.js +0 -1
  308. package/dist/parts/components/markdown-editor.d.ts +0 -2
  309. package/dist/parts/components/markdown-editor.js +0 -1
  310. package/dist/parts/components/markdown-renderer.js +0 -1
  311. package/dist/payload-text-DQNRbJY5.js +0 -31
  312. package/dist/progress-DL9k-ERG.js +0 -265
  313. package/dist/registry-DAIjCjWd.js +0 -77
  314. package/dist/slot-part-BWHvQ3mK.js +0 -25
  315. package/dist/text-gacox6bp.js +0 -822
  316. package/dist/travel-BliEidau.js +0 -180
  317. package/dist/tween-Dv3IIIQG.js +0 -61
  318. package/dist/types-Ceh7h7NT.d.ts +0 -31
  319. package/dist/visual-copy-CHHBfJ6O.js +0 -14
@@ -1,206 +1 @@
1
- import { t as formatDuration } from "../../format-CPipR1FP.js";
2
- import { icon } from "./icons.js";
3
- import { computed, defineComponent, h, onBeforeUnmount, ref, watch } from "vue";
4
- // src/workspace/workspace-boot-status.ts
5
- const checklist = [
6
- {
7
- label: "Check browser support",
8
- stage: "checking"
9
- },
10
- {
11
- label: "Start WebContainer",
12
- stage: "booting"
13
- },
14
- {
15
- label: "Load project files",
16
- stage: "mounting"
17
- },
18
- {
19
- label: "Install dependencies",
20
- stage: "installing"
21
- },
22
- {
23
- label: "Start dev server",
24
- stage: "starting"
25
- }
26
- ];
27
- /** The install hint shows after this many milliseconds. */
28
- const slowInstallMs = 2e4;
29
- /** Maps the steps of `@vite-hub/web-container` to the five rows of the checklist. */
30
- function bootChecklist(steps, status, now) {
31
- const failed = status === "error" || status === "unsupported";
32
- const last = [...steps].reverse().find((step) => step.stage !== "error" && step.stage !== "unsupported" && step.stage !== "ready");
33
- const reached = last ? checklist.findIndex((row) => row.stage === last.stage) : -1;
34
- return checklist.map((row, index) => {
35
- const step = [...steps].reverse().find((candidate) => candidate.stage === row.stage);
36
- if (!step) return {
37
- ...row,
38
- state: index < reached ? "skipped" : "pending"
39
- };
40
- const ms = step.ms ?? Math.max(0, now - step.startedAt);
41
- if (failed && step === last) return {
42
- ...row,
43
- ms,
44
- state: "failed"
45
- };
46
- return {
47
- ...row,
48
- ms,
49
- state: step.ms === void 0 ? "running" : "done"
50
- };
51
- });
52
- }
53
- const stateIcon = {
54
- done: () => icon("check", "vh-ws-icon vh-ws-step-icon"),
55
- failed: () => icon("circle-alert", "vh-ws-icon vh-ws-step-icon"),
56
- pending: () => h("span", {
57
- "aria-hidden": "true",
58
- class: "vh-ws-step-dot"
59
- }),
60
- running: () => h("span", {
61
- "aria-hidden": "true",
62
- class: "vh-ws-step-dot is-running"
63
- }),
64
- skipped: () => h("span", {
65
- "aria-hidden": "true",
66
- class: "vh-ws-step-dot"
67
- })
68
- };
69
- const stateText = {
70
- done: "Done",
71
- failed: "Failed",
72
- pending: "Waiting",
73
- running: "Running",
74
- skipped: "Skipped"
75
- };
76
- function failureCopy(failure) {
77
- switch (failure.kind) {
78
- case "install": return {
79
- body: failure.exitCode === void 0 ? failure.error.message : `npm install exited with code ${failure.exitCode}. The output shows which package failed.`,
80
- title: "Install failed"
81
- };
82
- case "server": return {
83
- body: failure.exitCode === void 0 ? failure.error.message : `The dev server exited with code ${failure.exitCode}. Your edits are kept.`,
84
- title: "The dev server stopped"
85
- };
86
- case "unsupported": return {
87
- body: failure.error.message,
88
- title: "The live workspace does not run here"
89
- };
90
- case "boot": return {
91
- body: failure.error.message,
92
- title: "The workspace did not start"
93
- };
94
- }
95
- }
96
- /**
97
- * A checklist of the boot stages with live elapsed times. It shows no progress bar,
98
- * because an install has no reliable total.
99
- */
100
- const WorkspaceBootStatus = defineComponent({
101
- name: "WorkspaceBootStatus",
102
- props: {
103
- status: {
104
- required: true,
105
- type: String
106
- },
107
- steps: {
108
- default: () => [],
109
- type: Array
110
- },
111
- failure: {
112
- default: void 0,
113
- type: Object
114
- },
115
- online: {
116
- default: true,
117
- type: Boolean
118
- }
119
- },
120
- emits: {
121
- /** Boot again after `failure.kind` is `boot`. */
122
- retry: () => true,
123
- /** Run the install again after `failure.kind` is `install`. */
124
- "retry-install": () => true,
125
- /** Start the dev server again after `failure.kind` is `server`. */
126
- restart: () => true,
127
- /** Show the terminal output. */
128
- "show-output": () => true
129
- },
130
- setup(props, { emit }) {
131
- const now = ref(typeof performance === "undefined" ? 0 : performance.now());
132
- let timer;
133
- const rows = computed(() => bootChecklist(props.steps, props.status, now.value));
134
- const running = computed(() => rows.value.find((row) => row.state === "running"));
135
- watch(running, (row) => {
136
- if (row && !timer) timer = setInterval(() => {
137
- now.value = performance.now();
138
- }, 100);
139
- if (!row && timer) {
140
- clearInterval(timer);
141
- timer = void 0;
142
- now.value = performance.now();
143
- }
144
- }, { immediate: true });
145
- onBeforeUnmount(() => {
146
- if (timer) clearInterval(timer);
147
- });
148
- const showOutput = () => h("button", {
149
- class: "vh-ws-button",
150
- type: "button",
151
- onClick: () => emit("show-output")
152
- }, "Show output");
153
- return () => {
154
- const slowInstall = running.value?.stage === "installing" && (running.value.ms ?? 0) > slowInstallMs;
155
- const failure = props.failure;
156
- const ready = props.status === "ready" && !failure;
157
- const heading = failure ? failureCopy(failure).title : ready ? "The workspace is ready" : "Starting the workspace";
158
- return h("div", {
159
- "aria-busy": running.value ? "true" : "false",
160
- class: "vh-ws-boot",
161
- "data-status": props.status
162
- }, [
163
- h("p", {
164
- class: "vh-ws-boot-title",
165
- role: "status"
166
- }, heading),
167
- h("ol", {
168
- "aria-label": "Workspace start steps",
169
- class: "vh-ws-steps"
170
- }, rows.value.map((row) => h("li", {
171
- class: "vh-ws-step",
172
- "data-stage": row.stage,
173
- "data-state": row.state,
174
- key: row.stage
175
- }, [
176
- stateIcon[row.state](),
177
- h("span", { class: "vh-ws-step-label" }, row.label),
178
- h("span", { class: "vh-ws-sr-only" }, `, ${stateText[row.state]}`),
179
- h("span", { class: "vh-ws-step-time" }, row.ms === void 0 ? "" : formatDuration(row.ms))
180
- ]))),
181
- slowInstall ? h("p", { class: "vh-ws-muted vh-ws-boot-hint" }, "First install downloads packages. Later steps reuse them.") : void 0,
182
- props.online ? void 0 : h("p", {
183
- class: "vh-ws-notice",
184
- role: "alert"
185
- }, [icon("wifi-off"), h("span", "You are offline. Installing packages needs a connection. Your edits are kept.")]),
186
- failure ? h("div", {
187
- class: "vh-ws-failure",
188
- role: "alert"
189
- }, [h("p", { class: "vh-ws-failure-body" }, failureCopy(failure).body), h("div", { class: "vh-ws-actions" }, failure.kind === "install" ? [h("button", {
190
- class: "vh-ws-button vh-ws-button--primary",
191
- type: "button",
192
- onClick: () => emit("retry-install")
193
- }, "Retry install"), showOutput()] : failure.kind === "server" ? [h("button", {
194
- class: "vh-ws-button vh-ws-button--primary",
195
- type: "button",
196
- onClick: () => emit("restart")
197
- }, "Restart server"), showOutput()] : failure.kind === "boot" ? [h("button", {
198
- class: "vh-ws-button vh-ws-button--primary",
199
- type: "button",
200
- onClick: () => emit("retry")
201
- }, "Try again"), showOutput()] : [])]) : h("div", { class: "vh-ws-actions" }, [showOutput()])
202
- ]);
203
- };
204
- }
205
- });
206
- export { WorkspaceBootStatus, bootChecklist };
1
+ export { t as WorkspaceBootStatus, n as bootChecklist } from "../../workspace-boot-status-CyGlJS06.js";
@@ -40,6 +40,6 @@ export declare const WorkspaceEditorHead: import("vue").DefineComponent<import("
40
40
  }>> & Readonly<{
41
41
  "onUpdate:wrap"?: ((wrap: boolean) => any) | undefined;
42
42
  }>, {
43
- wrap: boolean;
44
43
  readonly: boolean;
44
+ wrap: boolean;
45
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { fileIcon } from "./file-icons.js";
3
3
  import { icon } from "./icons.js";
4
4
  import { defineComponent, h } from "vue";
@@ -49,10 +49,10 @@ export declare const WorkspaceEditor: import("vue").DefineComponent<import("vue"
49
49
  };
50
50
  }>> & Readonly<{
51
51
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
52
- onCursor?: ((cursor: WorkspaceCursor) => any) | undefined;
53
52
  "onUpdate:wrap"?: ((wrap: boolean) => any) | undefined;
53
+ onCursor?: ((cursor: WorkspaceCursor) => any) | undefined;
54
54
  }>, {
55
- wrap: boolean;
56
55
  modelValue: string;
57
56
  readonly: boolean;
57
+ wrap: boolean;
58
58
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { computed, defineComponent, h } from "vue";
3
3
  // src/workspace/workspace-examples.ts
4
4
  /** The examples by group, in the order of their first example. Examples without a group come first. */
@@ -46,6 +46,6 @@ export declare const WorkspaceFileTree: import("vue").DefineComponent<import("vu
46
46
  "onUpdate:selected"?: ((path: string) => any) | undefined;
47
47
  }>, {
48
48
  label: string;
49
+ edited: ReadonlySet<string> | readonly string[];
49
50
  selected: string;
50
- edited: readonly string[] | ReadonlySet<string>;
51
51
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,5 @@
1
- import { n as useFileTree, t as FileTree } from "../../file-tree-CRFIdtzw.js";
1
+ import { t as FileTree_default } from "../../file-tree-DS5shGSL.js";
2
+ import { n as useFileTree } from "../../file-tree-B4JKbp4r.js";
2
3
  import { fileTreeIcons } from "./file-icons.js";
3
4
  import { computed, defineComponent, h, onBeforeUnmount, watch } from "vue";
4
5
  // src/workspace/workspace-file-tree.ts
@@ -64,7 +65,7 @@ const WorkspaceFileTree = defineComponent({
64
65
  if (path && model.getSelectedPaths().at(-1) !== path) model.getItem(path)?.select();
65
66
  });
66
67
  onBeforeUnmount(() => model.cleanUp());
67
- return () => h(FileTree, {
68
+ return () => h(FileTree_default, {
68
69
  "aria-label": props.label,
69
70
  class: "vh-ws-file-tree",
70
71
  model
@@ -45,6 +45,6 @@ export declare const WorkspaceGuide: import("vue").DefineComponent<import("vue")
45
45
  "onUpdate:step"?: ((step: number) => any) | undefined;
46
46
  }>, {
47
47
  title: string;
48
- step: number;
49
48
  steps: readonly WorkspaceStep[];
49
+ step: number;
50
50
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { keepFocus, useStepModel } from "./workspace-steps.js";
3
3
  import { defineComponent, h, ref, watch } from "vue";
4
4
  // src/workspace/workspace-guide.ts
@@ -63,8 +63,8 @@ export declare const WorkspacePreview: import("vue").DefineComponent<import("vue
63
63
  "onUpdate:path"?: ((path: string) => any) | undefined;
64
64
  "onUpdate:device"?: ((device: WorkspacePreviewDevice) => any) | undefined;
65
65
  }>, {
66
+ url: string;
66
67
  title: string;
67
68
  path: string;
68
- url: string;
69
69
  device: WorkspacePreviewDevice;
70
70
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,5 +1,5 @@
1
- import { DeviceFrame } from "../components/device-frame.js";
2
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
1
+ import { t as DeviceFrame_default } from "../../device-frame-DDWoyB-G.js";
2
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
3
3
  import { icon } from "./icons.js";
4
4
  import { computed, defineComponent, h, onBeforeUnmount, onMounted, ref, shallowRef, useId, watch } from "vue";
5
5
  // src/workspace/workspace-preview.ts
@@ -283,23 +283,25 @@ const WorkspacePreview = defineComponent({
283
283
  target: "_blank",
284
284
  title: "Open in new tab"
285
285
  }, [icon("external-link")])
286
- ]), src.value ? h(DeviceFrame, {
286
+ ]), src.value ? h(DeviceFrame_default, {
287
287
  breakpoints: [],
288
288
  insetBottom: 16,
289
289
  modelValue: size.value,
290
290
  presets,
291
- toolbar: false,
292
291
  "onUpdate:modelValue": (next) => {
293
292
  size.value = next;
294
293
  }
295
- }, () => h("iframe", {
296
- allow: "cross-origin-isolated; clipboard-read; clipboard-write",
297
- class: "vh-ws-preview-frame",
298
- key: `${src.value}#${reloads.value}`,
299
- ref: frame,
300
- src: src.value,
301
- title: props.title
302
- })) : h("div", { class: "vh-ws-empty" }, slots.empty?.() ?? [h("p", { class: "vh-ws-empty-title" }, "No preview yet"), h("p", { class: "vh-ws-muted" }, "The preview opens here when the dev server is ready.")])]);
294
+ }, {
295
+ toolbar: () => [],
296
+ default: () => h("iframe", {
297
+ allow: "cross-origin-isolated; clipboard-read; clipboard-write",
298
+ class: "vh-ws-preview-frame",
299
+ key: `${src.value}#${reloads.value}`,
300
+ ref: frame,
301
+ src: src.value,
302
+ title: props.title
303
+ })
304
+ }) : h("div", { class: "vh-ws-empty" }, slots.empty?.() ?? [h("p", { class: "vh-ws-empty-title" }, "No preview yet"), h("p", { class: "vh-ws-muted" }, "The preview opens here when the dev server is ready.")])]);
303
305
  };
304
306
  }
305
307
  });
@@ -1,2 +1,2 @@
1
- import { a as WorkspaceTabItem, i as WorkspaceTab, n as WorkspaceShell, r as WorkspaceSplits, t as WorkspaceLayout } from "../../workspace-shell-ChCwWPyv.js";
1
+ import { a as WorkspaceTabItem, i as WorkspaceTab, n as WorkspaceShell, r as WorkspaceSplits, t as WorkspaceLayout } from "../../workspace-shell-B4A7CINd.js";
2
2
  export { WorkspaceLayout, WorkspaceShell, WorkspaceSplits, WorkspaceTab, WorkspaceTabItem };
@@ -1,4 +1,4 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { computed, defineComponent, h, onMounted, ref, watch } from "vue";
3
3
  // src/workspace/workspace-shell.ts
4
4
  const defaultSplits = {
@@ -224,7 +224,7 @@ const WorkspaceShell = defineComponent({
224
224
  function panelContent(name) {
225
225
  const custom = slots[`tab-${name}`];
226
226
  if (custom) return custom(slotProps());
227
- if (!layoutSlots.has(name) && !name.startsWith("tab-")) return renderSlot(slots, name, slotProps());
227
+ if (!layoutSlots.has(name) && !name.startsWith("tab-")) return renderSlot$1(slots, name, slotProps());
228
228
  }
229
229
  function output() {
230
230
  if (tabs.value.length === 0) return void 0;
@@ -266,7 +266,7 @@ const WorkspaceShell = defineComponent({
266
266
  }, [...slots.files ? [h("div", {
267
267
  class: "vh-ws-pane vh-ws-pane--files",
268
268
  style: { flexBasis: `${s.files}px` }
269
- }, renderSlot(slots, "files", slotProps())), separator({
269
+ }, renderSlot$1(slots, "files", slotProps())), separator({
270
270
  container: () => codePane.value,
271
271
  label: "Resize files",
272
272
  max: filesMax.value,
@@ -276,14 +276,14 @@ const WorkspaceShell = defineComponent({
276
276
  set,
277
277
  splits: s
278
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
279
+ slots["editor-head"] ? h("div", { class: "vh-ws-head vh-ws-editor-head" }, renderSlot$1(slots, "editor-head", slotProps())) : void 0,
280
+ h("div", { class: "vh-ws-pane vh-ws-editor-body" }, renderSlot$1(slots, "editor", slotProps())),
281
+ slots.status ? h("div", { class: "vh-ws-status" }, renderSlot$1(slots, "status", slotProps())) : void 0
282
282
  ])]);
283
283
  const guide = (style) => slots.guide ? h("div", {
284
284
  class: "vh-ws-pane vh-ws-guide",
285
285
  style
286
- }, renderSlot(slots, "guide", slotProps())) : void 0;
286
+ }, renderSlot$1(slots, "guide", slotProps())) : void 0;
287
287
  const codeSeparator = () => separator({
288
288
  container: body,
289
289
  label: "Resize code",
@@ -326,18 +326,18 @@ const WorkspaceShell = defineComponent({
326
326
  "data-layout": layout,
327
327
  ref: root
328
328
  }, [
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,
329
+ slots.bar ? h("div", { class: "vh-ws-bar" }, renderSlot$1(slots, "bar", slotProps())) : void 0,
330
+ slots.banner ? h("div", { class: "vh-ws-banner" }, renderSlot$1(slots, "banner", slotProps())) : void 0,
331
331
  h("div", {
332
332
  class: "vh-ws-body",
333
333
  inert: props.covered ? "" : void 0
334
334
  }, children),
335
- slots.overlay ? h("div", { class: "vh-ws-overlay" }, renderSlot(slots, "overlay", slotProps())) : void 0
335
+ slots.overlay ? h("div", { class: "vh-ws-overlay" }, renderSlot$1(slots, "overlay", slotProps())) : void 0
336
336
  ]);
337
337
  };
338
338
  }
339
339
  });
340
- function renderSlot(slots, name, props) {
340
+ function renderSlot$1(slots, name, props) {
341
341
  return slots[name]?.(props);
342
342
  }
343
343
  export { WorkspaceShell };
@@ -62,11 +62,11 @@ export declare const WorkspaceSidebar: import("vue").DefineComponent<import("vue
62
62
  "onCopy-link"?: (() => any) | undefined;
63
63
  "onUpdate:open"?: ((open: boolean) => any) | undefined;
64
64
  }>, {
65
+ copied: boolean;
65
66
  label: string;
67
+ id: string;
66
68
  open: boolean;
67
69
  actions: readonly WorkspaceSidebarAction[];
68
- id: string;
69
- copied: boolean;
70
70
  }, SlotsType<{
71
71
  default?: () => VNode[];
72
72
  footer?: () => VNode[];
@@ -1,5 +1,5 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
2
- import { t as ring } from "../../ring-GaJsg32c.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
+ import { t as ring } from "../../ring-B0nZBnU0.js";
3
3
  import { defineComponent, h, nextTick, onBeforeUnmount, onMounted, ref, useId, watch } from "vue";
4
4
  // src/workspace/workspace-sidebar.ts
5
5
  const tabbable = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])";
@@ -38,8 +38,8 @@ export declare const WorkspaceStart: import("vue").DefineComponent<import("vue")
38
38
  }>> & Readonly<{
39
39
  onPick?: ((id: string) => any) | undefined;
40
40
  }>, {
41
- title: string;
42
41
  description: string;
42
+ title: string;
43
43
  }, SlotsType<{
44
44
  footer?: () => VNode[];
45
45
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { defineComponent, h, useId } from "vue";
3
3
  // src/workspace/workspace-start.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { computed, defineComponent, h, nextTick, ref } from "vue";
3
3
  // src/workspace/workspace-steps.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceExample } from "./workspace-examples.js";
2
- import { a as WorkspaceTabItem, i as WorkspaceTab } from "../../workspace-shell-ChCwWPyv.js";
2
+ import { a as WorkspaceTabItem, i as WorkspaceTab } from "../../workspace-shell-B4A7CINd.js";
3
3
  import { t as WorkspaceStep } from "../../workspace-steps-BKByX9DW.js";
4
4
  import { ComputedRef, ExtractPropTypes, PropType, Ref, VNode } from "vue";
5
5
  /** Files by project-relative path. */
@@ -237,11 +237,11 @@ export declare const Workspace: import("vue").DefineComponent<ExtractPropTypes<{
237
237
  name: string;
238
238
  label: string;
239
239
  reset: (files: WorkspaceFiles, example: WorkspaceExample) => WorkspaceFiles;
240
- start: boolean;
241
240
  open: boolean;
241
+ start: boolean;
242
+ steps: readonly WorkspaceStep[];
242
243
  step: number;
243
244
  selected: string;
244
- steps: readonly WorkspaceStep[];
245
245
  tabs: readonly WorkspaceTabItem[];
246
246
  example: string;
247
247
  guide: "top" | "side";
@@ -1,8 +1,8 @@
1
- import { useCopy } from "../components/copy-button.js";
2
- import { Status } from "../components/status.js";
1
+ import { n as useCopy } from "../../CopyButton-Bs6DT-Z8.js";
2
+ import { t as Status_default } from "../../status-B2Yhrwv8.js";
3
3
  import { t as uiErrorDiagnostics } from "../../error-diagnostics-BlgA9rI2.js";
4
- import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
5
- import { t as ring } from "../../ring-GaJsg32c.js";
4
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
5
+ import { t as ring } from "../../ring-B0nZBnU0.js";
6
6
  import { decodePlaygroundLink, encodePlaygroundLink, playgroundLinkLimit, playgroundUrl, readPlaygroundHash } from "../playground/share.js";
7
7
  import { downloadZip } from "../playground/zip.js";
8
8
  import { BrowserSupportNotice } from "./browser-support-notice.js";
@@ -301,7 +301,7 @@ const WorkspaceSession = defineComponent({
301
301
  default: state ? () => [h("span", {
302
302
  class: "vh-workspace-run-state",
303
303
  role: "status"
304
- }, h(Status, {
304
+ }, h(Status_default, {
305
305
  colored: state.tone === "error",
306
306
  label: state.label,
307
307
  pulse: state.tone === "busy",
@@ -0,0 +1,83 @@
1
+ /** The attributes whose change the motion layer reports to the `state` hook of an effect. */
2
+ declare const motionStateAttributes: readonly ["aria-checked", "aria-selected", "aria-pressed", "aria-expanded", "aria-valuenow", "aria-valuetext", "data-state", "data-checked", "data-open", "open", "data-leaving"];
3
+ type MotionStateAttribute = (typeof motionStateAttributes)[number];
4
+ type MotionRoot = Document | ShadowRoot | Element;
5
+ interface MotionStateChange {
6
+ attribute: MotionStateAttribute;
7
+ oldValue: string | null;
8
+ value: string | null;
9
+ }
10
+ /** The children or the text of an element changed, such as Vue writing the new label of a button. */
11
+ interface MotionContentChange {
12
+ /** The nodes that the change added, in order. */
13
+ added: Node[];
14
+ /** The nodes that the change removed, in order. */
15
+ removed: Node[];
16
+ /** The text before the change, when the change replaced all of it. */
17
+ oldText: string | undefined;
18
+ }
19
+ /** What a press does next. The motion layer calls it until the pointer or the key goes up. */
20
+ interface MotionPress {
21
+ /** The pointer moved while it was down, such as on a resize handle. Not called for a key press. */
22
+ move?(event: PointerEvent): void;
23
+ /** The pointer or the key went up. Also called on cancellation if there is no `cancel` hook. */
24
+ release(): void;
25
+ /** The pointer left, the press was interrupted, or reduced motion turned on. */
26
+ cancel?(): void;
27
+ }
28
+ /**
29
+ * One effect of the motion layer, for one interaction. The layer finds the element of the interaction by `selector`,
30
+ * walks the composed path so it also finds elements in shadow DOM, and skips everything inside `[data-motion="none"]`.
31
+ *
32
+ * An effect writes only the separate CSS properties `scale`, `translate`, and `rotate`, and `filter` or `opacity` where
33
+ * it needs them, through `writeMotionStyle`, so it adds to a component's own `transform`. It clears what it wrote when
34
+ * its spring settles.
35
+ */
36
+ interface MotionEffect {
37
+ /** A unique name, such as "press". Defining an effect with a name that exists replaces it. */
38
+ name: string;
39
+ /** The elements of the interaction, such as `[role=tab]`. The innermost element on the event path wins. */
40
+ selector: string;
41
+ /** Starts tracking state in an installed root and returns its cleanup. */
42
+ watch?(root: MotionRoot): () => void;
43
+ /**
44
+ * A pointer went down on the element (main button only), or Space or Enter went down while it had focus. Return a
45
+ * `MotionPress` to hear the rest of the press. Not called under reduced motion.
46
+ */
47
+ press?(element: HTMLElement, event: PointerEvent | KeyboardEvent): MotionPress | void;
48
+ /** One of `motionStateAttributes` changed on the element. Also called under reduced motion: keep the meaning. */
49
+ state?(element: HTMLElement, change: MotionStateChange): void;
50
+ /** The element was added to the page, such as a tooltip. Also called under reduced motion: keep the meaning. */
51
+ enter?(element: HTMLElement): void;
52
+ /**
53
+ * The children or the text of the element changed, such as the label or the icon of a button. Also called under
54
+ * reduced motion, and for the changes that effects make themselves: tell them apart by `added`.
55
+ */
56
+ content?(element: HTMLElement | SVGElement, change: MotionContentChange): void;
57
+ }
58
+ /**
59
+ * Adds an effect to the motion layer. Every installed layer runs it from the next interaction on. Returns a function
60
+ * that removes it. When another copy of the module is the shared layer, the effect goes to that copy.
61
+ */
62
+ declare function defineMotionEffect(effect: MotionEffect): () => void;
63
+ /** The effects of the motion layer, in the order they were defined. */
64
+ declare function listMotionEffects(): MotionEffect[];
65
+ /**
66
+ * The CSS properties that the motion layer may write. `clip-path` hides the part of a tooltip that is still behind its
67
+ * trigger. `width` is only for a panel that opens beside the page, as a sidebar does.
68
+ */
69
+ type MotionStyleProperty = "scale" | "translate" | "rotate" | "filter" | "opacity" | "clip-path" | "width";
70
+ /** Writes motion properties inline. An empty string or `null` removes the property, so the stylesheet applies again. */
71
+ declare function writeMotionStyle(element: HTMLElement | SVGElement, values: Partial<Record<MotionStyleProperty, string | null>>): void;
72
+ /**
73
+ * Which elements squash when they have no `data-motion-press` of their own: `"buttons"`, only compact native buttons;
74
+ * `"opt-in"`, none; `"all"`, every element of the press selector.
75
+ */
76
+ type MotionPressMode = "buttons" | "opt-in" | "all";
77
+ /**
78
+ * Sets the press mode of every copy of the motion layer on the page. The first copy that installs runs the press for
79
+ * all of them, so the mode is on the global object.
80
+ */
81
+ declare function setMotionPressMode(mode: MotionPressMode): void;
82
+ declare const press: MotionEffect;
83
+ export { MotionEffect as a, MotionStateAttribute as c, defineMotionEffect as d, listMotionEffects as f, MotionContentChange as i, MotionStateChange as l, writeMotionStyle as m, press as n, MotionPress as o, motionStateAttributes as p, setMotionPressMode as r, MotionRoot as s, MotionPressMode as t, MotionStyleProperty as u };
@@ -0,0 +1,47 @@
1
+ import { n as createProgress } from "./motion-core-JZZiPKEk.js";
2
+ import { computed, createElementBlock, defineComponent, onBeforeUnmount, onMounted, openBlock, useTemplateRef, watch } from "vue";
3
+ // registry/progress/Progress.vue?vue&type=script&setup=true&lang.ts
4
+ const _hoisted_1 = ["aria-label", "aria-valuenow"];
5
+ // registry/progress/Progress.vue
6
+ var Progress_default = /* @__PURE__ */ defineComponent({
7
+ __name: "Progress",
8
+ props: {
9
+ value: {},
10
+ done: {
11
+ type: Boolean,
12
+ default: false
13
+ },
14
+ label: {}
15
+ },
16
+ setup(__props) {
17
+ const root = useTemplateRef("root");
18
+ let progress;
19
+ function apply() {
20
+ if (!progress) return;
21
+ if (__props.done) progress.done();
22
+ else if (__props.value === void 0) progress.reset();
23
+ else progress.set(__props.value);
24
+ }
25
+ onMounted(() => {
26
+ if (!root.value) return;
27
+ progress = createProgress(root.value);
28
+ apply();
29
+ });
30
+ watch(() => [__props.value, __props.done], apply);
31
+ onBeforeUnmount(() => progress?.destroy());
32
+ const now = computed(() => __props.done ? 100 : typeof __props.value === "number" ? Math.round(Math.max(0, Math.min(1, __props.value)) * 100) : void 0);
33
+ return (_ctx, _cache) => {
34
+ return openBlock(), createElementBlock("div", {
35
+ ref_key: "root",
36
+ ref: root,
37
+ "data-slot": "progress",
38
+ role: "progressbar",
39
+ "aria-label": __props.label,
40
+ "aria-valuemin": "0",
41
+ "aria-valuemax": "100",
42
+ "aria-valuenow": now.value
43
+ }, null, 8, _hoisted_1);
44
+ };
45
+ }
46
+ });
47
+ export { Progress_default as t };
@@ -0,0 +1,8 @@
1
+ interface ProgressProps {
2
+ value?: number | null;
3
+ done?: boolean;
4
+ label?: string;
5
+ }
6
+ declare const __VLS_export: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<ProgressProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export { ProgressProps as n, _default as t };