@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,270 @@
|
|
|
1
|
+
import { i as playTween, t as cubicBezier } from "./tween-Dv3IIIQG.js";
|
|
2
|
+
import { t as visualCopy } from "./visual-copy-CHHBfJ6O.js";
|
|
3
|
+
import { r as createSpring, s as springs, t as isMotionOff, u as prefersReducedMotion } from "./opt-out-D66l60sg.js";
|
|
4
|
+
import { u as writeMotionStyle } from "./registry-DAIjCjWd.js";
|
|
5
|
+
// src/motion/list.ts
|
|
6
|
+
const grow = {
|
|
7
|
+
stiffness: 380,
|
|
8
|
+
damping: 26
|
|
9
|
+
};
|
|
10
|
+
const fold = {
|
|
11
|
+
stiffness: 260,
|
|
12
|
+
damping: 28
|
|
13
|
+
};
|
|
14
|
+
const slotScale = .9;
|
|
15
|
+
const leaveDuration = .32;
|
|
16
|
+
const leaveEasing = cubicBezier(.5, 0, .75, 0);
|
|
17
|
+
const ghostAttribute = "data-motion-ghost";
|
|
18
|
+
const center = (rect) => ({
|
|
19
|
+
x: rect.left + rect.width / 2,
|
|
20
|
+
y: rect.top + rect.height / 2
|
|
21
|
+
});
|
|
22
|
+
function onScreen(rect) {
|
|
23
|
+
return rect.bottom > 0 && rect.right > 0 && rect.top < innerHeight && rect.left < innerWidth && rect.width + rect.height > 0;
|
|
24
|
+
}
|
|
25
|
+
function defaultItems(container) {
|
|
26
|
+
return [...container.children].filter((child) => child instanceof HTMLElement && !child.hasAttribute(ghostAttribute));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The list mover of docs/design/motion.md: "Items are added, removed, or reordered". It is FLIP with the springs of the
|
|
30
|
+
* motion layer. Call `measure()` before a change and `play()` after it.
|
|
31
|
+
*
|
|
32
|
+
* Neighbors spring to their new place and keep their speed when a second change comes before they settle. A new item
|
|
33
|
+
* grows from its origin, such as the row it duplicates, or from its slot. A removed item folds away, or leaves toward
|
|
34
|
+
* `target`. Items that are off screen before and after the change do not move, so a long list costs one read per item.
|
|
35
|
+
* Under reduced motion nothing travels: a new item and a removed item cross-fade in 150ms. Inside `data-motion="none"`
|
|
36
|
+
* nothing moves.
|
|
37
|
+
*/
|
|
38
|
+
function createMotionList(container, options = {}) {
|
|
39
|
+
const items = options.items ?? defaultItems;
|
|
40
|
+
const motions = /* @__PURE__ */ new Map();
|
|
41
|
+
const ghosts = /* @__PURE__ */ new Set();
|
|
42
|
+
let snapshot = /* @__PURE__ */ new Map();
|
|
43
|
+
let starting = false;
|
|
44
|
+
function offset(motion) {
|
|
45
|
+
if (!motion) return {
|
|
46
|
+
x: 0,
|
|
47
|
+
y: 0
|
|
48
|
+
};
|
|
49
|
+
const rest = 1 - motion.grow.value;
|
|
50
|
+
return {
|
|
51
|
+
x: motion.x.value + motion.from.x * rest,
|
|
52
|
+
y: motion.y.value + motion.from.y * rest
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function write(element, motion) {
|
|
56
|
+
const { x, y, grow, from } = motion;
|
|
57
|
+
if (!x.active && !y.active && !grow.active && x.value === 0 && y.value === 0 && grow.value === 1) {
|
|
58
|
+
writeMotionStyle(element, {
|
|
59
|
+
translate: null,
|
|
60
|
+
scale: null,
|
|
61
|
+
opacity: null
|
|
62
|
+
});
|
|
63
|
+
if (!starting) motions.delete(element);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const { x: dx, y: dy } = offset(motion);
|
|
67
|
+
const scale = from.scale + (1 - from.scale) * grow.value;
|
|
68
|
+
writeMotionStyle(element, {
|
|
69
|
+
translate: dx || dy ? `${dx.toFixed(2)}px ${dy.toFixed(2)}px` : null,
|
|
70
|
+
scale: scale === 1 ? null : scale.toFixed(4),
|
|
71
|
+
opacity: grow.value >= 1 ? null : Math.max(0, Math.min(1, grow.value)).toFixed(3)
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function motionOf(element) {
|
|
75
|
+
let motion = motions.get(element);
|
|
76
|
+
if (motion) return motion;
|
|
77
|
+
const draw = () => motion && write(element, motion);
|
|
78
|
+
motion = {
|
|
79
|
+
x: createSpring(0, draw, springs.snappy),
|
|
80
|
+
y: createSpring(0, draw, springs.snappy),
|
|
81
|
+
grow: createSpring(1, draw, grow),
|
|
82
|
+
from: {
|
|
83
|
+
x: 0,
|
|
84
|
+
y: 0,
|
|
85
|
+
scale: 1
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
motions.set(element, motion);
|
|
89
|
+
return motion;
|
|
90
|
+
}
|
|
91
|
+
function stopItem(element) {
|
|
92
|
+
const motion = motions.get(element);
|
|
93
|
+
if (!motion) return;
|
|
94
|
+
motions.delete(element);
|
|
95
|
+
motion.x.stop();
|
|
96
|
+
motion.y.stop();
|
|
97
|
+
motion.grow.stop();
|
|
98
|
+
writeMotionStyle(element, {
|
|
99
|
+
translate: null,
|
|
100
|
+
scale: null,
|
|
101
|
+
opacity: null
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function travel(spring, from) {
|
|
105
|
+
const velocity = spring.velocity;
|
|
106
|
+
spring.set(from);
|
|
107
|
+
spring.to(0, {
|
|
108
|
+
preset: springs.snappy,
|
|
109
|
+
velocity
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function leave(element, before, target) {
|
|
113
|
+
if (!onScreen(before)) return;
|
|
114
|
+
const box = container.getBoundingClientRect();
|
|
115
|
+
if (getComputedStyle(container).position === "static") container.style.position = "relative";
|
|
116
|
+
const ghost = visualCopy(element);
|
|
117
|
+
ghost.setAttribute(ghostAttribute, "");
|
|
118
|
+
Object.assign(ghost.style, {
|
|
119
|
+
boxSizing: "border-box",
|
|
120
|
+
height: `${before.height}px`,
|
|
121
|
+
left: `${before.left - box.left - container.clientLeft + container.scrollLeft}px`,
|
|
122
|
+
margin: "0",
|
|
123
|
+
pointerEvents: "none",
|
|
124
|
+
position: "absolute",
|
|
125
|
+
top: `${before.top - box.top - container.clientTop + container.scrollTop}px`,
|
|
126
|
+
width: `${before.width}px`
|
|
127
|
+
});
|
|
128
|
+
writeMotionStyle(ghost, {
|
|
129
|
+
translate: null,
|
|
130
|
+
scale: null,
|
|
131
|
+
opacity: null,
|
|
132
|
+
filter: null
|
|
133
|
+
});
|
|
134
|
+
container.append(ghost);
|
|
135
|
+
const entry = {
|
|
136
|
+
element: ghost,
|
|
137
|
+
stop: () => {}
|
|
138
|
+
};
|
|
139
|
+
const end = () => {
|
|
140
|
+
entry.stop();
|
|
141
|
+
ghost.remove();
|
|
142
|
+
ghosts.delete(entry);
|
|
143
|
+
};
|
|
144
|
+
ghosts.add(entry);
|
|
145
|
+
if (prefersReducedMotion()) {
|
|
146
|
+
const tween = playTween(.15, (p) => writeMotionStyle(ghost, { opacity: (1 - p).toFixed(3) }));
|
|
147
|
+
entry.stop = tween.stop;
|
|
148
|
+
tween.done.then(end);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (target) {
|
|
152
|
+
const to = center(target.getBoundingClientRect());
|
|
153
|
+
const from = center(before);
|
|
154
|
+
const tween = playTween(leaveDuration, (p) => {
|
|
155
|
+
writeMotionStyle(ghost, {
|
|
156
|
+
translate: `${((to.x - from.x) * p).toFixed(2)}px ${((to.y - from.y) * p).toFixed(2)}px`,
|
|
157
|
+
scale: (1 - .8 * p).toFixed(4),
|
|
158
|
+
opacity: (1 - p).toFixed(3),
|
|
159
|
+
filter: p > 0 ? `blur(${(3 * p).toFixed(2)}px)` : null
|
|
160
|
+
});
|
|
161
|
+
}, leaveEasing);
|
|
162
|
+
entry.stop = tween.stop;
|
|
163
|
+
tween.done.then(end);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const spring = createSpring(1, (value) => {
|
|
167
|
+
writeMotionStyle(ghost, {
|
|
168
|
+
scale: (slotScale + .09999999999999998 * value).toFixed(4),
|
|
169
|
+
opacity: Math.max(0, value).toFixed(3)
|
|
170
|
+
});
|
|
171
|
+
if (value < .02) end();
|
|
172
|
+
}, fold);
|
|
173
|
+
entry.stop = () => spring.stop();
|
|
174
|
+
spring.to(0);
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
measure() {
|
|
178
|
+
snapshot = /* @__PURE__ */ new Map();
|
|
179
|
+
for (const element of items(container)) {
|
|
180
|
+
const rect = element.getBoundingClientRect();
|
|
181
|
+
if (!rect.width && !rect.height) continue;
|
|
182
|
+
const now = center(rect);
|
|
183
|
+
const shift = offset(motions.get(element));
|
|
184
|
+
snapshot.set(element, {
|
|
185
|
+
x: now.x - shift.x,
|
|
186
|
+
y: now.y - shift.y,
|
|
187
|
+
rect
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
play(play = {}) {
|
|
192
|
+
const before = snapshot;
|
|
193
|
+
snapshot = /* @__PURE__ */ new Map();
|
|
194
|
+
const off = isMotionOff(container);
|
|
195
|
+
const current = items(container);
|
|
196
|
+
const present = new Set(current);
|
|
197
|
+
const reads = current.map((element) => {
|
|
198
|
+
const rect = element.getBoundingClientRect();
|
|
199
|
+
const shift = offset(motions.get(element));
|
|
200
|
+
const now = center(rect);
|
|
201
|
+
return {
|
|
202
|
+
element,
|
|
203
|
+
rect,
|
|
204
|
+
layout: {
|
|
205
|
+
x: now.x - shift.x,
|
|
206
|
+
y: now.y - shift.y
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
});
|
|
210
|
+
const origins = reads.map(({ element }) => {
|
|
211
|
+
if (before.has(element) || !play.origin) return void 0;
|
|
212
|
+
return (typeof play.origin === "function" ? play.origin(element) : play.origin)?.getBoundingClientRect();
|
|
213
|
+
});
|
|
214
|
+
for (const [element, { rect }] of before) {
|
|
215
|
+
if (present.has(element)) continue;
|
|
216
|
+
stopItem(element);
|
|
217
|
+
if (!off && !options.movesOnly && !element.hasAttribute("data-motion-leaving")) leave(element, rect, play.target);
|
|
218
|
+
}
|
|
219
|
+
starting = true;
|
|
220
|
+
reads.forEach(({ element, rect, layout }, index) => {
|
|
221
|
+
if (off) return stopItem(element);
|
|
222
|
+
const old = before.get(element);
|
|
223
|
+
if (old) {
|
|
224
|
+
const dx = old.x - layout.x;
|
|
225
|
+
const dy = old.y - layout.y;
|
|
226
|
+
if (Math.abs(dx) < .5 && Math.abs(dy) < .5) return;
|
|
227
|
+
if (!onScreen(old.rect) && !onScreen(rect)) return stopItem(element);
|
|
228
|
+
const motion = motionOf(element);
|
|
229
|
+
travel(motion.x, motion.x.value + dx);
|
|
230
|
+
travel(motion.y, motion.y.value + dy);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
if (!onScreen(rect) || options.movesOnly) return;
|
|
234
|
+
const motion = motionOf(element);
|
|
235
|
+
const origin = origins[index];
|
|
236
|
+
if (prefersReducedMotion()) motion.from = {
|
|
237
|
+
x: 0,
|
|
238
|
+
y: 0,
|
|
239
|
+
scale: 1
|
|
240
|
+
};
|
|
241
|
+
else if (origin) {
|
|
242
|
+
const start = center(origin);
|
|
243
|
+
const scale = Math.min(1, Math.max(.2, Math.min(origin.width / (rect.width || 1), origin.height / (rect.height || 1))));
|
|
244
|
+
motion.from = {
|
|
245
|
+
x: start.x - layout.x,
|
|
246
|
+
y: start.y - layout.y,
|
|
247
|
+
scale
|
|
248
|
+
};
|
|
249
|
+
} else motion.from = {
|
|
250
|
+
x: 0,
|
|
251
|
+
y: 0,
|
|
252
|
+
scale: slotScale
|
|
253
|
+
};
|
|
254
|
+
motion.grow.set(0);
|
|
255
|
+
motion.grow.to(1, prefersReducedMotion() ? { tween: .15 } : { preset: grow });
|
|
256
|
+
});
|
|
257
|
+
starting = false;
|
|
258
|
+
},
|
|
259
|
+
destroy() {
|
|
260
|
+
for (const element of motions.keys()) stopItem(element);
|
|
261
|
+
for (const ghost of ghosts) {
|
|
262
|
+
ghost.stop();
|
|
263
|
+
ghost.element.remove();
|
|
264
|
+
}
|
|
265
|
+
ghosts.clear();
|
|
266
|
+
snapshot = /* @__PURE__ */ new Map();
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
export { createMotionList as t };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@pierre+highlights@0.5.2/node_modules/@pierre/highlights/dist/themes/loader.js
|
|
2
|
+
const themes = {
|
|
3
|
+
"andromeeda": () => import("./andromeeda-DaUPZ4_A.js"),
|
|
4
|
+
"aurora-x": () => import("./aurora-x-B5RPZ9i5.js"),
|
|
5
|
+
"ayu-dark": () => import("./ayu-dark-DXTaGA7I.js"),
|
|
6
|
+
"ayu-light": () => import("./ayu-light-BCYi80Fe.js"),
|
|
7
|
+
"ayu-mirage": () => import("./ayu-mirage-CgbXz-N5.js"),
|
|
8
|
+
"catppuccin-frappe": () => import("./catppuccin-frappe-MV2xzv44.js"),
|
|
9
|
+
"catppuccin-latte": () => import("./catppuccin-latte-CL6jjlVD.js"),
|
|
10
|
+
"catppuccin-macchiato": () => import("./catppuccin-macchiato-Bp6oZJVK.js"),
|
|
11
|
+
"catppuccin-mocha": () => import("./catppuccin-mocha-DOHrQ4dw.js"),
|
|
12
|
+
"dark-plus": () => import("./dark-plus-CXEBSjk4.js"),
|
|
13
|
+
"dracula": () => import("./dracula-Bvyz6eCo.js"),
|
|
14
|
+
"dracula-soft": () => import("./dracula-soft-a9indxAQ.js"),
|
|
15
|
+
"everforest-dark": () => import("./everforest-dark-9sVAxG7I.js"),
|
|
16
|
+
"everforest-light": () => import("./everforest-light-BocTn_Hd.js"),
|
|
17
|
+
"github-dark": () => import("./github-dark-BO9SXswM.js"),
|
|
18
|
+
"github-dark-default": () => import("./github-dark-default-XB_RHfBI.js"),
|
|
19
|
+
"github-dark-dimmed": () => import("./github-dark-dimmed-BoGxaWUQ.js"),
|
|
20
|
+
"github-dark-high-contrast": () => import("./github-dark-high-contrast-B3X6t2fG.js"),
|
|
21
|
+
"github-light": () => import("./github-light-D7VHHlUH.js"),
|
|
22
|
+
"github-light-default": () => import("./github-light-default-BuDsGtcR.js"),
|
|
23
|
+
"github-light-high-contrast": () => import("./github-light-high-contrast-GodZiAwh.js"),
|
|
24
|
+
"gruvbox-dark-hard": () => import("./gruvbox-dark-hard-CU4LuKJc.js"),
|
|
25
|
+
"gruvbox-dark-medium": () => import("./gruvbox-dark-medium-DjAsuXuH.js"),
|
|
26
|
+
"gruvbox-dark-soft": () => import("./gruvbox-dark-soft-D3Zttj6R.js"),
|
|
27
|
+
"gruvbox-light-hard": () => import("./gruvbox-light-hard-4M_9onwE.js"),
|
|
28
|
+
"gruvbox-light-medium": () => import("./gruvbox-light-medium-D9QwS4kQ.js"),
|
|
29
|
+
"gruvbox-light-soft": () => import("./gruvbox-light-soft-DhYcfQql.js"),
|
|
30
|
+
"horizon": () => import("./horizon-tItY9ATR.js"),
|
|
31
|
+
"horizon-bright": () => import("./horizon-bright-B9u59onx.js"),
|
|
32
|
+
"houston": () => import("./houston-BqKrKNQv.js"),
|
|
33
|
+
"kanagawa-dragon": () => import("./kanagawa-dragon-BH1K3aMw.js"),
|
|
34
|
+
"kanagawa-lotus": () => import("./kanagawa-lotus-C-4JB2io.js"),
|
|
35
|
+
"kanagawa-wave": () => import("./kanagawa-wave-DTQqNe5k.js"),
|
|
36
|
+
"laserwave": () => import("./laserwave-BkV0uIaG.js"),
|
|
37
|
+
"light-plus": () => import("./light-plus-CxYgEz7U.js"),
|
|
38
|
+
"material-theme": () => import("./material-theme-Xdm37UUJ.js"),
|
|
39
|
+
"material-theme-darker": () => import("./material-theme-darker-Blaz0cgN.js"),
|
|
40
|
+
"material-theme-lighter": () => import("./material-theme-lighter-BddVxBVA.js"),
|
|
41
|
+
"material-theme-ocean": () => import("./material-theme-ocean-C4qhfFHi.js"),
|
|
42
|
+
"material-theme-palenight": () => import("./material-theme-palenight-ChHDqoiA.js"),
|
|
43
|
+
"min-dark": () => import("./min-dark-DpGSNjaW.js"),
|
|
44
|
+
"min-light": () => import("./min-light-BMfJUsU2.js"),
|
|
45
|
+
"monokai": () => import("./monokai-DW19E-zg.js"),
|
|
46
|
+
"night-owl": () => import("./night-owl-B7Of8ee9.js"),
|
|
47
|
+
"night-owl-light": () => import("./night-owl-light-Vu9tTNpS.js"),
|
|
48
|
+
"nord": () => import("./nord-CDzJumeN.js"),
|
|
49
|
+
"one-dark-pro": () => import("./one-dark-pro-hS_sNo5p.js"),
|
|
50
|
+
"one-light": () => import("./one-light-CD4ItzSC.js"),
|
|
51
|
+
"pierre-dark": () => import("./pierre-dark-BtKHt2e4.js"),
|
|
52
|
+
"pierre-dark-protanopia-deuteranopia": () => import("./pierre-dark-protanopia-deuteranopia-CS0Gs25Q.js"),
|
|
53
|
+
"pierre-dark-soft": () => import("./pierre-dark-soft-D__0FtYP.js"),
|
|
54
|
+
"pierre-dark-tritanopia": () => import("./pierre-dark-tritanopia-C6fHROmA.js"),
|
|
55
|
+
"pierre-dark-vibrant": () => import("./pierre-dark-vibrant-COXpyAHb.js"),
|
|
56
|
+
"pierre-light": () => import("./pierre-light-BD28C_vh.js"),
|
|
57
|
+
"pierre-light-protanopia-deuteranopia": () => import("./pierre-light-protanopia-deuteranopia-CwWH1xGL.js"),
|
|
58
|
+
"pierre-light-soft": () => import("./pierre-light-soft-BkKY4pMj.js"),
|
|
59
|
+
"pierre-light-tritanopia": () => import("./pierre-light-tritanopia-Mpubahl7.js"),
|
|
60
|
+
"pierre-light-vibrant": () => import("./pierre-light-vibrant-x11J3_aO.js"),
|
|
61
|
+
"plastic": () => import("./plastic-BQnXkmvK.js"),
|
|
62
|
+
"poimandres": () => import("./poimandres-DEfG-8RI.js"),
|
|
63
|
+
"red": () => import("./red-BfKrAjYG.js"),
|
|
64
|
+
"rose-pine": () => import("./rose-pine-D0rhGGFg.js"),
|
|
65
|
+
"rose-pine-dawn": () => import("./rose-pine-dawn-7jVaYUiD.js"),
|
|
66
|
+
"rose-pine-moon": () => import("./rose-pine-moon-CFyS0Mvu.js"),
|
|
67
|
+
"slack-dark": () => import("./slack-dark-Bv-KFSBD.js"),
|
|
68
|
+
"slack-ochin": () => import("./slack-ochin-Dg2BAv1D.js"),
|
|
69
|
+
"snazzy-light": () => import("./snazzy-light-sYDdR9rx.js"),
|
|
70
|
+
"solarized-dark": () => import("./solarized-dark-COt2tTmN.js"),
|
|
71
|
+
"solarized-light": () => import("./solarized-light-BJrwFarZ.js"),
|
|
72
|
+
"synthwave-84": () => import("./synthwave-84-NUDBykTM.js"),
|
|
73
|
+
"tokyo-night": () => import("./tokyo-night-DD3B2QcO.js"),
|
|
74
|
+
"vesper": () => import("./vesper-oVQYrv8Y.js"),
|
|
75
|
+
"vitesse-black": () => import("./vitesse-black-D84DQZAP.js"),
|
|
76
|
+
"vitesse-dark": () => import("./vitesse-dark-CMZ6olk_.js"),
|
|
77
|
+
"vitesse-light": () => import("./vitesse-light-D9d8hLOY.js")
|
|
78
|
+
};
|
|
79
|
+
export { themes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as uiErrorDiagnostics } from "./error-diagnostics-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { _ as childrenOf$1, a as hash, c as addStyles, d as shikiDark, f as src_default, g as src_default$3, h as src_default$1, i as rowsOf, l as typesetCss, p as src_default$2, s as scalar, t as Properties, u as theme, v as isElement$2 } from "./vue-BlknIGIm.js";
|
|
2
|
+
import { t as uiErrorDiagnostics } from "./error-diagnostics-BlgA9rI2.js";
|
|
3
|
+
import { n as editorHandlersKey, t as createEditorHandlers } from "./handlers-CnbkvXjX.js";
|
|
4
|
+
import { r as useUIComponent } from "./nuxt-ui-7ByUrymx.js";
|
|
5
5
|
import { Comment, Fragment, computed, defineComponent, h, isVNode, onBeforeUnmount, onMounted, onScopeDispose, provide, ref, shallowRef, watch, watchEffect } from "vue";
|
|
6
6
|
import { defineDiagnostics } from "nostics";
|
|
7
7
|
import { Editor, EditorContent, NodeViewContent, NodeViewWrapper, VueNodeViewRenderer, nodeViewProps } from "@tiptap/vue-3";
|
|
@@ -20,13 +20,12 @@ import taskList from "comark/plugins/task-list";
|
|
|
20
20
|
import { parseFrontmatter } from "comark/parse";
|
|
21
21
|
import { Plugin as Plugin$1, PluginKey } from "@tiptap/pm/state";
|
|
22
22
|
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
|
23
|
-
|
|
23
|
+
// ../blob/dist/object-DRSmpe04.js
|
|
24
24
|
/** A non-null object that is not an array. Functions do not pass. */
|
|
25
25
|
function isRecord(value) {
|
|
26
26
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
//#region ../blob/dist/browser-diagnostics-LWw4MIqX.js
|
|
28
|
+
// ../blob/dist/browser-diagnostics-BPpUaEfo.js
|
|
30
29
|
const blobBrowserDiagnostics = /*#__PURE__*/ defineDiagnostics({
|
|
31
30
|
docsBase: "https://vitehub.dev/docs/blob/diagnostics",
|
|
32
31
|
codes: {
|
|
@@ -60,8 +59,7 @@ const blobBrowserDiagnostics = /*#__PURE__*/ defineDiagnostics({
|
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
});
|
|
63
|
-
|
|
64
|
-
//#region ../blob/dist/client.js
|
|
62
|
+
// ../blob/dist/client.js
|
|
65
63
|
function isFile(value) {
|
|
66
64
|
return "name" in value && typeof value.name === "string" && "arrayBuffer" in value && typeof value.arrayBuffer === "function";
|
|
67
65
|
}
|
|
@@ -229,30 +227,7 @@ function sendWithProgress(url, init, onProgress) {
|
|
|
229
227
|
request.send(init.body);
|
|
230
228
|
});
|
|
231
229
|
}
|
|
232
|
-
|
|
233
|
-
//#region ../../node_modules/.pnpm/comark-ui@0.12.0_@comark+html@0.9.0_katex@0.19.1_shiki@4.5.0__@tiptap+core@3.31.4_@tipt_529d07a13f99d0823ee3fccd15d28268/node_modules/comark-ui/dist/text-BaJTbiwp.mjs
|
|
234
|
-
/**
|
|
235
|
-
* A prop value as text. Comark writes strings, numbers, and booleans, so an object, array, function, or missing value
|
|
236
|
-
* is no text. The `typeof` check, unlike `instanceof`, can't throw on a revoked proxy.
|
|
237
|
-
*/
|
|
238
|
-
function scalar(value) {
|
|
239
|
-
switch (typeof value) {
|
|
240
|
-
case "string": return value;
|
|
241
|
-
case "number":
|
|
242
|
-
case "boolean":
|
|
243
|
-
case "bigint":
|
|
244
|
-
case "symbol": return String(value);
|
|
245
|
-
default: return;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
/** FNV-1a, in base 36: short, and the same every time the same text is hashed, so ids derived from it are stable. */
|
|
249
|
-
function hash(source) {
|
|
250
|
-
let value = 2166136261;
|
|
251
|
-
for (let at = 0; at < source.length; at++) value = Math.imul(value ^ source.charCodeAt(at), 16777619);
|
|
252
|
-
return (value >>> 0).toString(36);
|
|
253
|
-
}
|
|
254
|
-
//#endregion
|
|
255
|
-
//#region ../../node_modules/.pnpm/comark-ui@0.12.0_@comark+html@0.9.0_katex@0.19.1_shiki@4.5.0__@tiptap+core@3.31.4_@tipt_529d07a13f99d0823ee3fccd15d28268/node_modules/comark-ui/dist/editor-BWYpRh4o.mjs
|
|
230
|
+
// ../../node_modules/.pnpm/comark-ui@0.12.2_@comark+html@0.9.2_katex@0.19.1_shiki@4.6.0__@tiptap+core@3.35.0_@tipt_cf2f734d482ac6e082eda4effd9c073f/node_modules/comark-ui/dist/editor-Bg6MgHEv.mjs
|
|
256
231
|
const typesWithProps = [
|
|
257
232
|
"paragraph",
|
|
258
233
|
"heading",
|
|
@@ -1639,8 +1614,82 @@ Extension.create({
|
|
|
1639
1614
|
};
|
|
1640
1615
|
}
|
|
1641
1616
|
});
|
|
1642
|
-
|
|
1643
|
-
|
|
1617
|
+
const codeHighlightKey = new PluginKey("comarkCodeHighlight");
|
|
1618
|
+
/** The language a code block's `language` attribute names: its first word, as the preset reads a fence's. */
|
|
1619
|
+
const languageOf = (node) => String(node.attrs.language ?? "").trim().split(/\s/, 1)[0];
|
|
1620
|
+
function styleOf(token) {
|
|
1621
|
+
const style = token.htmlStyle ?? (token.color ? { color: token.color } : {});
|
|
1622
|
+
return Object.entries(style).map(([name, value]) => `${name}:${value}`).join(";");
|
|
1623
|
+
}
|
|
1624
|
+
Extension.create({
|
|
1625
|
+
name: "comarkCodeHighlight",
|
|
1626
|
+
addOptions: () => ({
|
|
1627
|
+
highlighter: () => void 0,
|
|
1628
|
+
themes: { light: "" }
|
|
1629
|
+
}),
|
|
1630
|
+
addProseMirrorPlugins() {
|
|
1631
|
+
const { highlighter, themes } = this.options;
|
|
1632
|
+
const ready = /* @__PURE__ */ new Map();
|
|
1633
|
+
const asked = /* @__PURE__ */ new Set();
|
|
1634
|
+
const decorate = (doc) => {
|
|
1635
|
+
const decorations = [];
|
|
1636
|
+
doc.descendants((node, pos) => {
|
|
1637
|
+
if (node.type.name !== "codeBlock") return;
|
|
1638
|
+
const language = languageOf(node);
|
|
1639
|
+
const shiki = language ? ready.get(language) : void 0;
|
|
1640
|
+
if (!shiki) return false;
|
|
1641
|
+
let tokens;
|
|
1642
|
+
try {
|
|
1643
|
+
({tokens} = shiki.codeToTokens(node.textContent, {
|
|
1644
|
+
lang: language,
|
|
1645
|
+
themes
|
|
1646
|
+
}));
|
|
1647
|
+
} catch {
|
|
1648
|
+
return false;
|
|
1649
|
+
}
|
|
1650
|
+
decorations.push(Decoration.node(pos, pos + node.nodeSize, { class: "shiki" }));
|
|
1651
|
+
let from = pos + 1;
|
|
1652
|
+
for (const line of tokens) {
|
|
1653
|
+
for (const token of line) {
|
|
1654
|
+
const style = styleOf(token);
|
|
1655
|
+
if (style) decorations.push(Decoration.inline(from, from + token.content.length, { style }));
|
|
1656
|
+
from += token.content.length;
|
|
1657
|
+
}
|
|
1658
|
+
from += 1;
|
|
1659
|
+
}
|
|
1660
|
+
return false;
|
|
1661
|
+
});
|
|
1662
|
+
return DecorationSet.create(doc, decorations);
|
|
1663
|
+
};
|
|
1664
|
+
return [new Plugin$1({
|
|
1665
|
+
key: codeHighlightKey,
|
|
1666
|
+
state: {
|
|
1667
|
+
init: (_, { doc }) => decorate(doc),
|
|
1668
|
+
apply: (tr, previous) => tr.docChanged || tr.getMeta(codeHighlightKey) ? decorate(tr.doc) : previous
|
|
1669
|
+
},
|
|
1670
|
+
props: { decorations: (state) => codeHighlightKey.getState(state) },
|
|
1671
|
+
view(view) {
|
|
1672
|
+
addStyles("editor-highlight", `@layer comark{${shikiDark}}`);
|
|
1673
|
+
const load = () => view.state.doc.descendants((node) => {
|
|
1674
|
+
if (node.type.name !== "codeBlock") return;
|
|
1675
|
+
const language = languageOf(node);
|
|
1676
|
+
if (language && !asked.has(language)) {
|
|
1677
|
+
asked.add(language);
|
|
1678
|
+
Promise.resolve().then(() => highlighter(language)).then((shiki) => {
|
|
1679
|
+
if (!shiki || view.isDestroyed) return;
|
|
1680
|
+
ready.set(language, shiki);
|
|
1681
|
+
view.dispatch(view.state.tr.setMeta(codeHighlightKey, true));
|
|
1682
|
+
}).catch(() => {});
|
|
1683
|
+
}
|
|
1684
|
+
return false;
|
|
1685
|
+
});
|
|
1686
|
+
load();
|
|
1687
|
+
return { update: load };
|
|
1688
|
+
}
|
|
1689
|
+
})];
|
|
1690
|
+
}
|
|
1691
|
+
});
|
|
1692
|
+
// ../../node_modules/.pnpm/comark-ui@0.12.2_@comark+html@0.9.2_katex@0.19.1_shiki@4.6.0__@tiptap+core@3.35.0_@tipt_cf2f734d482ac6e082eda4effd9c073f/node_modules/comark-ui/dist/editor-vue.mjs
|
|
1644
1693
|
function readProp(props, name, type) {
|
|
1645
1694
|
if (Object.hasOwn(props, name)) {
|
|
1646
1695
|
const value = props[name];
|
|
@@ -2006,6 +2055,158 @@ const componentViewCss = `@layer comark{${[
|
|
|
2006
2055
|
`.cev-empty{margin:0;color:var(--_comark-muted)}`,
|
|
2007
2056
|
`.cev-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}`
|
|
2008
2057
|
].join("")}}`;
|
|
2058
|
+
const codeLanguagesCss = `@layer comark{${[
|
|
2059
|
+
theme(".cel-layer", "primary"),
|
|
2060
|
+
`.cel-layer{position:absolute;inset:0;z-index:1;pointer-events:none}`,
|
|
2061
|
+
`.cel-block{position:absolute;pointer-events:auto}`,
|
|
2062
|
+
`.cel-select{max-width:12rem;padding:.125rem .375rem;border:0;border-radius:calc(var(--_comark-radius)*.6);background:transparent;color:var(--_comark-muted);font:500 .75rem/1.4 var(--_comark-font);cursor:pointer}`,
|
|
2063
|
+
`.cel-select:hover{color:var(--_comark-foreground)}`,
|
|
2064
|
+
`.cel-select:focus-visible{outline:2px solid var(--_comark-ring);outline-offset:1px}`,
|
|
2065
|
+
`.cel-select:disabled{cursor:default}`
|
|
2066
|
+
].join("")}}`;
|
|
2067
|
+
const firstWord = (info) => info.trim().split(/\s/, 1)[0]?.toLowerCase() || void 0;
|
|
2068
|
+
defineComponent({
|
|
2069
|
+
name: "CodeLanguageSelect",
|
|
2070
|
+
props: {
|
|
2071
|
+
editor: {
|
|
2072
|
+
type: Object,
|
|
2073
|
+
required: true
|
|
2074
|
+
},
|
|
2075
|
+
/** The languages it offers, by name, with the label each shows. */
|
|
2076
|
+
languages: {
|
|
2077
|
+
type: Object,
|
|
2078
|
+
required: true
|
|
2079
|
+
},
|
|
2080
|
+
/** The name in `languages` a block's language stands for, such as an alias's. Its first word by default. */
|
|
2081
|
+
language: {
|
|
2082
|
+
type: Function,
|
|
2083
|
+
default: void 0
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
slots: Object,
|
|
2087
|
+
setup(props, { slots }) {
|
|
2088
|
+
const blocks = shallowRef([]);
|
|
2089
|
+
const layer = shallowRef();
|
|
2090
|
+
const targets = /* @__PURE__ */ new Map();
|
|
2091
|
+
const pluginKey = new PluginKey("codeLanguageTargets");
|
|
2092
|
+
let lastId = 0;
|
|
2093
|
+
const nameOf = (info) => {
|
|
2094
|
+
if (props.language) return props.language(info);
|
|
2095
|
+
const word = firstWord(info);
|
|
2096
|
+
return word && Object.hasOwn(props.languages, word) ? word : void 0;
|
|
2097
|
+
};
|
|
2098
|
+
function measure() {
|
|
2099
|
+
const box = layer.value?.getBoundingClientRect();
|
|
2100
|
+
if (!box) return;
|
|
2101
|
+
const { view } = props.editor;
|
|
2102
|
+
const next = [];
|
|
2103
|
+
props.editor.state.doc.descendants((node, pos) => {
|
|
2104
|
+
if (node.type.name !== "codeBlock") return;
|
|
2105
|
+
const element = view.nodeDOM(pos);
|
|
2106
|
+
if (element instanceof HTMLElement) {
|
|
2107
|
+
const rect = element.getBoundingClientRect();
|
|
2108
|
+
const info = String(node.attrs.language ?? "");
|
|
2109
|
+
next.push({
|
|
2110
|
+
id: [...targets].find(([, target]) => target.valid && target.pos === pos)?.[0] ?? ++lastId,
|
|
2111
|
+
target: {
|
|
2112
|
+
pos,
|
|
2113
|
+
valid: true
|
|
2114
|
+
},
|
|
2115
|
+
top: rect.top - box.top,
|
|
2116
|
+
right: box.right - rect.right,
|
|
2117
|
+
language: nameOf(info),
|
|
2118
|
+
written: info.trim().split(/\s/, 1)[0] || void 0
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2121
|
+
return false;
|
|
2122
|
+
});
|
|
2123
|
+
for (const block of next) {
|
|
2124
|
+
const existing = targets.get(block.id);
|
|
2125
|
+
if (existing) block.target = existing;
|
|
2126
|
+
else targets.set(block.id, block.target);
|
|
2127
|
+
}
|
|
2128
|
+
blocks.value = next;
|
|
2129
|
+
}
|
|
2130
|
+
function choose(block, language) {
|
|
2131
|
+
if (!props.editor.isEditable || !block.target.valid) return;
|
|
2132
|
+
const { view } = props.editor;
|
|
2133
|
+
const { pos } = block.target;
|
|
2134
|
+
if (view.state.doc.nodeAt(pos)?.type.name !== "codeBlock") return;
|
|
2135
|
+
props.editor.chain().command(({ tr }) => {
|
|
2136
|
+
tr.setNodeAttribute(pos, "language", language);
|
|
2137
|
+
return true;
|
|
2138
|
+
}).run();
|
|
2139
|
+
}
|
|
2140
|
+
let resize;
|
|
2141
|
+
onMounted(() => {
|
|
2142
|
+
addStyles("editor-languages", codeLanguagesCss);
|
|
2143
|
+
measure();
|
|
2144
|
+
props.editor.registerPlugin(new Plugin$1({
|
|
2145
|
+
key: pluginKey,
|
|
2146
|
+
state: {
|
|
2147
|
+
init: () => null,
|
|
2148
|
+
apply(tr) {
|
|
2149
|
+
for (const [id, target] of targets) {
|
|
2150
|
+
const mapped = tr.mapping.mapResult(target.pos, 1);
|
|
2151
|
+
target.pos = mapped.pos;
|
|
2152
|
+
if (mapped.deleted || tr.doc.nodeAt(target.pos)?.type.name !== "codeBlock") {
|
|
2153
|
+
target.valid = false;
|
|
2154
|
+
targets.delete(id);
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
return null;
|
|
2158
|
+
}
|
|
2159
|
+
},
|
|
2160
|
+
view: () => ({ update: measure })
|
|
2161
|
+
}));
|
|
2162
|
+
if ("ResizeObserver" in globalThis) {
|
|
2163
|
+
resize = new ResizeObserver(() => measure());
|
|
2164
|
+
resize.observe(props.editor.view.dom);
|
|
2165
|
+
}
|
|
2166
|
+
});
|
|
2167
|
+
onBeforeUnmount(() => {
|
|
2168
|
+
props.editor.unregisterPlugin(pluginKey);
|
|
2169
|
+
resize?.disconnect();
|
|
2170
|
+
});
|
|
2171
|
+
const options = () => Object.entries(props.languages).toSorted(([, a], [, b]) => a.localeCompare(b)).map(([value, label]) => h("option", { value }, label));
|
|
2172
|
+
const select = (block, editable) => h("select", {
|
|
2173
|
+
class: "cel-select",
|
|
2174
|
+
"aria-label": "Code language",
|
|
2175
|
+
disabled: !editable,
|
|
2176
|
+
value: block.language ?? block.written ?? "",
|
|
2177
|
+
onChange: (event) => {
|
|
2178
|
+
const { value } = event.target;
|
|
2179
|
+
choose(block, value || null);
|
|
2180
|
+
}
|
|
2181
|
+
}, [
|
|
2182
|
+
h("option", { value: "" }, "Plain text"),
|
|
2183
|
+
block.written && !block.language ? h("option", {
|
|
2184
|
+
value: block.written,
|
|
2185
|
+
disabled: true
|
|
2186
|
+
}, block.written) : null,
|
|
2187
|
+
...options()
|
|
2188
|
+
]);
|
|
2189
|
+
return () => {
|
|
2190
|
+
const editable = props.editor.isEditable;
|
|
2191
|
+
return h("div", {
|
|
2192
|
+
ref: layer,
|
|
2193
|
+
class: "cel-layer"
|
|
2194
|
+
}, blocks.value.map((block) => h("div", {
|
|
2195
|
+
key: block.id,
|
|
2196
|
+
class: "cel-block",
|
|
2197
|
+
style: {
|
|
2198
|
+
top: `${block.top + 4}px`,
|
|
2199
|
+
right: `${block.right + 4}px`
|
|
2200
|
+
}
|
|
2201
|
+
}, slots.select ? slots.select({
|
|
2202
|
+
language: block.language,
|
|
2203
|
+
written: block.written,
|
|
2204
|
+
editable,
|
|
2205
|
+
choose: (language) => choose(block, language)
|
|
2206
|
+
}) : select(block, editable))));
|
|
2207
|
+
};
|
|
2208
|
+
}
|
|
2209
|
+
});
|
|
2009
2210
|
/**
|
|
2010
2211
|
* A Tiptap editor bound to a Markdown string: an edit writes the Markdown back, and a change from outside reloads the
|
|
2011
2212
|
* editor. A document the editor can't save unchanged (see `checkMarkdown`) opens read-only, with `editable` false.
|
|
@@ -2134,8 +2335,7 @@ defineComponent({
|
|
|
2134
2335
|
};
|
|
2135
2336
|
}
|
|
2136
2337
|
});
|
|
2137
|
-
|
|
2138
|
-
//#region src/components/markdown-editor.ts
|
|
2338
|
+
// src/components/markdown-editor.ts
|
|
2139
2339
|
/**
|
|
2140
2340
|
* Uploads to a route that returns the result of `blob.handleUpload()`, with progress, and resolves with the stored
|
|
2141
2341
|
* object's URL. The Blob store has to be served (`blob.serve`), so the object has a URL to link.
|
|
@@ -2390,5 +2590,4 @@ const MarkdownEditor = defineComponent({
|
|
|
2390
2590
|
};
|
|
2391
2591
|
}
|
|
2392
2592
|
});
|
|
2393
|
-
//#endregion
|
|
2394
2593
|
export { blobUpload as n, MarkdownEditor as t };
|