@vite-hub/ui 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -7
- package/dist/{andromeeda-DnSv6o6l.js → andromeeda-BASpqCeJ.js} +1 -1
- package/dist/attachment-B3dXC7jM.js +71 -0
- package/dist/attachment-BBndG9_P.d.ts +88 -0
- package/dist/attachment.d.ts +2 -0
- package/dist/attachment.js +2 -0
- package/dist/{aurora-x-XJ5I8rFc.js → aurora-x-DugsLcii.js} +1 -1
- package/dist/avatar-stack-DM6HRnc0.js +63 -0
- package/dist/avatar-stack-DXmCQhxd.d.ts +59 -0
- package/dist/avatar-stack.d.ts +2 -0
- package/dist/avatar-stack.js +2 -0
- package/dist/{ayu-dark-CBRGL64-.js → ayu-dark-BT3qdi3o.js} +1 -1
- package/dist/{ayu-light-BlrCS3Ih.js → ayu-light-BVZyHoh9.js} +1 -1
- package/dist/{ayu-mirage-CqpTmLcF.js → ayu-mirage-XFwUVZQZ.js} +1 -1
- package/dist/bubble-BJH2rfii.d.ts +72 -0
- package/dist/bubble-BPyFQlW7.js +53 -0
- package/dist/bubble.d.ts +2 -0
- package/dist/bubble.js +2 -0
- package/dist/catppuccin-frappe-D20KODDN.js +4 -0
- package/dist/catppuccin-latte-eGLVHIUJ.js +4 -0
- package/dist/catppuccin-macchiato-bQGch4PY.js +4 -0
- package/dist/catppuccin-mocha-Bes8-0Mr.js +4 -0
- package/dist/chat-B9HlZWA2.d.ts +50 -0
- package/dist/chat-BoFHlu9V.js +73 -0
- package/dist/chat-message-BNK9G7xF.js +51 -0
- package/dist/chat-message-mpDmZbIC.d.ts +28 -0
- package/dist/chat-message.d.ts +2 -0
- package/dist/chat-message.js +2 -0
- package/dist/chat-session-D6C7VJBR.d.ts +29 -0
- package/dist/chat-session-DYEHB1HC.js +38 -0
- package/dist/chat-session.d.ts +2 -0
- package/dist/chat-session.js +2 -0
- package/dist/chat.d.ts +2 -0
- package/dist/chat.js +2 -0
- package/dist/code-block-Br-02hn-.js +139 -0
- package/dist/code-block.d.ts +2 -0
- package/dist/code-block.js +3 -0
- package/dist/code-view-J4OsgEdh.js +158 -0
- package/dist/code-view-vDM-hph-.d.ts +4091 -0
- package/dist/code-view.d.ts +2 -0
- package/dist/code-view.js +2 -0
- package/dist/comment-layer-CBlxJ8eK.js +1113 -0
- package/dist/comments-C08J3z4e.js +456 -0
- package/dist/comments-ChNJkV1d.d.ts +108 -0
- package/dist/comments-Cq5eewsu.d.ts +537 -0
- package/dist/comments.d.ts +2 -0
- package/dist/comments.js +2 -0
- package/dist/{config-BwhBDTjC.d.ts → config-Bux_AJzm.d.ts} +0 -1
- package/dist/{config-CzOjpPth.js → config-bHqE4JOs.js} +2 -7
- package/dist/connection-status-CzuWBENf.js +65 -0
- package/dist/connection-status-DjGBw6xX.d.ts +39 -0
- package/dist/connection-status.d.ts +2 -0
- package/dist/connection-status.js +2 -0
- package/dist/{dark-plus-BCxGtnt0.js → dark-plus-BGuiqa1B.js} +1 -1
- package/dist/{dracula-fPErIccy.js → dracula-0CVA2XY5.js} +1 -1
- package/dist/{dracula-soft-BrQbqXs8.js → dracula-soft-Dk9bpbVU.js} +1 -1
- package/dist/error-diagnostics-B4hMpJRL.js +13 -0
- package/dist/{everforest-dark-gTeBQCos.js → everforest-dark-CRjTbhh5.js} +1 -1
- package/dist/{everforest-light-DUjxsp-2.js → everforest-light-CEeYFLn8.js} +1 -1
- package/dist/file-diff.d.ts +2 -0
- package/dist/file-diff.js +2 -0
- package/dist/file-tree-C1pv4_AI.js +9307 -0
- package/dist/file-tree-Ctb8hZ_g.d.ts +459 -0
- package/dist/file-tree.d.ts +2 -0
- package/dist/file-tree.js +2 -0
- package/dist/file-view.d.ts +2 -0
- package/dist/file-view.js +2 -0
- package/dist/{getSingularPatch-D0VFiyjB.js → getSingularPatch-Dsb8EgxR.js} +191 -116
- package/dist/{github-dark-Dg1hl_QD.js → github-dark-BXgKmOw_.js} +1 -1
- package/dist/{github-dark-default-Dym2P842.js → github-dark-default-DzJQXksd.js} +1 -1
- package/dist/{github-dark-dimmed-7iDMx266.js → github-dark-dimmed-B1pEmGtS.js} +1 -1
- package/dist/{github-dark-high-contrast-DkV2fyPG.js → github-dark-high-contrast-BkHIa6jc.js} +1 -1
- package/dist/{github-light-BQKYgor9.js → github-light-BKRlUbaB.js} +1 -1
- package/dist/{github-light-default-BZhIfzqQ.js → github-light-default-BU3eYkzs.js} +1 -1
- package/dist/{github-light-high-contrast-C7zHfx4C.js → github-light-high-contrast-B3MumDcI.js} +1 -1
- package/dist/{gruvbox-dark-hard-CQiwpF03.js → gruvbox-dark-hard-B0ecF443.js} +1 -1
- package/dist/{gruvbox-dark-medium-BKe6XKBS.js → gruvbox-dark-medium-BQnpC39k.js} +1 -1
- package/dist/{gruvbox-dark-soft-Cz6U6pa4.js → gruvbox-dark-soft-DFZUgESr.js} +1 -1
- package/dist/{gruvbox-light-hard-DgU_i19B.js → gruvbox-light-hard-CuB_LOJr.js} +1 -1
- package/dist/{gruvbox-light-medium-D64I06ER.js → gruvbox-light-medium-idDHgxjs.js} +1 -1
- package/dist/{gruvbox-light-soft-B-YxAs1L.js → gruvbox-light-soft-CfWH49MY.js} +1 -1
- package/dist/headless.d.ts +14 -14
- package/dist/headless.js +3 -333
- package/dist/highlighted-code-Ck4zexJX.js +90 -0
- package/dist/highlighted-code-Dzf6o54i.d.ts +112 -0
- package/dist/{horizon-bright-CPyV7XIA.js → horizon-bright-Ba6M8QSV.js} +1 -1
- package/dist/{horizon-DYoumREk.js → horizon-h92C5OlZ.js} +1 -1
- package/dist/{houston-B3NWfq0V.js → houston-EQnPegWq.js} +1 -1
- package/dist/image-preview-VfknBEFu.js +102 -0
- package/dist/index-DcH0QSI5.d.ts +61 -0
- package/dist/index.d.ts +34 -6378
- package/dist/index.js +27 -12338
- package/dist/kanagawa-dragon-DgDvwi3B.js +4 -0
- package/dist/kanagawa-lotus-BgoQro20.js +4 -0
- package/dist/kanagawa-wave-DgXEowHs.js +4 -0
- package/dist/{laserwave-DkfjiLxA.js → laserwave-IxBH_3yW.js} +1 -1
- package/dist/{light-plus-DuO6rXxZ.js → light-plus-S8JBx6is.js} +1 -1
- package/dist/markdown-BoLBN0qH.js +197 -0
- package/dist/markdown-Dse5ldJe.d.ts +47 -0
- package/dist/markdown.d.ts +2 -0
- package/dist/markdown.js +2 -0
- package/dist/marker-Di2ZG_k1.js +23 -0
- package/dist/marker-ea-tvx-J.d.ts +35 -0
- package/dist/marker.d.ts +2 -0
- package/dist/marker.js +2 -0
- package/dist/{material-theme-C_YrwKEa.js → material-theme-D1f3HBq-.js} +1 -1
- package/dist/{material-theme-darker-DB3YVCla.js → material-theme-darker-ExzYhT0j.js} +1 -1
- package/dist/{material-theme-lighter-D2fgNrBK.js → material-theme-lighter-D6gH9nnA.js} +1 -1
- package/dist/{material-theme-ocean-DVy172Rs.js → material-theme-ocean-D1w5BPAa.js} +1 -1
- package/dist/{material-theme-palenight-uMMwIfpG.js → material-theme-palenight-CkqWmVpF.js} +1 -1
- package/dist/message-CW_paC1k.d.ts +35 -0
- package/dist/message-DiyBthIq.js +23 -0
- package/dist/message-parts-BBFUkluC.d.ts +28 -0
- package/dist/message-parts-DQnfioAH.js +38 -0
- package/dist/message-parts.d.ts +2 -0
- package/dist/message-parts.js +2 -0
- package/dist/message-scroller-CX6NJTdm.js +335 -0
- package/dist/message.d.ts +2 -0
- package/dist/message.js +2 -0
- package/dist/{min-dark-C7Ec8I_2.js → min-dark-npsJH98j.js} +1 -1
- package/dist/{min-light-Be6foA7m.js → min-light-DUk1XsVt.js} +1 -1
- package/dist/monokai-CfFRWUNl.js +4 -0
- package/dist/multi-file-diff.d.ts +2 -0
- package/dist/multi-file-diff.js +2 -0
- package/dist/{night-owl-CqqbiLON.js → night-owl-BS7V-av_.js} +1 -1
- package/dist/{night-owl-light-B9vYgGRt.js → night-owl-light-CZtRawYE.js} +1 -1
- package/dist/{nord-BZ9DVmcN.js → nord-BFh54Nqz.js} +1 -1
- package/dist/nuxt.d.ts +8 -5
- package/dist/nuxt.js +136 -22
- package/dist/one-dark-pro-zDovGosB.js +4 -0
- package/dist/{one-light-CzxBC38_.js → one-light-gmHK3iK6.js} +1 -1
- package/dist/patch-diff.d.ts +2 -0
- package/dist/patch-diff.js +2 -0
- package/dist/{pierre-code-view-DYpF5M8R.js → pierre-code-view-T7V67hwT.js} +7209 -15318
- package/dist/{plastic-BGkJ2das.js → plastic-DtdaCjub.js} +1 -1
- package/dist/{poimandres-CpnMgZuc.js → poimandres-Hdda6aHK.js} +1 -1
- package/dist/primitive-rail.d.ts +222 -0
- package/dist/primitive-rail.js +348 -0
- package/dist/prompt-input-BbnCb80O.js +299 -0
- package/dist/prompt-input-Cy_Ue6B5.d.ts +93 -0
- package/dist/prompt-input.d.ts +2 -0
- package/dist/prompt-input.js +2 -0
- package/dist/red-VqZFRByZ.js +4 -0
- package/dist/rose-pine-DiTkEueR.js +4 -0
- package/dist/rose-pine-dawn-tfo5y2X0.js +4 -0
- package/dist/rose-pine-moon-C0gON9XN.js +4 -0
- package/dist/runtime/nuxt-plugin.js +3 -1
- package/dist/runtime-type-DlCscMfw.js +59 -0
- package/dist/{slack-dark-BS2AOOdo.js → slack-dark-v8P_eXr6.js} +1 -1
- package/dist/{slack-ochin-Nc7Cucwk.js → slack-ochin-D8SyEdKz.js} +1 -1
- package/dist/slot-part-C7Ocxn3b.js +20 -0
- package/dist/{snazzy-light-C2ghKZXY.js → snazzy-light-BtkQkvXb.js} +1 -1
- package/dist/solarized-dark-B8nAdMfM.js +4 -0
- package/dist/solarized-light-B-3F1INj.js +4 -0
- package/dist/styles.css +2134 -2034
- package/dist/sync-status-BpxYdZIJ.js +48 -0
- package/dist/sync-status-refELOZn.d.ts +25 -0
- package/dist/sync-status.d.ts +2 -0
- package/dist/sync-status.js +2 -0
- package/dist/{synthwave-84-CPtGYwOz.js → synthwave-84-DcsXCF_c.js} +1 -1
- package/dist/{tokyo-night-BKYoawWu.js → tokyo-night-Bvpqduda.js} +1 -1
- package/dist/tool-list-BdSr5CT4.js +150 -0
- package/dist/tool-list-E7CA52rz.d.ts +31 -0
- package/dist/tool-list.d.ts +2 -0
- package/dist/tool-list.js +2 -0
- package/dist/trace-V7rM3Pyd.d.ts +62 -0
- package/dist/trace-llBCDiSW.js +70 -0
- package/dist/trace-run-BIQ17CED.js +98 -0
- package/dist/trace-run-COeXn46Z.d.ts +28 -0
- package/dist/trace-run.d.ts +2 -0
- package/dist/trace-run.js +2 -0
- package/dist/trace.d.ts +2 -0
- package/dist/trace.js +2 -0
- package/dist/types-CqDwuJAm.d.ts +33 -0
- package/dist/unresolved-file.d.ts +2 -0
- package/dist/unresolved-file.js +2 -0
- package/dist/{vesper-ClvmKzqD.js → vesper-CfxmMOy3.js} +1 -1
- package/dist/vite.d.ts +3 -5
- package/dist/{vitesse-black-BY6Qtyq-.js → vitesse-black-D9-_1mjV.js} +1 -1
- package/dist/{vitesse-dark-BT-v_EgR.js → vitesse-dark-DlSMLlr9.js} +1 -1
- package/dist/{vitesse-light-Box8ZFz6.js → vitesse-light-KRWWWztf.js} +1 -1
- package/package.json +176 -26
- package/dist/abap-LtYK6g-v.js +0 -3
- package/dist/actionscript-3-Czo0lKSf.js +0 -3
- package/dist/ada-twHwrVWN.js +0 -3
- package/dist/angular-html-Ct-40ew8.js +0 -33
- package/dist/angular-ts-D6akBVit.js +0 -27
- package/dist/apache-BIl2qPOf.js +0 -3
- package/dist/apex-BkQQFAhi.js +0 -3
- package/dist/apl-Cxjn4xYu.js +0 -17
- package/dist/applescript-CJ80B5XJ.js +0 -3
- package/dist/ara-IxnQjO6j.js +0 -3
- package/dist/asciidoc-Dsw6zvwf.js +0 -3
- package/dist/asm-wBDSgBbA.js +0 -3
- package/dist/astro-BPVTb8uX.js +0 -19
- package/dist/awk-D6dA05Ye.js +0 -3
- package/dist/ballerina-DIdXD2KH.js +0 -3
- package/dist/bat-hQslfzu-.js +0 -3
- package/dist/beancount-CXtOQ8oS.js +0 -3
- package/dist/berry-CgA2ea0_.js +0 -3
- package/dist/bibtex-BzgdqG3s.js +0 -3
- package/dist/bicep-CZ338dSk.js +0 -3
- package/dist/bird2-GLyzhwkD.js +0 -3
- package/dist/blade-0LMawyyw.js +0 -21
- package/dist/bsl-0NWGiiFE.js +0 -6
- package/dist/c-Dc0_AVM6.js +0 -6
- package/dist/c3-BLXk7BLN.js +0 -3
- package/dist/cadence-B1ELWULD.js +0 -3
- package/dist/cairo-DjG4M3vq.js +0 -6
- package/dist/catppuccin-frappe-COUg_LSX.js +0 -4
- package/dist/catppuccin-latte-r30LFfsa.js +0 -4
- package/dist/catppuccin-macchiato-D-EwZyPh.js +0 -4
- package/dist/catppuccin-mocha-C6RD5yh3.js +0 -4
- package/dist/clarity-2iIoRiLx.js +0 -3
- package/dist/clojure-DDsQ0FaV.js +0 -3
- package/dist/cmake-DPsCB_V6.js +0 -3
- package/dist/cobol-CocL1RYn.js +0 -11
- package/dist/codeowners-CxEKPWu0.js +0 -3
- package/dist/codeql-BwdvwJnv.js +0 -3
- package/dist/coffee-DtqnQNu5.js +0 -6
- package/dist/common-lisp-DJtwvW4V.js +0 -3
- package/dist/coq-Ds6Ye5el.js +0 -3
- package/dist/cpp-Mb4ikSI3.js +0 -25
- package/dist/crystal-D4OMbAh_.js +0 -19
- package/dist/csharp-CFKaLbHg.js +0 -3
- package/dist/css-DTzmO9U0.js +0 -6
- package/dist/csv-DqIVFkK7.js +0 -3
- package/dist/cue-B5KneM5p.js +0 -3
- package/dist/cypher-D8Bb8Cq2.js +0 -3
- package/dist/d-BQY8TDgQ.js +0 -3
- package/dist/dart-C6DUdjib.js +0 -3
- package/dist/dax-S-Noo-ku.js +0 -3
- package/dist/desktop-BgOb7Aj4.js +0 -3
- package/dist/diff-Blb4MjsC.js +0 -3
- package/dist/docker-PC1tuYpa.js +0 -3
- package/dist/dotenv-Dkdv7Sm2.js +0 -3
- package/dist/dream-maker-CngiPd8U.js +0 -3
- package/dist/edge-DrFNu-N9.js +0 -13
- package/dist/elixir-OpZyQ8Ht.js +0 -6
- package/dist/elm-CjX_545P.js +0 -6
- package/dist/emacs-lisp-DxhFFVu_.js +0 -3
- package/dist/erb-trZRdc47.js +0 -11
- package/dist/erlang-BJeTH9QH.js +0 -6
- package/dist/fennel-B3wtZRne.js +0 -3
- package/dist/fish-D7qAeWQz.js +0 -3
- package/dist/fluent-BjfpB34g.js +0 -3
- package/dist/fortran-fixed-form-B_eBTsj9.js +0 -6
- package/dist/fortran-free-form-yxJ7igsv.js +0 -3
- package/dist/fsharp-UvrT6oWG.js +0 -6
- package/dist/gdresource-Dl9wvKCd.js +0 -11
- package/dist/gdscript-jjgTGGzd.js +0 -3
- package/dist/gdshader-D7JfdFV3.js +0 -3
- package/dist/genie-DnK2KWIP.js +0 -3
- package/dist/gherkin-D6Lr12YQ.js +0 -3
- package/dist/git-commit-2LMniMoO.js +0 -6
- package/dist/git-rebase-DUOURRPN.js +0 -6
- package/dist/gleam-CTllUdfC.js +0 -3
- package/dist/glimmer-js-D_32hFh8.js +0 -15
- package/dist/glimmer-ts-CVt002zd.js +0 -15
- package/dist/glsl-pHhzolba.js +0 -8
- package/dist/gn-DDjbVPF4.js +0 -3
- package/dist/gnuplot-DgWvVXI8.js +0 -3
- package/dist/go-aXtTCanQ.js +0 -3
- package/dist/graphql-BjqekQIR.js +0 -17
- package/dist/groovy-Bw2Ku4bU.js +0 -3
- package/dist/hack-BITNGzgt.js +0 -11
- package/dist/haml-DVwRP8W9.js +0 -13
- package/dist/handlebars-T3TJj8Il.js +0 -15
- package/dist/haskell-CfGsE1Cf.js +0 -3
- package/dist/haxe-B0odltAZ.js +0 -3
- package/dist/hcl-DHg_Osgo.js +0 -3
- package/dist/hjson-Cuaphql8.js +0 -3
- package/dist/hlsl-BJLUNfne.js +0 -3
- package/dist/html-CamevgpM.js +0 -13
- package/dist/html-derivative-jMOJf6rB.js +0 -6
- package/dist/http-BEHztmFP.js +0 -15
- package/dist/hurl-LmFBxrwm.js +0 -13
- package/dist/hxml-BQ4V4Tez.js +0 -6
- package/dist/hy-CJKxDzbh.js +0 -3
- package/dist/imba-96qKoJCa.js +0 -3
- package/dist/ini-C24lZfdM.js +0 -3
- package/dist/java-Cfowl-Ex.js +0 -6
- package/dist/javascript-C4sF7sej.js +0 -6
- package/dist/jinja-CCAEwzP4.js +0 -10
- package/dist/jison-BKCoBkyT.js +0 -6
- package/dist/json-E4f3l6hr.js +0 -6
- package/dist/json5-xULSgPQI.js +0 -3
- package/dist/jsonc-Cu6rqcrJ.js +0 -3
- package/dist/jsonl-Bp0qqr10.js +0 -3
- package/dist/jsonnet-BafgE6cE.js +0 -3
- package/dist/jssm-Dx5A5sBR.js +0 -3
- package/dist/jsx-BZjOirBP.js +0 -6
- package/dist/julia-nEdJo0dp.js +0 -17
- package/dist/just-Brtw3q7S.js +0 -19
- package/dist/kanagawa-dragon-DExkuQAs.js +0 -4
- package/dist/kanagawa-lotus-qdYh7_RY.js +0 -4
- package/dist/kanagawa-wave-CSW_hADG.js +0 -4
- package/dist/kdl-DkTyxPcj.js +0 -3
- package/dist/kotlin-BHE8CoV9.js +0 -3
- package/dist/kusto-6FdaWTzR.js +0 -3
- package/dist/latex-QHQNiZDD.js +0 -6
- package/dist/lean-BwOKScIt.js +0 -3
- package/dist/less-BzbdhFUi.js +0 -3
- package/dist/liquid-DYQ7uW5u.js +0 -15
- package/dist/llvm-uY68ROGz.js +0 -3
- package/dist/log-Dad54gsi.js +0 -3
- package/dist/logo-DTXV8SKw.js +0 -3
- package/dist/lua-BhkUWs1q.js +0 -8
- package/dist/luau-YC4aaMmR.js +0 -3
- package/dist/make-B2ukzWs3.js +0 -3
- package/dist/markdown-CkmxmzqY.js +0 -3
- package/dist/marko-BHWvxp04.js +0 -15
- package/dist/matlab-CfRK6IMC.js +0 -3
- package/dist/mdc-Dg7VPYLa.js +0 -13
- package/dist/mdx-BK9ZufRc.js +0 -3
- package/dist/mermaid-r7OoIYpE.js +0 -3
- package/dist/mipsasm-EL46Y4Xg.js +0 -3
- package/dist/mojo-YCzvCoMT.js +0 -3
- package/dist/monokai-CREPpJ3k.js +0 -4
- package/dist/moonbit-B_9L5rST.js +0 -3
- package/dist/move-Dqi5fhOb.js +0 -3
- package/dist/narrat-D9rrR0H5.js +0 -3
- package/dist/nextflow-CgUAk9iA.js +0 -6
- package/dist/nextflow-groovy-CdFFX-gF.js +0 -3
- package/dist/nginx-Q-E8IJvs.js +0 -6
- package/dist/nim-CNcTuF14.js +0 -21
- package/dist/nix-Bm1Ax-Z3.js +0 -7
- package/dist/nushell-r7hBzeS_.js +0 -3
- package/dist/objective-c-6dJF64Dt.js +0 -3
- package/dist/objective-cpp-_ooRQ-PY.js +0 -3
- package/dist/ocaml-vm1Y8An6.js +0 -3
- package/dist/odin-vjOJSyfV.js +0 -3
- package/dist/one-dark-pro-Ev8UPkf4.js +0 -4
- package/dist/openscad-jn-f1Ocl.js +0 -3
- package/dist/pascal-D8-gNZ2I.js +0 -3
- package/dist/perl-Bbgb6Twx.js +0 -17
- package/dist/php-CBOR45_G.js +0 -19
- package/dist/pkl-C7lWzykI.js +0 -3
- package/dist/plsql-DCNXypXO.js +0 -3
- package/dist/po-IjpR1yHO.js +0 -3
- package/dist/polar-4pN1JrJ8.js +0 -3
- package/dist/postcss-D1gKt4z_.js +0 -3
- package/dist/powerquery-SrvS_NBM.js +0 -3
- package/dist/powershell-CpTLv_ai.js +0 -3
- package/dist/prisma-BWfa4-tI.js +0 -3
- package/dist/prolog-Bacii3Ue.js +0 -3
- package/dist/proto-ClkOcAW0.js +0 -3
- package/dist/pug-Cn_U_o_I.js +0 -13
- package/dist/puppet-CQlPp728.js +0 -3
- package/dist/purescript-CLpaGMbw.js +0 -3
- package/dist/python-BjnOIxPe.js +0 -3
- package/dist/qml-DNlrbxJT.js +0 -6
- package/dist/qmldir-Dz8ttxjf.js +0 -3
- package/dist/qss-Iltvkn1C.js +0 -3
- package/dist/r-VqTZMNY_.js +0 -6
- package/dist/racket-DRv7j6nv.js +0 -3
- package/dist/raku-DI9yGpeW.js +0 -3
- package/dist/razor-Bw2un3e8.js +0 -11
- package/dist/red-EHiRGXSv.js +0 -4
- package/dist/reg-DpJf71oO.js +0 -3
- package/dist/regexp-5HbFqwky.js +0 -6
- package/dist/rel-BT0iIKKw.js +0 -3
- package/dist/riscv-CvzikGLb.js +0 -3
- package/dist/ron-DzAo6FTJ.js +0 -3
- package/dist/rose-pine-DTI-z1Qp.js +0 -4
- package/dist/rose-pine-dawn-BIiGXpWs.js +0 -4
- package/dist/rose-pine-moon-DU4wt90U.js +0 -4
- package/dist/rosmsg-CyYq6XdT.js +0 -3
- package/dist/rst-BZPDb03W.js +0 -23
- package/dist/ruby-BbVp0_gQ.js +0 -31
- package/dist/rust-COBzcmTx.js +0 -3
- package/dist/sas-DSkdG4wF.js +0 -6
- package/dist/sass-DI2zJwx7.js +0 -3
- package/dist/scala-CtSYTRYT.js +0 -3
- package/dist/scheme-D3A2QBtM.js +0 -3
- package/dist/scss-BQ7uffpQ.js +0 -8
- package/dist/sdbl-CdQg5gu1.js +0 -3
- package/dist/shaderlab-CWP9wBCf.js +0 -6
- package/dist/shellscript-B42c0JAn.js +0 -6
- package/dist/shellsession-Oc9-NqAv.js +0 -6
- package/dist/smalltalk-BEQkVl4K.js +0 -3
- package/dist/solarized-dark-UHgjRWhr.js +0 -4
- package/dist/solarized-light-B-Zcwve2.js +0 -4
- package/dist/solidity-lB9VjfB9.js +0 -3
- package/dist/soy-tgh9u9aW.js +0 -6
- package/dist/sparql-B4t0ZbEe.js +0 -6
- package/dist/splunk-xP_ZjUH2.js +0 -3
- package/dist/sql-CrPlEQn4.js +0 -6
- package/dist/ssh-config-DXFPABYp.js +0 -3
- package/dist/stata-D_KqT8cj.js +0 -6
- package/dist/stylus-ZZDn1yUO.js +0 -3
- package/dist/surrealql-C0KhgoyZ.js +0 -6
- package/dist/svelte-DuHT0xxw.js +0 -15
- package/dist/swift-BTPQlRLK.js +0 -3
- package/dist/system-verilog-BEoxaBuU.js +0 -3
- package/dist/systemd-DFbUltlW.js +0 -3
- package/dist/talonscript-CLxaFu-b.js +0 -3
- package/dist/tasl-_AAbKiWM.js +0 -3
- package/dist/tcl-DLe0Tsfm.js +0 -3
- package/dist/templ-DF54artD.js +0 -13
- package/dist/terraform-v0KN9QQh.js +0 -3
- package/dist/tex-Bbhb8xAP.js +0 -6
- package/dist/toml-B7BHZIqX.js +0 -3
- package/dist/ts-tags-DH1AB-Ri.js +0 -59
- package/dist/tsv-BorGVq2Z.js +0 -3
- package/dist/tsx-BR8s1Lhs.js +0 -6
- package/dist/turtle-BEG5g_eT.js +0 -3
- package/dist/twig-DziFF7iU.js +0 -19
- package/dist/typescript-D8TR6ff2.js +0 -6
- package/dist/typespec-C_R5TbvO.js +0 -3
- package/dist/typst-BV9w0z8-.js +0 -3
- package/dist/v-DfbeXLo8.js +0 -3
- package/dist/vala-BnnASFsX.js +0 -3
- package/dist/vb-DU29mvss.js +0 -3
- package/dist/verilog-BW5U03XW.js +0 -3
- package/dist/vhdl-Co2XFKY7.js +0 -3
- package/dist/viml-BReTXeDA.js +0 -3
- package/dist/vue-BRy8iDCZ.js +0 -31
- package/dist/vue-html-B24bjO_3.js +0 -6
- package/dist/vue-vine-l7O7Mg81.js +0 -19
- package/dist/vyper-C6KGx0YU.js +0 -3
- package/dist/wasm-BRCjOXGL.js +0 -7
- package/dist/wasm-gNIKwGlD.js +0 -3
- package/dist/wenyan-BeysbCrW.js +0 -3
- package/dist/wgsl-1s5rV5xS.js +0 -3
- package/dist/wikitext-wjhjmmzD.js +0 -3
- package/dist/wit-CeQiCbz_.js +0 -3
- package/dist/wolfram-CcZPfnLd.js +0 -3
- package/dist/xml-CduVPlYa.js +0 -8
- package/dist/xsl-BeH_vLTK.js +0 -6
- package/dist/yaml-Cb0uRU1q.js +0 -6
- package/dist/zenscript-BoijL7rl.js +0 -3
- package/dist/zig-lTQvxhLD.js +0 -3
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { t as hasRuntimeType } from "./runtime-type-DlCscMfw.js";
|
|
2
|
+
import { computed, defineComponent, getCurrentInstance, h, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
3
|
+
//#region src/components/primitive-icon.ts
|
|
4
|
+
const rect = (x, y, width, height, rx = 1.5) => ["rect", {
|
|
5
|
+
x,
|
|
6
|
+
y,
|
|
7
|
+
width,
|
|
8
|
+
height,
|
|
9
|
+
rx
|
|
10
|
+
}];
|
|
11
|
+
const path = (d) => ["path", { d }];
|
|
12
|
+
/** Square 24px icons, one for each Server Primitive and docs area. Strokes use currentColor. */
|
|
13
|
+
const primitiveIcons = {
|
|
14
|
+
agent: {
|
|
15
|
+
base: [
|
|
16
|
+
rect(4.5, 9, 15, 11, 3),
|
|
17
|
+
path("M12 6v3"),
|
|
18
|
+
["circle", {
|
|
19
|
+
cx: 12,
|
|
20
|
+
cy: 5,
|
|
21
|
+
r: 1
|
|
22
|
+
}]
|
|
23
|
+
],
|
|
24
|
+
motion: [path("M9.5 13.5v2M14.5 13.5v2")]
|
|
25
|
+
},
|
|
26
|
+
auth: {
|
|
27
|
+
base: [rect(5, 10.5, 14, 10, 2), path("M12 14.5v2")],
|
|
28
|
+
motion: [path("M8 10.5v-3a4 4 0 0 1 8 0v3")]
|
|
29
|
+
},
|
|
30
|
+
blob: {
|
|
31
|
+
base: [path("M5 9.5A1.5 1.5 0 0 1 6.5 8H12l4 4v7.5a1.5 1.5 0 0 1-1.5 1.5h-8A1.5 1.5 0 0 1 5 19.5z"), path("M12 8v4h4")],
|
|
32
|
+
motion: [path("M9 5V4.5A1.5 1.5 0 0 1 10.5 3H16l4 4v8.5a1.5 1.5 0 0 1-1.5 1.5H18")]
|
|
33
|
+
},
|
|
34
|
+
browser: {
|
|
35
|
+
base: [rect(3, 4, 18, 16, 2), path("M3 8.5h18M6 6.25h.01M8.5 6.25h.01")],
|
|
36
|
+
motion: [path("m11 12 5.5 2-2.25 1-1 2.25z")]
|
|
37
|
+
},
|
|
38
|
+
channel: {
|
|
39
|
+
base: [path("M5.5 4h13A1.5 1.5 0 0 1 20 5.5v9a1.5 1.5 0 0 1-1.5 1.5H11l-4.5 4v-4h-1A1.5 1.5 0 0 1 4 14.5v-9A1.5 1.5 0 0 1 5.5 4z")],
|
|
40
|
+
motion: [path("M8 8.5h8M8 12h5")]
|
|
41
|
+
},
|
|
42
|
+
connection: {
|
|
43
|
+
base: [path("M12 16v5")],
|
|
44
|
+
motion: [path("M9 3v4M15 3v4M6.5 7h11v3.5a5.5 5.5 0 0 1-11 0z")]
|
|
45
|
+
},
|
|
46
|
+
content: {
|
|
47
|
+
base: [rect(5, 3, 14, 18, 2), path("M8.5 7.5h7")],
|
|
48
|
+
motion: [path("M8.5 11.5h7M8.5 15.5h4.5")]
|
|
49
|
+
},
|
|
50
|
+
database: {
|
|
51
|
+
base: [path("M5 6v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6"), path("M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5")],
|
|
52
|
+
motion: [path("M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6z")]
|
|
53
|
+
},
|
|
54
|
+
development: {
|
|
55
|
+
base: [path("m8.5 7-5 5 5 5M15.5 7l5 5-5 5")],
|
|
56
|
+
motion: [path("m13.5 5-3 14")]
|
|
57
|
+
},
|
|
58
|
+
email: {
|
|
59
|
+
base: [rect(3, 5.5, 18, 13, 2)],
|
|
60
|
+
motion: [path("m3.5 7.5 8.5 6 8.5-6")]
|
|
61
|
+
},
|
|
62
|
+
env: {
|
|
63
|
+
base: [],
|
|
64
|
+
motion: [["circle", {
|
|
65
|
+
cx: 8,
|
|
66
|
+
cy: 16,
|
|
67
|
+
r: 4
|
|
68
|
+
}], path("M10.8 13.2 20 4M17 7l2.5 2.5M14.5 9.5l2 2")]
|
|
69
|
+
},
|
|
70
|
+
hosts: {
|
|
71
|
+
base: [path("m3.5 12.5 8.5 4.5 8.5-4.5M3.5 16.5l8.5 4.5 8.5-4.5")],
|
|
72
|
+
motion: [path("m12 3.5 8.5 4.5-8.5 4.5L3.5 8z")]
|
|
73
|
+
},
|
|
74
|
+
kv: {
|
|
75
|
+
base: [rect(3, 5, 18, 14, 2), path("M9 5v14M3 12h18")],
|
|
76
|
+
motion: [path("M12.5 8.5h5M12.5 15.5h3.5")]
|
|
77
|
+
},
|
|
78
|
+
queue: {
|
|
79
|
+
base: [path("M16.5 12H21m-2-2.5 2 2.5-2 2.5")],
|
|
80
|
+
motion: [rect(3, 9.5, 5, 5, 1), rect(9.5, 9.5, 5, 5, 1)]
|
|
81
|
+
},
|
|
82
|
+
"rate-limit": {
|
|
83
|
+
base: [path("M3.5 15a8.5 8.5 0 0 1 17 0M6 19h12"), ["circle", {
|
|
84
|
+
cx: 12,
|
|
85
|
+
cy: 15,
|
|
86
|
+
r: 1
|
|
87
|
+
}]],
|
|
88
|
+
motion: [path("m12 15 3.5-4.5")]
|
|
89
|
+
},
|
|
90
|
+
realtime: {
|
|
91
|
+
base: [["circle", {
|
|
92
|
+
cx: 12,
|
|
93
|
+
cy: 12,
|
|
94
|
+
r: 1.5
|
|
95
|
+
}], path("M8.5 8.5a5 5 0 0 0 0 7M15.5 8.5a5 5 0 0 1 0 7")],
|
|
96
|
+
motion: [path("M5.5 5.5a9.2 9.2 0 0 0 0 13M18.5 5.5a9.2 9.2 0 0 1 0 13")]
|
|
97
|
+
},
|
|
98
|
+
reference: {
|
|
99
|
+
base: [path("M12 6.5c-1.5-1.5-4-2-8-2v13c4 0 6.5.5 8 2")],
|
|
100
|
+
motion: [path("M12 6.5c1.5-1.5 4-2 8-2v13c-4 0-6.5.5-8 2V6.5")]
|
|
101
|
+
},
|
|
102
|
+
sandbox: {
|
|
103
|
+
base: [path("M3 8V4.5A1.5 1.5 0 0 1 4.5 3H8M16 3h3.5A1.5 1.5 0 0 1 21 4.5V8M21 16v3.5a1.5 1.5 0 0 1-1.5 1.5H16M8 21H4.5A1.5 1.5 0 0 1 3 19.5V16")],
|
|
104
|
+
motion: [rect(8.5, 8.5, 7, 7, 1)]
|
|
105
|
+
},
|
|
106
|
+
schedule: {
|
|
107
|
+
base: [rect(3.5, 5, 17, 15.5, 2), path("M3.5 10h17M8 3v4M16 3v4")],
|
|
108
|
+
motion: [rect(7, 13, 3, 3, .5)]
|
|
109
|
+
},
|
|
110
|
+
shell: {
|
|
111
|
+
base: [rect(3, 4, 18, 16, 2), path("m7 9.5 3 2.5-3 2.5")],
|
|
112
|
+
motion: [path("M12.5 15h4")]
|
|
113
|
+
},
|
|
114
|
+
source: {
|
|
115
|
+
base: [path("M4 14v4.5A1.5 1.5 0 0 0 5.5 20h13a1.5 1.5 0 0 0 1.5-1.5V14")],
|
|
116
|
+
motion: [path("M12 3v10M8 9.5l4 4 4-4")]
|
|
117
|
+
},
|
|
118
|
+
start: {
|
|
119
|
+
base: [path("M6 21V3.5")],
|
|
120
|
+
motion: [path("M6 4h11l-2.5 4 2.5 4H6")]
|
|
121
|
+
},
|
|
122
|
+
ui: {
|
|
123
|
+
base: [
|
|
124
|
+
rect(3.5, 3.5, 7, 7),
|
|
125
|
+
rect(13.5, 3.5, 7, 7),
|
|
126
|
+
rect(3.5, 13.5, 7, 7)
|
|
127
|
+
],
|
|
128
|
+
motion: [rect(13.5, 13.5, 7, 7)]
|
|
129
|
+
},
|
|
130
|
+
usage: {
|
|
131
|
+
base: [path("M4 19h16")],
|
|
132
|
+
motion: [
|
|
133
|
+
rect(6, 10, 3, 6, .5),
|
|
134
|
+
rect(10.5, 5, 3, 11, .5),
|
|
135
|
+
rect(15, 8, 3, 8, .5)
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
workflow: {
|
|
139
|
+
base: [
|
|
140
|
+
rect(3, 3, 6, 6),
|
|
141
|
+
rect(3, 15, 6, 6),
|
|
142
|
+
path("M9 6h2.5a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9M12.5 12H15")
|
|
143
|
+
],
|
|
144
|
+
motion: [rect(15, 9, 6, 6)]
|
|
145
|
+
},
|
|
146
|
+
workspace: {
|
|
147
|
+
base: [path("M3 7.5A1.5 1.5 0 0 1 4.5 6H9l2 2h8.5A1.5 1.5 0 0 1 21 9.5v9a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 18.5z")],
|
|
148
|
+
motion: [path("M3 11.5h18")]
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
function isPrimitiveIconName(value) {
|
|
152
|
+
return hasRuntimeType(value, "string") && Object.hasOwn(primitiveIcons, value);
|
|
153
|
+
}
|
|
154
|
+
const primitiveIconNames = Object.keys(primitiveIcons).filter(isPrimitiveIconName);
|
|
155
|
+
const shapes = (list) => list.map(([tag, attributes]) => h(tag, attributes));
|
|
156
|
+
const PrimitiveIcon = defineComponent({
|
|
157
|
+
name: "PrimitiveIcon",
|
|
158
|
+
props: { name: {
|
|
159
|
+
required: true,
|
|
160
|
+
type: String
|
|
161
|
+
} },
|
|
162
|
+
setup(props) {
|
|
163
|
+
return () => {
|
|
164
|
+
const icon = primitiveIcons[props.name];
|
|
165
|
+
return h("svg", {
|
|
166
|
+
"aria-hidden": "true",
|
|
167
|
+
class: "vh-primitive-icon",
|
|
168
|
+
"data-icon": props.name,
|
|
169
|
+
fill: "none",
|
|
170
|
+
stroke: "currentColor",
|
|
171
|
+
"stroke-linecap": "round",
|
|
172
|
+
"stroke-linejoin": "round",
|
|
173
|
+
"stroke-width": 1.5,
|
|
174
|
+
viewBox: "0 0 24 24",
|
|
175
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
176
|
+
}, [...shapes(icon.base), h("g", { class: "vh-primitive-icon__motion" }, shapes(icon.motion))]);
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/components/primitive-rail.ts
|
|
182
|
+
const hoverIntentDelay = 140;
|
|
183
|
+
/**
|
|
184
|
+
* The narrow icon rail that ViteHub docs and the Console show at the left edge.
|
|
185
|
+
* It always takes 3.5rem of the layout. On hover or keyboard focus, its surface expands over the next element to show the labels.
|
|
186
|
+
*/
|
|
187
|
+
const PrimitiveRail = defineComponent({
|
|
188
|
+
name: "PrimitiveRail",
|
|
189
|
+
props: {
|
|
190
|
+
/** Accessible name of the navigation landmark. */
|
|
191
|
+
label: {
|
|
192
|
+
required: true,
|
|
193
|
+
type: String
|
|
194
|
+
} },
|
|
195
|
+
slots: Object,
|
|
196
|
+
setup(props, { slots }) {
|
|
197
|
+
const hovered = ref(false);
|
|
198
|
+
const focused = ref(false);
|
|
199
|
+
const dismissed = ref(false);
|
|
200
|
+
const root = ref();
|
|
201
|
+
const expanded = computed(() => (hovered.value || focused.value) && !dismissed.value);
|
|
202
|
+
let intent;
|
|
203
|
+
const cancelIntent = () => {
|
|
204
|
+
clearTimeout(intent);
|
|
205
|
+
intent = void 0;
|
|
206
|
+
};
|
|
207
|
+
const release = () => {
|
|
208
|
+
if (!hovered.value && !focused.value) dismissed.value = false;
|
|
209
|
+
};
|
|
210
|
+
function onPointerenter(event) {
|
|
211
|
+
if (event.pointerType === "touch" || !globalThis.matchMedia?.("(hover: hover) and (pointer: fine)").matches) return;
|
|
212
|
+
cancelIntent();
|
|
213
|
+
intent = setTimeout(() => {
|
|
214
|
+
intent = void 0;
|
|
215
|
+
hovered.value = true;
|
|
216
|
+
}, hoverIntentDelay);
|
|
217
|
+
}
|
|
218
|
+
function onPointerleave() {
|
|
219
|
+
cancelIntent();
|
|
220
|
+
hovered.value = false;
|
|
221
|
+
release();
|
|
222
|
+
}
|
|
223
|
+
function dismissForMenu(event) {
|
|
224
|
+
if (!(event.target instanceof Element) || !root.value?.contains(event.target) || !event.target.closest("[aria-haspopup]")) return;
|
|
225
|
+
cancelIntent();
|
|
226
|
+
dismissed.value = true;
|
|
227
|
+
}
|
|
228
|
+
function onFocusin(event) {
|
|
229
|
+
focused.value = event.target instanceof Element && event.target.matches(":focus-visible");
|
|
230
|
+
}
|
|
231
|
+
function onFocusout(event) {
|
|
232
|
+
const rail = event.currentTarget;
|
|
233
|
+
if (rail instanceof Element && event.relatedTarget instanceof Node && rail.contains(event.relatedTarget)) return;
|
|
234
|
+
focused.value = false;
|
|
235
|
+
release();
|
|
236
|
+
}
|
|
237
|
+
function onKeydown(event) {
|
|
238
|
+
if ([
|
|
239
|
+
"Enter",
|
|
240
|
+
" ",
|
|
241
|
+
"ArrowDown"
|
|
242
|
+
].includes(event.key)) dismissForMenu(event);
|
|
243
|
+
else if (event.key === "Escape" && expanded.value) {
|
|
244
|
+
cancelIntent();
|
|
245
|
+
dismissed.value = true;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
onMounted(() => document.addEventListener("keydown", onKeydown));
|
|
249
|
+
onBeforeUnmount(() => {
|
|
250
|
+
cancelIntent();
|
|
251
|
+
document.removeEventListener("keydown", onKeydown);
|
|
252
|
+
});
|
|
253
|
+
return () => {
|
|
254
|
+
const slotProps = { expanded: expanded.value };
|
|
255
|
+
return h("nav", {
|
|
256
|
+
"aria-label": props.label,
|
|
257
|
+
class: "vh-primitive-rail",
|
|
258
|
+
"data-dismissed": dismissed.value ? "" : void 0,
|
|
259
|
+
"data-expanded": expanded.value ? "" : void 0,
|
|
260
|
+
onFocusin,
|
|
261
|
+
onFocusout,
|
|
262
|
+
onPointerdown: dismissForMenu,
|
|
263
|
+
onPointerenter,
|
|
264
|
+
onPointerleave,
|
|
265
|
+
ref: root
|
|
266
|
+
}, h("div", { class: "vh-primitive-rail__surface" }, [
|
|
267
|
+
slots.header ? h("div", { class: "vh-primitive-rail__header" }, slots.header(slotProps)) : null,
|
|
268
|
+
h("div", { class: "vh-primitive-rail__body" }, slots.default?.(slotProps)),
|
|
269
|
+
slots.footer ? h("div", { class: "vh-primitive-rail__footer" }, slots.footer(slotProps)) : null
|
|
270
|
+
]));
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
/**
|
|
275
|
+
* Scrolls the rail body the least amount that shows the whole item, with no animation.
|
|
276
|
+
* It changes only the rail's own scroll position, never the page scroll.
|
|
277
|
+
*/
|
|
278
|
+
function revealInRail(item) {
|
|
279
|
+
const body = item.closest(".vh-primitive-rail__body");
|
|
280
|
+
if (!body) return;
|
|
281
|
+
const itemBox = item.getBoundingClientRect();
|
|
282
|
+
const bodyBox = body.getBoundingClientRect();
|
|
283
|
+
if (itemBox.top < bodyBox.top) body.scrollTop -= bodyBox.top - itemBox.top;
|
|
284
|
+
else if (itemBox.bottom > bodyBox.bottom) body.scrollTop += itemBox.bottom - bodyBox.bottom;
|
|
285
|
+
}
|
|
286
|
+
/** A group of rail items. A short rule separates consecutive groups. */
|
|
287
|
+
const PrimitiveRailGroup = defineComponent({
|
|
288
|
+
name: "PrimitiveRailGroup",
|
|
289
|
+
setup(_props, { slots }) {
|
|
290
|
+
return () => h("div", { class: "vh-primitive-rail__group" }, slots.default?.());
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
/**
|
|
294
|
+
* One rail target: a square icon that becomes a labeled row when the rail expands. It renders a button by default.
|
|
295
|
+
* Pass a link component in `as` and its props, such as `to`, as attributes.
|
|
296
|
+
* The default slot replaces the primitive icon, for example with a host icon component. The icon is decorative.
|
|
297
|
+
* The `label` slot replaces the visible label, for example to add a badge. `label` stays the accessible name.
|
|
298
|
+
*/
|
|
299
|
+
const PrimitiveRailItem = defineComponent({
|
|
300
|
+
name: "PrimitiveRailItem",
|
|
301
|
+
props: {
|
|
302
|
+
as: {
|
|
303
|
+
default: "button",
|
|
304
|
+
type: [
|
|
305
|
+
String,
|
|
306
|
+
Object,
|
|
307
|
+
Function
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
/** Marks the item as the current page with `aria-current="page"`. */
|
|
311
|
+
current: Boolean,
|
|
312
|
+
icon: {
|
|
313
|
+
required: false,
|
|
314
|
+
type: String
|
|
315
|
+
},
|
|
316
|
+
/** Visible label and accessible name. The label shows when the rail expands. */
|
|
317
|
+
label: {
|
|
318
|
+
required: true,
|
|
319
|
+
type: String
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
setup(props, { slots }) {
|
|
323
|
+
const instance = getCurrentInstance();
|
|
324
|
+
const revealIfCurrent = () => {
|
|
325
|
+
const element = instance?.proxy?.$el;
|
|
326
|
+
if (props.current && hasRuntimeType(globalThis.Element, "function") && element instanceof Element) revealInRail(element);
|
|
327
|
+
};
|
|
328
|
+
onMounted(revealIfCurrent);
|
|
329
|
+
watch(() => props.current, revealIfCurrent, { flush: "post" });
|
|
330
|
+
const content = () => [h("span", {
|
|
331
|
+
"aria-hidden": "true",
|
|
332
|
+
class: "vh-primitive-rail__icon"
|
|
333
|
+
}, slots.default?.() ?? (props.icon ? [h(PrimitiveIcon, { name: props.icon })] : [])), h("span", { class: "vh-primitive-rail__label" }, slots.label?.() ?? props.label)];
|
|
334
|
+
return () => {
|
|
335
|
+
const attributes = {
|
|
336
|
+
"aria-current": props.current ? "page" : void 0,
|
|
337
|
+
"aria-label": props.label,
|
|
338
|
+
class: "vh-primitive-rail__item"
|
|
339
|
+
};
|
|
340
|
+
return hasRuntimeType(props.as, "string") ? h(props.as, {
|
|
341
|
+
...attributes,
|
|
342
|
+
type: props.as === "button" ? "button" : void 0
|
|
343
|
+
}, content()) : h(props.as, attributes, { default: content });
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
//#endregion
|
|
348
|
+
export { PrimitiveIcon, PrimitiveRail, PrimitiveRailGroup, PrimitiveRailItem, isPrimitiveIconName, primitiveIconNames };
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { t as uiErrorDiagnostics } from "./error-diagnostics-B4hMpJRL.js";
|
|
2
|
+
import { t as ImagePreview } from "./image-preview-VfknBEFu.js";
|
|
3
|
+
import { c as AttachmentTitle, i as AttachmentContent, n as AttachmentAction, o as AttachmentGroup, r as AttachmentActions, s as AttachmentMedia, t as Attachment } from "./attachment-B3dXC7jM.js";
|
|
4
|
+
import { computed, defineComponent, h, onBeforeUnmount, onScopeDispose, ref, resolveComponent } from "vue";
|
|
5
|
+
//#region src/composables/attachments.ts
|
|
6
|
+
function matchesAccept(file, accept) {
|
|
7
|
+
if (!accept) return true;
|
|
8
|
+
return accept.split(",").some((entry) => {
|
|
9
|
+
const value = entry.trim();
|
|
10
|
+
if (value.startsWith(".")) return file.name.toLowerCase().endsWith(value.toLowerCase());
|
|
11
|
+
if (value.endsWith("/*")) return file.type.startsWith(value.slice(0, -1));
|
|
12
|
+
return file.type === value;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function fileToDataUrl(file) {
|
|
16
|
+
return new Promise((resolve, reject) => {
|
|
17
|
+
const reader = new FileReader();
|
|
18
|
+
reader.onerror = () => reject(reader.error ?? uiErrorDiagnostics.UI_R0001({ message: `Could not read ${file.name}.` }));
|
|
19
|
+
reader.onload = () => resolve(String(reader.result));
|
|
20
|
+
reader.readAsDataURL(file);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async function fileToUIPart(file) {
|
|
24
|
+
return {
|
|
25
|
+
filename: file.name,
|
|
26
|
+
mediaType: file.type || "application/octet-stream",
|
|
27
|
+
type: "file",
|
|
28
|
+
url: await fileToDataUrl(file)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function useAgentAttachments(options = {}) {
|
|
32
|
+
const files = ref([]);
|
|
33
|
+
const accept = computed(() => options.accept);
|
|
34
|
+
const revoke = (attachment) => {
|
|
35
|
+
if (attachment.previewUrl?.startsWith("blob:")) URL.revokeObjectURL(attachment.previewUrl);
|
|
36
|
+
};
|
|
37
|
+
const remove = (id) => {
|
|
38
|
+
const attachment = files.value.find((item) => item.id === id);
|
|
39
|
+
if (attachment) revoke(attachment);
|
|
40
|
+
files.value = files.value.filter((item) => item.id !== id);
|
|
41
|
+
};
|
|
42
|
+
const clear = () => {
|
|
43
|
+
files.value.forEach(revoke);
|
|
44
|
+
files.value = [];
|
|
45
|
+
};
|
|
46
|
+
const add = (input) => {
|
|
47
|
+
for (const file of Array.from(input)) {
|
|
48
|
+
if (!matchesAccept(file, options.accept)) {
|
|
49
|
+
options.onReject?.(file, "type");
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (options.maxSize !== void 0 && file.size > options.maxSize) {
|
|
53
|
+
options.onReject?.(file, "size");
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (options.multiple === false && files.value.length > 0 || options.maxFiles !== void 0 && files.value.length >= options.maxFiles) {
|
|
57
|
+
options.onReject?.(file, "count");
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const previewUrl = file.type.startsWith("image/") && typeof URL.createObjectURL === "function" ? URL.createObjectURL(file) : void 0;
|
|
61
|
+
files.value.push({
|
|
62
|
+
file,
|
|
63
|
+
id: globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${file.name}`,
|
|
64
|
+
previewUrl
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
onScopeDispose(clear);
|
|
69
|
+
return {
|
|
70
|
+
accept,
|
|
71
|
+
add,
|
|
72
|
+
clear,
|
|
73
|
+
files,
|
|
74
|
+
inputProps: computed(() => ({
|
|
75
|
+
accept: options.accept,
|
|
76
|
+
multiple: options.multiple ?? true,
|
|
77
|
+
type: "file"
|
|
78
|
+
})),
|
|
79
|
+
remove,
|
|
80
|
+
async toFileParts() {
|
|
81
|
+
return Promise.all(files.value.map(({ file }) => fileToUIPart(file)));
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/internal/prompt-files.ts
|
|
87
|
+
function nextPromptFiles(current, selected, multiple) {
|
|
88
|
+
return multiple ? [...current, ...selected] : selected.slice(-1);
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/components/prompt-input.ts
|
|
92
|
+
const submitLabels = {
|
|
93
|
+
error: "Retry prompt",
|
|
94
|
+
ready: "Send prompt",
|
|
95
|
+
streaming: "Stop response",
|
|
96
|
+
submitted: "Stop response"
|
|
97
|
+
};
|
|
98
|
+
const submitIcons = {
|
|
99
|
+
error: "i-ph-arrow-clockwise",
|
|
100
|
+
ready: "i-ph-arrow-up",
|
|
101
|
+
streaming: "i-ph-stop-fill",
|
|
102
|
+
submitted: "i-ph-stop-fill"
|
|
103
|
+
};
|
|
104
|
+
/** Whether the device has only coarse pointers, such as a phone. A tablet with a trackpad or a mouse is not touch only. */
|
|
105
|
+
function touchOnly() {
|
|
106
|
+
return typeof matchMedia === "function" && matchMedia("(pointer: coarse)").matches && !matchMedia("(any-pointer: fine)").matches;
|
|
107
|
+
}
|
|
108
|
+
const PromptInput = defineComponent({
|
|
109
|
+
name: "PromptInput",
|
|
110
|
+
inheritAttrs: false,
|
|
111
|
+
props: {
|
|
112
|
+
accept: { type: String },
|
|
113
|
+
attachments: {
|
|
114
|
+
default: true,
|
|
115
|
+
type: Boolean
|
|
116
|
+
},
|
|
117
|
+
files: {
|
|
118
|
+
default: () => [],
|
|
119
|
+
type: Array
|
|
120
|
+
},
|
|
121
|
+
filterFiles: { type: Function },
|
|
122
|
+
modelValue: {
|
|
123
|
+
default: "",
|
|
124
|
+
type: String
|
|
125
|
+
},
|
|
126
|
+
multiple: {
|
|
127
|
+
default: true,
|
|
128
|
+
type: Boolean
|
|
129
|
+
},
|
|
130
|
+
placeholder: { type: String },
|
|
131
|
+
status: {
|
|
132
|
+
default: "ready",
|
|
133
|
+
type: String
|
|
134
|
+
},
|
|
135
|
+
/** The name of the submit button while the status is `ready`. Default `Send prompt`. */
|
|
136
|
+
submitLabel: { type: String }
|
|
137
|
+
},
|
|
138
|
+
emits: [
|
|
139
|
+
"error",
|
|
140
|
+
"reload",
|
|
141
|
+
"submit",
|
|
142
|
+
"stop",
|
|
143
|
+
"update:files",
|
|
144
|
+
"update:modelValue"
|
|
145
|
+
],
|
|
146
|
+
setup(props, { attrs, emit, slots }) {
|
|
147
|
+
const input = ref(null);
|
|
148
|
+
const form = ref(null);
|
|
149
|
+
const pendingFiles = ref(0);
|
|
150
|
+
const preparingFiles = computed(() => pendingFiles.value > 0);
|
|
151
|
+
const canSubmit = computed(() => props.status === "ready" && !preparingFiles.value && (props.modelValue.trim().length > 0 || props.files.length > 0));
|
|
152
|
+
let disposed = false;
|
|
153
|
+
let nextBatch = 0;
|
|
154
|
+
const convertedBatches = /* @__PURE__ */ new Map();
|
|
155
|
+
onBeforeUnmount(() => {
|
|
156
|
+
disposed = true;
|
|
157
|
+
});
|
|
158
|
+
const UButton = resolveComponent("UButton");
|
|
159
|
+
const UIcon = resolveComponent("UIcon");
|
|
160
|
+
const remove = (index) => emit("update:files", props.files.filter((_, current) => current !== index));
|
|
161
|
+
const addFiles = async (input, onAccepted) => {
|
|
162
|
+
const batch = nextBatch++;
|
|
163
|
+
pendingFiles.value++;
|
|
164
|
+
try {
|
|
165
|
+
const rawFiles = Array.from(input);
|
|
166
|
+
const acceptedFiles = props.filterFiles?.(rawFiles) ?? rawFiles;
|
|
167
|
+
if (acceptedFiles.length === 0) return;
|
|
168
|
+
onAccepted?.();
|
|
169
|
+
const files = await Promise.all(Array.from(acceptedFiles, fileToUIPart));
|
|
170
|
+
if (!disposed) convertedBatches.set(batch, files);
|
|
171
|
+
} catch (error) {
|
|
172
|
+
if (!disposed) emit("error", error);
|
|
173
|
+
} finally {
|
|
174
|
+
pendingFiles.value--;
|
|
175
|
+
if (!disposed && pendingFiles.value === 0 && convertedBatches.size > 0) {
|
|
176
|
+
const files = [...convertedBatches].sort(([first], [second]) => first - second).flatMap(([, converted]) => converted);
|
|
177
|
+
convertedBatches.clear();
|
|
178
|
+
emit("update:files", nextPromptFiles(props.files, files, props.multiple));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
const paste = async (event) => {
|
|
183
|
+
const clipboard = event.clipboardData;
|
|
184
|
+
if (!props.attachments || !clipboard) return;
|
|
185
|
+
const hasText = clipboard.getData("text/plain").length > 0;
|
|
186
|
+
const files = Array.from(clipboard.files).filter((file) => file.type.startsWith("image/") || !hasText);
|
|
187
|
+
if (files.length === 0) return;
|
|
188
|
+
await addFiles(files, () => event.preventDefault());
|
|
189
|
+
};
|
|
190
|
+
const submit = (event) => {
|
|
191
|
+
event.preventDefault();
|
|
192
|
+
if (!canSubmit.value) return;
|
|
193
|
+
emit("submit", {
|
|
194
|
+
files: props.files,
|
|
195
|
+
text: props.modelValue.trim()
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
const pressSubmit = () => {
|
|
199
|
+
if (props.status === "streaming" || props.status === "submitted") emit("stop");
|
|
200
|
+
else if (props.status === "error") emit("reload");
|
|
201
|
+
else form.value?.requestSubmit();
|
|
202
|
+
};
|
|
203
|
+
const attachments = () => h(AttachmentGroup, { "data-slot": "prompt-input-attachments" }, () => props.files.map((file, index) => {
|
|
204
|
+
const label = file.filename ?? file.mediaType;
|
|
205
|
+
const image = file.mediaType.startsWith("image/");
|
|
206
|
+
return h(Attachment, {
|
|
207
|
+
key: `${file.filename}-${index}`,
|
|
208
|
+
size: "xs"
|
|
209
|
+
}, () => [
|
|
210
|
+
h(AttachmentMedia, { variant: image ? "image" : "icon" }, () => image ? h(ImagePreview, {
|
|
211
|
+
alt: label,
|
|
212
|
+
compact: true,
|
|
213
|
+
src: file.url
|
|
214
|
+
}) : h(UIcon, { name: "i-ph-file-light" })),
|
|
215
|
+
h(AttachmentContent, () => h(AttachmentTitle, () => label)),
|
|
216
|
+
h(AttachmentActions, () => h(AttachmentAction, {
|
|
217
|
+
"aria-label": `Remove ${file.filename ?? "attachment"}`,
|
|
218
|
+
icon: "i-ph-x-light",
|
|
219
|
+
onClick: () => remove(index)
|
|
220
|
+
}))
|
|
221
|
+
]);
|
|
222
|
+
}));
|
|
223
|
+
return () => h("form", {
|
|
224
|
+
...attrs,
|
|
225
|
+
"data-slot": "prompt-input",
|
|
226
|
+
onSubmit: submit,
|
|
227
|
+
ref: form
|
|
228
|
+
}, [h("div", { "data-slot": "prompt-input-group" }, [
|
|
229
|
+
props.files.length > 0 || slots.files ? slots.files?.({
|
|
230
|
+
files: props.files,
|
|
231
|
+
remove
|
|
232
|
+
}) ?? attachments() : null,
|
|
233
|
+
h("textarea", {
|
|
234
|
+
"aria-label": attrs["aria-label"] ?? "Message",
|
|
235
|
+
"data-slot": "prompt-input-textarea",
|
|
236
|
+
onInput: (event) => emit("update:modelValue", event.target.value),
|
|
237
|
+
onKeydown: (event) => {
|
|
238
|
+
if (event.key !== "Enter" || event.shiftKey || event.ctrlKey || event.metaKey || event.altKey || event.isComposing) return;
|
|
239
|
+
if (touchOnly()) return;
|
|
240
|
+
event.preventDefault();
|
|
241
|
+
if (props.status === "ready") form.value?.requestSubmit();
|
|
242
|
+
},
|
|
243
|
+
onPaste: paste,
|
|
244
|
+
placeholder: props.placeholder,
|
|
245
|
+
rows: 1,
|
|
246
|
+
value: props.modelValue
|
|
247
|
+
}),
|
|
248
|
+
h("div", { "data-slot": "prompt-input-toolbar" }, [
|
|
249
|
+
props.attachments && h("input", {
|
|
250
|
+
accept: props.accept,
|
|
251
|
+
"aria-label": "Add attachment",
|
|
252
|
+
class: "vh-visually-hidden",
|
|
253
|
+
multiple: props.multiple,
|
|
254
|
+
onChange: async (event) => {
|
|
255
|
+
const target = event.currentTarget;
|
|
256
|
+
if (!(target instanceof HTMLInputElement)) return;
|
|
257
|
+
await addFiles(target.files ?? []);
|
|
258
|
+
target.value = "";
|
|
259
|
+
},
|
|
260
|
+
ref: input,
|
|
261
|
+
tabindex: -1,
|
|
262
|
+
type: "file"
|
|
263
|
+
}),
|
|
264
|
+
slots.actions?.() ?? (props.attachments && h(UButton, {
|
|
265
|
+
"aria-label": "Add attachment",
|
|
266
|
+
class: "rounded-full",
|
|
267
|
+
color: "neutral",
|
|
268
|
+
icon: "i-ph-plus",
|
|
269
|
+
onClick: () => input.value?.click(),
|
|
270
|
+
size: "sm",
|
|
271
|
+
square: true,
|
|
272
|
+
type: "button",
|
|
273
|
+
variant: "outline"
|
|
274
|
+
})),
|
|
275
|
+
slots["footer-leading"]?.(),
|
|
276
|
+
h("span", { "data-slot": "prompt-input-spacer" }),
|
|
277
|
+
slots.submit?.({
|
|
278
|
+
canSubmit: canSubmit.value,
|
|
279
|
+
preparingFiles: preparingFiles.value,
|
|
280
|
+
status: props.status
|
|
281
|
+
}) ?? h(UButton, {
|
|
282
|
+
"aria-label": props.status === "ready" && props.submitLabel ? props.submitLabel : submitLabels[props.status],
|
|
283
|
+
class: "rounded-full",
|
|
284
|
+
color: "neutral",
|
|
285
|
+
disabled: props.status === "ready" && !canSubmit.value,
|
|
286
|
+
icon: submitIcons[props.status],
|
|
287
|
+
loading: props.status === "ready" && preparingFiles.value,
|
|
288
|
+
onClick: pressSubmit,
|
|
289
|
+
size: "sm",
|
|
290
|
+
square: true,
|
|
291
|
+
type: "button",
|
|
292
|
+
variant: "solid"
|
|
293
|
+
})
|
|
294
|
+
])
|
|
295
|
+
])]);
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
//#endregion
|
|
299
|
+
export { useAgentAttachments as i, fileToDataUrl as n, fileToUIPart as r, PromptInput as t };
|