@vite-hub/ui 0.0.4 → 0.3.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 +263 -17
- package/dist/attachments-BzTwqRTU.js +90 -0
- package/dist/avatar-stack-DXmCQhxd.d.ts +59 -0
- package/dist/choices-input-ByXJvDn1.d.ts +94 -0
- package/dist/code-view-D0bqhogi.js +174 -0
- package/dist/colors-BghReA9C-CjF9gnmy.js +28 -0
- package/dist/comment-composer-Cc8Jvu6u.d.ts +243 -0
- package/dist/comment-composer-jYv2ULNP.js +591 -0
- package/dist/comment-layer-ClH4MLj4.d.ts +165 -0
- package/dist/comment-list-B8hphLfS.d.ts +62 -0
- package/dist/comment-marks.css +234 -0
- package/dist/comment-panel-fcKSKwLC.d.ts +197 -0
- package/dist/comment-person-CLPlW_SS.js +40 -0
- package/dist/comment-pin-CvwgRSDR.d.ts +68 -0
- package/dist/comment-row-Bbm9WwuF.js +39 -0
- package/dist/comment-thread-CoTLrdal.d.ts +368 -0
- package/dist/comment-visibility-DsVuVndP.d.ts +40 -0
- package/dist/comments-Bx2WRsYy.d.ts +170 -0
- package/dist/comments-CkWc2Khc.js +551 -0
- package/dist/comments-context-C2lOZyQ5.js +38 -0
- package/dist/config-DgxBW013.d.ts +80 -0
- package/dist/config-Dk67emQt.js +63 -0
- package/dist/copy-button-CRN3kmSD.js +253 -0
- package/dist/draw-DzSmD7uo-Dwz8zoH2.js +72976 -0
- package/dist/editor-C_wt4RRV.js +582 -0
- package/dist/error-diagnostics-SXtnk6bz.js +38 -0
- package/dist/file-tree-C4OYgbV-.js +9454 -0
- package/dist/file-tree-DlT9RGhu.d.ts +495 -0
- package/dist/format-Du58PlsG.js +18 -0
- package/dist/{getSingularPatch-D0VFiyjB.js → getSingularPatch-Dsb8EgxR.js} +191 -116
- package/dist/handlers-DMl-Na3x.js +182 -0
- package/dist/headless.d.ts +5 -176
- package/dist/headless.js +5 -333
- package/dist/icon-swap.css +69 -0
- package/dist/image-preview-C9tdkmEj.js +105 -0
- package/dist/index-BD1e8vx5.d.ts +69 -0
- package/dist/index-CNY1uNTh.d.ts +3877 -0
- package/dist/index.d.ts +55 -6402
- package/dist/index.js +618 -12277
- package/dist/markdown-editor-CMbNZOdN.js +2394 -0
- package/dist/markdown-editor-DqdZfIEn.d.ts +195 -0
- package/dist/markdown-editor.d.ts +108 -0
- package/dist/markdown-editor.js +3 -0
- package/dist/message-scroller-Bm1YWTeY.d.ts +175 -0
- package/dist/nuxt-ui-DSQFzq3s.js +38 -0
- package/dist/nuxt.d.ts +90 -5
- package/dist/nuxt.js +344 -28
- package/dist/parts/components/agent-session.d.ts +254 -0
- package/dist/parts/components/agent-session.js +640 -0
- package/dist/parts/components/attachment.d.ts +87 -0
- package/dist/parts/components/attachment.js +73 -0
- package/dist/parts/components/avatar-stack.d.ts +2 -0
- package/dist/parts/components/avatar-stack.js +60 -0
- package/dist/parts/components/bubble.d.ts +71 -0
- package/dist/parts/components/bubble.js +53 -0
- package/dist/parts/components/chat-message.d.ts +27 -0
- package/dist/parts/components/chat-message.js +51 -0
- package/dist/parts/components/chat-session.d.ts +28 -0
- package/dist/parts/components/chat-session.js +38 -0
- package/dist/parts/components/chat.d.ts +54 -0
- package/dist/parts/components/chat.js +106 -0
- package/dist/parts/components/code-block.d.ts +104 -0
- package/dist/parts/components/code-block.js +110 -0
- package/dist/parts/components/code-view.d.ts +270 -0
- package/dist/parts/components/code-view.js +2 -0
- package/dist/parts/components/comment-composer.d.ts +2 -0
- package/dist/parts/components/comment-composer.js +2 -0
- package/dist/parts/components/comment-layer.d.ts +2 -0
- package/dist/parts/components/comment-layer.js +618 -0
- package/dist/parts/components/comment-list.d.ts +2 -0
- package/dist/parts/components/comment-list.js +167 -0
- package/dist/parts/components/comment-panel.d.ts +2 -0
- package/dist/parts/components/comment-panel.js +299 -0
- package/dist/parts/components/comment-pin.d.ts +2 -0
- package/dist/parts/components/comment-pin.js +75 -0
- package/dist/parts/components/comment-thread.d.ts +2 -0
- package/dist/parts/components/comment-thread.js +571 -0
- package/dist/parts/components/comments.d.ts +7 -0
- package/dist/parts/components/comments.js +8 -0
- package/dist/parts/components/connection-status.d.ts +38 -0
- package/dist/parts/components/connection-status.js +65 -0
- package/dist/parts/components/copy-button.d.ts +118 -0
- package/dist/parts/components/copy-button.js +2 -0
- package/dist/parts/components/device-frame.d.ts +130 -0
- package/dist/parts/components/device-frame.js +471 -0
- package/dist/parts/components/file-tree.d.ts +2 -0
- package/dist/parts/components/file-tree.js +2 -0
- package/dist/parts/components/filter-search.d.ts +47 -0
- package/dist/parts/components/filter-search.js +58 -0
- package/dist/parts/components/markdown-editor.d.ts +2 -0
- package/dist/parts/components/markdown-editor.js +2 -0
- package/dist/parts/components/markdown-renderer.d.ts +52 -0
- package/dist/parts/components/markdown-renderer.js +23077 -0
- package/dist/parts/components/markdown.d.ts +47 -0
- package/dist/parts/components/markdown.js +47 -0
- package/dist/parts/components/marker.d.ts +34 -0
- package/dist/parts/components/marker.js +23 -0
- package/dist/parts/components/message-parts.d.ts +27 -0
- package/dist/parts/components/message-parts.js +38 -0
- package/dist/parts/components/message.d.ts +34 -0
- package/dist/parts/components/message.js +23 -0
- package/dist/parts/components/patch-parsers.d.ts +2 -0
- package/dist/parts/components/patch-parsers.js +2 -0
- package/dist/parts/components/prompt-input.d.ts +136 -0
- package/dist/parts/components/prompt-input.js +254 -0
- package/dist/parts/components/relative-time.d.ts +73 -0
- package/dist/parts/components/relative-time.js +2 -0
- package/dist/parts/components/status.d.ts +60 -0
- package/dist/parts/components/status.js +48 -0
- package/dist/parts/components/sync-status.d.ts +24 -0
- package/dist/parts/components/sync-status.js +48 -0
- package/dist/parts/components/tool-list.d.ts +30 -0
- package/dist/parts/components/tool-list.js +119 -0
- package/dist/parts/components/trace-run.d.ts +27 -0
- package/dist/parts/components/trace-run.js +90 -0
- package/dist/parts/components/trace.d.ts +61 -0
- package/dist/parts/components/trace.js +77 -0
- package/dist/parts/composables/attachments.d.ts +32 -0
- package/dist/parts/composables/attachments.js +2 -0
- package/dist/parts/composables/highlighted-code.d.ts +9 -0
- package/dist/parts/composables/highlighted-code.js +93 -0
- package/dist/parts/headless/choices-input.d.ts +2 -0
- package/dist/parts/headless/choices-input.js +162 -0
- package/dist/parts/headless/comment-visibility.d.ts +2 -0
- package/dist/parts/headless/comment-visibility.js +128 -0
- package/dist/parts/headless/comments.d.ts +2 -0
- package/dist/parts/headless/comments.js +2 -0
- package/dist/parts/headless/message-scroller.d.ts +2 -0
- package/dist/parts/headless/message-scroller.js +335 -0
- package/dist/parts/playground/highlight.d.ts +5 -0
- package/dist/parts/playground/highlight.js +23 -0
- package/dist/parts/playground/paths.d.ts +4 -0
- package/dist/parts/playground/paths.js +7 -0
- package/dist/parts/playground/playground-render.d.ts +126 -0
- package/dist/parts/playground/playground-render.js +356 -0
- package/dist/parts/playground/share.d.ts +2 -0
- package/dist/parts/playground/share.js +92 -0
- package/dist/parts/playground/zip.d.ts +6 -0
- package/dist/parts/playground/zip.js +76 -0
- package/dist/parts/workspace/browser-support-notice.d.ts +76 -0
- package/dist/parts/workspace/browser-support-notice.js +105 -0
- package/dist/parts/workspace/codemirror.d.ts +16 -0
- package/dist/parts/workspace/codemirror.js +243 -0
- package/dist/parts/workspace/connect-panel.d.ts +129 -0
- package/dist/parts/workspace/connect-panel.js +285 -0
- package/dist/parts/workspace/connect-store.d.ts +26 -0
- package/dist/parts/workspace/connect-store.js +59 -0
- package/dist/parts/workspace/icons.d.ts +34 -0
- package/dist/parts/workspace/icons.js +46 -0
- package/dist/parts/workspace/playground-container.d.ts +192 -0
- package/dist/parts/workspace/playground-container.js +603 -0
- package/dist/parts/workspace/workspace-boot-status.d.ts +75 -0
- package/dist/parts/workspace/workspace-boot-status.js +207 -0
- package/dist/parts/workspace/workspace-editor.d.ts +43 -0
- package/dist/parts/workspace/workspace-editor.js +54 -0
- package/dist/parts/workspace/workspace-file-tree.d.ts +53 -0
- package/dist/parts/workspace/workspace-file-tree.js +68 -0
- package/dist/parts/workspace/workspace-preview.d.ts +72 -0
- package/dist/parts/workspace/workspace-preview.js +307 -0
- package/dist/parts/workspace/workspace-shell.d.ts +88 -0
- package/dist/parts/workspace/workspace-shell.js +291 -0
- package/dist/parts/workspace/workspace-terminal.d.ts +39 -0
- package/dist/parts/workspace/workspace-terminal.js +130 -0
- package/dist/payload-text-sjkYAwvw.js +32 -0
- package/dist/{pierre-code-view-DYpF5M8R.js → pierre-code-view-xgBL6DO7.js} +7325 -15311
- package/dist/{pierre-dark-DDWDl8g6.js → pierre-dark-CzUmjETS.js} +3 -1
- package/dist/{pierre-light-CWhW4NrH.js → pierre-light-Dn6E0sWv.js} +3 -1
- package/dist/playground.d.ts +4 -0
- package/dist/playground.js +4 -0
- package/dist/relative-time-BVmjOsYG.js +309 -0
- package/dist/rolldown-runtime-C9mWXvCC.js +29 -0
- package/dist/runtime/nuxt-plugin.js +24 -3
- package/dist/sankey-CAYwt82B-D4uDQoMR.js +2887 -0
- package/dist/share-DM4eNy4q.d.ts +37 -0
- package/dist/slot-part-Doic71uh.js +26 -0
- package/dist/styles.css +4006 -2035
- package/dist/temml-BilSAAws.js +12362 -0
- package/dist/theme-focus-ring.css +42 -0
- package/dist/theme.css +376 -0
- package/dist/theme.d.ts +355 -0
- package/dist/theme.js +265 -0
- package/dist/types-Dyr6CfBW.d.ts +33 -0
- package/dist/vite.d.ts +3 -5
- package/dist/vue-BDmSCtay.js +30779 -0
- package/dist/vue-DGstVdGn.js +2492 -0
- package/dist/workspace.d.ts +15 -0
- package/dist/workspace.js +12 -0
- package/package.json +168 -32
- 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/andromeeda-DnSv6o6l.js +0 -4
- 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/aurora-x-XJ5I8rFc.js +0 -4
- package/dist/awk-D6dA05Ye.js +0 -3
- package/dist/ayu-dark-CBRGL64-.js +0 -4
- package/dist/ayu-light-BlrCS3Ih.js +0 -4
- package/dist/ayu-mirage-CqpTmLcF.js +0 -4
- 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/config-BwhBDTjC.d.ts +0 -30
- package/dist/config-CzOjpPth.js +0 -43
- 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/dark-plus-BCxGtnt0.js +0 -4
- 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/dracula-fPErIccy.js +0 -4
- package/dist/dracula-soft-BrQbqXs8.js +0 -4
- 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/everforest-dark-gTeBQCos.js +0 -4
- package/dist/everforest-light-DUjxsp-2.js +0 -4
- 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/github-dark-Dg1hl_QD.js +0 -4
- package/dist/github-dark-default-Dym2P842.js +0 -4
- package/dist/github-dark-dimmed-7iDMx266.js +0 -4
- package/dist/github-dark-high-contrast-DkV2fyPG.js +0 -4
- package/dist/github-light-BQKYgor9.js +0 -4
- package/dist/github-light-default-BZhIfzqQ.js +0 -4
- package/dist/github-light-high-contrast-C7zHfx4C.js +0 -4
- 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/gruvbox-dark-hard-CQiwpF03.js +0 -4
- package/dist/gruvbox-dark-medium-BKe6XKBS.js +0 -4
- package/dist/gruvbox-dark-soft-Cz6U6pa4.js +0 -4
- package/dist/gruvbox-light-hard-DgU_i19B.js +0 -4
- package/dist/gruvbox-light-medium-D64I06ER.js +0 -4
- package/dist/gruvbox-light-soft-B-YxAs1L.js +0 -4
- 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/horizon-DYoumREk.js +0 -4
- package/dist/horizon-bright-CPyV7XIA.js +0 -4
- package/dist/houston-B3NWfq0V.js +0 -4
- 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/laserwave-DkfjiLxA.js +0 -4
- package/dist/latex-QHQNiZDD.js +0 -6
- package/dist/lean-BwOKScIt.js +0 -3
- package/dist/less-BzbdhFUi.js +0 -3
- package/dist/light-plus-DuO6rXxZ.js +0 -4
- 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/material-theme-C_YrwKEa.js +0 -4
- package/dist/material-theme-darker-DB3YVCla.js +0 -4
- package/dist/material-theme-lighter-D2fgNrBK.js +0 -4
- package/dist/material-theme-ocean-DVy172Rs.js +0 -4
- package/dist/material-theme-palenight-uMMwIfpG.js +0 -4
- 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/min-dark-C7Ec8I_2.js +0 -4
- package/dist/min-light-Be6foA7m.js +0 -4
- 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/night-owl-CqqbiLON.js +0 -4
- package/dist/night-owl-light-B9vYgGRt.js +0 -4
- package/dist/nim-CNcTuF14.js +0 -21
- package/dist/nix-Bm1Ax-Z3.js +0 -7
- package/dist/nord-BZ9DVmcN.js +0 -4
- 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/one-light-CzxBC38_.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/plastic-BGkJ2das.js +0 -4
- package/dist/plsql-DCNXypXO.js +0 -3
- package/dist/po-IjpR1yHO.js +0 -3
- package/dist/poimandres-CpnMgZuc.js +0 -4
- 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/slack-dark-BS2AOOdo.js +0 -4
- package/dist/slack-ochin-Nc7Cucwk.js +0 -4
- package/dist/smalltalk-BEQkVl4K.js +0 -3
- package/dist/snazzy-light-C2ghKZXY.js +0 -4
- 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/synthwave-84-CPtGYwOz.js +0 -4
- 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/tokyo-night-BKYoawWu.js +0 -4
- 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/vesper-ClvmKzqD.js +0 -4
- package/dist/vhdl-Co2XFKY7.js +0 -3
- package/dist/viml-BReTXeDA.js +0 -3
- package/dist/vitesse-black-BY6Qtyq-.js +0 -4
- package/dist/vitesse-dark-BT-v_EgR.js +0 -4
- package/dist/vitesse-light-Box8ZFz6.js +0 -4
- 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,471 @@
|
|
|
1
|
+
import { computed, defineComponent, h, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
2
|
+
//#region src/components/device-frame.ts
|
|
3
|
+
const DEVICE_FRAME_PRESETS = [
|
|
4
|
+
{
|
|
5
|
+
id: "iphone",
|
|
6
|
+
label: "iPhone",
|
|
7
|
+
kind: "phone",
|
|
8
|
+
width: 393,
|
|
9
|
+
height: 852
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "ipad",
|
|
13
|
+
label: "iPad",
|
|
14
|
+
kind: "tablet",
|
|
15
|
+
width: 820,
|
|
16
|
+
height: 1180
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "laptop",
|
|
20
|
+
label: "Laptop",
|
|
21
|
+
kind: "laptop",
|
|
22
|
+
width: 1280,
|
|
23
|
+
height: 800
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "desktop",
|
|
27
|
+
label: "Desktop",
|
|
28
|
+
kind: "desktop",
|
|
29
|
+
width: 1920,
|
|
30
|
+
height: 1080
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
/** The widths Chrome's device mode marks above the page, narrowest first. */
|
|
34
|
+
const DEVICE_FRAME_BREAKPOINTS = [
|
|
35
|
+
{
|
|
36
|
+
label: "Mobile S",
|
|
37
|
+
width: 320
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "Mobile M",
|
|
41
|
+
width: 375
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "Mobile L",
|
|
45
|
+
width: 425
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "Tablet",
|
|
49
|
+
width: 768
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "Laptop",
|
|
53
|
+
width: 1024
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: "Laptop L",
|
|
57
|
+
width: 1440
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "4K",
|
|
61
|
+
width: 2560
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
const SIZE_MIN = 240;
|
|
65
|
+
const SIZE_MAX = 3840;
|
|
66
|
+
const ZOOM_MIN = .1;
|
|
67
|
+
const ZOOM_MAX = 4;
|
|
68
|
+
const clampSize = (value) => Math.round(Math.min(SIZE_MAX, Math.max(SIZE_MIN, value)));
|
|
69
|
+
const clampZoom = (value) => Math.min(ZOOM_MAX, Math.max(ZOOM_MIN, value));
|
|
70
|
+
const paths = {
|
|
71
|
+
phone: ["M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z", "M12 18h.01"],
|
|
72
|
+
tablet: ["M6 2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z", "M12 18h.01"],
|
|
73
|
+
laptop: ["M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16"],
|
|
74
|
+
desktop: [
|
|
75
|
+
"M4 3h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z",
|
|
76
|
+
"M8 21h8",
|
|
77
|
+
"M12 17v4"
|
|
78
|
+
],
|
|
79
|
+
custom: [
|
|
80
|
+
"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z",
|
|
81
|
+
"M3 9h18",
|
|
82
|
+
"M9 21V9"
|
|
83
|
+
],
|
|
84
|
+
rotate: [
|
|
85
|
+
"M20 9V7a2 2 0 0 0-2-2h-6",
|
|
86
|
+
"m15 2-3 3 3 3",
|
|
87
|
+
"M20 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2"
|
|
88
|
+
],
|
|
89
|
+
chevron: ["m6 9 6 6 6-6"],
|
|
90
|
+
close: ["M18 6 6 18", "m6 6 12 12"]
|
|
91
|
+
};
|
|
92
|
+
function icon(name, className = "vh-device-frame__icon") {
|
|
93
|
+
return h("svg", {
|
|
94
|
+
"aria-hidden": "true",
|
|
95
|
+
class: className,
|
|
96
|
+
fill: "none",
|
|
97
|
+
stroke: "currentColor",
|
|
98
|
+
"stroke-linecap": "round",
|
|
99
|
+
"stroke-linejoin": "round",
|
|
100
|
+
"stroke-width": "1.75",
|
|
101
|
+
viewBox: "0 0 24 24"
|
|
102
|
+
}, (paths[name] ?? []).map((d) => h("path", { d })));
|
|
103
|
+
}
|
|
104
|
+
function readStored(key) {
|
|
105
|
+
if (!key || typeof localStorage === "undefined") return void 0;
|
|
106
|
+
try {
|
|
107
|
+
const value = JSON.parse(localStorage.getItem(key) ?? "null");
|
|
108
|
+
if (!value || typeof value !== "object") return void 0;
|
|
109
|
+
const { on, id, width, height, zoom } = value;
|
|
110
|
+
if (typeof width !== "number" || typeof height !== "number" || typeof id !== "string") return void 0;
|
|
111
|
+
return {
|
|
112
|
+
on: on === true,
|
|
113
|
+
id,
|
|
114
|
+
width: clampSize(width),
|
|
115
|
+
height: clampSize(height),
|
|
116
|
+
zoom: typeof zoom === "number" ? clampZoom(zoom) : null
|
|
117
|
+
};
|
|
118
|
+
} catch {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/** Shows its content at a device's size: a bar with the device, the size, Rotate, breakpoints and zoom, over a stage that fits the pane. */
|
|
123
|
+
const DeviceFrame = defineComponent({
|
|
124
|
+
name: "DeviceFrame",
|
|
125
|
+
props: {
|
|
126
|
+
/** The size, for `v-model`. Without it the frame keeps its own state. */
|
|
127
|
+
modelValue: {
|
|
128
|
+
default: void 0,
|
|
129
|
+
type: Object
|
|
130
|
+
},
|
|
131
|
+
/** The first size when uncontrolled and nothing is stored. */
|
|
132
|
+
defaultValue: {
|
|
133
|
+
default: void 0,
|
|
134
|
+
type: Object
|
|
135
|
+
},
|
|
136
|
+
/** Keeps the uncontrolled size in local storage under this key. */
|
|
137
|
+
storageKey: {
|
|
138
|
+
default: void 0,
|
|
139
|
+
type: String
|
|
140
|
+
},
|
|
141
|
+
/** The devices the bar offers. Defaults to `DEVICE_FRAME_PRESETS`: iPhone, iPad, Laptop, and Desktop. */
|
|
142
|
+
presets: {
|
|
143
|
+
default: void 0,
|
|
144
|
+
type: Array
|
|
145
|
+
},
|
|
146
|
+
/** The one-click widths. Defaults to `DEVICE_FRAME_BREAKPOINTS`, Chrome's; pass `[]` to hide them. */
|
|
147
|
+
breakpoints: {
|
|
148
|
+
default: void 0,
|
|
149
|
+
type: Array
|
|
150
|
+
},
|
|
151
|
+
/** Shows the content full size without the bar, and keeps the size for later. */
|
|
152
|
+
disabled: {
|
|
153
|
+
default: false,
|
|
154
|
+
type: Boolean
|
|
155
|
+
},
|
|
156
|
+
/** Shows the bar above the page while device mode is on. Pass `false` when the page around the frame has its own device controls. */
|
|
157
|
+
toolbar: {
|
|
158
|
+
default: true,
|
|
159
|
+
type: Boolean
|
|
160
|
+
},
|
|
161
|
+
/** Space in pixels under the page, for a toolbar that floats over the bottom of the frame. */
|
|
162
|
+
insetBottom: {
|
|
163
|
+
default: 16,
|
|
164
|
+
type: Number
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
emits: { "update:modelValue": (_size) => true },
|
|
168
|
+
setup(props, { emit, slots, expose }) {
|
|
169
|
+
const presets = computed(() => props.presets ?? DEVICE_FRAME_PRESETS);
|
|
170
|
+
const breakpoints = computed(() => props.breakpoints ?? DEVICE_FRAME_BREAKPOINTS);
|
|
171
|
+
const first = presets.value[0] ?? DEVICE_FRAME_PRESETS[0];
|
|
172
|
+
const initial = (stored) => ({
|
|
173
|
+
on: false,
|
|
174
|
+
id: first.id,
|
|
175
|
+
width: first.width,
|
|
176
|
+
height: first.height,
|
|
177
|
+
zoom: null,
|
|
178
|
+
...stored ?? props.defaultValue
|
|
179
|
+
});
|
|
180
|
+
const local = ref(initial());
|
|
181
|
+
const size = computed(() => props.modelValue ?? local.value);
|
|
182
|
+
function update(next) {
|
|
183
|
+
const value = {
|
|
184
|
+
...size.value,
|
|
185
|
+
...next
|
|
186
|
+
};
|
|
187
|
+
if (props.modelValue === void 0) {
|
|
188
|
+
local.value = value;
|
|
189
|
+
if (props.storageKey && typeof localStorage !== "undefined") try {
|
|
190
|
+
localStorage.setItem(props.storageKey, JSON.stringify(value));
|
|
191
|
+
} catch {}
|
|
192
|
+
}
|
|
193
|
+
emit("update:modelValue", value);
|
|
194
|
+
}
|
|
195
|
+
const sized = computed(() => !props.disabled && size.value.on);
|
|
196
|
+
const presetOf = (id) => presets.value.find((item) => item.id === id);
|
|
197
|
+
const matching = (width, height) => presets.value.find((item) => item.width === width && item.height === height || item.width === height && item.height === width)?.id ?? "custom";
|
|
198
|
+
const preset = computed(() => presetOf(size.value.id));
|
|
199
|
+
const setSize = (width, height) => update({
|
|
200
|
+
on: true,
|
|
201
|
+
width,
|
|
202
|
+
height,
|
|
203
|
+
id: matching(width, height)
|
|
204
|
+
});
|
|
205
|
+
function pick(id) {
|
|
206
|
+
const next = presetOf(id);
|
|
207
|
+
if (!next) return;
|
|
208
|
+
const current = preset.value;
|
|
209
|
+
update(current && size.value.width === current.height && size.value.width !== current.width ? {
|
|
210
|
+
id,
|
|
211
|
+
width: next.height,
|
|
212
|
+
height: next.width
|
|
213
|
+
} : {
|
|
214
|
+
id,
|
|
215
|
+
width: next.width,
|
|
216
|
+
height: next.height
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
const rotate = () => update({
|
|
220
|
+
width: size.value.height,
|
|
221
|
+
height: size.value.width
|
|
222
|
+
});
|
|
223
|
+
const within = computed(() => breakpoints.value.filter((band) => band.width <= size.value.width).at(-1)?.width);
|
|
224
|
+
const stage = ref();
|
|
225
|
+
const room = ref({
|
|
226
|
+
width: 0,
|
|
227
|
+
height: 0
|
|
228
|
+
});
|
|
229
|
+
let observer;
|
|
230
|
+
onMounted(() => {
|
|
231
|
+
local.value = initial(readStored(props.storageKey));
|
|
232
|
+
if (!stage.value || typeof ResizeObserver === "undefined") return;
|
|
233
|
+
observer = new ResizeObserver(([entry]) => {
|
|
234
|
+
if (entry) room.value = {
|
|
235
|
+
width: entry.contentRect.width,
|
|
236
|
+
height: entry.contentRect.height
|
|
237
|
+
};
|
|
238
|
+
});
|
|
239
|
+
observer.observe(stage.value);
|
|
240
|
+
});
|
|
241
|
+
onBeforeUnmount(() => observer?.disconnect());
|
|
242
|
+
const fit = computed(() => room.value.width && room.value.height ? Math.min(1, room.value.width / size.value.width, room.value.height / size.value.height) : 1);
|
|
243
|
+
const held = ref(null);
|
|
244
|
+
const scale = computed(() => Math.max(ZOOM_MIN, held.value ?? size.value.zoom ?? fit.value));
|
|
245
|
+
let start;
|
|
246
|
+
function grab(event) {
|
|
247
|
+
if (event.currentTarget instanceof Element) event.currentTarget.setPointerCapture(event.pointerId);
|
|
248
|
+
start = {
|
|
249
|
+
x: event.clientX,
|
|
250
|
+
y: event.clientY,
|
|
251
|
+
width: size.value.width,
|
|
252
|
+
height: size.value.height
|
|
253
|
+
};
|
|
254
|
+
held.value = scale.value;
|
|
255
|
+
}
|
|
256
|
+
function drag(event, edges) {
|
|
257
|
+
if (!start) return;
|
|
258
|
+
const s = scale.value;
|
|
259
|
+
setSize(edges.x ? clampSize(start.width + 2 * (event.clientX - start.x) / s) : size.value.width, edges.y ? clampSize(start.height + (event.clientY - start.y) / s) : size.value.height);
|
|
260
|
+
}
|
|
261
|
+
function release() {
|
|
262
|
+
start = void 0;
|
|
263
|
+
held.value = null;
|
|
264
|
+
}
|
|
265
|
+
function nudge(event, edges) {
|
|
266
|
+
const step = event.shiftKey ? 50 : 10;
|
|
267
|
+
const dx = edges.x ? event.key === "ArrowRight" ? step : event.key === "ArrowLeft" ? -step : 0 : 0;
|
|
268
|
+
const dy = edges.y ? event.key === "ArrowDown" ? step : event.key === "ArrowUp" ? -step : 0 : 0;
|
|
269
|
+
if (!dx && !dy) return;
|
|
270
|
+
event.preventDefault();
|
|
271
|
+
setSize(clampSize(size.value.width + dx), clampSize(size.value.height + dy));
|
|
272
|
+
}
|
|
273
|
+
const numberValue = (event) => event.target instanceof HTMLInputElement ? event.target.valueAsNumber : NaN;
|
|
274
|
+
expose({
|
|
275
|
+
rotate,
|
|
276
|
+
fit: () => update({ zoom: null })
|
|
277
|
+
});
|
|
278
|
+
function toolbar() {
|
|
279
|
+
const current = size.value;
|
|
280
|
+
const percent = Math.round(scale.value * 100);
|
|
281
|
+
return h("div", {
|
|
282
|
+
key: "bar",
|
|
283
|
+
class: "vh-device-frame__bar",
|
|
284
|
+
role: "toolbar",
|
|
285
|
+
"aria-label": "Device"
|
|
286
|
+
}, [
|
|
287
|
+
slots["toolbar-start"]?.(),
|
|
288
|
+
h("label", {
|
|
289
|
+
class: "vh-device-frame__select",
|
|
290
|
+
"data-focus-ring": ""
|
|
291
|
+
}, [
|
|
292
|
+
icon(preset.value?.kind ?? "custom"),
|
|
293
|
+
h("span", {
|
|
294
|
+
"aria-hidden": "true",
|
|
295
|
+
class: "vh-device-frame__select-label"
|
|
296
|
+
}, preset.value?.label ?? "Custom"),
|
|
297
|
+
h("select", {
|
|
298
|
+
"aria-label": "Device",
|
|
299
|
+
value: preset.value ? current.id : "custom",
|
|
300
|
+
onChange: (event) => event.target instanceof HTMLSelectElement && pick(event.target.value)
|
|
301
|
+
}, [...presets.value.map((item) => h("option", {
|
|
302
|
+
key: item.id,
|
|
303
|
+
value: item.id
|
|
304
|
+
}, `${item.label} · ${item.width} × ${item.height}`)), preset.value ? null : h("option", {
|
|
305
|
+
value: "custom",
|
|
306
|
+
disabled: true
|
|
307
|
+
}, "Custom")]),
|
|
308
|
+
icon("chevron", "vh-device-frame__chevron")
|
|
309
|
+
]),
|
|
310
|
+
h("input", {
|
|
311
|
+
"aria-label": "Width",
|
|
312
|
+
class: "vh-device-frame__number",
|
|
313
|
+
"data-focus-frame": "",
|
|
314
|
+
inputmode: "numeric",
|
|
315
|
+
max: SIZE_MAX,
|
|
316
|
+
min: SIZE_MIN,
|
|
317
|
+
type: "number",
|
|
318
|
+
value: current.width,
|
|
319
|
+
onChange: (event) => {
|
|
320
|
+
const value = numberValue(event);
|
|
321
|
+
if (Number.isFinite(value)) setSize(clampSize(value), current.height);
|
|
322
|
+
}
|
|
323
|
+
}),
|
|
324
|
+
h("span", {
|
|
325
|
+
"aria-hidden": "true",
|
|
326
|
+
class: "vh-device-frame__times"
|
|
327
|
+
}, "×"),
|
|
328
|
+
h("input", {
|
|
329
|
+
"aria-label": "Height",
|
|
330
|
+
class: "vh-device-frame__number",
|
|
331
|
+
"data-focus-frame": "",
|
|
332
|
+
inputmode: "numeric",
|
|
333
|
+
max: SIZE_MAX,
|
|
334
|
+
min: SIZE_MIN,
|
|
335
|
+
type: "number",
|
|
336
|
+
value: current.height,
|
|
337
|
+
onChange: (event) => {
|
|
338
|
+
const value = numberValue(event);
|
|
339
|
+
if (Number.isFinite(value)) setSize(current.width, clampSize(value));
|
|
340
|
+
}
|
|
341
|
+
}),
|
|
342
|
+
h("button", {
|
|
343
|
+
class: "vh-device-frame__button",
|
|
344
|
+
type: "button",
|
|
345
|
+
onClick: rotate
|
|
346
|
+
}, [icon("rotate"), h("span", "Rotate")]),
|
|
347
|
+
breakpoints.value.length ? h("div", {
|
|
348
|
+
class: "vh-device-frame__bands",
|
|
349
|
+
role: "group",
|
|
350
|
+
"aria-label": "Breakpoints"
|
|
351
|
+
}, breakpoints.value.map((band) => h("button", {
|
|
352
|
+
key: band.width,
|
|
353
|
+
"aria-label": `${band.label}, ${band.width} pixels wide`,
|
|
354
|
+
"aria-pressed": current.width === band.width ? "true" : "false",
|
|
355
|
+
class: "vh-device-frame__band",
|
|
356
|
+
"data-within": within.value === band.width ? "" : void 0,
|
|
357
|
+
title: band.label,
|
|
358
|
+
type: "button",
|
|
359
|
+
onClick: () => setSize(band.width, current.height)
|
|
360
|
+
}, String(band.width)))) : null,
|
|
361
|
+
h("div", { class: "vh-device-frame__end" }, [
|
|
362
|
+
h("label", { class: "vh-device-frame__zoom" }, [h("input", {
|
|
363
|
+
"aria-label": "Zoom, in percent",
|
|
364
|
+
class: "vh-device-frame__number",
|
|
365
|
+
"data-focus-frame": "",
|
|
366
|
+
inputmode: "numeric",
|
|
367
|
+
max: 400,
|
|
368
|
+
min: ZOOM_MIN * 100,
|
|
369
|
+
step: 10,
|
|
370
|
+
type: "number",
|
|
371
|
+
value: percent,
|
|
372
|
+
onChange: (event) => {
|
|
373
|
+
const value = numberValue(event);
|
|
374
|
+
if (Number.isFinite(value) && value > 0) update({ zoom: clampZoom(value / 100) });
|
|
375
|
+
}
|
|
376
|
+
}), h("span", { "aria-hidden": "true" }, "%")]),
|
|
377
|
+
h("button", {
|
|
378
|
+
"aria-pressed": current.zoom === null ? "true" : "false",
|
|
379
|
+
class: "vh-device-frame__button",
|
|
380
|
+
type: "button",
|
|
381
|
+
onClick: () => update({ zoom: null })
|
|
382
|
+
}, "Fit"),
|
|
383
|
+
slots["toolbar-end"]?.(),
|
|
384
|
+
h("button", {
|
|
385
|
+
"aria-label": "Leave device mode",
|
|
386
|
+
class: "vh-device-frame__button vh-device-frame__icon-button",
|
|
387
|
+
title: "Leave device mode",
|
|
388
|
+
type: "button",
|
|
389
|
+
onClick: () => update({ on: false })
|
|
390
|
+
}, [icon("close")])
|
|
391
|
+
])
|
|
392
|
+
]);
|
|
393
|
+
}
|
|
394
|
+
const HANDLES = [
|
|
395
|
+
{
|
|
396
|
+
edge: "x",
|
|
397
|
+
edges: { x: true },
|
|
398
|
+
label: "Drag to change the width"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
edge: "y",
|
|
402
|
+
edges: { y: true },
|
|
403
|
+
label: "Drag to change the height"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
edge: "xy",
|
|
407
|
+
edges: {
|
|
408
|
+
x: true,
|
|
409
|
+
y: true
|
|
410
|
+
},
|
|
411
|
+
label: "Drag to resize"
|
|
412
|
+
}
|
|
413
|
+
];
|
|
414
|
+
watch(() => props.storageKey, () => {
|
|
415
|
+
if (props.modelValue === void 0) local.value = initial(readStored(props.storageKey));
|
|
416
|
+
});
|
|
417
|
+
return () => {
|
|
418
|
+
const on = sized.value;
|
|
419
|
+
const current = size.value;
|
|
420
|
+
const s = scale.value;
|
|
421
|
+
return h("div", {
|
|
422
|
+
class: "vh-device-frame",
|
|
423
|
+
"data-slot": "device-frame",
|
|
424
|
+
"data-on": on ? "" : void 0,
|
|
425
|
+
"data-dragging": held.value === null ? void 0 : ""
|
|
426
|
+
}, [on && props.toolbar ? toolbar() : null, h("div", {
|
|
427
|
+
key: "stage",
|
|
428
|
+
ref: stage,
|
|
429
|
+
class: "vh-device-frame__stage",
|
|
430
|
+
style: on ? { paddingBottom: `${props.insetBottom}px` } : void 0
|
|
431
|
+
}, [h("div", {
|
|
432
|
+
class: "vh-device-frame__footprint",
|
|
433
|
+
style: on ? {
|
|
434
|
+
width: `${current.width * s}px`,
|
|
435
|
+
height: `${current.height * s}px`
|
|
436
|
+
} : void 0
|
|
437
|
+
}, [
|
|
438
|
+
h("div", {
|
|
439
|
+
class: "vh-device-frame__page",
|
|
440
|
+
style: on ? {
|
|
441
|
+
width: `${current.width}px`,
|
|
442
|
+
height: `${current.height}px`,
|
|
443
|
+
transform: `scale(${s})`
|
|
444
|
+
} : void 0
|
|
445
|
+
}, slots.default?.()),
|
|
446
|
+
on && held.value !== null ? h("p", {
|
|
447
|
+
class: "vh-device-frame__readout",
|
|
448
|
+
"aria-live": "polite"
|
|
449
|
+
}, `${current.width} × ${current.height}`) : null,
|
|
450
|
+
...on ? HANDLES.map((handle) => h("div", {
|
|
451
|
+
key: handle.edge,
|
|
452
|
+
"aria-label": handle.label,
|
|
453
|
+
"aria-orientation": handle.edge === "y" ? "horizontal" : "vertical",
|
|
454
|
+
"aria-valuenow": handle.edge === "y" ? current.height : current.width,
|
|
455
|
+
"aria-valuemin": SIZE_MIN,
|
|
456
|
+
"aria-valuemax": SIZE_MAX,
|
|
457
|
+
class: "vh-device-frame__handle",
|
|
458
|
+
"data-edge": handle.edge,
|
|
459
|
+
role: "separator",
|
|
460
|
+
tabindex: 0,
|
|
461
|
+
onKeydown: (event) => nudge(event, handle.edges),
|
|
462
|
+
onLostpointercapture: release,
|
|
463
|
+
onPointerdown: grab,
|
|
464
|
+
onPointermove: (event) => drag(event, handle.edges)
|
|
465
|
+
}, handle.edge === "xy" ? void 0 : [h("span", { class: "vh-device-frame__grip" })])) : []
|
|
466
|
+
])])]);
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
//#endregion
|
|
471
|
+
export { DEVICE_FRAME_BREAKPOINTS, DEVICE_FRAME_PRESETS, DeviceFrame };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { a as ChoicesInputSource } from "../../choices-input-ByXJvDn1.js";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
//#region src/components/filter-search.d.ts
|
|
4
|
+
export type FilterSearchSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
|
+
export declare const FilterSearch: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
/** The object that `useChoices()` returns. */
|
|
7
|
+
choices: {
|
|
8
|
+
required: true;
|
|
9
|
+
type: PropType<ChoicesInputSource>;
|
|
10
|
+
};
|
|
11
|
+
/** The accessible name of the input. */
|
|
12
|
+
label: {
|
|
13
|
+
default: string;
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
placeholder: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
size: {
|
|
20
|
+
default: string;
|
|
21
|
+
type: PropType<FilterSearchSize>;
|
|
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
|
+
/** The object that `useChoices()` returns. */
|
|
27
|
+
choices: {
|
|
28
|
+
required: true;
|
|
29
|
+
type: PropType<ChoicesInputSource>;
|
|
30
|
+
};
|
|
31
|
+
/** The accessible name of the input. */
|
|
32
|
+
label: {
|
|
33
|
+
default: string;
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
};
|
|
36
|
+
placeholder: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
39
|
+
size: {
|
|
40
|
+
default: string;
|
|
41
|
+
type: PropType<FilterSearchSize>;
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{}>, {
|
|
44
|
+
label: string;
|
|
45
|
+
size: FilterSearchSize;
|
|
46
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
47
|
+
//#endregion
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { r as useUIComponent } from "../../nuxt-ui-DSQFzq3s.js";
|
|
2
|
+
import { ChoicesInput, ChoicesInputClear, ChoicesInputError, ChoicesInputField, ChoicesInputStatus } from "../headless/choices-input.js";
|
|
3
|
+
import { defineComponent, h } from "vue";
|
|
4
|
+
//#region src/components/filter-search.ts
|
|
5
|
+
const FilterSearch = defineComponent({
|
|
6
|
+
name: "FilterSearch",
|
|
7
|
+
props: {
|
|
8
|
+
/** The object that `useChoices()` returns. */
|
|
9
|
+
choices: {
|
|
10
|
+
required: true,
|
|
11
|
+
type: Object
|
|
12
|
+
},
|
|
13
|
+
/** The accessible name of the input. */
|
|
14
|
+
label: {
|
|
15
|
+
default: "Search",
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
placeholder: { type: String },
|
|
19
|
+
size: {
|
|
20
|
+
default: "md",
|
|
21
|
+
type: String
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(props, { slots }) {
|
|
25
|
+
const UButton = useUIComponent("UButton");
|
|
26
|
+
const UIcon = useUIComponent("UIcon");
|
|
27
|
+
const UInput = useUIComponent("UInput");
|
|
28
|
+
return () => h(ChoicesInput, {
|
|
29
|
+
choices: props.choices,
|
|
30
|
+
class: "vh-filter-search"
|
|
31
|
+
}, () => [
|
|
32
|
+
h(ChoicesInputField, {
|
|
33
|
+
as: UInput,
|
|
34
|
+
class: "w-full",
|
|
35
|
+
label: props.label,
|
|
36
|
+
placeholder: props.placeholder,
|
|
37
|
+
size: props.size
|
|
38
|
+
}, {
|
|
39
|
+
leading: slots.leading,
|
|
40
|
+
trailing: () => [props.choices.status.value === "thinking" ? h(UIcon, {
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
class: "animate-spin",
|
|
43
|
+
name: "i-lucide-loader-circle"
|
|
44
|
+
}) : props.choices.text.value !== "" ? h(ChoicesInputClear, {
|
|
45
|
+
as: UButton,
|
|
46
|
+
color: "neutral",
|
|
47
|
+
icon: "i-lucide-x",
|
|
48
|
+
size: "xs",
|
|
49
|
+
variant: "link"
|
|
50
|
+
}) : null, slots.trailing?.()]
|
|
51
|
+
}),
|
|
52
|
+
h("span", { "data-slot": "visually-hidden" }, [h(ChoicesInputStatus)]),
|
|
53
|
+
h(ChoicesInputError, { class: "vh-filter-search-error" }, { default: ({ error }) => slots.error?.({ error }) ?? error?.message })
|
|
54
|
+
]);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
export { FilterSearch };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
import { MarkdownDocumentProps, MarkdownProps } from "@comark/vue";
|
|
3
|
+
//#region src/components/markdown-renderer.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The part of `Markdown` that parses and renders: Comark, the comark-ui preset, and their plugins. `Markdown` loads it
|
|
6
|
+
* with the first Markdown that renders, and passes its own props and attributes.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MarkdownRenderer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
+
components: {
|
|
10
|
+
type: PropType<MarkdownProps["components"]>;
|
|
11
|
+
};
|
|
12
|
+
options: {
|
|
13
|
+
type: PropType<MarkdownProps["options"]>;
|
|
14
|
+
};
|
|
15
|
+
plugins: {
|
|
16
|
+
type: PropType<MarkdownProps["plugins"]>;
|
|
17
|
+
};
|
|
18
|
+
streaming: {
|
|
19
|
+
default: boolean;
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
};
|
|
22
|
+
value: {
|
|
23
|
+
default: string;
|
|
24
|
+
type: PropType<string | NonNullable<MarkdownDocumentProps["value"]>>;
|
|
25
|
+
};
|
|
26
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
components: {
|
|
30
|
+
type: PropType<MarkdownProps["components"]>;
|
|
31
|
+
};
|
|
32
|
+
options: {
|
|
33
|
+
type: PropType<MarkdownProps["options"]>;
|
|
34
|
+
};
|
|
35
|
+
plugins: {
|
|
36
|
+
type: PropType<MarkdownProps["plugins"]>;
|
|
37
|
+
};
|
|
38
|
+
streaming: {
|
|
39
|
+
default: boolean;
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
};
|
|
42
|
+
value: {
|
|
43
|
+
default: string;
|
|
44
|
+
type: PropType<string | NonNullable<MarkdownDocumentProps["value"]>>;
|
|
45
|
+
};
|
|
46
|
+
}>> & Readonly<{}>, {
|
|
47
|
+
value: string | NonNullable<import("comark").MarkdownDocument<Record<string, any>, Record<string, any>> | {
|
|
48
|
+
nodes: import("comark").MarkdownDocument["nodes"];
|
|
49
|
+
} | undefined>;
|
|
50
|
+
streaming: boolean;
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
52
|
+
//#endregion
|