@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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MaybeRefOrGetter, PropType, Ref } from "vue";
|
|
2
|
-
//#region src/components/copy-button.d.ts
|
|
3
2
|
/** The text to copy, or a function that returns it, such as one that fetches the Markdown of a page. */
|
|
4
3
|
export type CopyValue = string | (() => string | Promise<string>);
|
|
5
4
|
export type CopyButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
@@ -23,8 +22,9 @@ export interface UseCopyReturn {
|
|
|
23
22
|
export declare function useCopy(options?: UseCopyOptions): UseCopyReturn;
|
|
24
23
|
/**
|
|
25
24
|
* A button that copies text. It shows `icon`, or the theme's `copy` icon, and swaps to the theme's `copyCheck` icon for
|
|
26
|
-
* `duration` ms after a copy
|
|
27
|
-
* announces "Copied", or "Copy failed" when the browser refuses. Without a label
|
|
25
|
+
* `duration` ms after a copy: the copy icon blurs out and the check draws in, a label changes to `copiedLabel` letter by
|
|
26
|
+
* letter, and the button rings once. It announces "Copied", or "Copy failed" when the browser refuses. Without a label
|
|
27
|
+
* it is an icon-only button named "Copy".
|
|
28
28
|
*/
|
|
29
29
|
export declare const CopyButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
30
30
|
value: {
|
|
@@ -35,6 +35,10 @@ export declare const CopyButton: import("vue").DefineComponent<import("vue").Ext
|
|
|
35
35
|
default: undefined;
|
|
36
36
|
type: StringConstructor;
|
|
37
37
|
};
|
|
38
|
+
copiedLabel: {
|
|
39
|
+
default: string;
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
};
|
|
38
42
|
/** The icon before a copy, such as `i-lucide-link` for a link. Defaults to the theme's `copy` icon. */
|
|
39
43
|
icon: {
|
|
40
44
|
default: undefined;
|
|
@@ -76,6 +80,10 @@ export declare const CopyButton: import("vue").DefineComponent<import("vue").Ext
|
|
|
76
80
|
default: undefined;
|
|
77
81
|
type: StringConstructor;
|
|
78
82
|
};
|
|
83
|
+
copiedLabel: {
|
|
84
|
+
default: string;
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
};
|
|
79
87
|
/** The icon before a copy, such as `i-lucide-link` for a link. Defaults to the theme's `copy` icon. */
|
|
80
88
|
icon: {
|
|
81
89
|
default: undefined;
|
|
@@ -109,10 +117,10 @@ export declare const CopyButton: import("vue").DefineComponent<import("vue").Ext
|
|
|
109
117
|
}>, {
|
|
110
118
|
label: string;
|
|
111
119
|
size: CopyButtonSize;
|
|
112
|
-
variant: CopyButtonVariant;
|
|
113
120
|
icon: string;
|
|
114
121
|
preload: boolean;
|
|
122
|
+
variant: CopyButtonVariant;
|
|
123
|
+
copiedLabel: string;
|
|
115
124
|
ariaLabel: string;
|
|
116
125
|
duration: number;
|
|
117
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
118
|
-
//#endregion
|
|
126
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,2 +1,226 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as useViteHubUIIcons } from "../../config-DztmAYYn.js";
|
|
2
|
+
import { t as uiErrorDiagnostics } from "../../error-diagnostics-BlgA9rI2.js";
|
|
3
|
+
import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
4
|
+
import { n as prepareAnnouncer, t as announce } from "../../announce-B0DLwflT.js";
|
|
5
|
+
import { t as ring } from "../../ring-BN4d8vtw.js";
|
|
6
|
+
import { SwapIcon } from "./motion.js";
|
|
7
|
+
import { defineComponent, getCurrentInstance, getCurrentScope, h, onMounted, onScopeDispose, readonly, ref, toValue, watch } from "vue";
|
|
8
|
+
// src/components/copy-button.ts
|
|
9
|
+
async function writeClipboard(value) {
|
|
10
|
+
const text = typeof value === "function" ? value() : value;
|
|
11
|
+
try {
|
|
12
|
+
await writeClipboardApi(text);
|
|
13
|
+
} catch (error) {
|
|
14
|
+
if (!copyWithCommand(await text)) throw error;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
async function writeClipboardApi(text) {
|
|
18
|
+
const clipboard = globalThis.navigator?.clipboard;
|
|
19
|
+
if (typeof clipboard?.writeText !== "function") throw uiErrorDiagnostics.UI_CLIPBOARD_UNAVAILABLE();
|
|
20
|
+
if (typeof text === "string") return clipboard.writeText(text);
|
|
21
|
+
if (typeof ClipboardItem === "function" && typeof clipboard.write === "function") return clipboard.write([new ClipboardItem({ "text/plain": text.then((resolved) => new Blob([resolved], { type: "text/plain" })) })]);
|
|
22
|
+
return clipboard.writeText(await text);
|
|
23
|
+
}
|
|
24
|
+
/** Copies through a hidden text area and `document.execCommand("copy")`. Returns `false` when the browser refuses. */
|
|
25
|
+
function copyWithCommand(text) {
|
|
26
|
+
const doc = globalThis.document;
|
|
27
|
+
if (typeof doc?.execCommand !== "function" || !doc.body) return false;
|
|
28
|
+
const focused = doc.activeElement;
|
|
29
|
+
const area = doc.createElement("textarea");
|
|
30
|
+
area.value = text;
|
|
31
|
+
area.readOnly = true;
|
|
32
|
+
area.style.position = "fixed";
|
|
33
|
+
area.style.opacity = "0";
|
|
34
|
+
doc.body.append(area);
|
|
35
|
+
area.focus({ preventScroll: true });
|
|
36
|
+
area.select();
|
|
37
|
+
try {
|
|
38
|
+
return doc.execCommand("copy");
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
} finally {
|
|
42
|
+
area.remove();
|
|
43
|
+
if (focused instanceof HTMLElement) focused.focus({ preventScroll: true });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The clipboard logic of `CopyButton`, for a control that copies as one part of a larger action, such as the item
|
|
48
|
+
* "Copy link" in a menu. The caller shows the result, for example with a toast.
|
|
49
|
+
*/
|
|
50
|
+
function useCopy(options = {}) {
|
|
51
|
+
const copied = ref(false);
|
|
52
|
+
const failed = ref(false);
|
|
53
|
+
let timer;
|
|
54
|
+
if (getCurrentScope()) onScopeDispose(() => clearTimeout(timer));
|
|
55
|
+
async function copy(value) {
|
|
56
|
+
clearTimeout(timer);
|
|
57
|
+
copied.value = false;
|
|
58
|
+
failed.value = false;
|
|
59
|
+
try {
|
|
60
|
+
await writeClipboard(value);
|
|
61
|
+
copied.value = true;
|
|
62
|
+
} catch {
|
|
63
|
+
failed.value = true;
|
|
64
|
+
}
|
|
65
|
+
timer = setTimeout(() => {
|
|
66
|
+
copied.value = false;
|
|
67
|
+
failed.value = false;
|
|
68
|
+
}, toValue(options.duration) ?? 2e3);
|
|
69
|
+
return copied.value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
copy,
|
|
73
|
+
copied: readonly(copied),
|
|
74
|
+
failed: readonly(failed)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A button that copies text. It shows `icon`, or the theme's `copy` icon, and swaps to the theme's `copyCheck` icon for
|
|
79
|
+
* `duration` ms after a copy: the copy icon blurs out and the check draws in, a label changes to `copiedLabel` letter by
|
|
80
|
+
* letter, and the button rings once. It announces "Copied", or "Copy failed" when the browser refuses. Without a label
|
|
81
|
+
* it is an icon-only button named "Copy".
|
|
82
|
+
*/
|
|
83
|
+
const CopyButton = defineComponent({
|
|
84
|
+
name: "CopyButton",
|
|
85
|
+
inheritAttrs: false,
|
|
86
|
+
props: {
|
|
87
|
+
value: {
|
|
88
|
+
required: true,
|
|
89
|
+
type: [String, Function]
|
|
90
|
+
},
|
|
91
|
+
label: {
|
|
92
|
+
default: void 0,
|
|
93
|
+
type: String
|
|
94
|
+
},
|
|
95
|
+
copiedLabel: {
|
|
96
|
+
default: "Copied",
|
|
97
|
+
type: String
|
|
98
|
+
},
|
|
99
|
+
/** The icon before a copy, such as `i-lucide-link` for a link. Defaults to the theme's `copy` icon. */
|
|
100
|
+
icon: {
|
|
101
|
+
default: void 0,
|
|
102
|
+
type: String
|
|
103
|
+
},
|
|
104
|
+
ariaLabel: {
|
|
105
|
+
default: void 0,
|
|
106
|
+
type: String
|
|
107
|
+
},
|
|
108
|
+
size: {
|
|
109
|
+
default: void 0,
|
|
110
|
+
type: String
|
|
111
|
+
},
|
|
112
|
+
variant: {
|
|
113
|
+
default: "ghost",
|
|
114
|
+
type: String
|
|
115
|
+
},
|
|
116
|
+
/** How long, in ms, the check shows after a copy. */
|
|
117
|
+
duration: {
|
|
118
|
+
default: 2e3,
|
|
119
|
+
type: Number
|
|
120
|
+
},
|
|
121
|
+
/** Call a function `value` when the pointer enters the button or it gets focus, so the click copies text that is already loaded. */
|
|
122
|
+
preload: {
|
|
123
|
+
default: false,
|
|
124
|
+
type: Boolean
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
emits: {
|
|
128
|
+
copy: () => true,
|
|
129
|
+
error: () => true
|
|
130
|
+
},
|
|
131
|
+
setup(props, { attrs, emit, slots }) {
|
|
132
|
+
const UButton = useUIComponent("UButton");
|
|
133
|
+
const icons = useViteHubUIIcons();
|
|
134
|
+
const { copy, copied } = useCopy({ duration: () => props.duration });
|
|
135
|
+
const instance = getCurrentInstance();
|
|
136
|
+
const element = () => {
|
|
137
|
+
const el = instance?.proxy?.$el;
|
|
138
|
+
return el instanceof Element ? el : void 0;
|
|
139
|
+
};
|
|
140
|
+
onMounted(() => prepareAnnouncer(element()));
|
|
141
|
+
let preloaded;
|
|
142
|
+
watch(() => props.value, () => preloaded = void 0);
|
|
143
|
+
function preload() {
|
|
144
|
+
if (!props.preload || preloaded || typeof props.value !== "function") return;
|
|
145
|
+
const entry = { text: callValue(props.value) };
|
|
146
|
+
preloaded = entry;
|
|
147
|
+
if (typeof entry.text === "string") return;
|
|
148
|
+
entry.text.then((text) => {
|
|
149
|
+
if (preloaded === entry) entry.text = text;
|
|
150
|
+
}, () => {
|
|
151
|
+
if (preloaded === entry) preloaded = void 0;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
const loading = ref(false);
|
|
155
|
+
async function onClick(event) {
|
|
156
|
+
const target = event.currentTarget instanceof Element ? event.currentTarget : element();
|
|
157
|
+
let value = props.value;
|
|
158
|
+
if (typeof value === "function") {
|
|
159
|
+
const text = preloaded?.text ?? callValue(value);
|
|
160
|
+
preloaded = void 0;
|
|
161
|
+
value = typeof text === "string" ? text : () => text;
|
|
162
|
+
loading.value = typeof text !== "string";
|
|
163
|
+
}
|
|
164
|
+
const ok = await copy(value);
|
|
165
|
+
loading.value = false;
|
|
166
|
+
announce(target, ok ? "Copied" : "Copy failed");
|
|
167
|
+
if (ok && target instanceof HTMLElement) ring(target);
|
|
168
|
+
if (ok) emit("copy");
|
|
169
|
+
else emit("error");
|
|
170
|
+
}
|
|
171
|
+
const leading = ({ ui }) => {
|
|
172
|
+
const iconClass = ui?.leadingIcon?.({ class: leadingIconClass(attrs.ui) });
|
|
173
|
+
const [name, enter] = loading.value ? [icons.value.loading, "draw"] : copied.value ? [icons.value.copyCheck, "draw"] : [props.icon ?? icons.value.copy, "blur"];
|
|
174
|
+
return [h(SwapIcon, {
|
|
175
|
+
class: iconClass,
|
|
176
|
+
name,
|
|
177
|
+
enter,
|
|
178
|
+
spin: loading.value
|
|
179
|
+
})];
|
|
180
|
+
};
|
|
181
|
+
return () => h(UButton, {
|
|
182
|
+
...attrs,
|
|
183
|
+
"aria-label": props.ariaLabel ?? (props.label || slots.default ? void 0 : "Copy"),
|
|
184
|
+
"data-copied": copied.value ? "" : void 0,
|
|
185
|
+
"data-slot": attrs["data-slot"] ?? "copy-button",
|
|
186
|
+
icon: copied.value ? icons.value.copyCheck : props.icon ?? icons.value.copy,
|
|
187
|
+
label: props.label && copied.value ? props.copiedLabel : props.label,
|
|
188
|
+
disabled: loading.value || attrs.disabled,
|
|
189
|
+
size: props.size,
|
|
190
|
+
variant: props.variant,
|
|
191
|
+
onClick: (event) => {
|
|
192
|
+
callListener(attrs.onClick, event);
|
|
193
|
+
return onClick(event);
|
|
194
|
+
},
|
|
195
|
+
onFocus: (event) => {
|
|
196
|
+
callListener(attrs.onFocus, event);
|
|
197
|
+
if (event.currentTarget instanceof Element) prepareAnnouncer(event.currentTarget);
|
|
198
|
+
preload();
|
|
199
|
+
},
|
|
200
|
+
onPointerenter: (event) => {
|
|
201
|
+
callListener(attrs.onPointerenter, event);
|
|
202
|
+
preload();
|
|
203
|
+
}
|
|
204
|
+
}, {
|
|
205
|
+
leading,
|
|
206
|
+
...slots.default ? { default: slots.default } : {}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
/** Calls a function `value`. A function that throws gives a rejected promise, so the copy reports the failure. */
|
|
211
|
+
function callValue(value) {
|
|
212
|
+
try {
|
|
213
|
+
return value();
|
|
214
|
+
} catch (error) {
|
|
215
|
+
return Promise.reject(error);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function leadingIconClass(ui) {
|
|
219
|
+
return typeof ui === "object" && ui !== null && "leadingIcon" in ui ? ui.leadingIcon : void 0;
|
|
220
|
+
}
|
|
221
|
+
function callListener(listener, event) {
|
|
222
|
+
if (Array.isArray(listener)) {
|
|
223
|
+
for (const handler of listener) if (typeof handler === "function") handler(event);
|
|
224
|
+
} else if (typeof listener === "function") listener(event);
|
|
225
|
+
}
|
|
2
226
|
export { CopyButton, useCopy };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PropType, VNode } from "vue";
|
|
2
|
-
//#region src/components/device-frame.d.ts
|
|
3
2
|
/** A device the bar offers, in CSS pixels, the way it usually stands. */
|
|
4
3
|
export interface DeviceFramePreset {
|
|
5
4
|
id: string;
|
|
@@ -118,13 +117,12 @@ export declare const DeviceFrame: import("vue").DefineComponent<import("vue").Ex
|
|
|
118
117
|
}>> & Readonly<{
|
|
119
118
|
"onUpdate:modelValue"?: ((_size: DeviceFrameSize) => any) | undefined;
|
|
120
119
|
}>, {
|
|
121
|
-
disabled: boolean;
|
|
122
|
-
modelValue: DeviceFrameSize;
|
|
123
120
|
storageKey: string;
|
|
124
121
|
toolbar: boolean;
|
|
122
|
+
disabled: boolean;
|
|
125
123
|
defaultValue: Partial<DeviceFrameSize>;
|
|
124
|
+
modelValue: DeviceFrameSize;
|
|
126
125
|
presets: readonly DeviceFramePreset[];
|
|
127
126
|
breakpoints: readonly DeviceFrameBreakpoint[];
|
|
128
127
|
insetBottom: number;
|
|
129
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
130
|
-
//#endregion
|
|
128
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, defineComponent, h, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/components/device-frame.ts
|
|
3
3
|
const DEVICE_FRAME_PRESETS = [
|
|
4
4
|
{
|
|
5
5
|
id: "iphone",
|
|
@@ -467,5 +467,4 @@ const DeviceFrame = defineComponent({
|
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
469
|
});
|
|
470
|
-
//#endregion
|
|
471
470
|
export { DEVICE_FRAME_BREAKPOINTS, DEVICE_FRAME_PRESETS, DeviceFrame };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { SlotsType, VNodeChild } from "vue";
|
|
2
|
+
export interface DropFieldSlots {
|
|
3
|
+
/** The text of the field. `over` is true while a file is over it. */
|
|
4
|
+
default?: (props: {
|
|
5
|
+
over: boolean;
|
|
6
|
+
}) => VNodeChild;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A place to drop files, with the drop field of `@vite-hub/ui/motion` (docs/design/motion.md, "Files are dragged in"):
|
|
10
|
+
* a grid of dots that leans toward the dragged file. It is a label around a native file input, so a click and the
|
|
11
|
+
* keyboard open the file picker as before. It emits `files` for a drop and for a pick.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DropField: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
14
|
+
accept: {
|
|
15
|
+
default: undefined;
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
multiple: {
|
|
19
|
+
default: boolean;
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
};
|
|
22
|
+
disabled: {
|
|
23
|
+
default: boolean;
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
};
|
|
26
|
+
label: {
|
|
27
|
+
default: string;
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
description: {
|
|
31
|
+
default: string;
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
};
|
|
34
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
files: (files: File[]) => boolean;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
+
accept: {
|
|
40
|
+
default: undefined;
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
};
|
|
43
|
+
multiple: {
|
|
44
|
+
default: boolean;
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
};
|
|
47
|
+
disabled: {
|
|
48
|
+
default: boolean;
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
};
|
|
51
|
+
label: {
|
|
52
|
+
default: string;
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
};
|
|
55
|
+
description: {
|
|
56
|
+
default: string;
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
};
|
|
59
|
+
}>> & Readonly<{
|
|
60
|
+
onFiles?: ((files: File[]) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
label: string;
|
|
63
|
+
multiple: boolean;
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
accept: string;
|
|
66
|
+
description: string;
|
|
67
|
+
}, SlotsType<DropFieldSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { t as createDropField } from "../../drop-field-CNZgwFVO.js";
|
|
2
|
+
import { defineComponent, h, onBeforeUnmount, onMounted, ref } from "vue";
|
|
3
|
+
// src/components/drop-field.ts
|
|
4
|
+
/**
|
|
5
|
+
* A place to drop files, with the drop field of `@vite-hub/ui/motion` (docs/design/motion.md, "Files are dragged in"):
|
|
6
|
+
* a grid of dots that leans toward the dragged file. It is a label around a native file input, so a click and the
|
|
7
|
+
* keyboard open the file picker as before. It emits `files` for a drop and for a pick.
|
|
8
|
+
*/
|
|
9
|
+
const DropField = defineComponent({
|
|
10
|
+
name: "DropField",
|
|
11
|
+
props: {
|
|
12
|
+
accept: {
|
|
13
|
+
default: void 0,
|
|
14
|
+
type: String
|
|
15
|
+
},
|
|
16
|
+
multiple: {
|
|
17
|
+
default: false,
|
|
18
|
+
type: Boolean
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
default: false,
|
|
22
|
+
type: Boolean
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
default: "Drop files to upload",
|
|
26
|
+
type: String
|
|
27
|
+
},
|
|
28
|
+
description: {
|
|
29
|
+
default: "or click to browse",
|
|
30
|
+
type: String
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: { files: (files) => Array.isArray(files) },
|
|
34
|
+
slots: Object,
|
|
35
|
+
setup(props, { emit, slots }) {
|
|
36
|
+
const root = ref();
|
|
37
|
+
const over = ref(false);
|
|
38
|
+
let field;
|
|
39
|
+
const watcher = typeof MutationObserver === "function" ? new MutationObserver(() => over.value = root.value?.dataset.over !== void 0) : void 0;
|
|
40
|
+
onMounted(() => {
|
|
41
|
+
if (!root.value) return;
|
|
42
|
+
field = createDropField(root.value, {
|
|
43
|
+
accepts: (event) => !props.disabled && [...event.dataTransfer?.types ?? []].includes("Files"),
|
|
44
|
+
onFiles: (files) => {
|
|
45
|
+
if (files.length) emit("files", props.multiple ? files : files.slice(0, 1));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
watcher?.observe(root.value, { attributeFilter: ["data-over"] });
|
|
49
|
+
});
|
|
50
|
+
onBeforeUnmount(() => {
|
|
51
|
+
watcher?.disconnect();
|
|
52
|
+
field?.destroy();
|
|
53
|
+
});
|
|
54
|
+
function pick(event) {
|
|
55
|
+
const input = event.target;
|
|
56
|
+
if (!(input instanceof HTMLInputElement)) return;
|
|
57
|
+
const files = [...input.files ?? []];
|
|
58
|
+
input.value = "";
|
|
59
|
+
if (files.length) emit("files", files);
|
|
60
|
+
}
|
|
61
|
+
return () => h("label", {
|
|
62
|
+
"data-disabled": props.disabled ? "" : void 0,
|
|
63
|
+
"data-focus-ring": "",
|
|
64
|
+
"data-slot": "drop-field",
|
|
65
|
+
ref: root
|
|
66
|
+
}, [h("input", {
|
|
67
|
+
accept: props.accept,
|
|
68
|
+
"data-slot": "drop-field-input",
|
|
69
|
+
disabled: props.disabled,
|
|
70
|
+
multiple: props.multiple,
|
|
71
|
+
onChange: pick,
|
|
72
|
+
type: "file"
|
|
73
|
+
}), slots.default?.({ over: over.value }) ?? [h("span", { "data-slot": "drop-field-label" }, over.value ? "Release to upload" : props.label), props.description ? h("span", { "data-slot": "drop-field-description" }, props.description) : null]]);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export { DropField };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useFileTreeSelection, i as useFileTree, n as FileTreeModel, r as FileTreeOptions, t as FileTree } from "../../file-tree-
|
|
1
|
+
import { a as useFileTreeSelection, i as useFileTree, n as FileTreeModel, r as FileTreeOptions, t as FileTree } from "../../file-tree-DOtkeBaq.js";
|
|
2
2
|
export { FileTree, FileTreeModel, FileTreeOptions, useFileTree, useFileTreeSelection };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { FileTree, useFileTree, useFileTreeSelection };
|
|
1
|
+
export { t as FileTree, n as useFileTree, r as useFileTreeSelection } from "../../file-tree-CRFIdtzw.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as ChoicesInputSource } from "../../choices-input-
|
|
1
|
+
import { a as ChoicesInputSource } from "../../choices-input-BUf-QqGj.js";
|
|
2
2
|
import { PropType } from "vue";
|
|
3
|
-
//#region src/components/filter-search.d.ts
|
|
4
3
|
export type FilterSearchSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
4
|
export declare const FilterSearch: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
5
|
/** The object that `useChoices()` returns. */
|
|
@@ -43,5 +42,4 @@ export declare const FilterSearch: import("vue").DefineComponent<import("vue").E
|
|
|
43
42
|
}>> & Readonly<{}>, {
|
|
44
43
|
label: string;
|
|
45
44
|
size: FilterSearchSize;
|
|
46
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
47
|
-
//#endregion
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as useUIComponent } from "../../nuxt-ui-DSQFzq3s.js";
|
|
2
1
|
import { ChoicesInput, ChoicesInputClear, ChoicesInputError, ChoicesInputField, ChoicesInputStatus } from "../headless/choices-input.js";
|
|
2
|
+
import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
3
3
|
import { defineComponent, h } from "vue";
|
|
4
|
-
|
|
4
|
+
// src/components/filter-search.ts
|
|
5
5
|
const FilterSearch = defineComponent({
|
|
6
6
|
name: "FilterSearch",
|
|
7
7
|
props: {
|
|
@@ -54,5 +54,4 @@ const FilterSearch = defineComponent({
|
|
|
54
54
|
]);
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
//#endregion
|
|
58
57
|
export { FilterSearch };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { r as HoldToDeleteState } from "../../hold-to-delete-BSMrpE-i.js";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
/**
|
|
4
|
+
* A delete that can be undone, with hold to delete of `@vite-hub/ui/motion` (docs/design/motion.md, "Something is
|
|
5
|
+
* deleted and the delete can be undone"). Hold the button: it fills, and a release before the end cancels. At the end it
|
|
6
|
+
* emits `delete`, so hide the item, the item leaves toward the trash, and the button turns into Undo. `commit` runs the
|
|
7
|
+
* real delete once the Undo window passes. Undo emits `undo`, so show the item again.
|
|
8
|
+
*
|
|
9
|
+
* Use it only where the real delete can wait: a delete in the browser, or an API whose delete the page may send a few
|
|
10
|
+
* seconds later. Unmounting it during the Undo window, or leaving the page, commits.
|
|
11
|
+
*/
|
|
12
|
+
export declare const HoldToDelete: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
|
+
commit: {
|
|
14
|
+
required: true;
|
|
15
|
+
type: PropType<() => void | Promise<void>>;
|
|
16
|
+
};
|
|
17
|
+
item: {
|
|
18
|
+
default: undefined;
|
|
19
|
+
type: PropType<() => Element | null | undefined>;
|
|
20
|
+
};
|
|
21
|
+
label: {
|
|
22
|
+
default: string;
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
};
|
|
25
|
+
undoLabel: {
|
|
26
|
+
default: string;
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
undoFor: {
|
|
30
|
+
default: number;
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
};
|
|
33
|
+
confirm: {
|
|
34
|
+
default: undefined;
|
|
35
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
36
|
+
};
|
|
37
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
|
+
delete: () => true;
|
|
41
|
+
undo: () => true;
|
|
42
|
+
error: (_error: unknown) => true;
|
|
43
|
+
state: (_state: HoldToDeleteState) => true;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
commit: {
|
|
46
|
+
required: true;
|
|
47
|
+
type: PropType<() => void | Promise<void>>;
|
|
48
|
+
};
|
|
49
|
+
item: {
|
|
50
|
+
default: undefined;
|
|
51
|
+
type: PropType<() => Element | null | undefined>;
|
|
52
|
+
};
|
|
53
|
+
label: {
|
|
54
|
+
default: string;
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
};
|
|
57
|
+
undoLabel: {
|
|
58
|
+
default: string;
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
};
|
|
61
|
+
undoFor: {
|
|
62
|
+
default: number;
|
|
63
|
+
type: NumberConstructor;
|
|
64
|
+
};
|
|
65
|
+
confirm: {
|
|
66
|
+
default: undefined;
|
|
67
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
68
|
+
};
|
|
69
|
+
}>> & Readonly<{
|
|
70
|
+
onError?: ((_error: unknown) => any) | undefined;
|
|
71
|
+
onDelete?: (() => any) | undefined;
|
|
72
|
+
onState?: ((_state: HoldToDeleteState) => any) | undefined;
|
|
73
|
+
onUndo?: (() => any) | undefined;
|
|
74
|
+
}>, {
|
|
75
|
+
label: string;
|
|
76
|
+
confirm: () => boolean | Promise<boolean>;
|
|
77
|
+
item: () => Element | null | undefined;
|
|
78
|
+
undoLabel: string;
|
|
79
|
+
undoFor: number;
|
|
80
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { t as createHoldToDelete } from "../../hold-to-delete-Cludb56v.js";
|
|
2
|
+
import { defineComponent, h, onBeforeUnmount, onMounted, ref } from "vue";
|
|
3
|
+
// src/components/hold-to-delete.ts
|
|
4
|
+
/**
|
|
5
|
+
* A delete that can be undone, with hold to delete of `@vite-hub/ui/motion` (docs/design/motion.md, "Something is
|
|
6
|
+
* deleted and the delete can be undone"). Hold the button: it fills, and a release before the end cancels. At the end it
|
|
7
|
+
* emits `delete`, so hide the item, the item leaves toward the trash, and the button turns into Undo. `commit` runs the
|
|
8
|
+
* real delete once the Undo window passes. Undo emits `undo`, so show the item again.
|
|
9
|
+
*
|
|
10
|
+
* Use it only where the real delete can wait: a delete in the browser, or an API whose delete the page may send a few
|
|
11
|
+
* seconds later. Unmounting it during the Undo window, or leaving the page, commits.
|
|
12
|
+
*/
|
|
13
|
+
const HoldToDelete = defineComponent({
|
|
14
|
+
name: "HoldToDelete",
|
|
15
|
+
props: {
|
|
16
|
+
commit: {
|
|
17
|
+
required: true,
|
|
18
|
+
type: Function
|
|
19
|
+
},
|
|
20
|
+
item: {
|
|
21
|
+
default: void 0,
|
|
22
|
+
type: Function
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
default: "Hold to delete",
|
|
26
|
+
type: String
|
|
27
|
+
},
|
|
28
|
+
undoLabel: {
|
|
29
|
+
default: "Undo",
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
undoFor: {
|
|
33
|
+
default: 5e3,
|
|
34
|
+
type: Number
|
|
35
|
+
},
|
|
36
|
+
confirm: {
|
|
37
|
+
default: void 0,
|
|
38
|
+
type: Function
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
emits: {
|
|
42
|
+
delete: () => true,
|
|
43
|
+
undo: () => true,
|
|
44
|
+
error: (_error) => true,
|
|
45
|
+
state: (_state) => true
|
|
46
|
+
},
|
|
47
|
+
setup(props, { emit, expose }) {
|
|
48
|
+
const root = ref();
|
|
49
|
+
let hold;
|
|
50
|
+
onMounted(() => {
|
|
51
|
+
if (!root.value) return;
|
|
52
|
+
hold = createHoldToDelete(root.value, {
|
|
53
|
+
commit: () => props.commit(),
|
|
54
|
+
confirm: props.confirm ? () => props.confirm() : void 0,
|
|
55
|
+
item: () => props.item?.(),
|
|
56
|
+
label: props.label,
|
|
57
|
+
onDelete: () => emit("delete"),
|
|
58
|
+
onError: (error) => emit("error", error),
|
|
59
|
+
onState: (state) => emit("state", state),
|
|
60
|
+
onUndo: () => emit("undo"),
|
|
61
|
+
undoFor: props.undoFor,
|
|
62
|
+
undoLabel: props.undoLabel
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
onBeforeUnmount(() => hold?.destroy());
|
|
66
|
+
expose({ undo: () => hold?.undo() });
|
|
67
|
+
return () => h("button", {
|
|
68
|
+
"data-icon-only": props.label ? void 0 : "",
|
|
69
|
+
"data-slot": "hold-to-delete",
|
|
70
|
+
ref: root,
|
|
71
|
+
type: "button"
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export { HoldToDelete };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as MarkdownEditorUpload, r as blobUpload, t as MarkdownEditor } from "../../markdown-editor-
|
|
1
|
+
import { n as MarkdownEditorUpload, r as blobUpload, t as MarkdownEditor } from "../../markdown-editor-B7gD60tp.js";
|
|
2
2
|
export { MarkdownEditor, MarkdownEditorUpload, blobUpload };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { MarkdownEditor, blobUpload };
|
|
1
|
+
export { t as MarkdownEditor, n as blobUpload } from "../../markdown-editor-3gY9MLvy.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
2
|
import { MarkdownDocumentProps, MarkdownProps } from "@comark/vue";
|
|
3
|
-
//#region src/components/markdown-renderer.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* The part of `Markdown` that parses and renders: Comark, the comark-ui preset, and their plugins. `Markdown` loads it
|
|
6
5
|
* with the first Markdown that renders, and passes its own props and attributes.
|
|
@@ -48,5 +47,4 @@ export declare const MarkdownRenderer: import("vue").DefineComponent<import("vue
|
|
|
48
47
|
nodes: import("comark").MarkdownDocument["nodes"];
|
|
49
48
|
} | undefined>;
|
|
50
49
|
streaming: boolean;
|
|
51
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
52
|
-
//#endregion
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|