@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.
- package/README.md +102 -76
- package/dist/andromeeda-DaUPZ4_A.js +147 -0
- package/dist/announce-B0DLwflT.js +31 -0
- package/dist/{attachments-BzTwqRTU.js → attachments-DgwoQZKY.js} +3 -5
- package/dist/aurora-x-B5RPZ9i5.js +162 -0
- package/dist/{avatar-stack-DPRFuezh.d.ts → avatar-stack-C0IKwj6g.d.ts} +1 -3
- package/dist/ayu-dark-DXTaGA7I.js +137 -0
- package/dist/ayu-light-BCYi80Fe.js +137 -0
- package/dist/ayu-mirage-CgbXz-N5.js +137 -0
- package/dist/catppuccin-frappe-MV2xzv44.js +266 -0
- package/dist/catppuccin-latte-CL6jjlVD.js +266 -0
- package/dist/catppuccin-macchiato-Bp6oZJVK.js +266 -0
- package/dist/catppuccin-mocha-DOHrQ4dw.js +266 -0
- package/dist/{choices-input-ByXJvDn1.d.ts → choices-input-BUf-QqGj.d.ts} +0 -2
- package/dist/{code-view-DsU-xzic.js → code-view-Cg4nyTNA.js} +6 -8
- package/dist/{colors-BghReA9C-CjF9gnmy.js → colors-BghReA9C-DEq4bhEP.js} +1 -2
- package/dist/{comment-attachments-C4yNbcx5.js → comment-attachments-CMpYOJod.js} +1 -2
- package/dist/{comment-composer-fINL5bxo.d.ts → comment-composer-BI6CNJyO.d.ts} +3 -5
- package/dist/{comment-composer-jYv2ULNP.js → comment-composer-CzU7DdfD.js} +260 -16
- package/dist/{comment-layer-C_sbPIR5.d.ts → comment-layer-DyVstrs-.d.ts} +5 -7
- package/dist/{comment-list-BcSaLngS.d.ts → comment-list-CSK5o-Ua.d.ts} +3 -5
- package/dist/comment-marks.css +18 -22
- package/dist/{comment-panel-CfvdRUMX.d.ts → comment-panel-CEvOI3gk.d.ts} +3 -5
- package/dist/{comment-person-CLPlW_SS.js → comment-person-D_IyIjXo.js} +1 -2
- package/dist/{comment-pin-DHOdRvUw.d.ts → comment-pin-C5UeLPTa.d.ts} +1 -3
- package/dist/{comment-row-Bn3nr8l5.js → comment-row-DPMWI5Z0.js} +3 -4
- package/dist/{comment-selection-bar-CyVBNYl9.d.ts → comment-selection-bar-CVuS-FNL.d.ts} +0 -2
- package/dist/comment-send-DPzV9B8S.js +275 -0
- package/dist/comment-send-MmxFsOQf.d.ts +23 -0
- package/dist/comment-send.css +267 -0
- package/dist/comment-thread-CbPtoi8-.js +796 -0
- package/dist/{comment-thread-DKJjmWN0.d.ts → comment-thread-DGm1cGJt.d.ts} +4 -8
- package/dist/{comment-visibility-DsVuVndP.d.ts → comment-visibility-CYctacNx.d.ts} +0 -2
- package/dist/{comments-D0d26ghV.js → comments-C0OdHh_F.js} +5 -8
- package/dist/{comments-D8hulVPy.d.ts → comments-DrE9DU-E.d.ts} +1 -3
- package/dist/{comments-context-C2lOZyQ5.js → comments-context-CrjhleVA.js} +4 -5
- package/dist/{config-Dk67emQt.js → config-DztmAYYn.js} +9 -3
- package/dist/{config-DgxBW013.d.ts → config-xL4EBeXw.d.ts} +11 -4
- package/dist/dark-plus-CXEBSjk4.js +148 -0
- package/dist/dracula-Bvyz6eCo.js +165 -0
- package/dist/dracula-soft-a9indxAQ.js +115 -0
- package/dist/{draw-DzSmD7uo-Dwz8zoH2.js → draw-DzSmD7uo-Cb7s9kxJ.js} +359 -708
- package/dist/drop-field-CNZgwFVO.js +162 -0
- package/dist/{editor-C_wt4RRV.js → editor-CGiEVOnB.js} +44 -6
- package/dist/effects-g4QucvgO.js +2955 -0
- package/dist/{error-diagnostics-SXtnk6bz.js → error-diagnostics-BlgA9rI2.js} +1 -2
- package/dist/everforest-dark-9sVAxG7I.js +99 -0
- package/dist/everforest-light-BocTn_Hd.js +99 -0
- package/dist/{file-tree-C4OYgbV-.js → file-tree-CRFIdtzw.js} +58 -116
- package/dist/{file-tree-DlT9RGhu.d.ts → file-tree-DOtkeBaq.d.ts} +0 -14
- package/dist/{format-orwcdZL_.js → format-Bc9m7-r0.js} +1 -2
- package/dist/{getSingularPatch-Dsb8EgxR.js → getSingularPatch-C7LmmBrW.js} +375 -79
- package/dist/github-dark-BO9SXswM.js +142 -0
- package/dist/github-dark-default-XB_RHfBI.js +90 -0
- package/dist/github-dark-dimmed-BoGxaWUQ.js +137 -0
- package/dist/github-dark-high-contrast-B3X6t2fG.js +137 -0
- package/dist/github-light-D7VHHlUH.js +142 -0
- package/dist/github-light-default-BuDsGtcR.js +137 -0
- package/dist/github-light-high-contrast-GodZiAwh.js +137 -0
- package/dist/gruvbox-dark-hard-CU4LuKJc.js +140 -0
- package/dist/gruvbox-dark-medium-DjAsuXuH.js +140 -0
- package/dist/gruvbox-dark-soft-D3Zttj6R.js +140 -0
- package/dist/gruvbox-light-hard-4M_9onwE.js +140 -0
- package/dist/gruvbox-light-medium-D9QwS4kQ.js +140 -0
- package/dist/gruvbox-light-soft-DhYcfQql.js +140 -0
- package/dist/{handlers-DMl-Na3x.js → handlers-CnbkvXjX.js} +1 -2
- package/dist/headless.d.ts +4 -4
- package/dist/headless.js +1 -1
- package/dist/highlights-C2AbEdDI.js +2630 -0
- package/dist/hold-to-delete-BSMrpE-i.d.ts +49 -0
- package/dist/hold-to-delete-Cludb56v.js +433 -0
- package/dist/horizon-bright-B9u59onx.js +97 -0
- package/dist/horizon-tItY9ATR.js +97 -0
- package/dist/houston-BqKrKNQv.js +207 -0
- package/dist/icon-XZaCUZTG.d.ts +29 -0
- package/dist/{image-preview-C9tdkmEj.js → image-preview-DrLXrHpp.js} +3 -4
- package/dist/{index-CNY1uNTh.d.ts → index-B2cbt3py.d.ts} +3945 -2445
- package/dist/{index-BYRFQfCd.d.ts → index-B_PSX-5h.d.ts} +5 -11
- package/dist/index.d.ts +35 -32
- package/dist/index.js +71 -73
- package/dist/install-Ba9mkkqI.js +16 -0
- package/dist/kanagawa-dragon-BH1K3aMw.js +159 -0
- package/dist/kanagawa-lotus-C-4JB2io.js +159 -0
- package/dist/kanagawa-wave-DTQqNe5k.js +159 -0
- package/dist/laserwave-BkV0uIaG.js +84 -0
- package/dist/light-plus-CxYgEz7U.js +149 -0
- package/dist/list-DUTAo0uC.js +270 -0
- package/dist/loader-CYMEjzwc.js +79 -0
- package/dist/{markdown-editor-CMbNZOdN.js → markdown-editor-3gY9MLvy.js} +237 -38
- package/dist/{markdown-editor-wQF0yD5o.d.ts → markdown-editor-B7gD60tp.d.ts} +0 -6
- package/dist/markdown-editor.d.ts +1 -5
- package/dist/markdown-editor.js +2 -2
- package/dist/markdown-renderer-DFS1vf1h.js +26578 -0
- package/dist/material-theme-Xdm37UUJ.js +105 -0
- package/dist/material-theme-darker-Blaz0cgN.js +105 -0
- package/dist/material-theme-lighter-BddVxBVA.js +105 -0
- package/dist/material-theme-ocean-C4qhfFHi.js +105 -0
- package/dist/material-theme-palenight-ChHDqoiA.js +105 -0
- package/dist/{message-scroller-jrYN9dG9.d.ts → message-scroller-a6qaYHno.d.ts} +2 -4
- package/dist/min-dark-DpGSNjaW.js +125 -0
- package/dist/min-light-BMfJUsU2.js +122 -0
- package/dist/monokai-DW19E-zg.js +162 -0
- package/dist/motion/core.d.ts +4 -0
- package/dist/motion/core.js +11 -0
- package/dist/motion-core-DNl7TR1T.d.ts +402 -0
- package/dist/motion.d.ts +14 -0
- package/dist/motion.js +13 -0
- package/dist/night-owl-B7Of8ee9.js +188 -0
- package/dist/night-owl-light-Vu9tTNpS.js +189 -0
- package/dist/nord-CDzJumeN.js +128 -0
- package/dist/nuxt-ui-7ByUrymx.js +43 -0
- package/dist/nuxt.d.ts +1 -7
- package/dist/nuxt.js +16 -11
- package/dist/one-dark-pro-hS_sNo5p.js +124 -0
- package/dist/one-light-CD4ItzSC.js +153 -0
- package/dist/opt-out-D66l60sg.js +205 -0
- package/dist/parts/components/agent-session.d.ts +1 -3
- package/dist/parts/components/agent-session.js +3 -4
- package/dist/parts/components/attachment.d.ts +2 -4
- package/dist/parts/components/attachment.js +3 -4
- package/dist/parts/components/avatar-stack.d.ts +1 -1
- package/dist/parts/components/avatar-stack.js +4 -4
- package/dist/parts/components/bubble.d.ts +2 -4
- package/dist/parts/components/bubble.js +2 -3
- package/dist/parts/components/chat-message.d.ts +1 -3
- package/dist/parts/components/chat-message.js +1 -2
- package/dist/parts/components/chat-session.d.ts +2 -4
- package/dist/parts/components/chat-session.js +1 -2
- package/dist/parts/components/chat.d.ts +1 -3
- package/dist/parts/components/chat.js +4 -5
- package/dist/parts/components/code-block.d.ts +2 -4
- package/dist/parts/components/code-block.js +3 -4
- package/dist/parts/components/code-view.d.ts +1 -3
- package/dist/parts/components/code-view.js +1 -2
- package/dist/parts/components/comment-composer.d.ts +1 -1
- package/dist/parts/components/comment-composer.js +1 -2
- package/dist/parts/components/comment-layer.d.ts +1 -1
- package/dist/parts/components/comment-layer.js +28 -11
- package/dist/parts/components/comment-list.d.ts +1 -1
- package/dist/parts/components/comment-list.js +13 -9
- package/dist/parts/components/comment-panel.d.ts +1 -1
- package/dist/parts/components/comment-panel.js +27 -14
- package/dist/parts/components/comment-pin.d.ts +1 -1
- package/dist/parts/components/comment-pin.js +2 -3
- package/dist/parts/components/comment-selection-bar.d.ts +1 -1
- package/dist/parts/components/comment-selection-bar.js +4 -4
- package/dist/parts/components/comment-send.d.ts +2 -0
- package/dist/parts/components/comment-send.js +1 -0
- package/dist/parts/components/comment-thread.d.ts +1 -1
- package/dist/parts/components/comment-thread.js +2 -597
- package/dist/parts/components/comments.d.ts +9 -8
- package/dist/parts/components/comments.js +7 -6
- package/dist/parts/components/connection-status.d.ts +1 -3
- package/dist/parts/components/connection-status.js +1 -2
- package/dist/parts/components/copy-button.d.ts +14 -6
- package/dist/parts/components/copy-button.js +225 -1
- package/dist/parts/components/device-frame.d.ts +3 -5
- package/dist/parts/components/device-frame.js +1 -2
- package/dist/parts/components/drop-field.d.ts +67 -0
- package/dist/parts/components/drop-field.js +76 -0
- package/dist/parts/components/file-tree.d.ts +1 -1
- package/dist/parts/components/file-tree.js +1 -2
- package/dist/parts/components/filter-search.d.ts +2 -4
- package/dist/parts/components/filter-search.js +2 -3
- package/dist/parts/components/hold-to-delete.d.ts +80 -0
- package/dist/parts/components/hold-to-delete.js +75 -0
- package/dist/parts/components/markdown-editor.d.ts +1 -1
- package/dist/parts/components/markdown-editor.js +1 -2
- package/dist/parts/components/markdown-renderer.d.ts +1 -3
- package/dist/parts/components/markdown-renderer.js +1 -23077
- package/dist/parts/components/markdown.d.ts +1 -3
- package/dist/parts/components/markdown.js +2 -3
- package/dist/parts/components/marker.d.ts +2 -4
- package/dist/parts/components/marker.js +2 -3
- package/dist/parts/components/message-parts.d.ts +1 -3
- package/dist/parts/components/message-parts.js +14 -7
- package/dist/parts/components/message.d.ts +1 -3
- package/dist/parts/components/message.js +2 -3
- package/dist/parts/components/motion-list.d.ts +40 -0
- package/dist/parts/components/motion-list.js +41 -0
- package/dist/parts/components/motion.d.ts +122 -0
- package/dist/parts/components/motion.js +171 -0
- package/dist/parts/components/patch-parsers.d.ts +1 -1
- package/dist/parts/components/patch-parsers.js +1 -2
- package/dist/parts/components/progress.d.ts +39 -0
- package/dist/parts/components/progress.js +53 -0
- package/dist/parts/components/prompt-input.d.ts +5 -7
- package/dist/parts/components/prompt-input.js +5 -6
- package/dist/parts/components/relative-time.d.ts +1 -3
- package/dist/parts/components/relative-time.js +1 -2
- package/dist/parts/components/status.d.ts +1 -3
- package/dist/parts/components/status.js +1 -2
- package/dist/parts/components/sync-status.d.ts +1 -3
- package/dist/parts/components/sync-status.js +3 -3
- package/dist/parts/components/tool-list.d.ts +2 -4
- package/dist/parts/components/tool-list.js +2 -3
- package/dist/parts/components/trace-run.d.ts +2 -4
- package/dist/parts/components/trace-run.js +4 -5
- package/dist/parts/components/trace.d.ts +2 -4
- package/dist/parts/components/trace.js +2 -3
- package/dist/parts/composables/attachments.d.ts +1 -3
- package/dist/parts/composables/attachments.js +1 -2
- package/dist/parts/composables/highlighted-code.d.ts +1 -3
- package/dist/parts/composables/highlighted-code.js +1 -2
- package/dist/parts/headless/choices-input.d.ts +1 -1
- package/dist/parts/headless/choices-input.js +3 -4
- package/dist/parts/headless/comment-visibility.d.ts +1 -1
- package/dist/parts/headless/comment-visibility.js +1 -2
- package/dist/parts/headless/comments.d.ts +1 -1
- package/dist/parts/headless/comments.js +1 -2
- package/dist/parts/headless/message-scroller.d.ts +1 -1
- package/dist/parts/headless/message-scroller.js +2 -3
- package/dist/parts/playground/paths.d.ts +1 -3
- package/dist/parts/playground/paths.js +1 -2
- package/dist/parts/playground/share.d.ts +34 -2
- package/dist/parts/playground/share.js +1 -2
- package/dist/parts/playground/zip.d.ts +1 -3
- package/dist/parts/playground/zip.js +2 -3
- package/dist/parts/workspace/browser-support-notice.d.ts +2 -4
- package/dist/parts/workspace/browser-support-notice.js +13 -6
- package/dist/parts/workspace/codemirror.d.ts +10 -3
- package/dist/parts/workspace/codemirror.js +40 -8
- package/dist/parts/workspace/connect-panel.d.ts +2 -4
- package/dist/parts/workspace/connect-panel.js +2 -3
- package/dist/parts/workspace/connect-store.d.ts +1 -3
- package/dist/parts/workspace/connect-store.js +1 -2
- package/dist/parts/workspace/file-icons.d.ts +14 -0
- package/dist/parts/workspace/file-icons.js +81 -0
- package/dist/parts/workspace/icons.d.ts +2 -2
- package/dist/parts/workspace/icons.js +2 -2
- package/dist/parts/workspace/runners/render.d.ts +24 -0
- package/dist/parts/workspace/runners/render.js +123 -0
- package/dist/parts/workspace/runners/web-container.d.ts +27 -0
- package/dist/parts/workspace/runners/web-container.js +185 -0
- package/dist/parts/workspace/workspace-bar.d.ts +49 -0
- package/dist/parts/workspace/workspace-bar.js +50 -0
- package/dist/parts/workspace/workspace-boot-status.d.ts +1 -2
- package/dist/parts/workspace/workspace-boot-status.js +2 -3
- package/dist/parts/workspace/workspace-editor-head.d.ts +45 -0
- package/dist/parts/workspace/workspace-editor-head.js +65 -0
- package/dist/parts/workspace/workspace-editor.d.ts +18 -3
- package/dist/parts/workspace/workspace-editor.js +30 -5
- package/dist/parts/workspace/workspace-examples.d.ts +72 -0
- package/dist/parts/workspace/workspace-examples.js +71 -0
- package/dist/parts/workspace/workspace-file-link.d.ts +33 -0
- package/dist/parts/workspace/workspace-file-link.js +38 -0
- package/dist/parts/workspace/workspace-file-tree.d.ts +9 -11
- package/dist/parts/workspace/workspace-file-tree.js +28 -22
- package/dist/parts/workspace/workspace-guide.d.ts +50 -0
- package/dist/parts/workspace/workspace-guide.js +90 -0
- package/dist/parts/workspace/workspace-issues.d.ts +44 -0
- package/dist/parts/workspace/workspace-issues.js +48 -0
- package/dist/parts/workspace/workspace-preview.d.ts +1 -3
- package/dist/parts/workspace/workspace-preview.js +2 -3
- package/dist/parts/workspace/workspace-shell.d.ts +2 -88
- package/dist/parts/workspace/workspace-shell.js +132 -80
- package/dist/parts/workspace/workspace-sidebar.d.ts +73 -0
- package/dist/parts/workspace/workspace-sidebar.js +131 -0
- package/dist/parts/workspace/workspace-start.d.ts +45 -0
- package/dist/parts/workspace/workspace-start.js +59 -0
- package/dist/parts/workspace/workspace-status.d.ts +67 -0
- package/dist/parts/workspace/workspace-status.js +73 -0
- package/dist/parts/workspace/workspace-steps.d.ts +2 -0
- package/dist/parts/workspace/workspace-steps.js +127 -0
- package/dist/parts/workspace/workspace-task.d.ts +18 -0
- package/dist/parts/workspace/workspace-task.js +19 -0
- package/dist/parts/workspace/workspace-terminal.d.ts +1 -3
- package/dist/parts/workspace/workspace-terminal.js +1 -2
- package/dist/parts/workspace/workspace.d.ts +249 -0
- package/dist/parts/workspace/workspace.js +664 -0
- package/dist/{payload-text-sjkYAwvw.js → payload-text-DQNRbJY5.js} +1 -2
- package/dist/{pierre-code-view-NE35tkmR.js → pierre-code-view-C49BVDrc.js} +11333 -6718
- package/dist/pierre-dark-BtKHt2e4.js +166 -0
- package/dist/pierre-dark-CXW3KeKO.js +5 -0
- package/dist/pierre-dark-protanopia-deuteranopia-CS0Gs25Q.js +166 -0
- package/dist/pierre-dark-protanopia-deuteranopia-DajNv_A3.js +3 -0
- package/dist/pierre-dark-soft-BUFoeBEf.js +3 -0
- package/dist/pierre-dark-soft-D__0FtYP.js +166 -0
- package/dist/pierre-dark-tritanopia-C6fHROmA.js +166 -0
- package/dist/pierre-dark-tritanopia-oa3gpgIR.js +3 -0
- package/dist/pierre-dark-vibrant-COXpyAHb.js +166 -0
- package/dist/pierre-dark-vibrant-CYRHyDoW.js +3 -0
- package/dist/pierre-light-BD28C_vh.js +166 -0
- package/dist/pierre-light-BN0rL1e5.js +5 -0
- package/dist/pierre-light-protanopia-deuteranopia-CYsDHJt0.js +3 -0
- package/dist/pierre-light-protanopia-deuteranopia-CwWH1xGL.js +166 -0
- package/dist/pierre-light-soft-BkKY4pMj.js +166 -0
- package/dist/pierre-light-soft-F2QIpNbb.js +3 -0
- package/dist/pierre-light-tritanopia-BbKKIkua.js +3 -0
- package/dist/pierre-light-tritanopia-Mpubahl7.js +166 -0
- package/dist/pierre-light-vibrant-CdV9Besm.js +3 -0
- package/dist/pierre-light-vibrant-x11J3_aO.js +166 -0
- package/dist/plastic-BQnXkmvK.js +137 -0
- package/dist/playground.d.ts +1 -1
- package/dist/poimandres-DEfG-8RI.js +124 -0
- package/dist/progress-DL9k-ERG.js +265 -0
- package/dist/red-BfKrAjYG.js +169 -0
- package/dist/registry-DAIjCjWd.js +77 -0
- package/dist/{relative-time-BVmjOsYG.js → relative-time-DJnw45tr.js} +5 -8
- package/dist/ring-BN4d8vtw.js +173 -0
- package/dist/{rolldown-runtime-C9mWXvCC.js → rolldown-runtime-CahUhzF3.js} +2 -3
- package/dist/rose-pine-D0rhGGFg.js +136 -0
- package/dist/rose-pine-dawn-7jVaYUiD.js +136 -0
- package/dist/rose-pine-moon-CFyS0Mvu.js +136 -0
- package/dist/runtime/nuxt-plugin.d.ts +0 -2
- package/dist/runtime/nuxt-plugin.js +3 -4
- package/dist/{sankey-CAYwt82B-D4uDQoMR.js → sankey-CAYwt82B-BAAk7WkJ.js} +147 -151
- package/dist/shiki-CbfEu_Az.js +607 -0
- package/dist/slack-dark-Bv-KFSBD.js +87 -0
- package/dist/slack-ochin-Dg2BAv1D.js +107 -0
- package/dist/{slot-part-Doic71uh.js → slot-part-BWHvQ3mK.js} +1 -2
- package/dist/snazzy-light-sYDdR9rx.js +93 -0
- package/dist/solarized-dark-COt2tTmN.js +160 -0
- package/dist/solarized-light-BJrwFarZ.js +160 -0
- package/dist/stream-tokenizer-ByC3l0HQ.js +263 -0
- package/dist/styles.css +590 -573
- package/dist/synthwave-84-NUDBykTM.js +410 -0
- package/dist/{temml-BilSAAws.js → temml-m3ad3bfq.js} +2 -3
- package/dist/text-BWzZFnGY.js +822 -0
- package/dist/theme.d.ts +44 -3
- package/dist/theme.js +23 -9
- package/dist/themes-DKugPHlg.js +323 -0
- package/dist/tokyo-night-DD3B2QcO.js +153 -0
- package/dist/travel-CwVhU_GS.js +180 -0
- package/dist/tween-Dv3IIIQG.js +61 -0
- package/dist/{types-Dj7vp0lZ.d.ts → types-Ceh7h7NT.d.ts} +1 -3
- package/dist/vesper-oVQYrv8Y.js +99 -0
- package/dist/visual-copy-CHHBfJ6O.js +14 -0
- package/dist/vite.d.ts +1 -3
- package/dist/vite.js +13 -3
- package/dist/vitesse-black-D84DQZAP.js +196 -0
- package/dist/vitesse-dark-CMZ6olk_.js +196 -0
- package/dist/vitesse-light-D9d8hLOY.js +196 -0
- package/dist/{vue-DGstVdGn.js → vue-BlknIGIm.js} +43 -34
- package/dist/{vue-BDmSCtay.js → vue-kCdzBu0N.js} +4 -7
- package/dist/workspace-shell-ChCwWPyv.d.ts +110 -0
- package/dist/workspace-steps-BKByX9DW.d.ts +70 -0
- package/dist/workspace.d.ts +16 -5
- package/dist/workspace.js +16 -3
- package/package.json +66 -55
- package/dist/copy-button-CRN3kmSD.js +0 -253
- package/dist/icon-swap.css +0 -69
- package/dist/nuxt-ui-DSQFzq3s.js +0 -38
- package/dist/parts/playground/highlight.d.ts +0 -5
- package/dist/parts/playground/highlight.js +0 -23
- package/dist/parts/playground/playground-render.d.ts +0 -126
- package/dist/parts/playground/playground-render.js +0 -356
- package/dist/parts/workspace/playground-container.d.ts +0 -192
- package/dist/parts/workspace/playground-container.js +0 -603
- package/dist/pierre-dark-CzUmjETS.js +0 -6
- package/dist/pierre-dark-protanopia-deuteranopia-C35UMuvO.js +0 -4
- package/dist/pierre-dark-soft-Bb-4-biO.js +0 -4
- package/dist/pierre-dark-tritanopia-CIJISGWF.js +0 -4
- package/dist/pierre-dark-vibrant-8oZzB3gw.js +0 -4
- package/dist/pierre-light-Dn6E0sWv.js +0 -6
- package/dist/pierre-light-protanopia-deuteranopia-u0U7N4Hn.js +0 -4
- package/dist/pierre-light-soft-BCU6fuhO.js +0 -4
- package/dist/pierre-light-tritanopia-3c8Yx3co.js +0 -4
- package/dist/pierre-light-vibrant-Cwh332o_.js +0 -4
- package/dist/share-DM4eNy4q.d.ts +0 -37
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
2
|
+
import { computed, defineComponent, h } from "vue";
|
|
3
|
+
// src/workspace/workspace-examples.ts
|
|
4
|
+
/** The examples by group, in the order of their first example. Examples without a group come first. */
|
|
5
|
+
function groupExamples(examples) {
|
|
6
|
+
const groups = /* @__PURE__ */ new Map([[void 0, []]]);
|
|
7
|
+
for (const example of examples) {
|
|
8
|
+
const list = groups.get(example.group) ?? [];
|
|
9
|
+
list.push(example);
|
|
10
|
+
groups.set(example.group, list);
|
|
11
|
+
}
|
|
12
|
+
return [...groups].filter(([, list]) => list.length > 0).map(([group, list]) => ({
|
|
13
|
+
examples: list,
|
|
14
|
+
group
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The examples menu of the workspace bar. The button shows the open example. The menu lists the examples under their
|
|
19
|
+
* group headings and checks the open one. The arrow keys move, a typed letter jumps to an example, and Enter opens it.
|
|
20
|
+
* It does not open the example itself: it emits `update:modelValue`, so the page can ask before it replaces edits.
|
|
21
|
+
*/
|
|
22
|
+
const WorkspaceExamples = defineComponent({
|
|
23
|
+
name: "WorkspaceExamples",
|
|
24
|
+
props: {
|
|
25
|
+
examples: {
|
|
26
|
+
required: true,
|
|
27
|
+
type: Array
|
|
28
|
+
},
|
|
29
|
+
modelValue: {
|
|
30
|
+
default: void 0,
|
|
31
|
+
type: [String, null]
|
|
32
|
+
},
|
|
33
|
+
label: {
|
|
34
|
+
default: "Example",
|
|
35
|
+
type: String
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: { "update:modelValue": (id) => typeof id === "string" },
|
|
39
|
+
setup(props, { emit }) {
|
|
40
|
+
const UButton = useUIComponent("UButton");
|
|
41
|
+
const UDropdownMenu = useUIComponent("UDropdownMenu");
|
|
42
|
+
const current = computed(() => props.modelValue === null ? void 0 : props.examples.find((example) => example.id === props.modelValue) ?? props.examples[0]);
|
|
43
|
+
const items = computed(() => groupExamples(props.examples).map(({ examples, group }) => [...group ? [{
|
|
44
|
+
label: group,
|
|
45
|
+
type: "label"
|
|
46
|
+
}] : [], ...examples.map((example) => ({
|
|
47
|
+
checked: example.id === current.value?.id,
|
|
48
|
+
description: example.description,
|
|
49
|
+
label: example.label,
|
|
50
|
+
onSelect: () => {
|
|
51
|
+
if (example.id !== current.value?.id) emit("update:modelValue", example.id);
|
|
52
|
+
},
|
|
53
|
+
type: "checkbox"
|
|
54
|
+
}))]));
|
|
55
|
+
return () => h(UDropdownMenu, {
|
|
56
|
+
content: {
|
|
57
|
+
align: "start",
|
|
58
|
+
sideOffset: 6
|
|
59
|
+
},
|
|
60
|
+
items: items.value,
|
|
61
|
+
ui: { content: "vh-ws-examples-menu" }
|
|
62
|
+
}, () => h(UButton, {
|
|
63
|
+
"aria-label": props.modelValue === null ? `Choose ${props.label.toLowerCase()}` : `${props.label}: ${current.value?.label ?? "none"}`,
|
|
64
|
+
class: "vh-ws-bar-button vh-ws-examples-button",
|
|
65
|
+
color: "neutral",
|
|
66
|
+
trailingIcon: "i-lucide-chevron-down",
|
|
67
|
+
variant: "ghost"
|
|
68
|
+
}, () => [h("span", { class: "vh-ws-muted" }, props.label), h("span", { class: "vh-ws-examples-current" }, current.value?.label)]));
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
export { WorkspaceExamples, groupExamples };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** What a file link asks of the workspace that holds it. */
|
|
2
|
+
export interface WorkspaceFileOpener {
|
|
3
|
+
/** Opens `path` in the editor. A path that does not exist yet can open as a new, empty file. */
|
|
4
|
+
show: (path: string) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Lets the file links under this component open files. A workspace calls it with its own `show`. A page that puts the
|
|
8
|
+
* guide outside the workspace calls it too, in the component that holds both.
|
|
9
|
+
*/
|
|
10
|
+
export declare function provideWorkspaceFileOpener(opener: WorkspaceFileOpener): void;
|
|
11
|
+
/**
|
|
12
|
+
* An inline link in a guide that opens a file in the workspace editor. It shows the file name, or its slot. It calls
|
|
13
|
+
* the opener of `provideWorkspaceFileOpener()` above it, and emits `open` either way.
|
|
14
|
+
*/
|
|
15
|
+
export declare const WorkspaceFileLink: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
16
|
+
/** The path of the file in the workspace, such as `src/app.vue`. */
|
|
17
|
+
path: {
|
|
18
|
+
required: true;
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
open: (path: string) => boolean;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
/** The path of the file in the workspace, such as `src/app.vue`. */
|
|
27
|
+
path: {
|
|
28
|
+
required: true;
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{
|
|
32
|
+
onOpen?: ((path: string) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent, h, inject, provide } from "vue";
|
|
2
|
+
// src/workspace/workspace-file-link.ts
|
|
3
|
+
const fileOpenerKey = Symbol("WorkspaceFileOpener");
|
|
4
|
+
/**
|
|
5
|
+
* Lets the file links under this component open files. A workspace calls it with its own `show`. A page that puts the
|
|
6
|
+
* guide outside the workspace calls it too, in the component that holds both.
|
|
7
|
+
*/
|
|
8
|
+
function provideWorkspaceFileOpener(opener) {
|
|
9
|
+
provide(fileOpenerKey, opener);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An inline link in a guide that opens a file in the workspace editor. It shows the file name, or its slot. It calls
|
|
13
|
+
* the opener of `provideWorkspaceFileOpener()` above it, and emits `open` either way.
|
|
14
|
+
*/
|
|
15
|
+
const WorkspaceFileLink = defineComponent({
|
|
16
|
+
name: "WorkspaceFileLink",
|
|
17
|
+
props: {
|
|
18
|
+
/** The path of the file in the workspace, such as `src/app.vue`. */
|
|
19
|
+
path: {
|
|
20
|
+
required: true,
|
|
21
|
+
type: String
|
|
22
|
+
} },
|
|
23
|
+
emits: { open: (path) => typeof path === "string" },
|
|
24
|
+
setup(props, { emit, slots }) {
|
|
25
|
+
const opener = inject(fileOpenerKey, void 0);
|
|
26
|
+
return () => h("button", {
|
|
27
|
+
class: "vh-ws-file-link",
|
|
28
|
+
"data-path": props.path,
|
|
29
|
+
title: `Open ${props.path}`,
|
|
30
|
+
type: "button",
|
|
31
|
+
onClick: () => {
|
|
32
|
+
opener?.show(props.path);
|
|
33
|
+
emit("open", props.path);
|
|
34
|
+
}
|
|
35
|
+
}, slots.default?.() ?? props.path.split("/").pop());
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export { WorkspaceFileLink, provideWorkspaceFileOpener };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
|
|
3
|
-
/** The file list of a workspace. A dot marks each modified file, and the folders that hold one. */
|
|
2
|
+
/** The file list of a workspace, with an icon per file type and a dot on each edited file. */
|
|
4
3
|
export declare const WorkspaceFileTree: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
4
|
paths: {
|
|
6
5
|
required: true;
|
|
7
6
|
type: PropType<readonly string[]>;
|
|
8
7
|
};
|
|
9
|
-
/** Paths that differ from the original files, such as `workspace.modified`. */
|
|
10
|
-
|
|
8
|
+
/** Paths that differ from the original files, such as `workspace.modified`. A list or a set. */
|
|
9
|
+
edited: {
|
|
11
10
|
default: () => never[];
|
|
12
|
-
type: PropType<readonly string[]
|
|
11
|
+
type: PropType<readonly string[] | ReadonlySet<string>>;
|
|
13
12
|
};
|
|
14
13
|
/** The open file. Use `v-model:selected`. */
|
|
15
14
|
selected: {
|
|
@@ -29,10 +28,10 @@ export declare const WorkspaceFileTree: import("vue").DefineComponent<import("vu
|
|
|
29
28
|
required: true;
|
|
30
29
|
type: PropType<readonly string[]>;
|
|
31
30
|
};
|
|
32
|
-
/** Paths that differ from the original files, such as `workspace.modified`. */
|
|
33
|
-
|
|
31
|
+
/** Paths that differ from the original files, such as `workspace.modified`. A list or a set. */
|
|
32
|
+
edited: {
|
|
34
33
|
default: () => never[];
|
|
35
|
-
type: PropType<readonly string[]
|
|
34
|
+
type: PropType<readonly string[] | ReadonlySet<string>>;
|
|
36
35
|
};
|
|
37
36
|
/** The open file. Use `v-model:selected`. */
|
|
38
37
|
selected: {
|
|
@@ -48,6 +47,5 @@ export declare const WorkspaceFileTree: import("vue").DefineComponent<import("vu
|
|
|
48
47
|
}>, {
|
|
49
48
|
label: string;
|
|
50
49
|
selected: string;
|
|
51
|
-
|
|
52
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
53
|
-
//#endregion
|
|
50
|
+
edited: readonly string[] | ReadonlySet<string>;
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { n as useFileTree, t as FileTree } from "../../file-tree-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { n as useFileTree, t as FileTree } from "../../file-tree-CRFIdtzw.js";
|
|
2
|
+
import { fileTreeIcons } from "./file-icons.js";
|
|
3
|
+
import { computed, defineComponent, h, onBeforeUnmount, watch } from "vue";
|
|
4
|
+
// src/workspace/workspace-file-tree.ts
|
|
5
|
+
const treeCSS = `
|
|
6
|
+
[data-type="item"][data-item-selected="true"] { box-shadow: inset 1px 0 0 var(--vh-ws-accent); }
|
|
7
|
+
[data-type="item"][data-item-type="folder"] > [data-item-section="content"] { color: var(--vh-highlighted); }
|
|
8
|
+
[data-type="item"][data-item-type="folder"] > [data-item-section="icon"] { color: var(--trees-fg-muted); }
|
|
9
|
+
[data-type="item"][data-item-type="folder"] > [data-item-section="icon"] svg { height: 14px; width: 14px; }
|
|
10
|
+
[data-type="item"][data-item-type="file"] > [data-item-section="icon"] { margin-inline-start: calc(var(--trees-icon-width) + var(--trees-item-row-gap)); }
|
|
11
|
+
[data-item-git-status] > :where([data-item-section="icon"]) > *, [data-item-git-status] > [data-item-section="content"] { color: inherit; }
|
|
12
|
+
[data-item-section="git"] { align-items: center; display: flex; justify-content: flex-end; opacity: 1; }
|
|
6
13
|
[data-item-section="git"] > span { font-size: 0; }
|
|
7
14
|
[data-item-section="git"] > span svg { display: none; }
|
|
8
|
-
[data-item-section="git"] > span
|
|
15
|
+
[data-item-git-status="modified"] > [data-item-section="git"] > span { background: var(--vh-ws-accent); border-radius: 50%; flex: none; height: 6px; margin-inline-end: 2px; width: 6px; }
|
|
9
16
|
`;
|
|
10
|
-
/** The file list of a workspace
|
|
17
|
+
/** The file list of a workspace, with an icon per file type and a dot on each edited file. */
|
|
11
18
|
const WorkspaceFileTree = defineComponent({
|
|
12
19
|
name: "WorkspaceFileTree",
|
|
13
20
|
props: {
|
|
@@ -15,10 +22,10 @@ const WorkspaceFileTree = defineComponent({
|
|
|
15
22
|
required: true,
|
|
16
23
|
type: Array
|
|
17
24
|
},
|
|
18
|
-
/** Paths that differ from the original files, such as `workspace.modified`. */
|
|
19
|
-
|
|
25
|
+
/** Paths that differ from the original files, such as `workspace.modified`. A list or a set. */
|
|
26
|
+
edited: {
|
|
20
27
|
default: () => [],
|
|
21
|
-
type: Array
|
|
28
|
+
type: [Array, Set]
|
|
22
29
|
},
|
|
23
30
|
/** The open file. Use `v-model:selected`. */
|
|
24
31
|
selected: {
|
|
@@ -32,26 +39,26 @@ const WorkspaceFileTree = defineComponent({
|
|
|
32
39
|
},
|
|
33
40
|
emits: { "update:selected": (path) => typeof path === "string" },
|
|
34
41
|
setup(props, { emit }) {
|
|
42
|
+
const edited = computed(() => [...props.edited].sort());
|
|
43
|
+
const gitStatus = (paths) => paths.map((path) => ({
|
|
44
|
+
path,
|
|
45
|
+
status: "modified"
|
|
46
|
+
}));
|
|
35
47
|
const model = useFileTree({
|
|
48
|
+
density: "compact",
|
|
49
|
+
gitStatus: gitStatus(edited.value),
|
|
50
|
+
icons: fileTreeIcons,
|
|
36
51
|
initialExpansion: "open",
|
|
37
52
|
initialSelectedPaths: props.selected ? [props.selected] : void 0,
|
|
53
|
+
itemHeight: 22,
|
|
38
54
|
paths: props.paths,
|
|
39
|
-
|
|
40
|
-
path,
|
|
41
|
-
status: "modified"
|
|
42
|
-
})),
|
|
43
|
-
unsafeCSS: modifiedDotCSS,
|
|
55
|
+
unsafeCSS: treeCSS,
|
|
44
56
|
onSelectionChange(paths) {
|
|
45
57
|
const path = paths.at(-1);
|
|
46
58
|
if (path && !path.endsWith("/") && path !== props.selected) emit("update:selected", path);
|
|
47
59
|
}
|
|
48
60
|
});
|
|
49
|
-
watch(() =>
|
|
50
|
-
model.setGitStatus(next.map((path) => ({
|
|
51
|
-
path,
|
|
52
|
-
status: "modified"
|
|
53
|
-
})));
|
|
54
|
-
});
|
|
61
|
+
watch(() => edited.value.join("\n"), () => model.setGitStatus(gitStatus(edited.value)));
|
|
55
62
|
watch(() => props.paths, (paths) => model.resetPaths(paths));
|
|
56
63
|
watch(() => props.selected, (path) => {
|
|
57
64
|
if (path && model.getSelectedPaths().at(-1) !== path) model.getItem(path)?.select();
|
|
@@ -64,5 +71,4 @@ const WorkspaceFileTree = defineComponent({
|
|
|
64
71
|
});
|
|
65
72
|
}
|
|
66
73
|
});
|
|
67
|
-
//#endregion
|
|
68
74
|
export { WorkspaceFileTree };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { t as WorkspaceStep } from "../../workspace-steps-BKByX9DW.js";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
/**
|
|
4
|
+
* The guide of a lesson: the step's position and title, the page's text in the default slot, and Back and Next at the
|
|
5
|
+
* bottom of the column. It never parses Markdown: render the step's text into the slot. Put it in the `guide` slot of
|
|
6
|
+
* the shell, in the `guide-top` or `guide-side` layout. Use `v-model:step`; the step is a 0-based index.
|
|
7
|
+
*/
|
|
8
|
+
export declare const WorkspaceGuide: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
+
/** The steps of the lesson, in order. The guide shows the title of the current one. */
|
|
10
|
+
steps: {
|
|
11
|
+
default: () => never[];
|
|
12
|
+
type: PropType<readonly WorkspaceStep[]>;
|
|
13
|
+
};
|
|
14
|
+
/** The current step, from 0. Use `v-model:step`. */
|
|
15
|
+
step: {
|
|
16
|
+
default: undefined;
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
};
|
|
19
|
+
/** The title over the text. Defaults to the title of the current step. */
|
|
20
|
+
title: {
|
|
21
|
+
default: undefined;
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
};
|
|
24
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"update:step": (step: number) => boolean;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
/** The steps of the lesson, in order. The guide shows the title of the current one. */
|
|
30
|
+
steps: {
|
|
31
|
+
default: () => never[];
|
|
32
|
+
type: PropType<readonly WorkspaceStep[]>;
|
|
33
|
+
};
|
|
34
|
+
/** The current step, from 0. Use `v-model:step`. */
|
|
35
|
+
step: {
|
|
36
|
+
default: undefined;
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
};
|
|
39
|
+
/** The title over the text. Defaults to the title of the current step. */
|
|
40
|
+
title: {
|
|
41
|
+
default: undefined;
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
44
|
+
}>> & Readonly<{
|
|
45
|
+
"onUpdate:step"?: ((step: number) => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
title: string;
|
|
48
|
+
step: number;
|
|
49
|
+
steps: readonly WorkspaceStep[];
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
2
|
+
import { keepFocus, useStepModel } from "./workspace-steps.js";
|
|
3
|
+
import { defineComponent, h, ref, watch } from "vue";
|
|
4
|
+
// src/workspace/workspace-guide.ts
|
|
5
|
+
/**
|
|
6
|
+
* The guide of a lesson: the step's position and title, the page's text in the default slot, and Back and Next at the
|
|
7
|
+
* bottom of the column. It never parses Markdown: render the step's text into the slot. Put it in the `guide` slot of
|
|
8
|
+
* the shell, in the `guide-top` or `guide-side` layout. Use `v-model:step`; the step is a 0-based index.
|
|
9
|
+
*/
|
|
10
|
+
const WorkspaceGuide = defineComponent({
|
|
11
|
+
name: "WorkspaceGuide",
|
|
12
|
+
props: {
|
|
13
|
+
/** The steps of the lesson, in order. The guide shows the title of the current one. */
|
|
14
|
+
steps: {
|
|
15
|
+
default: () => [],
|
|
16
|
+
type: Array
|
|
17
|
+
},
|
|
18
|
+
/** The current step, from 0. Use `v-model:step`. */
|
|
19
|
+
step: {
|
|
20
|
+
default: void 0,
|
|
21
|
+
type: Number
|
|
22
|
+
},
|
|
23
|
+
/** The title over the text. Defaults to the title of the current step. */
|
|
24
|
+
title: {
|
|
25
|
+
default: void 0,
|
|
26
|
+
type: String
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: { "update:step": (step) => Number.isInteger(step) },
|
|
30
|
+
setup(props, { emit, slots }) {
|
|
31
|
+
const { current, go } = useStepModel(props, emit);
|
|
32
|
+
const UButton = useUIComponent("UButton");
|
|
33
|
+
const body = ref(null);
|
|
34
|
+
const nav = ref(null);
|
|
35
|
+
function move(index) {
|
|
36
|
+
const forward = index > current.value;
|
|
37
|
+
go(index);
|
|
38
|
+
keepFocus(() => nav.value, (controls) => forward ? controls.at(-1) : controls[0]);
|
|
39
|
+
}
|
|
40
|
+
watch(current, () => body.value?.scrollTo?.({ top: 0 }));
|
|
41
|
+
return () => {
|
|
42
|
+
const index = current.value;
|
|
43
|
+
const total = props.steps.length;
|
|
44
|
+
const previous = props.steps[index - 1];
|
|
45
|
+
const next = props.steps[index + 1];
|
|
46
|
+
const title = props.title ?? props.steps[index]?.title;
|
|
47
|
+
const slotProps = {
|
|
48
|
+
next: () => move(index + 1),
|
|
49
|
+
previous: () => move(index - 1),
|
|
50
|
+
step: index,
|
|
51
|
+
total
|
|
52
|
+
};
|
|
53
|
+
const content = slots.footer?.(slotProps) ?? (total > 1 ? [previous ? h(UButton, {
|
|
54
|
+
"aria-label": `Back to step ${index}: ${previous.title}`,
|
|
55
|
+
class: "vh-ws-guide-back",
|
|
56
|
+
color: "neutral",
|
|
57
|
+
icon: "i-lucide-chevron-left",
|
|
58
|
+
label: previous.title,
|
|
59
|
+
size: "sm",
|
|
60
|
+
variant: "ghost",
|
|
61
|
+
onClick: () => move(index - 1)
|
|
62
|
+
}) : h("span"), next ? h(UButton, {
|
|
63
|
+
class: "vh-ws-guide-next",
|
|
64
|
+
color: "neutral",
|
|
65
|
+
label: `Next: ${next.title}`,
|
|
66
|
+
size: "sm",
|
|
67
|
+
trailingIcon: "i-lucide-chevron-right",
|
|
68
|
+
variant: "solid",
|
|
69
|
+
onClick: () => move(index + 1)
|
|
70
|
+
}) : slots.finish?.(slotProps)] : total === 1 && slots.finish ? [h("span"), slots.finish(slotProps)] : void 0);
|
|
71
|
+
const footer = content ? h("nav", {
|
|
72
|
+
"aria-label": "Step navigation",
|
|
73
|
+
class: "vh-ws-guide-footer",
|
|
74
|
+
ref: nav
|
|
75
|
+
}, content) : void 0;
|
|
76
|
+
return h("article", {
|
|
77
|
+
class: "vh-ws-guide-pane",
|
|
78
|
+
"data-step": total ? index : void 0
|
|
79
|
+
}, [h("div", {
|
|
80
|
+
class: "vh-ws-guide-body",
|
|
81
|
+
ref: body
|
|
82
|
+
}, [
|
|
83
|
+
total > 1 ? h("p", { class: "vh-ws-guide-kicker" }, `Step ${index + 1} of ${total}`) : void 0,
|
|
84
|
+
title ? h("h2", { class: "vh-ws-guide-title" }, title) : void 0,
|
|
85
|
+
h("div", { class: "vh-ws-guide-content" }, slots.default?.(slotProps))
|
|
86
|
+
]), footer]);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export { WorkspaceGuide };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* A problem in the files, such as a parse error. `file` is the path of the file that it is in, and `line` the line of
|
|
4
|
+
* that file, from 1.
|
|
5
|
+
*/
|
|
6
|
+
export interface WorkspaceIssue {
|
|
7
|
+
message: string;
|
|
8
|
+
file?: string;
|
|
9
|
+
line?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The issues of the last render, as a list. Screen readers hear each new list. Without issues the list hides, or shows
|
|
13
|
+
* `empty` when it is set, such as in an Issues tab. An issue with a `file` shows `file:line` as a button that emits
|
|
14
|
+
* `show` with the path.
|
|
15
|
+
*/
|
|
16
|
+
export declare const WorkspaceIssues: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
|
+
issues: {
|
|
18
|
+
required: true;
|
|
19
|
+
type: PropType<readonly WorkspaceIssue[]>;
|
|
20
|
+
};
|
|
21
|
+
/** The text to show when there are no issues. Without it, the list hides. */
|
|
22
|
+
empty: {
|
|
23
|
+
default: undefined;
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
};
|
|
26
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
show: (path: string) => boolean;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
issues: {
|
|
32
|
+
required: true;
|
|
33
|
+
type: PropType<readonly WorkspaceIssue[]>;
|
|
34
|
+
};
|
|
35
|
+
/** The text to show when there are no issues. Without it, the list hides. */
|
|
36
|
+
empty: {
|
|
37
|
+
default: undefined;
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
}>> & Readonly<{
|
|
41
|
+
onShow?: ((path: string) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
empty: string;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent, h } from "vue";
|
|
2
|
+
// src/workspace/workspace-issues.ts
|
|
3
|
+
function where(issue) {
|
|
4
|
+
if (issue.file === void 0) return issue.line === void 0 ? void 0 : `Line ${issue.line}`;
|
|
5
|
+
return issue.line === void 0 ? issue.file : `${issue.file}:${issue.line}`;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The issues of the last render, as a list. Screen readers hear each new list. Without issues the list hides, or shows
|
|
9
|
+
* `empty` when it is set, such as in an Issues tab. An issue with a `file` shows `file:line` as a button that emits
|
|
10
|
+
* `show` with the path.
|
|
11
|
+
*/
|
|
12
|
+
const WorkspaceIssues = defineComponent({
|
|
13
|
+
name: "WorkspaceIssues",
|
|
14
|
+
props: {
|
|
15
|
+
issues: {
|
|
16
|
+
required: true,
|
|
17
|
+
type: Array
|
|
18
|
+
},
|
|
19
|
+
/** The text to show when there are no issues. Without it, the list hides. */
|
|
20
|
+
empty: {
|
|
21
|
+
default: void 0,
|
|
22
|
+
type: String
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: { show: (path) => typeof path === "string" },
|
|
26
|
+
setup(props, { emit }) {
|
|
27
|
+
return () => {
|
|
28
|
+
const none = props.issues.length === 0;
|
|
29
|
+
return h("ul", {
|
|
30
|
+
"aria-label": "Issues",
|
|
31
|
+
"aria-live": "polite",
|
|
32
|
+
class: "vh-ws-issues",
|
|
33
|
+
"data-empty": none ? "" : void 0,
|
|
34
|
+
hidden: none && !props.empty
|
|
35
|
+
}, none ? props.empty ? [h("li", { class: "vh-ws-issues-empty" }, props.empty)] : [] : props.issues.map((issue) => {
|
|
36
|
+
const label = where(issue);
|
|
37
|
+
const file = issue.file;
|
|
38
|
+
return h("li", [label === void 0 ? void 0 : file === void 0 ? h("span", { class: "vh-ws-issue-line" }, label) : h("button", {
|
|
39
|
+
class: "vh-ws-issue-line vh-ws-issue-file",
|
|
40
|
+
title: `Open ${file}`,
|
|
41
|
+
type: "button",
|
|
42
|
+
onClick: () => emit("show", file)
|
|
43
|
+
}, label), issue.message]);
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export { WorkspaceIssues };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
//#region src/workspace/workspace-preview.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Runs first in every HTML page of the preview: pass it to `useWebContainer({ previewScript })`. The preview is
|
|
5
4
|
* cross-origin, so the page around it cannot read its address or its history. This script sends the page address to
|
|
@@ -68,5 +67,4 @@ export declare const WorkspacePreview: import("vue").DefineComponent<import("vue
|
|
|
68
67
|
path: string;
|
|
69
68
|
url: string;
|
|
70
69
|
device: WorkspacePreviewDevice;
|
|
71
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
72
|
-
//#endregion
|
|
70
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as useUIComponent } from "../../nuxt-ui-DSQFzq3s.js";
|
|
2
1
|
import { DeviceFrame } from "../components/device-frame.js";
|
|
2
|
+
import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.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
|
|
6
6
|
function join(base, path) {
|
|
7
7
|
try {
|
|
8
8
|
return new URL(path || "/", base).href;
|
|
@@ -303,5 +303,4 @@ const WorkspacePreview = defineComponent({
|
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
|
-
//#endregion
|
|
307
306
|
export { WorkspacePreview, workspacePreviewScript };
|
|
@@ -1,88 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export type WorkspaceLayout = "tutorial" | "playground";
|
|
4
|
-
/** A built-in panel, or the slot name of a panel that the page adds. */
|
|
5
|
-
export type WorkspaceTab = "preview" | "terminal" | "connect" | (string & {});
|
|
6
|
-
/** One tab of the panel group. It shows the slot with the name `value`. */
|
|
7
|
-
export interface WorkspaceTabItem {
|
|
8
|
-
value: WorkspaceTab;
|
|
9
|
-
label: string;
|
|
10
|
-
/** A short count or state next to the label, such as the number of connected accounts. */
|
|
11
|
-
badge?: string | number;
|
|
12
|
-
}
|
|
13
|
-
/** Split sizes. `files` is in pixels. `main` and `side` are percents of the shell. */
|
|
14
|
-
export interface WorkspaceSplits {
|
|
15
|
-
files: number;
|
|
16
|
-
main: number;
|
|
17
|
-
side: number;
|
|
18
|
-
}
|
|
19
|
-
export declare const WorkspaceShell: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
20
|
-
layout: {
|
|
21
|
-
default: string;
|
|
22
|
-
type: PropType<WorkspaceLayout>;
|
|
23
|
-
};
|
|
24
|
-
/** The visible tab. Use `v-model:tab`. */
|
|
25
|
-
tab: {
|
|
26
|
-
default: undefined;
|
|
27
|
-
type: PropType<WorkspaceTab>;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* The tabs of the panel group, in order. Each tab shows the slot with the name of its `value`. Defaults to Preview,
|
|
31
|
-
* Terminal, and Connect, for the slots that are set. A playground shows the preview at the side, never as a tab.
|
|
32
|
-
*/
|
|
33
|
-
tabs: {
|
|
34
|
-
default: undefined;
|
|
35
|
-
type: PropType<readonly WorkspaceTabItem[]>;
|
|
36
|
-
};
|
|
37
|
-
/** The localStorage key for split sizes. `false` keeps them in memory. Defaults to one key per layout. */
|
|
38
|
-
storageKey: {
|
|
39
|
-
default: undefined;
|
|
40
|
-
type: PropType<string | false>;
|
|
41
|
-
};
|
|
42
|
-
/** The accessible name of the workspace region. */
|
|
43
|
-
label: {
|
|
44
|
-
default: string;
|
|
45
|
-
type: StringConstructor;
|
|
46
|
-
};
|
|
47
|
-
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
-
[key: string]: any;
|
|
49
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
50
|
-
"update:tab": (tab: WorkspaceTab) => boolean;
|
|
51
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
|
-
layout: {
|
|
53
|
-
default: string;
|
|
54
|
-
type: PropType<WorkspaceLayout>;
|
|
55
|
-
};
|
|
56
|
-
/** The visible tab. Use `v-model:tab`. */
|
|
57
|
-
tab: {
|
|
58
|
-
default: undefined;
|
|
59
|
-
type: PropType<WorkspaceTab>;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* The tabs of the panel group, in order. Each tab shows the slot with the name of its `value`. Defaults to Preview,
|
|
63
|
-
* Terminal, and Connect, for the slots that are set. A playground shows the preview at the side, never as a tab.
|
|
64
|
-
*/
|
|
65
|
-
tabs: {
|
|
66
|
-
default: undefined;
|
|
67
|
-
type: PropType<readonly WorkspaceTabItem[]>;
|
|
68
|
-
};
|
|
69
|
-
/** The localStorage key for split sizes. `false` keeps them in memory. Defaults to one key per layout. */
|
|
70
|
-
storageKey: {
|
|
71
|
-
default: undefined;
|
|
72
|
-
type: PropType<string | false>;
|
|
73
|
-
};
|
|
74
|
-
/** The accessible name of the workspace region. */
|
|
75
|
-
label: {
|
|
76
|
-
default: string;
|
|
77
|
-
type: StringConstructor;
|
|
78
|
-
};
|
|
79
|
-
}>> & Readonly<{
|
|
80
|
-
"onUpdate:tab"?: ((tab: WorkspaceTab) => any) | undefined;
|
|
81
|
-
}>, {
|
|
82
|
-
label: string;
|
|
83
|
-
storageKey: string | false;
|
|
84
|
-
layout: WorkspaceLayout;
|
|
85
|
-
tab: WorkspaceTab;
|
|
86
|
-
tabs: readonly WorkspaceTabItem[];
|
|
87
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
88
|
-
//#endregion
|
|
1
|
+
import { a as WorkspaceTabItem, i as WorkspaceTab, n as WorkspaceShell, r as WorkspaceSplits, t as WorkspaceLayout } from "../../workspace-shell-ChCwWPyv.js";
|
|
2
|
+
export { WorkspaceLayout, WorkspaceShell, WorkspaceSplits, WorkspaceTab, WorkspaceTabItem };
|