@vite-hub/ui 0.0.3 → 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,50 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
import { ChatStatus, UIMessage } from "ai";
|
|
3
|
+
//#region src/components/chat.d.ts
|
|
4
|
+
declare const Chat: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
edgeThreshold: {
|
|
6
|
+
type: NumberConstructor;
|
|
7
|
+
};
|
|
8
|
+
messages: {
|
|
9
|
+
default: () => never[];
|
|
10
|
+
type: PropType<readonly UIMessage[]>;
|
|
11
|
+
};
|
|
12
|
+
previousItemPeek: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
};
|
|
15
|
+
scrollButtonLabel: {
|
|
16
|
+
default: string;
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
status: {
|
|
20
|
+
default: string;
|
|
21
|
+
type: PropType<ChatStatus>;
|
|
22
|
+
};
|
|
23
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
edgeThreshold: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
};
|
|
29
|
+
messages: {
|
|
30
|
+
default: () => never[];
|
|
31
|
+
type: PropType<readonly UIMessage[]>;
|
|
32
|
+
};
|
|
33
|
+
previousItemPeek: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
};
|
|
36
|
+
scrollButtonLabel: {
|
|
37
|
+
default: string;
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
status: {
|
|
41
|
+
default: string;
|
|
42
|
+
type: PropType<ChatStatus>;
|
|
43
|
+
};
|
|
44
|
+
}>> & Readonly<{}>, {
|
|
45
|
+
messages: readonly UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>[];
|
|
46
|
+
scrollButtonLabel: string;
|
|
47
|
+
status: ChatStatus;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Chat as t };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { a as MessageScrollerViewport, i as MessageScrollerItem, n as MessageScrollerButton, r as MessageScrollerContent, t as MessageScroller } from "./message-scroller-CX6NJTdm.js";
|
|
2
|
+
import { i as useViteHubUI } from "./config-bHqE4JOs.js";
|
|
3
|
+
import { t as ChatMessage } from "./chat-message-BNK9G7xF.js";
|
|
4
|
+
import { defineComponent, h, resolveComponent } from "vue";
|
|
5
|
+
//#region src/components/chat.ts
|
|
6
|
+
const Chat = defineComponent({
|
|
7
|
+
name: "Chat",
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
props: {
|
|
10
|
+
edgeThreshold: { type: Number },
|
|
11
|
+
messages: {
|
|
12
|
+
default: () => [],
|
|
13
|
+
type: Array
|
|
14
|
+
},
|
|
15
|
+
previousItemPeek: { type: Number },
|
|
16
|
+
scrollButtonLabel: {
|
|
17
|
+
default: "Scroll to end",
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
status: {
|
|
21
|
+
default: "ready",
|
|
22
|
+
type: String
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(props, { attrs, slots }) {
|
|
26
|
+
const defaults = useViteHubUI();
|
|
27
|
+
const UButton = resolveComponent("UButton");
|
|
28
|
+
return () => {
|
|
29
|
+
const composer = slots.composer?.();
|
|
30
|
+
const messageSlots = Object.fromEntries(Object.entries(slots).filter(([name]) => name !== "composer" && name !== "default" && name !== "message" && name !== "scroll-button"));
|
|
31
|
+
return h(MessageScroller, {
|
|
32
|
+
...attrs,
|
|
33
|
+
class: ["vh-chat", attrs.class],
|
|
34
|
+
edgeThreshold: props.edgeThreshold ?? defaults.messageScroller.edgeThreshold,
|
|
35
|
+
previousItemPeek: props.previousItemPeek ?? defaults.messageScroller.previousItemPeek
|
|
36
|
+
}, { default: () => [
|
|
37
|
+
h(MessageScrollerViewport, { class: "vh-chat__viewport" }, { default: () => h(MessageScrollerContent, {
|
|
38
|
+
"aria-busy": props.status === "streaming" || props.status === "submitted" ? "true" : void 0,
|
|
39
|
+
class: "vh-chat__content",
|
|
40
|
+
items: props.messages.map((message) => message.id)
|
|
41
|
+
}, { default: () => props.messages.map((message, index) => h(MessageScrollerItem, {
|
|
42
|
+
key: message.id,
|
|
43
|
+
messageId: message.id,
|
|
44
|
+
scrollAnchor: message.role === "user" && index === props.messages.length - 1 && props.status !== "submitted"
|
|
45
|
+
}, { default: () => slots.message?.({
|
|
46
|
+
index,
|
|
47
|
+
message
|
|
48
|
+
}) ?? h(ChatMessage, {
|
|
49
|
+
message,
|
|
50
|
+
streaming: index === props.messages.length - 1 && (props.status === "streaming" || props.status === "submitted")
|
|
51
|
+
}, messageSlots) })) }) }),
|
|
52
|
+
h(MessageScrollerButton, {
|
|
53
|
+
"aria-label": props.scrollButtonLabel,
|
|
54
|
+
as: UButton,
|
|
55
|
+
class: "vh-chat__scroll-button",
|
|
56
|
+
color: "neutral",
|
|
57
|
+
icon: "i-lucide-chevron-down",
|
|
58
|
+
size: "xs",
|
|
59
|
+
type: "button",
|
|
60
|
+
ui: { leadingIcon: "size-3.5" },
|
|
61
|
+
variant: "outline"
|
|
62
|
+
}, { default: () => slots["scroll-button"]?.() ?? props.scrollButtonLabel }),
|
|
63
|
+
composer?.length ? h("div", {
|
|
64
|
+
class: "vh-chat__composer",
|
|
65
|
+
"data-slot": "chat-composer"
|
|
66
|
+
}, composer) : null,
|
|
67
|
+
slots.default?.()
|
|
68
|
+
] });
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
//#endregion
|
|
73
|
+
export { Chat as t };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { n as BubbleContent, t as Bubble } from "./bubble-BPyFQlW7.js";
|
|
2
|
+
import { i as MessageFooter, n as MessageAvatar, o as MessageHeader, r as MessageContent, t as Message } from "./message-DiyBthIq.js";
|
|
3
|
+
import { t as MessageParts } from "./message-parts-DQnfioAH.js";
|
|
4
|
+
import { defineComponent, h } from "vue";
|
|
5
|
+
//#region src/components/chat-message.ts
|
|
6
|
+
const roleLabels = {
|
|
7
|
+
assistant: "Assistant",
|
|
8
|
+
system: "System",
|
|
9
|
+
user: "User"
|
|
10
|
+
};
|
|
11
|
+
const ChatMessage = defineComponent({
|
|
12
|
+
name: "ChatMessage",
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
props: {
|
|
15
|
+
message: {
|
|
16
|
+
required: true,
|
|
17
|
+
type: Object
|
|
18
|
+
},
|
|
19
|
+
streaming: {
|
|
20
|
+
default: false,
|
|
21
|
+
type: Boolean
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(props, { attrs, slots }) {
|
|
25
|
+
return () => {
|
|
26
|
+
const { message } = props;
|
|
27
|
+
const user = message.role === "user";
|
|
28
|
+
const parts = () => h(MessageParts, {
|
|
29
|
+
parts: message.parts,
|
|
30
|
+
streaming: props.streaming
|
|
31
|
+
}, slots);
|
|
32
|
+
const body = slots.default?.({ message }) ?? (user ? h(Bubble, {
|
|
33
|
+
align: "end",
|
|
34
|
+
variant: "secondary"
|
|
35
|
+
}, () => h(BubbleContent, parts)) : parts());
|
|
36
|
+
return h(Message, {
|
|
37
|
+
...attrs,
|
|
38
|
+
align: user ? "end" : "start",
|
|
39
|
+
"aria-label": attrs["aria-label"] ?? `${roleLabels[message.role] ?? "System"} message`,
|
|
40
|
+
"data-role": message.role,
|
|
41
|
+
id: message.id
|
|
42
|
+
}, () => [slots.leading ? h(MessageAvatar, () => slots.leading?.({ message })) : null, h(MessageContent, () => [
|
|
43
|
+
slots.header ? h(MessageHeader, () => slots.header?.({ message })) : null,
|
|
44
|
+
body,
|
|
45
|
+
slots.actions ? h(MessageFooter, () => slots.actions?.({ message })) : null
|
|
46
|
+
])]);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
export { ChatMessage as t };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
import { UIMessage } from "ai";
|
|
3
|
+
//#region src/components/chat-message.d.ts
|
|
4
|
+
declare const ChatMessage: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
message: {
|
|
6
|
+
required: true;
|
|
7
|
+
type: PropType<UIMessage>;
|
|
8
|
+
};
|
|
9
|
+
streaming: {
|
|
10
|
+
default: boolean;
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
};
|
|
13
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
message: {
|
|
17
|
+
required: true;
|
|
18
|
+
type: PropType<UIMessage>;
|
|
19
|
+
};
|
|
20
|
+
streaming: {
|
|
21
|
+
default: boolean;
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {
|
|
25
|
+
streaming: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ChatMessage as t };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { i as ViteHubUISession } from "./types-CqDwuJAm.js";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
import { ChatStatus, UIMessage } from "ai";
|
|
4
|
+
//#region src/components/chat-session.d.ts
|
|
5
|
+
declare const ChatSession: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
session: {
|
|
7
|
+
required: true;
|
|
8
|
+
type: PropType<ViteHubUISession<UIMessage>>;
|
|
9
|
+
};
|
|
10
|
+
status: {
|
|
11
|
+
default: string;
|
|
12
|
+
type: PropType<ChatStatus>;
|
|
13
|
+
};
|
|
14
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
session: {
|
|
18
|
+
required: true;
|
|
19
|
+
type: PropType<ViteHubUISession<UIMessage>>;
|
|
20
|
+
};
|
|
21
|
+
status: {
|
|
22
|
+
default: string;
|
|
23
|
+
type: PropType<ChatStatus>;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
status: ChatStatus;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { ChatSession as t };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as Chat } from "./chat-BoFHlu9V.js";
|
|
2
|
+
import { defineComponent, h } from "vue";
|
|
3
|
+
//#region src/components/chat-session.ts
|
|
4
|
+
const ChatSession = defineComponent({
|
|
5
|
+
name: "ChatSession",
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
props: {
|
|
8
|
+
session: {
|
|
9
|
+
required: true,
|
|
10
|
+
type: Object
|
|
11
|
+
},
|
|
12
|
+
status: {
|
|
13
|
+
default: "ready",
|
|
14
|
+
type: String
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(props, { attrs, slots }) {
|
|
18
|
+
return () => {
|
|
19
|
+
const chatSlots = Object.fromEntries(Object.entries(slots).filter(([name]) => name !== "header" && name !== "footer"));
|
|
20
|
+
return h("section", {
|
|
21
|
+
...attrs,
|
|
22
|
+
"aria-label": attrs["aria-label"] ?? props.session.title ?? "Agent session",
|
|
23
|
+
class: ["vh-session", attrs.class],
|
|
24
|
+
"data-session-id": props.session.id
|
|
25
|
+
}, [
|
|
26
|
+
slots.header?.({ session: props.session }) ?? (props.session.title ? h("header", { class: "vh-session__header" }, [h("h2", { class: "vh-session__title" }, props.session.title)]) : null),
|
|
27
|
+
h(Chat, {
|
|
28
|
+
class: "vh-session__chat",
|
|
29
|
+
messages: props.session.messages,
|
|
30
|
+
status: props.status
|
|
31
|
+
}, chatSlots),
|
|
32
|
+
slots.footer?.({ session: props.session })
|
|
33
|
+
]);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { ChatSession as t };
|
package/dist/chat.d.ts
ADDED
package/dist/chat.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { n as slotPart } from "./slot-part-C7Ocxn3b.js";
|
|
2
|
+
import { Fragment, Text, defineComponent, h, onBeforeUnmount, ref, resolveComponent } from "vue";
|
|
3
|
+
//#region src/components/code-block.ts
|
|
4
|
+
const CodeBlock = defineComponent({
|
|
5
|
+
name: "CodeBlock",
|
|
6
|
+
props: {
|
|
7
|
+
size: {
|
|
8
|
+
default: "default",
|
|
9
|
+
type: String
|
|
10
|
+
},
|
|
11
|
+
variant: {
|
|
12
|
+
default: "default",
|
|
13
|
+
type: String
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(props, { slots }) {
|
|
17
|
+
return () => h("div", {
|
|
18
|
+
"data-size": props.size,
|
|
19
|
+
"data-slot": "code-block",
|
|
20
|
+
"data-variant": props.variant
|
|
21
|
+
}, slots.default?.());
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const CodeBlockHeader = slotPart("CodeBlockHeader", "code-block-header");
|
|
25
|
+
const CodeBlockTitle = slotPart("CodeBlockTitle", "code-block-title");
|
|
26
|
+
const CodeBlockActions = slotPart("CodeBlockActions", "code-block-actions");
|
|
27
|
+
const CodeBlockFooter = slotPart("CodeBlockFooter", "code-block-footer");
|
|
28
|
+
const CodeBlockCopyButton = defineComponent({
|
|
29
|
+
name: "CodeBlockCopyButton",
|
|
30
|
+
inheritAttrs: false,
|
|
31
|
+
props: { value: {
|
|
32
|
+
required: true,
|
|
33
|
+
type: String
|
|
34
|
+
} },
|
|
35
|
+
setup(props, { attrs }) {
|
|
36
|
+
const UButton = resolveComponent("UButton");
|
|
37
|
+
const copied = ref(false);
|
|
38
|
+
let timeout;
|
|
39
|
+
onBeforeUnmount(() => clearTimeout(timeout));
|
|
40
|
+
const copy = () => {
|
|
41
|
+
try {
|
|
42
|
+
const clipboard = navigator.clipboard;
|
|
43
|
+
if (!clipboard || typeof clipboard.writeText !== "function") return;
|
|
44
|
+
clipboard.writeText(props.value).then(() => {
|
|
45
|
+
copied.value = true;
|
|
46
|
+
clearTimeout(timeout);
|
|
47
|
+
timeout = setTimeout(() => copied.value = false, 2e3);
|
|
48
|
+
}).catch(() => {});
|
|
49
|
+
} catch {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return () => [h(UButton, {
|
|
54
|
+
"aria-label": copied.value ? "Copied" : "Copy",
|
|
55
|
+
color: "neutral",
|
|
56
|
+
icon: copied.value ? "i-ph-check-light" : "i-ph-copy-light",
|
|
57
|
+
size: "xs",
|
|
58
|
+
square: true,
|
|
59
|
+
variant: "ghost",
|
|
60
|
+
...attrs,
|
|
61
|
+
"data-copied": copied.value ? "" : void 0,
|
|
62
|
+
"data-slot": "code-block-copy-button",
|
|
63
|
+
onClick: (event) => {
|
|
64
|
+
const listener = attrs.onClick;
|
|
65
|
+
if (Array.isArray(listener)) {
|
|
66
|
+
for (const handler of listener) if (typeof handler === "function") handler(event);
|
|
67
|
+
} else if (typeof listener === "function") listener(event);
|
|
68
|
+
copy();
|
|
69
|
+
}
|
|
70
|
+
}), h("span", {
|
|
71
|
+
"aria-live": "polite",
|
|
72
|
+
"data-slot": "code-block-copy-status"
|
|
73
|
+
}, copied.value ? "Copied" : "")];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const CodeBlockLine = defineComponent({
|
|
77
|
+
name: "CodeBlockLine",
|
|
78
|
+
props: { variant: {
|
|
79
|
+
default: "default",
|
|
80
|
+
type: String
|
|
81
|
+
} },
|
|
82
|
+
setup(props, { slots }) {
|
|
83
|
+
return () => {
|
|
84
|
+
const content = slots.default?.();
|
|
85
|
+
const empty = !content || content.every(isEmptyText);
|
|
86
|
+
return h("span", {
|
|
87
|
+
"data-slot": "code-block-line",
|
|
88
|
+
"data-variant": props.variant
|
|
89
|
+
}, [h("span", { "data-slot": "code-block-line-content" }, empty ? "\n" : content)]);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
function isEmptyText(node) {
|
|
94
|
+
return node.type === Text && String(node.children ?? "") === "" || typeof node.type === "string" && String(node.children ?? "") === "";
|
|
95
|
+
}
|
|
96
|
+
function textOf(nodes) {
|
|
97
|
+
let text = "";
|
|
98
|
+
for (const node of nodes) if (node.type === Text) text += String(node.children ?? "");
|
|
99
|
+
else if (node.type === Fragment && Array.isArray(node.children)) {
|
|
100
|
+
const inner = textOf(node.children);
|
|
101
|
+
if (inner === void 0) return void 0;
|
|
102
|
+
text += inner;
|
|
103
|
+
} else return void 0;
|
|
104
|
+
return text;
|
|
105
|
+
}
|
|
106
|
+
const CodeBlockContent = defineComponent({
|
|
107
|
+
name: "CodeBlockContent",
|
|
108
|
+
props: {
|
|
109
|
+
lineNumbers: {
|
|
110
|
+
default: false,
|
|
111
|
+
type: Boolean
|
|
112
|
+
},
|
|
113
|
+
startLine: {
|
|
114
|
+
default: 1,
|
|
115
|
+
type: Number
|
|
116
|
+
},
|
|
117
|
+
wrap: {
|
|
118
|
+
default: false,
|
|
119
|
+
type: Boolean
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
setup(props, { slots }) {
|
|
123
|
+
return () => {
|
|
124
|
+
const children = slots.default?.() ?? [];
|
|
125
|
+
const text = props.lineNumbers ? textOf(children) : void 0;
|
|
126
|
+
const lines = text === void 0 ? children : text.replace(/\n$/, "").split("\n").map((line) => h(CodeBlockLine, null, () => line));
|
|
127
|
+
return h("pre", {
|
|
128
|
+
"data-numbered": props.lineNumbers ? "" : void 0,
|
|
129
|
+
"data-slot": "code-block-content",
|
|
130
|
+
"data-wrap": props.wrap ? "" : void 0,
|
|
131
|
+
dir: "ltr",
|
|
132
|
+
style: { counterReset: `line ${props.startLine - 1}` },
|
|
133
|
+
tabindex: 0
|
|
134
|
+
}, [h("code", { "data-slot": "code-block-code" }, lines)]);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
//#endregion
|
|
139
|
+
export { CodeBlockFooter as a, CodeBlockTitle as c, CodeBlockCopyButton as i, CodeBlockActions as n, CodeBlockHeader as o, CodeBlockContent as r, CodeBlockLine as s, CodeBlock as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as CodeBlockCopyButton, c as CodeBlockLine, d as CodeBlockTitle, f as CodeBlockVariant, i as CodeBlockContent, l as CodeBlockLineVariant, n as CodeBlock, o as CodeBlockFooter, r as CodeBlockActions, s as CodeBlockHeader, t as useHighlightedCode, u as CodeBlockSize } from "./highlighted-code-Dzf6o54i.js";
|
|
2
|
+
export { CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockLineVariant, CodeBlockSize, CodeBlockTitle, CodeBlockVariant, useHighlightedCode };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as CodeBlockFooter, c as CodeBlockTitle, i as CodeBlockCopyButton, n as CodeBlockActions, o as CodeBlockHeader, r as CodeBlockContent, s as CodeBlockLine, t as CodeBlock } from "./code-block-Br-02hn-.js";
|
|
2
|
+
import { t as useHighlightedCode } from "./highlighted-code-Ck4zexJX.js";
|
|
3
|
+
export { CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, useHighlightedCode };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { defineAsyncComponent, defineComponent, h } from "vue";
|
|
2
|
+
//#region src/internal/pierre-props.ts
|
|
3
|
+
const pierrePropTypes = {
|
|
4
|
+
codeViewItems: Array,
|
|
5
|
+
codeViewOptions: Object,
|
|
6
|
+
codeViewSelection: Object,
|
|
7
|
+
diffLineAnnotations: Array,
|
|
8
|
+
fileContents: Object,
|
|
9
|
+
fileDiff: Object,
|
|
10
|
+
fileDiffOptions: Object,
|
|
11
|
+
fileOptions: Object,
|
|
12
|
+
lineAnnotations: Array,
|
|
13
|
+
nullableFileContents: [Object, null],
|
|
14
|
+
selectedLines: Object,
|
|
15
|
+
unresolvedFileOptions: Object
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/code-view.ts
|
|
19
|
+
const PierreCodeView = defineAsyncComponent(() => import("./pierre-code-view-T7V67hwT.js").then((module) => module.PierreCodeView));
|
|
20
|
+
const PierreDiff = defineAsyncComponent(() => import("./pierre-code-view-T7V67hwT.js").then((module) => module.PierreDiff));
|
|
21
|
+
const PierreFile = defineAsyncComponent(() => import("./pierre-code-view-T7V67hwT.js").then((module) => module.PierreFile));
|
|
22
|
+
const PierreUnresolvedFile = defineAsyncComponent(() => import("./pierre-code-view-T7V67hwT.js").then((module) => module.PierreUnresolvedFile));
|
|
23
|
+
const diffProps = {
|
|
24
|
+
lineAnnotations: { type: pierrePropTypes.diffLineAnnotations },
|
|
25
|
+
options: { type: pierrePropTypes.fileDiffOptions },
|
|
26
|
+
selectedLines: {
|
|
27
|
+
default: void 0,
|
|
28
|
+
type: pierrePropTypes.selectedLines
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const PatchDiff = defineComponent({
|
|
32
|
+
name: "PatchDiff",
|
|
33
|
+
inheritAttrs: false,
|
|
34
|
+
props: {
|
|
35
|
+
...diffProps,
|
|
36
|
+
patch: {
|
|
37
|
+
required: true,
|
|
38
|
+
type: String
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
setup(props, { attrs }) {
|
|
42
|
+
return () => h(PierreDiff, {
|
|
43
|
+
...attrs,
|
|
44
|
+
...props,
|
|
45
|
+
class: ["vh-diff", attrs.class]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const MultiFileDiff = defineComponent({
|
|
50
|
+
name: "MultiFileDiff",
|
|
51
|
+
inheritAttrs: false,
|
|
52
|
+
props: {
|
|
53
|
+
...diffProps,
|
|
54
|
+
newFile: {
|
|
55
|
+
required: true,
|
|
56
|
+
type: pierrePropTypes.nullableFileContents
|
|
57
|
+
},
|
|
58
|
+
oldFile: {
|
|
59
|
+
required: true,
|
|
60
|
+
type: pierrePropTypes.nullableFileContents
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
setup(props, { attrs }) {
|
|
64
|
+
return () => h(PierreDiff, {
|
|
65
|
+
...attrs,
|
|
66
|
+
...props,
|
|
67
|
+
class: ["vh-diff", attrs.class]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const FileDiff = defineComponent({
|
|
72
|
+
name: "FileDiff",
|
|
73
|
+
inheritAttrs: false,
|
|
74
|
+
props: {
|
|
75
|
+
...diffProps,
|
|
76
|
+
fileDiff: {
|
|
77
|
+
required: true,
|
|
78
|
+
type: pierrePropTypes.fileDiff
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
setup(props, { attrs }) {
|
|
82
|
+
return () => h(PierreDiff, {
|
|
83
|
+
...attrs,
|
|
84
|
+
...props,
|
|
85
|
+
class: ["vh-diff", attrs.class]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
const FileView = defineComponent({
|
|
90
|
+
name: "FileView",
|
|
91
|
+
inheritAttrs: false,
|
|
92
|
+
props: {
|
|
93
|
+
file: {
|
|
94
|
+
required: true,
|
|
95
|
+
type: pierrePropTypes.fileContents
|
|
96
|
+
},
|
|
97
|
+
lineAnnotations: { type: pierrePropTypes.lineAnnotations },
|
|
98
|
+
options: { type: pierrePropTypes.fileOptions },
|
|
99
|
+
selectedLines: {
|
|
100
|
+
default: void 0,
|
|
101
|
+
type: pierrePropTypes.selectedLines
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
setup(props, { attrs }) {
|
|
105
|
+
return () => h(PierreFile, {
|
|
106
|
+
...attrs,
|
|
107
|
+
...props,
|
|
108
|
+
class: ["vh-file", attrs.class]
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const UnresolvedFile = defineComponent({
|
|
113
|
+
name: "UnresolvedFile",
|
|
114
|
+
inheritAttrs: false,
|
|
115
|
+
props: {
|
|
116
|
+
file: {
|
|
117
|
+
required: true,
|
|
118
|
+
type: pierrePropTypes.fileContents
|
|
119
|
+
},
|
|
120
|
+
lineAnnotations: { type: pierrePropTypes.diffLineAnnotations },
|
|
121
|
+
options: { type: pierrePropTypes.unresolvedFileOptions },
|
|
122
|
+
selectedLines: {
|
|
123
|
+
default: void 0,
|
|
124
|
+
type: pierrePropTypes.selectedLines
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
setup(props, { attrs }) {
|
|
128
|
+
return () => h(PierreUnresolvedFile, {
|
|
129
|
+
...attrs,
|
|
130
|
+
...props,
|
|
131
|
+
class: ["vh-unresolved-file", attrs.class]
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
const CodeView = defineComponent({
|
|
136
|
+
name: "CodeView",
|
|
137
|
+
inheritAttrs: false,
|
|
138
|
+
props: {
|
|
139
|
+
items: {
|
|
140
|
+
required: true,
|
|
141
|
+
type: pierrePropTypes.codeViewItems
|
|
142
|
+
},
|
|
143
|
+
options: { type: pierrePropTypes.codeViewOptions },
|
|
144
|
+
selectedLines: {
|
|
145
|
+
default: void 0,
|
|
146
|
+
type: pierrePropTypes.codeViewSelection
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
setup(props, { attrs }) {
|
|
150
|
+
return () => h(PierreCodeView, {
|
|
151
|
+
...attrs,
|
|
152
|
+
...props,
|
|
153
|
+
class: ["vh-code-view", attrs.class]
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
//#endregion
|
|
158
|
+
export { PatchDiff as a, MultiFileDiff as i, FileDiff as n, UnresolvedFile as o, FileView as r, pierrePropTypes as s, CodeView as t };
|