@vitejs/devtools 0.0.0-alpha.18 → 0.0.0-alpha.19
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/dist/{cli-commands-zRt72Hns.js → cli-commands-DRuCf81B.js} +2 -2
- package/dist/cli-commands.js +2 -2
- package/dist/cli.js +2 -2
- package/dist/client/inject.js +85 -2
- package/dist/client/standalone/assets/index-BdwMlRiX.css +1 -0
- package/dist/client/standalone/assets/index-Brys-GL2.js +7 -0
- package/dist/client/standalone/index.html +2 -2
- package/dist/client/webcomponents.d.ts +10 -10
- package/dist/client/webcomponents.js +1234 -2
- package/dist/{webcomponents-DheoZ3qc.js → docks-j8O6WvbD.js} +639 -1812
- package/dist/{index-Dt5HYF60.d.ts → index-Wdefo_Ne.d.ts} +113 -10
- package/dist/index.d.ts +11 -6
- package/dist/index.js +1 -1
- package/dist/{plugins-LceePuMU.js → plugins-l6D28NJB.js} +198 -38
- package/package.json +13 -11
- package/dist/client/standalone/assets/index-SrlfcErH.js +0 -1
- package/dist/client/standalone/assets/index-t2O2s5Eq.css +0 -1
|
@@ -1,3 +1,1235 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { A as watchEffect, B as normalizeStyle, C as onMounted, D as renderSlot, E as renderList, F as ref, I as shallowRef, L as toRefs, M as withDirectives, N as markRaw, O as useTemplateRef, P as reactive, R as unref, S as nextTick, T as openBlock, V as toDisplayString, _ as createCommentVNode, a as useEventListener, b as createVNode, c as useWindowSize, d as vShow, f as withModifiers, g as createBlock, h as createBaseVNode, i as useElementBounding, j as withCtx, k as watch, l as watchImmediate, m as computed, n as createDockEntryState, p as Fragment, r as useDocksEntries, s as useScreenSafeArea, t as DEFAULT_DOCK_PANEL_STORE, u as defineCustomElement, v as createElementBlock, w as onUnmounted, x as defineComponent, y as createStaticVNode, z as normalizeClass } from "../docks-j8O6WvbD.js";
|
|
2
|
+
import { FitAddon } from "@xterm/addon-fit";
|
|
3
|
+
import { Terminal } from "@xterm/xterm";
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
//#region src/client/webcomponents/.generated/css.ts
|
|
6
|
+
var css_default = "*{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before{--un-content:\"\"}:after{--un-content:\"\"}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button{-webkit-appearance:button;background-color:transparent;background-image:none}[type=button]{-webkit-appearance:button;background-color:transparent;background-image:none}[type=reset]{-webkit-appearance:button;background-color:transparent;background-image:none}[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder{opacity:1;color:#9ca3af}textarea::placeholder{opacity:1;color:#9ca3af}button{cursor:pointer}[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.xterm{cursor:text;user-select:none;position:relative}.xterm.focus{outline:none}.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;top:0;bottom:0;left:0;right:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-message{z-index:10;color:transparent;pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0}.xterm .xterm-accessibility:not(.debug){z-index:10;color:transparent;pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:transparent}.xterm .xterm-accessibility-tree{user-select:text;white-space:pre}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:underline double}.xterm-underline-3{text-decoration:underline wavy}.xterm-underline-4{text-decoration:underline dotted}.xterm-underline-5{text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}:root{--un-text-opacity:100%}#vite-devtools-anchor{z-index:2147483644;box-sizing:border-box;transform-origin:50%;width:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:15px;position:fixed;transform:translate(-50%,-50%)rotate(0)}#vite-devtools-anchor #vite-devtools-dock-container{width:max-content;min-width:100px;height:40px;display:flex;position:absolute;top:0;left:0;transform:translate(-50%,-50%)}#vite-devtools-anchor.vite-devtools-vertical #vite-devtools-dock-container{transition-property:all;transition-duration:.5s;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(-50%,-50%)rotate(90deg)}#vite-devtools-anchor #vite-devtools-dock{touch-action:none;user-select:none;--vdt-backdrop-blur:blur(5px);height:40px;backdrop-filter:var(--vdt-backdrop-blur)var(--vdt-backdrop-brightness)var(--vdt-backdrop-contrast)var(--vdt-backdrop-grayscale)var(--vdt-backdrop-hue-rotate)var(--vdt-backdrop-invert)var(--vdt-backdrop-opacity)var(--vdt-backdrop-saturate)var(--vdt-backdrop-sepia);--vdt-text-opacity:1;color:rgba(255,255,255,var(--vdt-text-opacity));--vdt-shadow:var(--vdt-shadow-inset)0 1px 3px 0 var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset)0 1px 2px -1px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow),var(--vdt-ring-shadow),var(--vdt-shadow);width:calc-size(max-content,size);background-color:rgba(255,255,255,.5);-webkit-border-radius:9999px;border-radius:9999px;margin:auto;padding-left:1rem;padding-right:1rem;transition-property:all;transition-duration:.5s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (prefers-color-scheme:dark){#vite-devtools-anchor #vite-devtools-dock{background-color:rgba(17,17,17,.5)}}#vite-devtools-anchor.vite-devtools-minimized #vite-devtools-dock{width:22px;height:22px;padding:2px 0}#vite-devtools-anchor.vite-devtools-minimized .vite-devtools-dock-bracket{opacity:.5;width:.375rem}#vite-devtools-anchor:hover #vite-devtools-glowing{opacity:.6}#vite-devtools-anchor #vite-devtools-glowing{pointer-events:none;z-index:-1;opacity:0;--vdt-blur:blur(60px);width:160px;height:160px;filter:var(--vdt-blur)var(--vdt-brightness)var(--vdt-contrast)var(--vdt-drop-shadow)var(--vdt-grayscale)var(--vdt-hue-rotate)var(--vdt-invert)var(--vdt-saturate)var(--vdt-sepia);background-image:linear-gradient(45deg,#61d9ff,#7a23a1,#715ebd);-webkit-border-radius:9999px;border-radius:9999px;transition-property:all;transition-duration:1s;transition-timing-function:cubic-bezier(0,0,.2,1);position:absolute;top:0;left:0;transform:translate(-50%,-50%)}@media print{#vite-devtools-anchor{display:none}}.vite-devtools-resize-handle-horizontal{cursor:ns-resize;-webkit-border-radius:.375rem;border-radius:.375rem;height:10px;margin-top:-5px;margin-bottom:-5px;position:absolute;left:6px;right:6px}.vite-devtools-resize-handle-vertical{cursor:ew-resize;-webkit-border-radius:.375rem;border-radius:.375rem;width:10px;margin-left:-5px;margin-right:-5px;position:absolute;top:6px;bottom:0}.vite-devtools-resize-handle-corner{-webkit-border-radius:.375rem;border-radius:.375rem;width:14px;height:14px;margin:-6px;position:absolute}.vite-devtools-resize-handle{z-index:30}.vite-devtools-resize-handle:hover{background-color:rgba(156,163,175,.1)}*{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }:before{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }:after{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }::backdrop{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }.i-carbon-clean{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 20h-6v-2h6zm4 8h-6v-2h6zm-2-4h-6v-2h6z'/%3E%3Cpath fill='currentColor' d='M17.003 20a4.9 4.9 0 0 0-2.404-4.173L22 3l-1.73-1l-7.577 13.126a5.7 5.7 0 0 0-5.243 1.503C3.706 20.24 3.996 28.682 4.01 29.04a1 1 0 0 0 1 .96h14.991a1 1 0 0 0 .6-1.8c-3.54-2.656-3.598-8.146-3.598-8.2m-5.073-3.003A3.11 3.11 0 0 1 15.004 20c0 .038.002.208.017.469l-5.9-2.624a3.8 3.8 0 0 1 2.809-.848M15.45 28A5.2 5.2 0 0 1 14 25h-2a6.5 6.5 0 0 0 .968 3h-2.223A16.6 16.6 0 0 1 10 24H8a17.3 17.3 0 0 0 .665 4H6c.031-1.836.29-5.892 1.803-8.553l7.533 3.35A13 13 0 0 0 17.596 28Z'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-check-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M232 56v144a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16' opacity='.2'/%3E%3Cpath d='m205.66 85.66l-96 96a8 8 0 0 1-11.32 0l-40-40a8 8 0 0 1 11.32-11.32L104 164.69l90.34-90.35a8 8 0 0 1 11.32 11.32'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-rocket-launch-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M184 120v61.65a8 8 0 0 1-2.34 5.65l-34.35 34.35a8 8 0 0 1-13.57-4.53L128 176Zm-48-48H74.35a8 8 0 0 0-5.65 2.34l-34.35 34.35a8 8 0 0 0 4.53 13.57L80 128ZM40 216c37.65 0 50.69-19.69 54.56-28.18l-26.38-26.38C59.69 165.31 40 178.35 40 216' opacity='.2'/%3E%3Cpath d='M223.85 47.12a16 16 0 0 0-15-15c-12.58-.75-44.73.4-71.41 27.07L132.69 64H74.36A15.9 15.9 0 0 0 63 68.68L28.7 103a16 16 0 0 0 9.07 27.16l38.47 5.37l44.21 44.21l5.37 38.49a15.94 15.94 0 0 0 10.78 12.92a16.1 16.1 0 0 0 5.1.83a15.9 15.9 0 0 0 11.3-4.68l34.32-34.3a15.9 15.9 0 0 0 4.68-11.36v-58.33l4.77-4.77c26.68-26.68 27.83-58.83 27.08-71.42M74.36 80h42.33l-39.53 39.52L40 114.34Zm74.41-9.45a76.65 76.65 0 0 1 59.11-22.47a76.46 76.46 0 0 1-22.42 59.16L128 164.68L91.32 128ZM176 181.64L141.67 216l-5.19-37.17L176 139.31Zm-74.16 9.5C97.34 201 82.29 224 40 224a8 8 0 0 1-8-8c0-42.29 23-57.34 32.86-61.85a8 8 0 0 1 6.64 14.56c-6.43 2.93-20.62 12.36-23.12 38.91c26.55-2.5 36-16.69 38.91-23.12a8 8 0 1 1 14.56 6.64Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-warning-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M215.46 216H40.54c-12.62 0-20.54-13.21-14.41-23.91l87.46-151.87c6.3-11 22.52-11 28.82 0l87.46 151.87c6.13 10.7-1.79 23.91-14.41 23.91' opacity='.2'/%3E%3Cpath d='M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-svg-spinners-8-dots-rotate{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Ccircle cx='3' cy='12' r='2' fill='currentColor'/%3E%3Ccircle cx='21' cy='12' r='2' fill='currentColor'/%3E%3Ccircle cx='12' cy='21' r='2' fill='currentColor'/%3E%3Ccircle cx='12' cy='3' r='2' fill='currentColor'/%3E%3Ccircle cx='5.64' cy='5.64' r='2' fill='currentColor'/%3E%3Ccircle cx='18.36' cy='18.36' r='2' fill='currentColor'/%3E%3Ccircle cx='5.64' cy='18.36' r='2' fill='currentColor'/%3E%3Ccircle cx='18.36' cy='5.64' r='2' fill='currentColor'/%3E%3CanimateTransform attributeName='transform' dur='1.5s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon)no-repeat;mask:var(--vdt-icon)no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.container{width:100%}.z-floating-tooltip{z-index:2147483645}.border-base{--vdt-border-opacity:.13;border-color:rgba(136,136,136,var(--vdt-border-opacity))}.bg-active{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.bg-glass{--vdt-backdrop-blur:blur(5px);backdrop-filter:var(--vdt-backdrop-blur)var(--vdt-backdrop-brightness)var(--vdt-backdrop-contrast)var(--vdt-backdrop-grayscale)var(--vdt-backdrop-hue-rotate)var(--vdt-backdrop-invert)var(--vdt-backdrop-opacity)var(--vdt-backdrop-saturate)var(--vdt-backdrop-sepia);background-color:rgba(255,255,255,.5)}.hover\\:bg-active:hover{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}@media (prefers-color-scheme:dark){.bg-glass{background-color:rgba(17,17,17,.5)}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.disabled\\:pointer-events-none:disabled{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{top:0;bottom:0;left:0;right:0}.bottom-0{bottom:0}.left--1{left:-.25rem}.left-1\\/2{left:50%}.right--1{right:-.25rem}.top-1\\/2{top:50%}.z--1{z-index:-1}.grid{display:grid}.grid-rows-\\[max-content_1fr\\]{grid-template-rows:max-content 1fr}.m-auto{margin:auto}.h-10{height:2.5rem}.h-3{height:.75rem}.h-5{height:1.25rem}.h-full{height:100%}.w-10{width:2.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-full{width:100%}.w-max{width:max-content}.flex{display:flex}.flex-col{flex-direction:column}.translate-x--1\\/2{--vdt-translate-x:-50%;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.translate-y--1\\/2{--vdt-translate-y:-50%;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.rotate-270{--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-rotate:270deg;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.scale-120{--vdt-scale-x:1.2;--vdt-scale-y:1.2;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.hover\\:scale-120:hover{--vdt-scale-x:1.2;--vdt-scale-y:1.2;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.scale-y--100{--vdt-scale-y:-1;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.transform{transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.select-none{user-select:none}.resize{resize:both}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.of-auto{overflow:auto}.overflow-x-auto{overflow-x:auto}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.rounded{-webkit-border-radius:.25rem;border-radius:.25rem}.rounded-lg{-webkit-border-radius:.5rem;border-radius:.5rem}.rounded-xl{-webkit-border-radius:.75rem;border-radius:.75rem}.rounded-t{-webkit-border-top-left-radius:.25rem;border-top-left-radius:.25rem;-webkit-border-top-right-radius:.25rem;border-top-right-radius:.25rem}.bg-black{--vdt-bg-opacity:1;background-color:rgba(0,0,0,var(--vdt-bg-opacity))}.bg-lime6{--vdt-bg-opacity:1;background-color:rgba(101,163,13,var(--vdt-bg-opacity))}.hover\\:bg-\\[\\#8881\\]:hover{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.hover\\:bg-lime7:hover{--vdt-bg-opacity:1;background-color:rgba(77,124,15,var(--vdt-bg-opacity))}.disabled\\:bg-gray6\\!:disabled{--vdt-bg-opacity:1!important;background-color:rgba(75,85,99,var(--vdt-bg-opacity))!important}.fill-black{--vdt-fill-opacity:1;fill:rgba(0,0,0,var(--vdt-fill-opacity))}.p1{padding:.25rem}.p1\\.5{padding:.375rem}.px,.px4{padding-left:1rem;padding-right:1rem}.px2{padding-left:.5rem;padding-right:.5rem}.px3{padding-left:.75rem;padding-right:.75rem}.py1{padding-top:.25rem;padding-bottom:.25rem}.py1\\.5{padding-top:.375rem;padding-bottom:.375rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-purple{--vdt-text-opacity:1;color:rgba(192,132,252,var(--vdt-text-opacity))}.font-bold{font-weight:700}.tab{tab-size:4}.op0,.opacity-0{opacity:0}.op100,.opacity-100{opacity:1}.op50{opacity:.5}.op60\\!{opacity:.6!important}.op75{opacity:.75}.shadow{--vdt-shadow:var(--vdt-shadow-inset)0 1px 3px 0 var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset)0 1px 2px -1px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow),var(--vdt-ring-shadow),var(--vdt-shadow)}.saturate-0{--vdt-saturate:saturate(0);filter:var(--vdt-blur)var(--vdt-brightness)var(--vdt-contrast)var(--vdt-drop-shadow)var(--vdt-grayscale)var(--vdt-hue-rotate)var(--vdt-invert)var(--vdt-saturate)var(--vdt-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}@media (prefers-color-scheme:dark){.dark\\:fill-white{--vdt-fill-opacity:1;fill:rgba(255,255,255,var(--vdt-fill-opacity))}}";
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/client/webcomponents/state/floating-tooltip.ts
|
|
10
|
+
const state = shallowRef(null);
|
|
11
|
+
function setFloatingTooltip(info) {
|
|
12
|
+
state.value = info;
|
|
13
|
+
}
|
|
14
|
+
function useFloatingTooltip() {
|
|
15
|
+
return state;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region \0/plugin-vue/export-helper
|
|
20
|
+
var export_helper_default = (sfc, props) => {
|
|
21
|
+
const target = sfc.__vccOpts || sfc;
|
|
22
|
+
for (const [key, val] of props) target[key] = val;
|
|
23
|
+
return target;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/client/webcomponents/components/icons/VitePlusCore.vue
|
|
28
|
+
const _sfc_main$16 = {};
|
|
29
|
+
const _hoisted_1$8 = {
|
|
30
|
+
viewBox: "0 0 22 22",
|
|
31
|
+
fill: "none",
|
|
32
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
33
|
+
};
|
|
34
|
+
function _sfc_render$2(_ctx, _cache) {
|
|
35
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [createStaticVNode("<g clip-path=\"url(#clip0_2_2)\"><path d=\"M11.85 20.535C11.7881 20.6144 11.7029 20.6726 11.6064 20.7012C11.5098 20.7298 11.4067 20.7276 11.3115 20.6947C11.2163 20.6619 11.1337 20.6001 11.0754 20.5181C11.017 20.436 10.9858 20.3377 10.986 20.237V15.834C10.986 15.5775 10.8841 15.3316 10.7028 15.1502C10.5214 14.9689 10.2755 14.867 10.019 14.867H5.157C5.06821 14.867 4.98114 14.8426 4.90534 14.7964C4.82954 14.7501 4.76795 14.6839 4.72734 14.6049C4.68673 14.526 4.66866 14.4374 4.67513 14.3488C4.6816 14.2603 4.71235 14.1752 4.764 14.103L7.961 9.62801C8.06459 9.48335 8.12626 9.31291 8.13923 9.13546C8.15219 8.95801 8.11594 8.78042 8.03448 8.62224C7.95301 8.46406 7.82948 8.33143 7.67749 8.23893C7.52549 8.14644 7.35093 8.09768 7.173 8.09801H1.29C1.20122 8.09803 1.11414 8.07359 1.03834 8.02736C0.962542 7.98113 0.900953 7.91489 0.86034 7.83594C0.819727 7.75699 0.801662 7.66837 0.80813 7.57982C0.814597 7.49127 0.845347 7.40622 0.897 7.33401L5.04 1.53301C5.08452 1.46999 5.14358 1.41864 5.21217 1.38331C5.28075 1.34797 5.35685 1.32969 5.434 1.33001H17.782C18.175 1.33001 18.404 1.77501 18.175 2.09401L14.978 6.57001C14.521 7.21001 14.978 8.10001 15.766 8.10001H20.627C21.031 8.10001 21.257 8.56401 21.007 8.88201L11.85 20.535Z\" fill=\"#6254FE\"></path><mask id=\"mask0_2_2\" style=\"mask-type:alpha;\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"1\" width=\"22\" height=\"20\"><path d=\"M11.85 20.535C11.7881 20.6144 11.7029 20.6726 11.6064 20.7012C11.5098 20.7298 11.4067 20.7276 11.3115 20.6947C11.2163 20.6619 11.1337 20.6001 11.0754 20.5181C11.017 20.436 10.9858 20.3377 10.986 20.237V15.834C10.986 15.5775 10.8841 15.3316 10.7028 15.1502C10.5214 14.9689 10.2755 14.867 10.019 14.867H5.157C5.06821 14.867 4.98114 14.8426 4.90534 14.7964C4.82954 14.7501 4.76795 14.6839 4.72734 14.6049C4.68673 14.526 4.66866 14.4374 4.67513 14.3488C4.6816 14.2603 4.71235 14.1752 4.764 14.103L7.961 9.62801C8.06459 9.48335 8.12626 9.31291 8.13923 9.13546C8.15219 8.95801 8.11594 8.78042 8.03448 8.62224C7.95301 8.46406 7.82948 8.33143 7.67749 8.23893C7.52549 8.14644 7.35093 8.09768 7.173 8.09801H1.29C1.20122 8.09803 1.11414 8.07359 1.03834 8.02736C0.962542 7.98113 0.900953 7.91489 0.86034 7.83594C0.819727 7.75699 0.801662 7.66837 0.80813 7.57982C0.814597 7.49127 0.845347 7.40622 0.897 7.33401L5.04 1.53301C5.08452 1.46999 5.14358 1.41864 5.21217 1.38331C5.28075 1.34797 5.35685 1.32969 5.434 1.33001H17.782C18.175 1.33001 18.404 1.77501 18.175 2.09401L14.978 6.57001C14.521 7.21001 14.978 8.10001 15.766 8.10001H20.627C21.031 8.10001 21.257 8.56401 21.007 8.88201L11.85 20.535Z\" fill=\"#833BFF\"></path></mask><g mask=\"url(#mask0_2_2)\"><g filter=\"url(#filter0_f_2_2)\"><path d=\"M11.4271 17.1119C11.4313 18.412 8.62134 19.475 5.1508 19.4863C1.68026 19.4975 -1.13659 18.4528 -1.14081 17.1527C-1.14503 15.8526 1.66497 14.7896 5.13551 14.7783C8.60605 14.767 11.4229 15.8118 11.4271 17.1119Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter1_f_2_2)\"><path d=\"M9.48364 9.06048C9.49161 11.5148 3.78614 13.523 -3.25987 13.5459C-10.3059 13.5688 -16.0243 11.5977 -16.0322 9.14332C-16.0402 6.68898 -10.3347 4.6808 -3.28872 4.65792C3.75729 4.63505 9.47567 6.60614 9.48364 9.06048Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter2_f_2_2)\"><path d=\"M9.53104 8.43813C9.53526 9.7382 3.70543 10.8111 -3.49025 10.8344C-10.6859 10.8578 -16.5226 9.82279 -16.5268 8.52272C-16.531 7.22265 -10.7012 6.1498 -3.50554 6.12644C3.69014 6.10308 9.52682 7.13806 9.53104 8.43813Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter3_f_2_2)\"><path d=\"M11.5916 16.1293C11.5958 17.4293 5.74448 18.5022 -1.47775 18.5256C-8.69997 18.549 -14.5582 17.5141 -14.5624 16.214C-14.5666 14.9139 -8.71523 13.841 -1.493 13.8176C5.72923 13.7942 11.5874 14.8292 11.5916 16.1293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter4_f_2_2)\"><path d=\"M12.2473 16.6206C12.2515 17.9206 6.40021 18.9935 -0.821978 19.017C-8.04417 19.0404 -13.9023 18.0055 -13.9066 16.7055C-13.9108 15.4054 -8.05945 14.3325 -0.837261 14.309C6.38493 14.2856 12.2431 15.3205 12.2473 16.6206Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter5_f_2_2)\"><path d=\"M14.047 5.7039C14.2411 2.38813 18.6158 -0.0529585 23.8183 0.251568C29.0207 0.556095 33.0808 3.49092 32.8867 6.80669C32.6926 10.1225 28.3179 12.5635 23.1154 12.259C17.913 11.9545 13.8529 9.01966 14.047 5.7039Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter6_f_2_2)\"><path d=\"M14.7518 7.88531C14.7376 7.06639 18.8396 6.33138 23.9137 6.2436C28.9879 6.15583 33.1129 6.74854 33.127 7.56745C33.1412 8.38637 29.0392 9.12139 23.965 9.20916C18.8909 9.29693 14.7659 8.70422 14.7518 7.88531Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter7_f_2_2)\"><path d=\"M14.7518 7.88531C14.7376 7.06639 18.8396 6.33138 23.9137 6.2436C28.9879 6.15583 33.1129 6.74854 33.127 7.56745C33.1412 8.38637 29.0392 9.12139 23.965 9.20916C18.8909 9.29693 14.7659 8.70422 14.7518 7.88531Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter8_f_2_2)\"><path d=\"M-6.98848 14.7616C-6.18615 15.4233 -1.99229 11.6626 2.37876 6.362C6.74982 1.06138 9.64283 -3.77199 8.84049 -4.43362C8.03816 -5.09525 3.8443 -1.3346 -0.526755 3.96602C-4.89781 9.26665 -7.79082 14.1 -6.98848 14.7616Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter9_f_2_2)\"><path d=\"M13.4305 8.5449C14.2512 9.18361 18.3372 5.30605 22.5568 -0.115883C26.7764 -5.53781 29.5318 -10.4509 28.7111 -11.0896C27.8904 -11.7284 23.8044 -7.8508 19.5848 -2.42887C15.3651 2.99306 12.6098 7.90619 13.4305 8.5449Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter10_f_2_2)\"><path d=\"M14.9501 9.73878C16.4926 10.9392 19.2111 10.026 21.0221 7.69897C22.8331 5.37198 23.0507 2.51245 21.5083 1.31202C19.9658 0.111596 17.2473 1.02485 15.4363 3.35184C13.6253 5.67882 13.4077 8.53835 14.9501 9.73878Z\" fill=\"#2BFDD2\"></path></g><g filter=\"url(#filter11_f_2_2)\"><path d=\"M-7.68233 27.5293C-6.86163 28.168 -2.77563 24.2904 1.44401 18.8685C5.66365 13.4466 8.41904 8.53346 7.59834 7.89474C6.77764 7.25603 2.69164 11.1336 -1.528 16.5555C-5.74764 21.9775 -8.50303 26.8906 -7.68233 27.5293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter12_f_2_2)\"><path d=\"M-7.68233 27.5293C-6.86163 28.168 -2.77563 24.2904 1.44401 18.8685C5.66365 13.4466 8.41904 8.53346 7.59834 7.89474C6.77764 7.25603 2.69164 11.1336 -1.528 16.5555C-5.74764 21.9775 -8.50303 26.8906 -7.68233 27.5293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter13_f_2_2)\"><path d=\"M8.26366 23.8563C9.13579 24.535 13.2635 20.6899 17.4831 15.268C21.7028 9.84604 24.4165 4.90047 23.5443 4.22173C22.6722 3.54299 18.5445 7.38811 14.3249 12.81C10.1052 18.232 7.39153 23.1775 8.26366 23.8563Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter14_f_2_2)\"><path d=\"M12.2866 22.5389C13.7846 23.7047 17.4746 21.4689 20.5284 17.5449C23.5822 13.621 24.8434 9.49495 23.3454 8.32912C21.8474 7.16329 18.1574 9.39917 15.1036 13.3231C12.0498 17.247 10.7886 21.3731 12.2866 22.5389Z\" fill=\"#2BFDD2\"></path></g></g></g><defs><filter id=\"filter0_f_2_2\" x=\"-7.68682\" y=\"8.2322\" width=\"25.6599\" height=\"17.8002\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter1_f_2_2\" x=\"-22.5782\" y=\"-1.88827\" width=\"38.6079\" height=\"21.9804\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter2_f_2_2\" x=\"-20.4548\" y=\"2.19805\" width=\"33.9139\" height=\"12.5647\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter3_f_2_2\" x=\"-18.4904\" y=\"9.88925\" width=\"34.01\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter4_f_2_2\" x=\"-17.8346\" y=\"10.3806\" width=\"34.0099\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter5_f_2_2\" x=\"7.4943\" y=\"-6.32009\" width=\"31.9451\" height=\"25.1508\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter6_f_2_2\" x=\"10.8237\" y=\"2.30699\" width=\"26.2313\" height=\"10.8388\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter7_f_2_2\" x=\"10.8237\" y=\"2.30699\" width=\"26.2313\" height=\"10.8388\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter8_f_2_2\" x=\"-11.0501\" y=\"-8.43711\" width=\"23.9523\" height=\"27.2022\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter9_f_2_2\" x=\"9.35783\" y=\"-15.0865\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter10_f_2_2\" x=\"9.99386\" y=\"-3.14457\" width=\"16.4707\" height=\"17.3399\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter11_f_2_2\" x=\"-11.755\" y=\"3.89791\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter12_f_2_2\" x=\"-11.755\" y=\"3.89791\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter13_f_2_2\" x=\"4.17262\" y=\"0.216058\" width=\"23.4628\" height=\"27.6459\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter14_f_2_2\" x=\"7.72776\" y=\"4.09222\" width=\"20.1765\" height=\"22.6836\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><clipPath id=\"clip0_2_2\"><rect width=\"22\" height=\"22\" fill=\"white\"></rect></clipPath></defs>", 2)])]);
|
|
36
|
+
}
|
|
37
|
+
var VitePlusCore_default = /* @__PURE__ */ export_helper_default(_sfc_main$16, [["render", _sfc_render$2]]);
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/client/webcomponents/components/DockIcon.vue
|
|
41
|
+
const _hoisted_1$7 = { key: 1 };
|
|
42
|
+
const _hoisted_2$3 = ["srcset"];
|
|
43
|
+
const _hoisted_3$2 = ["srcset"];
|
|
44
|
+
const _hoisted_4$1 = ["src", "alt"];
|
|
45
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
46
|
+
__name: "DockIcon",
|
|
47
|
+
props: {
|
|
48
|
+
icon: {},
|
|
49
|
+
title: {}
|
|
50
|
+
},
|
|
51
|
+
setup(__props) {
|
|
52
|
+
const props = __props;
|
|
53
|
+
function getIconUrl(str, color) {
|
|
54
|
+
if (str.includes("/") || str.startsWith("data:") || str.startsWith("builtin:")) return str;
|
|
55
|
+
const match = str.match(/^([\w-]+):([\w-]+)$/);
|
|
56
|
+
if (match) {
|
|
57
|
+
const [, collection, icon2] = match;
|
|
58
|
+
return `https://api.iconify.design/${collection}/${icon2}.svg${color === "dark" ? "?color=%23eee" : "?color=%23111"}`;
|
|
59
|
+
}
|
|
60
|
+
return str;
|
|
61
|
+
}
|
|
62
|
+
const icon = computed(() => {
|
|
63
|
+
if (typeof props.icon === "string") return {
|
|
64
|
+
dark: getIconUrl(props.icon, "dark"),
|
|
65
|
+
light: getIconUrl(props.icon, "light")
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
dark: getIconUrl(props.icon.dark, "dark"),
|
|
69
|
+
light: getIconUrl(props.icon.light, "light")
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
return (_ctx, _cache) => {
|
|
73
|
+
return icon.value.light === "builtin:vite-plus-core" ? (openBlock(), createBlock(VitePlusCore_default, { key: 0 })) : (openBlock(), createElementBlock("picture", _hoisted_1$7, [
|
|
74
|
+
createBaseVNode("source", {
|
|
75
|
+
srcset: icon.value.dark,
|
|
76
|
+
media: "(prefers-color-scheme: dark)"
|
|
77
|
+
}, null, 8, _hoisted_2$3),
|
|
78
|
+
createBaseVNode("source", {
|
|
79
|
+
srcset: icon.value.light,
|
|
80
|
+
media: "(prefers-color-scheme: light)"
|
|
81
|
+
}, null, 8, _hoisted_3$2),
|
|
82
|
+
createBaseVNode("img", {
|
|
83
|
+
src: icon.value.light,
|
|
84
|
+
alt: __props.title,
|
|
85
|
+
class: "w-full h-full m-auto",
|
|
86
|
+
draggable: "false"
|
|
87
|
+
}, null, 8, _hoisted_4$1)
|
|
88
|
+
]));
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
var DockIcon_default = _sfc_main$15;
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/client/webcomponents/components/DockEntry.vue
|
|
96
|
+
const _hoisted_1$6 = ["title"];
|
|
97
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
98
|
+
__name: "DockEntry",
|
|
99
|
+
props: {
|
|
100
|
+
dock: {},
|
|
101
|
+
isSelected: { type: Boolean },
|
|
102
|
+
isDimmed: { type: Boolean },
|
|
103
|
+
isVertical: { type: Boolean }
|
|
104
|
+
},
|
|
105
|
+
setup(__props) {
|
|
106
|
+
const props = __props;
|
|
107
|
+
const button = useTemplateRef("button");
|
|
108
|
+
function updatePos() {
|
|
109
|
+
const rect = button.value?.getBoundingClientRect();
|
|
110
|
+
if (rect) setFloatingTooltip({
|
|
111
|
+
text: props.dock.title,
|
|
112
|
+
width: rect.width,
|
|
113
|
+
height: rect.height,
|
|
114
|
+
left: rect.left,
|
|
115
|
+
top: rect.top
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function showTitle() {
|
|
119
|
+
updatePos();
|
|
120
|
+
}
|
|
121
|
+
function clearTitle() {
|
|
122
|
+
setFloatingTooltip(null);
|
|
123
|
+
}
|
|
124
|
+
useEventListener("pointerdown", () => {
|
|
125
|
+
setFloatingTooltip(null);
|
|
126
|
+
});
|
|
127
|
+
return (_ctx, _cache) => {
|
|
128
|
+
return openBlock(), createElementBlock("div", {
|
|
129
|
+
key: __props.dock.id,
|
|
130
|
+
class: "relative group vite-devtools-dock-entry",
|
|
131
|
+
onPointerenter: showTitle,
|
|
132
|
+
onPointerleave: clearTitle
|
|
133
|
+
}, [createBaseVNode("button", {
|
|
134
|
+
ref_key: "button",
|
|
135
|
+
ref: button,
|
|
136
|
+
title: __props.dock.title,
|
|
137
|
+
class: normalizeClass([[
|
|
138
|
+
__props.isVertical ? "rotate-270" : "",
|
|
139
|
+
__props.isDimmed ? "op50 saturate-0" : "",
|
|
140
|
+
__props.isSelected ? "scale-120 text-purple" : ""
|
|
141
|
+
], "flex items-center justify-center p1.5 rounded-xl hover:bg-[#8881] hover:scale-120 transition-all duration-300 relative"])
|
|
142
|
+
}, [createVNode(DockIcon_default, {
|
|
143
|
+
icon: __props.dock.icon,
|
|
144
|
+
title: __props.dock.title,
|
|
145
|
+
class: "w-5 h-5 select-none"
|
|
146
|
+
}, null, 8, ["icon", "title"])], 10, _hoisted_1$6)], 32);
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
var DockEntry_default = _sfc_main$14;
|
|
151
|
+
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/client/webcomponents/components/DockEntries.vue
|
|
154
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
155
|
+
__name: "DockEntries",
|
|
156
|
+
props: {
|
|
157
|
+
entries: {},
|
|
158
|
+
selected: {},
|
|
159
|
+
isVertical: { type: Boolean }
|
|
160
|
+
},
|
|
161
|
+
emits: ["select"],
|
|
162
|
+
setup(__props, { emit: __emit }) {
|
|
163
|
+
const props = __props;
|
|
164
|
+
const emit = __emit;
|
|
165
|
+
const { selected, isVertical, entries } = toRefs(props);
|
|
166
|
+
function toggleDockEntry(dock) {
|
|
167
|
+
if (selected.value?.id === dock.id) emit("select", void 0);
|
|
168
|
+
else emit("select", dock);
|
|
169
|
+
}
|
|
170
|
+
return (_ctx, _cache) => {
|
|
171
|
+
return openBlock(), createElementBlock("div", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(entries), (dock) => {
|
|
172
|
+
return openBlock(), createElementBlock(Fragment, { key: dock.id }, [!dock.isHidden ? (openBlock(), createBlock(DockEntry_default, {
|
|
173
|
+
key: 0,
|
|
174
|
+
dock,
|
|
175
|
+
"is-selected": unref(selected)?.id === dock.id,
|
|
176
|
+
"is-dimmed": unref(selected) ? unref(selected).id !== dock.id : false,
|
|
177
|
+
"is-vertical": unref(isVertical),
|
|
178
|
+
onClick: ($event) => toggleDockEntry(dock)
|
|
179
|
+
}, null, 8, [
|
|
180
|
+
"dock",
|
|
181
|
+
"is-selected",
|
|
182
|
+
"is-dimmed",
|
|
183
|
+
"is-vertical",
|
|
184
|
+
"onClick"
|
|
185
|
+
])) : createCommentVNode("v-if", true)], 64);
|
|
186
|
+
}), 128))]);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
var DockEntries_default = _sfc_main$13;
|
|
191
|
+
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/client/webcomponents/components/icons/BracketLeft.vue
|
|
194
|
+
const _sfc_main$12 = {};
|
|
195
|
+
const _hoisted_1$5 = {
|
|
196
|
+
viewBox: "0 0 9 20",
|
|
197
|
+
fill: "none",
|
|
198
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
199
|
+
};
|
|
200
|
+
function _sfc_render$1(_ctx, _cache) {
|
|
201
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$5, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
202
|
+
d: "M4.95763 0C1.02563 5.628 1.00263 14.351 4.95763 20H7.61363C3.65963 14.35 3.68363 5.627 7.61363 0H4.95763Z",
|
|
203
|
+
class: "fill-black dark:fill-white"
|
|
204
|
+
}, null, -1)])]);
|
|
205
|
+
}
|
|
206
|
+
var BracketLeft_default = /* @__PURE__ */ export_helper_default(_sfc_main$12, [["render", _sfc_render$1]]);
|
|
207
|
+
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/client/webcomponents/components/icons/BracketRight.vue
|
|
210
|
+
const _sfc_main$11 = {};
|
|
211
|
+
const _hoisted_1$4 = {
|
|
212
|
+
viewBox: "0 0 9 20",
|
|
213
|
+
fill: "none",
|
|
214
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
215
|
+
};
|
|
216
|
+
function _sfc_render(_ctx, _cache) {
|
|
217
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
218
|
+
d: "M4.246 10H6.903C6.902 6.407 5.913 2.816 3.946 0H1.29C3.256 2.816 4.244 6.407 4.246 10ZM8.935 14.907H6.27C6.46624 14.1665 6.61752 13.4148 6.723 12.656H4.066C3.96052 13.4148 3.80924 14.1665 3.613 14.907H0.944C0.703507 15.8176 0.387753 16.7067 0 17.565H2.669C2.2859 18.4179 1.82388 19.2331 1.289 20H3.945C4.47988 19.2331 4.9419 18.4179 5.325 17.565H7.99C8.376 16.714 8.691 15.823 8.935 14.907Z",
|
|
219
|
+
class: "fill-black dark:fill-white"
|
|
220
|
+
}, null, -1)])]);
|
|
221
|
+
}
|
|
222
|
+
var BracketRight_default = /* @__PURE__ */ export_helper_default(_sfc_main$11, [["render", _sfc_render]]);
|
|
223
|
+
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/client/webcomponents/components/Dock.vue
|
|
226
|
+
const PANEL_MARGIN = 2;
|
|
227
|
+
const SNAP_THRESHOLD = 2;
|
|
228
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
229
|
+
__name: "Dock",
|
|
230
|
+
props: { context: {} },
|
|
231
|
+
setup(__props) {
|
|
232
|
+
const context = __props.context;
|
|
233
|
+
const isSafari = navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome");
|
|
234
|
+
const panelMargins = reactive({
|
|
235
|
+
left: PANEL_MARGIN,
|
|
236
|
+
top: PANEL_MARGIN,
|
|
237
|
+
right: PANEL_MARGIN,
|
|
238
|
+
bottom: PANEL_MARGIN
|
|
239
|
+
});
|
|
240
|
+
const safeArea = useScreenSafeArea();
|
|
241
|
+
function toNumber(value) {
|
|
242
|
+
const num = +value;
|
|
243
|
+
if (Number.isNaN(num)) return 0;
|
|
244
|
+
return num;
|
|
245
|
+
}
|
|
246
|
+
watchEffect(() => {
|
|
247
|
+
panelMargins.left = toNumber(safeArea.left.value) + PANEL_MARGIN;
|
|
248
|
+
panelMargins.top = toNumber(safeArea.top.value) + PANEL_MARGIN;
|
|
249
|
+
panelMargins.right = toNumber(safeArea.right.value) + PANEL_MARGIN;
|
|
250
|
+
panelMargins.bottom = toNumber(safeArea.bottom.value) + PANEL_MARGIN;
|
|
251
|
+
});
|
|
252
|
+
const dockEl = useTemplateRef("dockEl");
|
|
253
|
+
const anchorEl = useTemplateRef("anchorEl");
|
|
254
|
+
const recalculateCounter = ref(0);
|
|
255
|
+
const isHovering = ref(false);
|
|
256
|
+
const windowSize = reactive({
|
|
257
|
+
width: window.innerWidth,
|
|
258
|
+
height: window.innerHeight
|
|
259
|
+
});
|
|
260
|
+
const draggingOffset = reactive({
|
|
261
|
+
x: 0,
|
|
262
|
+
y: 0
|
|
263
|
+
});
|
|
264
|
+
const mousePosition = reactive({
|
|
265
|
+
x: 0,
|
|
266
|
+
y: 0
|
|
267
|
+
});
|
|
268
|
+
function onPointerDown(e) {
|
|
269
|
+
if (!dockEl.value) return;
|
|
270
|
+
context.panel.isDragging = true;
|
|
271
|
+
const { left, top, width, height } = dockEl.value.getBoundingClientRect();
|
|
272
|
+
draggingOffset.x = e.clientX - left - width / 2;
|
|
273
|
+
draggingOffset.y = e.clientY - top - height / 2;
|
|
274
|
+
}
|
|
275
|
+
onMounted(() => {
|
|
276
|
+
windowSize.width = window.innerWidth;
|
|
277
|
+
windowSize.height = window.innerHeight;
|
|
278
|
+
useEventListener(window, "resize", () => {
|
|
279
|
+
windowSize.width = window.innerWidth;
|
|
280
|
+
windowSize.height = window.innerHeight;
|
|
281
|
+
});
|
|
282
|
+
useEventListener(window, "pointermove", (e) => {
|
|
283
|
+
if (!context.panel.isDragging) return;
|
|
284
|
+
const store = context.panel.store;
|
|
285
|
+
const centerX = window.innerWidth / 2;
|
|
286
|
+
const centerY = window.innerHeight / 2;
|
|
287
|
+
const x = e.clientX - draggingOffset.x;
|
|
288
|
+
const y = e.clientY - draggingOffset.y;
|
|
289
|
+
if (Number.isNaN(x) || Number.isNaN(y)) return;
|
|
290
|
+
mousePosition.x = x;
|
|
291
|
+
mousePosition.y = y;
|
|
292
|
+
const deg = Math.atan2(y - centerY, x - centerX);
|
|
293
|
+
const HORIZONTAL_MARGIN = 70;
|
|
294
|
+
const TL = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, 0 - centerX);
|
|
295
|
+
const TR = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, window.innerWidth - centerX);
|
|
296
|
+
const BL = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, 0 - centerX);
|
|
297
|
+
const BR = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, window.innerWidth - centerX);
|
|
298
|
+
store.position = deg >= TL && deg <= TR ? "top" : deg >= TR && deg <= BR ? "right" : deg >= BR && deg <= BL ? "bottom" : "left";
|
|
299
|
+
store.left = snapToPoints(x / window.innerWidth * 100);
|
|
300
|
+
store.top = snapToPoints(y / window.innerHeight * 100);
|
|
301
|
+
});
|
|
302
|
+
useEventListener(window, "pointerup", () => {
|
|
303
|
+
context.panel.isDragging = false;
|
|
304
|
+
});
|
|
305
|
+
useEventListener(window, "pointerleave", () => {
|
|
306
|
+
context.panel.isDragging = false;
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
function snapToPoints(value) {
|
|
310
|
+
if (value < 5) return 0;
|
|
311
|
+
if (value > 95) return 100;
|
|
312
|
+
if (Math.abs(value - 50) < SNAP_THRESHOLD) return 50;
|
|
313
|
+
return value;
|
|
314
|
+
}
|
|
315
|
+
function clamp(value, min, max) {
|
|
316
|
+
return Math.min(Math.max(value, min), max);
|
|
317
|
+
}
|
|
318
|
+
const anchorPos = computed(() => {
|
|
319
|
+
recalculateCounter.value;
|
|
320
|
+
const store = context.panel.store;
|
|
321
|
+
const halfWidth = (dockEl.value?.clientWidth || 0) / 2;
|
|
322
|
+
const halfHeight = (dockEl.value?.clientHeight || 0) / 2;
|
|
323
|
+
const left = store.left * windowSize.width / 100;
|
|
324
|
+
const top = store.top * windowSize.height / 100;
|
|
325
|
+
switch (store.position) {
|
|
326
|
+
case "top": return {
|
|
327
|
+
left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
|
|
328
|
+
top: panelMargins.top + halfHeight
|
|
329
|
+
};
|
|
330
|
+
case "right": return {
|
|
331
|
+
left: windowSize.width - panelMargins.right - halfHeight,
|
|
332
|
+
top: clamp(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
|
|
333
|
+
};
|
|
334
|
+
case "left": return {
|
|
335
|
+
left: panelMargins.left + halfHeight,
|
|
336
|
+
top: clamp(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
|
|
337
|
+
};
|
|
338
|
+
case "bottom":
|
|
339
|
+
default: return {
|
|
340
|
+
left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
|
|
341
|
+
top: windowSize.height - panelMargins.bottom - halfHeight
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
let _timer = null;
|
|
346
|
+
function bringUp() {
|
|
347
|
+
isHovering.value = true;
|
|
348
|
+
if (context.panel.store.inactiveTimeout < 0) return;
|
|
349
|
+
if (_timer) clearTimeout(_timer);
|
|
350
|
+
_timer = setTimeout(() => {
|
|
351
|
+
isHovering.value = false;
|
|
352
|
+
}, +context.panel.store.inactiveTimeout || 0);
|
|
353
|
+
}
|
|
354
|
+
const isHidden = computed(() => false);
|
|
355
|
+
const isMinimized = computed(() => {
|
|
356
|
+
if (context.panel.store.inactiveTimeout < 0) return false;
|
|
357
|
+
if (context.panel.store.inactiveTimeout === 0) return true;
|
|
358
|
+
const isTouchDevice = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
359
|
+
return !context.panel.isDragging && !context.panel.store.open && !isHovering.value && !isTouchDevice && context.panel.store.inactiveTimeout;
|
|
360
|
+
});
|
|
361
|
+
const anchorStyle = computed(() => {
|
|
362
|
+
return {
|
|
363
|
+
left: `${anchorPos.value.left}px`,
|
|
364
|
+
top: `${anchorPos.value.top}px`,
|
|
365
|
+
pointerEvents: isHidden.value ? "none" : "auto"
|
|
366
|
+
};
|
|
367
|
+
});
|
|
368
|
+
const panelStyle = computed(() => {
|
|
369
|
+
const style = { transform: context.panel.isVertical ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
|
|
370
|
+
if (isHidden.value) {
|
|
371
|
+
style.opacity = 0;
|
|
372
|
+
style.pointerEvents = "none";
|
|
373
|
+
}
|
|
374
|
+
if (context.panel.isDragging) style.transition = "none !important";
|
|
375
|
+
return style;
|
|
376
|
+
});
|
|
377
|
+
onMounted(() => {
|
|
378
|
+
bringUp();
|
|
379
|
+
recalculateCounter.value++;
|
|
380
|
+
});
|
|
381
|
+
return (_ctx, _cache) => {
|
|
382
|
+
return openBlock(), createElementBlock("div", {
|
|
383
|
+
id: "vite-devtools-anchor",
|
|
384
|
+
ref_key: "anchorEl",
|
|
385
|
+
ref: anchorEl,
|
|
386
|
+
style: normalizeStyle([anchorStyle.value]),
|
|
387
|
+
class: normalizeClass({
|
|
388
|
+
"vite-devtools-horizontal": !unref(context).panel.isVertical,
|
|
389
|
+
"vite-devtools-vertical": unref(context).panel.isVertical,
|
|
390
|
+
"vite-devtools-minimized": isMinimized.value
|
|
391
|
+
}),
|
|
392
|
+
onMousemove: bringUp
|
|
393
|
+
}, [
|
|
394
|
+
!unref(isSafari) ? (openBlock(), createElementBlock("div", {
|
|
395
|
+
key: 0,
|
|
396
|
+
id: "vite-devtools-glowing",
|
|
397
|
+
class: normalizeClass(unref(context).panel.isDragging ? "op60!" : "")
|
|
398
|
+
}, null, 2)) : createCommentVNode("v-if", true),
|
|
399
|
+
renderSlot(_ctx.$slots, "default", {
|
|
400
|
+
context: unref(context),
|
|
401
|
+
dockEl: dockEl.value,
|
|
402
|
+
selected: unref(context).docks.selected,
|
|
403
|
+
panelMargins
|
|
404
|
+
}),
|
|
405
|
+
createBaseVNode("div", {
|
|
406
|
+
id: "vite-devtools-dock-container",
|
|
407
|
+
ref_key: "dockEl",
|
|
408
|
+
ref: dockEl,
|
|
409
|
+
style: normalizeStyle(panelStyle.value)
|
|
410
|
+
}, [createBaseVNode("div", {
|
|
411
|
+
id: "vite-devtools-dock",
|
|
412
|
+
onPointerdown: onPointerDown
|
|
413
|
+
}, [
|
|
414
|
+
createVNode(BracketLeft_default, { class: "vite-devtools-dock-bracket absolute left--1 top-1/2 translate-y--1/2 bottom-0 w-2.5 op75 transition-opacity duration-300" }),
|
|
415
|
+
createVNode(BracketRight_default, { class: normalizeClass(["vite-devtools-dock-bracket absolute right--1 top-1/2 translate-y--1/2 bottom-0 w-2.5 op75 transition-opacity duration-300", unref(context).panel.isVertical ? "scale-y--100" : ""]) }, null, 8, ["class"]),
|
|
416
|
+
createVNode(VitePlusCore_default, { class: normalizeClass(["w-3 h-3 absolute left-1/2 top-1/2 translate-x--1/2 translate-y--1/2 transition-opacity duration-300", isMinimized.value ? "op100" : "op0"]) }, null, 8, ["class"]),
|
|
417
|
+
createVNode(DockEntries_default, {
|
|
418
|
+
entries: unref(context).docks.entries,
|
|
419
|
+
class: normalizeClass(["transition duration-200 flex items-center w-full h-full justify-center", isMinimized.value ? "opacity-0 pointer-events-none" : "opacity-100"]),
|
|
420
|
+
"is-vertical": unref(context).panel.isVertical,
|
|
421
|
+
selected: unref(context).docks.selected,
|
|
422
|
+
onSelect: _cache[0] || (_cache[0] = (e) => unref(context).docks.switchEntry(e?.id))
|
|
423
|
+
}, null, 8, [
|
|
424
|
+
"entries",
|
|
425
|
+
"class",
|
|
426
|
+
"is-vertical",
|
|
427
|
+
"selected"
|
|
428
|
+
])
|
|
429
|
+
], 32)], 4)
|
|
430
|
+
], 38);
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
var Dock_default = _sfc_main$10;
|
|
435
|
+
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region src/client/webcomponents/utils/PersistedDomViewsManager.ts
|
|
438
|
+
var PersistedDomViewsManager = class {
|
|
439
|
+
holders = {};
|
|
440
|
+
constructor(container) {
|
|
441
|
+
this.container = container;
|
|
442
|
+
}
|
|
443
|
+
getHolder(id, _type) {
|
|
444
|
+
return this.holders[id];
|
|
445
|
+
}
|
|
446
|
+
getOrCreateHolder(id, type) {
|
|
447
|
+
if (!this.container.value) throw new Error("[VITE DEVTOOLS] PersistedDomViewsManager: container is not set");
|
|
448
|
+
let holder;
|
|
449
|
+
if (!this.holders[id]) {
|
|
450
|
+
const el = document.createElement(type);
|
|
451
|
+
this.holders[id] = new PersistedDomHolder(id, el);
|
|
452
|
+
this.container.value.appendChild(el);
|
|
453
|
+
holder = this.holders[id];
|
|
454
|
+
} else holder = this.holders[id];
|
|
455
|
+
return holder;
|
|
456
|
+
}
|
|
457
|
+
removeHolder(id) {
|
|
458
|
+
const holder = this.holders[id];
|
|
459
|
+
if (!holder) return false;
|
|
460
|
+
holder.unmount();
|
|
461
|
+
holder.element.remove();
|
|
462
|
+
delete this.holders[id];
|
|
463
|
+
return true;
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
var PersistedDomHolder = class {
|
|
467
|
+
element;
|
|
468
|
+
id;
|
|
469
|
+
parent;
|
|
470
|
+
_cleanups = [];
|
|
471
|
+
constructor(id, iframe) {
|
|
472
|
+
this.id = id;
|
|
473
|
+
this.element = iframe;
|
|
474
|
+
}
|
|
475
|
+
cleanup() {
|
|
476
|
+
this._cleanups.forEach((cleanup) => cleanup());
|
|
477
|
+
this._cleanups = [];
|
|
478
|
+
}
|
|
479
|
+
mount(parent) {
|
|
480
|
+
if (this.parent === parent) {
|
|
481
|
+
this.show();
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
this.cleanup();
|
|
485
|
+
this.parent = parent;
|
|
486
|
+
const func = () => this.update();
|
|
487
|
+
window.addEventListener("resize", func);
|
|
488
|
+
this._cleanups.push(() => window.removeEventListener("resize", func));
|
|
489
|
+
this.show();
|
|
490
|
+
}
|
|
491
|
+
hide() {
|
|
492
|
+
this.element.style.display = "none";
|
|
493
|
+
}
|
|
494
|
+
show() {
|
|
495
|
+
this.element.style.display = "block";
|
|
496
|
+
this.update();
|
|
497
|
+
}
|
|
498
|
+
update() {
|
|
499
|
+
if (!this.parent) return;
|
|
500
|
+
const rect = this.parent.getBoundingClientRect();
|
|
501
|
+
this.element.style.position = "absolute";
|
|
502
|
+
this.element.style.width = `${rect.width}px`;
|
|
503
|
+
this.element.style.height = `${rect.height}px`;
|
|
504
|
+
}
|
|
505
|
+
unmount() {
|
|
506
|
+
this.cleanup();
|
|
507
|
+
this.hide();
|
|
508
|
+
this.parent = void 0;
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
//#endregion
|
|
513
|
+
//#region src/client/webcomponents/components/DockPanelResizer.vue
|
|
514
|
+
const PANEL_MIN = 20;
|
|
515
|
+
const PANEL_MAX = 100;
|
|
516
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
517
|
+
__name: "DockPanelResizer",
|
|
518
|
+
props: { panel: {} },
|
|
519
|
+
setup(__props) {
|
|
520
|
+
const props = __props;
|
|
521
|
+
const topHandle = useTemplateRef("topHandle");
|
|
522
|
+
const container = computed(() => topHandle.value?.parentElement);
|
|
523
|
+
const resizingState = ref(false);
|
|
524
|
+
function handleResize(e) {
|
|
525
|
+
if (!resizingState.value) return;
|
|
526
|
+
const box = container.value?.getBoundingClientRect();
|
|
527
|
+
if (!box) return;
|
|
528
|
+
const store = props.panel.store;
|
|
529
|
+
let widthPx, heightPx;
|
|
530
|
+
if (resizingState.value.right) {
|
|
531
|
+
widthPx = Math.abs(e instanceof MouseEvent ? e.clientX : (e.touches[0]?.clientX || 0) - (box?.left || 0));
|
|
532
|
+
store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
|
|
533
|
+
} else if (resizingState.value.left) {
|
|
534
|
+
widthPx = Math.abs((box?.right || 0) - (e instanceof MouseEvent ? e.clientX : e.touches[0]?.clientX || 0));
|
|
535
|
+
store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
|
|
536
|
+
}
|
|
537
|
+
if (resizingState.value.top) {
|
|
538
|
+
heightPx = Math.abs((box?.bottom || 0) - (e instanceof MouseEvent ? e.clientY : e.touches[0]?.clientY || 0));
|
|
539
|
+
store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
|
|
540
|
+
} else if (resizingState.value.bottom) {
|
|
541
|
+
heightPx = Math.abs(e instanceof MouseEvent ? e.clientY : (e.touches[0]?.clientY || 0) - (box?.top || 0));
|
|
542
|
+
store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
useEventListener(window, "mousemove", handleResize);
|
|
546
|
+
useEventListener(window, "touchmove", handleResize);
|
|
547
|
+
useEventListener(window, "mouseup", () => resizingState.value = false);
|
|
548
|
+
useEventListener(window, "touchend", () => resizingState.value = false);
|
|
549
|
+
useEventListener(window, "mouseleave", () => resizingState.value = false);
|
|
550
|
+
watch(resizingState, (value) => {
|
|
551
|
+
props.panel.isResizing = !!value;
|
|
552
|
+
}, { flush: "sync" });
|
|
553
|
+
return (_ctx, _cache) => {
|
|
554
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
555
|
+
createCommentVNode(" Handlers "),
|
|
556
|
+
withDirectives(createBaseVNode("div", {
|
|
557
|
+
ref_key: "topHandle",
|
|
558
|
+
ref: topHandle,
|
|
559
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
|
|
560
|
+
style: { top: 0 },
|
|
561
|
+
onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => resizingState.value = { top: true }, ["prevent"])),
|
|
562
|
+
onTouchstartPassive: _cache[1] || (_cache[1] = () => resizingState.value = { top: true })
|
|
563
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "top"]]),
|
|
564
|
+
withDirectives(createBaseVNode("div", {
|
|
565
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
|
|
566
|
+
style: { bottom: 0 },
|
|
567
|
+
onMousedown: _cache[2] || (_cache[2] = withModifiers(() => resizingState.value = { bottom: true }, ["prevent"])),
|
|
568
|
+
onTouchstartPassive: _cache[3] || (_cache[3] = () => resizingState.value = { bottom: true })
|
|
569
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "bottom"]]),
|
|
570
|
+
withDirectives(createBaseVNode("div", {
|
|
571
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
|
|
572
|
+
style: { left: 0 },
|
|
573
|
+
onMousedown: _cache[4] || (_cache[4] = withModifiers(() => resizingState.value = { left: true }, ["prevent"])),
|
|
574
|
+
onTouchstartPassive: _cache[5] || (_cache[5] = () => resizingState.value = { left: true })
|
|
575
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "left"]]),
|
|
576
|
+
withDirectives(createBaseVNode("div", {
|
|
577
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
|
|
578
|
+
style: { right: 0 },
|
|
579
|
+
onMousedown: _cache[6] || (_cache[6] = withModifiers(() => resizingState.value = { right: true }, ["prevent"])),
|
|
580
|
+
onTouchstartPassive: _cache[7] || (_cache[7] = () => resizingState.value = { right: true })
|
|
581
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "right"]]),
|
|
582
|
+
withDirectives(createBaseVNode("div", {
|
|
583
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
584
|
+
style: {
|
|
585
|
+
top: 0,
|
|
586
|
+
left: 0,
|
|
587
|
+
cursor: "nwse-resize"
|
|
588
|
+
},
|
|
589
|
+
onMousedown: _cache[8] || (_cache[8] = withModifiers(() => resizingState.value = {
|
|
590
|
+
top: true,
|
|
591
|
+
left: true
|
|
592
|
+
}, ["prevent"])),
|
|
593
|
+
onTouchstartPassive: _cache[9] || (_cache[9] = () => resizingState.value = {
|
|
594
|
+
top: true,
|
|
595
|
+
left: true
|
|
596
|
+
})
|
|
597
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "left"]]),
|
|
598
|
+
withDirectives(createBaseVNode("div", {
|
|
599
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
600
|
+
style: {
|
|
601
|
+
top: 0,
|
|
602
|
+
right: 0,
|
|
603
|
+
cursor: "nesw-resize"
|
|
604
|
+
},
|
|
605
|
+
onMousedown: _cache[10] || (_cache[10] = withModifiers(() => resizingState.value = {
|
|
606
|
+
top: true,
|
|
607
|
+
right: true
|
|
608
|
+
}, ["prevent"])),
|
|
609
|
+
onTouchstartPassive: _cache[11] || (_cache[11] = () => resizingState.value = {
|
|
610
|
+
top: true,
|
|
611
|
+
right: true
|
|
612
|
+
})
|
|
613
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "right"]]),
|
|
614
|
+
withDirectives(createBaseVNode("div", {
|
|
615
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
616
|
+
style: {
|
|
617
|
+
bottom: 0,
|
|
618
|
+
left: 0,
|
|
619
|
+
cursor: "nesw-resize"
|
|
620
|
+
},
|
|
621
|
+
onMousedown: _cache[12] || (_cache[12] = withModifiers(() => resizingState.value = {
|
|
622
|
+
bottom: true,
|
|
623
|
+
left: true
|
|
624
|
+
}, ["prevent"])),
|
|
625
|
+
onTouchstartPassive: _cache[13] || (_cache[13] = () => resizingState.value = {
|
|
626
|
+
bottom: true,
|
|
627
|
+
left: true
|
|
628
|
+
})
|
|
629
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "left"]]),
|
|
630
|
+
withDirectives(createBaseVNode("div", {
|
|
631
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
632
|
+
style: {
|
|
633
|
+
bottom: 0,
|
|
634
|
+
right: 0,
|
|
635
|
+
cursor: "nwse-resize"
|
|
636
|
+
},
|
|
637
|
+
onMousedown: _cache[14] || (_cache[14] = withModifiers(() => resizingState.value = {
|
|
638
|
+
bottom: true,
|
|
639
|
+
right: true
|
|
640
|
+
}, ["prevent"])),
|
|
641
|
+
onTouchstartPassive: _cache[15] || (_cache[15] = () => resizingState.value = {
|
|
642
|
+
bottom: true,
|
|
643
|
+
right: true
|
|
644
|
+
})
|
|
645
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "right"]])
|
|
646
|
+
], 64);
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
var DockPanelResizer_default = _sfc_main$9;
|
|
651
|
+
|
|
652
|
+
//#endregion
|
|
653
|
+
//#region src/client/webcomponents/state/terminals.ts
|
|
654
|
+
let _terminalsMap;
|
|
655
|
+
function useTerminals(context) {
|
|
656
|
+
if (_terminalsMap) return _terminalsMap;
|
|
657
|
+
const map = _terminalsMap = reactive(/* @__PURE__ */ new Map());
|
|
658
|
+
async function updateTerminals() {
|
|
659
|
+
const terminals = await context.rpc.$call("vite:internal:terminals:list");
|
|
660
|
+
for (const terminal of terminals) {
|
|
661
|
+
if (map.has(terminal.id)) {
|
|
662
|
+
map.get(terminal.id).info = Object.freeze(terminal);
|
|
663
|
+
continue;
|
|
664
|
+
}
|
|
665
|
+
map.set(terminal.id, {
|
|
666
|
+
info: Object.freeze(terminal),
|
|
667
|
+
buffer: null,
|
|
668
|
+
terminal: null
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
console.log("[VITE DEVTOOLS] Terminals Updated", [...map.values()]);
|
|
672
|
+
}
|
|
673
|
+
context.clientRpc.register({
|
|
674
|
+
name: "vite:internal:terminals:updated",
|
|
675
|
+
type: "action",
|
|
676
|
+
handler: () => updateTerminals()
|
|
677
|
+
});
|
|
678
|
+
context.clientRpc.register({
|
|
679
|
+
name: "vite:internal:terminals:stream-chunk",
|
|
680
|
+
type: "action",
|
|
681
|
+
handler: (data) => {
|
|
682
|
+
const terminal = map.get(data.id);
|
|
683
|
+
if (!terminal) {
|
|
684
|
+
console.warn(`[VITE DEVTOOLS] Terminal with id "${data.id}" not found`);
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
terminal.buffer?.push(...data.chunks);
|
|
688
|
+
for (const chunk of data.chunks) terminal.terminal?.writeln(chunk);
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
updateTerminals();
|
|
692
|
+
return map;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
//#endregion
|
|
696
|
+
//#region src/client/webcomponents/components/ViewBuiltinTerminalPanel.vue
|
|
697
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
698
|
+
__name: "ViewBuiltinTerminalPanel",
|
|
699
|
+
props: {
|
|
700
|
+
context: {},
|
|
701
|
+
terminal: {}
|
|
702
|
+
},
|
|
703
|
+
setup(__props) {
|
|
704
|
+
const props = __props;
|
|
705
|
+
const container = ref();
|
|
706
|
+
let term;
|
|
707
|
+
onMounted(async () => {
|
|
708
|
+
term = markRaw(new Terminal({
|
|
709
|
+
convertEol: true,
|
|
710
|
+
cols: 80,
|
|
711
|
+
screenReaderMode: true
|
|
712
|
+
}));
|
|
713
|
+
const fitAddon = new FitAddon();
|
|
714
|
+
term.loadAddon(fitAddon);
|
|
715
|
+
term.open(container.value);
|
|
716
|
+
fitAddon.fit();
|
|
717
|
+
useEventListener(window, "resize", () => {
|
|
718
|
+
fitAddon.fit();
|
|
719
|
+
});
|
|
720
|
+
nextTick(() => {
|
|
721
|
+
fitAddon.fit();
|
|
722
|
+
});
|
|
723
|
+
props.terminal.terminal = term;
|
|
724
|
+
if (props.terminal.buffer == null) {
|
|
725
|
+
const { buffer } = await props.context.rpc.$call("vite:internal:terminals:read", props.terminal.info.id);
|
|
726
|
+
props.terminal.buffer = markRaw(buffer);
|
|
727
|
+
}
|
|
728
|
+
for (const chunk of props.terminal.buffer) term.writeln(chunk);
|
|
729
|
+
});
|
|
730
|
+
onUnmounted(() => {
|
|
731
|
+
term.dispose();
|
|
732
|
+
props.terminal.terminal = null;
|
|
733
|
+
});
|
|
734
|
+
return (_ctx, _cache) => {
|
|
735
|
+
return openBlock(), createElementBlock(Fragment, null, [createBaseVNode("div", {
|
|
736
|
+
ref_key: "container",
|
|
737
|
+
ref: container,
|
|
738
|
+
class: "h-full w-full of-auto bg-black"
|
|
739
|
+
}, null, 512), createCommentVNode(" <div border=\"t base\" flex=\"~ gap-2\" items-center p2>\n <button title=\"Clear\" icon=\"i-carbon-clean\" :border=\"false\" @click=\"clear()\" />\n <button v-if=\"info?.restartable\" title=\"Restart\" icon=\"carbon-renew\" :border=\"false\" @click=\"restart()\" />\n <button v-if=\"info?.terminatable\" title=\"Terminate\" icon=\"carbon-delete\" :border=\"false\" @click=\"terminate()\" />\n <span text-sm op50>{{ info?.description }}</span>\n </div> ")], 2112);
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
var ViewBuiltinTerminalPanel_default = _sfc_main$8;
|
|
744
|
+
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region src/client/webcomponents/components/ViewBuiltinTerminals.vue
|
|
747
|
+
const _hoisted_1$3 = { class: "w-full h-full grid grid-rows-[max-content_1fr]" };
|
|
748
|
+
const _hoisted_2$2 = { class: "border-base border-b rounded-t overflow-x-auto" };
|
|
749
|
+
const _hoisted_3$1 = ["onClick"];
|
|
750
|
+
const _hoisted_4 = { class: "h-full w-full flex relative" };
|
|
751
|
+
const _hoisted_5 = {
|
|
752
|
+
key: 1,
|
|
753
|
+
class: "flex items-center justify-center h-full w-full text-center"
|
|
754
|
+
};
|
|
755
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
756
|
+
__name: "ViewBuiltinTerminals",
|
|
757
|
+
props: { context: {} },
|
|
758
|
+
setup(__props) {
|
|
759
|
+
const terminals = useTerminals(__props.context);
|
|
760
|
+
const selectedTerminal = shallowRef(null);
|
|
761
|
+
watchImmediate(terminals, () => {
|
|
762
|
+
if (selectedTerminal.value == null && terminals.size > 0) selectedTerminal.value = terminals.values().next().value;
|
|
763
|
+
});
|
|
764
|
+
return (_ctx, _cache) => {
|
|
765
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [createBaseVNode("div", _hoisted_2$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(terminals).values(), (terminal) => {
|
|
766
|
+
return openBlock(), createElementBlock("button", {
|
|
767
|
+
key: terminal.info.id,
|
|
768
|
+
class: normalizeClass(["px3 py1.5 border-r border-base hover:bg-active text-sm flex items-center gap-1", { "bg-active": selectedTerminal.value?.info.id === terminal.info.id }]),
|
|
769
|
+
onClick: ($event) => selectedTerminal.value = terminal
|
|
770
|
+
}, [createVNode(DockIcon_default, { icon: terminal.info.icon || "ph:terminal-duotone" }, null, 8, ["icon"]), createBaseVNode("span", null, toDisplayString(terminal.info.title), 1)], 10, _hoisted_3$1);
|
|
771
|
+
}), 128))]), createBaseVNode("div", _hoisted_4, [selectedTerminal.value ? (openBlock(), createBlock(ViewBuiltinTerminalPanel_default, {
|
|
772
|
+
key: selectedTerminal.value.info.id,
|
|
773
|
+
context: __props.context,
|
|
774
|
+
terminal: selectedTerminal.value
|
|
775
|
+
}, null, 8, ["context", "terminal"])) : (openBlock(), createElementBlock("div", _hoisted_5, [..._cache[0] || (_cache[0] = [createBaseVNode("div", null, "Select a terminal tab to start", -1)])]))])]);
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
var ViewBuiltinTerminals_default = _sfc_main$7;
|
|
780
|
+
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region src/client/webcomponents/components/ViewCustomRenderer.vue
|
|
783
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
784
|
+
__name: "ViewCustomRenderer",
|
|
785
|
+
props: {
|
|
786
|
+
context: {},
|
|
787
|
+
entry: {},
|
|
788
|
+
persistedDoms: {},
|
|
789
|
+
divStyle: {}
|
|
790
|
+
},
|
|
791
|
+
setup(__props) {
|
|
792
|
+
const props = __props;
|
|
793
|
+
const isLoading = ref(true);
|
|
794
|
+
const viewFrame = useTemplateRef("viewFrame");
|
|
795
|
+
onMounted(() => {
|
|
796
|
+
const holder = props.persistedDoms.getOrCreateHolder(props.entry.id, "div");
|
|
797
|
+
holder.element.style.boxShadow = "none";
|
|
798
|
+
holder.element.style.outline = "none";
|
|
799
|
+
Object.assign(holder.element.style, props.divStyle);
|
|
800
|
+
const entryState = props.context.docks.getStateById(props.entry.id);
|
|
801
|
+
if (entryState) entryState.domElements.panel = holder.element;
|
|
802
|
+
holder.mount(viewFrame.value);
|
|
803
|
+
isLoading.value = false;
|
|
804
|
+
nextTick(() => {
|
|
805
|
+
holder.update();
|
|
806
|
+
});
|
|
807
|
+
watch(() => props.context.panel, () => {
|
|
808
|
+
holder.update();
|
|
809
|
+
}, { deep: true });
|
|
810
|
+
watchEffect(() => {
|
|
811
|
+
holder.element.style.pointerEvents = props.context.panel.isDragging || props.context.panel.isResizing ? "none" : "auto";
|
|
812
|
+
}, { flush: "sync" });
|
|
813
|
+
});
|
|
814
|
+
onUnmounted(() => {
|
|
815
|
+
props.persistedDoms.getHolder(props.entry.id, "div")?.unmount();
|
|
816
|
+
});
|
|
817
|
+
return (_ctx, _cache) => {
|
|
818
|
+
return openBlock(), createElementBlock("div", {
|
|
819
|
+
ref_key: "viewFrame",
|
|
820
|
+
ref: viewFrame,
|
|
821
|
+
class: "vite-devtools-view-custom-renderer w-full h-full flex items-center justify-center"
|
|
822
|
+
}, null, 512);
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
var ViewCustomRenderer_default = _sfc_main$6;
|
|
827
|
+
|
|
828
|
+
//#endregion
|
|
829
|
+
//#region src/client/webcomponents/components/ViewIframe.vue
|
|
830
|
+
const _hoisted_1$2 = {
|
|
831
|
+
key: 0,
|
|
832
|
+
class: "op50 z--1"
|
|
833
|
+
};
|
|
834
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
835
|
+
__name: "ViewIframe",
|
|
836
|
+
props: {
|
|
837
|
+
context: {},
|
|
838
|
+
entry: {},
|
|
839
|
+
persistedDoms: {},
|
|
840
|
+
iframeStyle: {}
|
|
841
|
+
},
|
|
842
|
+
setup(__props) {
|
|
843
|
+
const props = __props;
|
|
844
|
+
const isLoading = ref(true);
|
|
845
|
+
const viewFrame = useTemplateRef("viewFrame");
|
|
846
|
+
onMounted(() => {
|
|
847
|
+
const holder = props.persistedDoms.getOrCreateHolder(props.entry.id, "iframe");
|
|
848
|
+
holder.element.style.boxShadow = "none";
|
|
849
|
+
holder.element.style.outline = "none";
|
|
850
|
+
Object.assign(holder.element.style, props.iframeStyle);
|
|
851
|
+
if (!holder.element.src) holder.element.src = props.entry.url;
|
|
852
|
+
const entryState = props.context.docks.getStateById(props.entry.id);
|
|
853
|
+
if (entryState) entryState.domElements.iframe = holder.element;
|
|
854
|
+
holder.mount(viewFrame.value);
|
|
855
|
+
isLoading.value = false;
|
|
856
|
+
nextTick(() => {
|
|
857
|
+
holder.update();
|
|
858
|
+
});
|
|
859
|
+
watch(() => props.context.panel, () => {
|
|
860
|
+
holder.update();
|
|
861
|
+
}, { deep: true });
|
|
862
|
+
watchEffect(() => {
|
|
863
|
+
holder.element.style.pointerEvents = props.context.panel.isDragging || props.context.panel.isResizing ? "none" : "auto";
|
|
864
|
+
}, { flush: "sync" });
|
|
865
|
+
});
|
|
866
|
+
onUnmounted(() => {
|
|
867
|
+
props.persistedDoms.getHolder(props.entry.id, "iframe")?.unmount();
|
|
868
|
+
});
|
|
869
|
+
return (_ctx, _cache) => {
|
|
870
|
+
return openBlock(), createElementBlock("div", {
|
|
871
|
+
ref_key: "viewFrame",
|
|
872
|
+
ref: viewFrame,
|
|
873
|
+
class: "vite-devtools-view-iframe w-full h-full flex items-center justify-center"
|
|
874
|
+
}, [isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, " Loading iframe... ")) : createCommentVNode("v-if", true)], 512);
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
var ViewIframe_default = _sfc_main$5;
|
|
879
|
+
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region src/client/webcomponents/components/ViewLauncher.vue
|
|
882
|
+
const _hoisted_1$1 = { class: "flex flex-col gap-4 items-center justify-center h-full relative" };
|
|
883
|
+
const _hoisted_2$1 = { class: "text-2xl font-bold" };
|
|
884
|
+
const _hoisted_3 = ["disabled"];
|
|
885
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
886
|
+
__name: "ViewLauncher",
|
|
887
|
+
props: {
|
|
888
|
+
context: {},
|
|
889
|
+
entry: {}
|
|
890
|
+
},
|
|
891
|
+
setup(__props) {
|
|
892
|
+
const props = __props;
|
|
893
|
+
function onLaunch() {
|
|
894
|
+
props.context.rpc.$call("vite:internal:docks:on-launch", props.entry.id);
|
|
895
|
+
}
|
|
896
|
+
const status = computed(() => props.entry.launcher.status || "idle");
|
|
897
|
+
const iconsMap = {
|
|
898
|
+
error: "i-ph-warning-duotone",
|
|
899
|
+
idle: "i-ph-rocket-launch-duotone",
|
|
900
|
+
loading: "i-svg-spinners-8-dots-rotate",
|
|
901
|
+
success: "i-ph-check-duotone"
|
|
902
|
+
};
|
|
903
|
+
const buttonText = computed(() => {
|
|
904
|
+
if (status.value === "idle") return props.entry.launcher.buttonStart || "Launch";
|
|
905
|
+
else if (status.value === "loading") return props.entry.launcher.buttonLoading || "Loading...";
|
|
906
|
+
else if (status.value === "error") return "ERROR";
|
|
907
|
+
else if (status.value === "success") return "Success";
|
|
908
|
+
else return `UNKNOWN STATUS: ${status.value}`;
|
|
909
|
+
});
|
|
910
|
+
return (_ctx, _cache) => {
|
|
911
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
912
|
+
createVNode(DockIcon_default, {
|
|
913
|
+
icon: __props.entry.launcher.icon || __props.entry.icon,
|
|
914
|
+
class: "w-10 h-10"
|
|
915
|
+
}, null, 8, ["icon"]),
|
|
916
|
+
createBaseVNode("h1", _hoisted_2$1, toDisplayString(__props.entry.launcher.title), 1),
|
|
917
|
+
createBaseVNode("p", null, toDisplayString(__props.entry.launcher.description), 1),
|
|
918
|
+
createBaseVNode("button", {
|
|
919
|
+
class: "bg-lime6 px4 py1 rounded hover:bg-lime7 transition-all duration-300 flex gap-2 items-center disabled:bg-gray6! disabled:pointer-events-none",
|
|
920
|
+
disabled: status.value !== "idle",
|
|
921
|
+
onClick: onLaunch
|
|
922
|
+
}, [createBaseVNode("div", { class: normalizeClass(iconsMap[status.value]) }, null, 2), createBaseVNode("div", null, toDisplayString(buttonText.value), 1)], 8, _hoisted_3)
|
|
923
|
+
]);
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
var ViewLauncher_default = _sfc_main$4;
|
|
928
|
+
|
|
929
|
+
//#endregion
|
|
930
|
+
//#region src/client/webcomponents/components/ViewEntry.vue
|
|
931
|
+
const _hoisted_1 = { key: 1 };
|
|
932
|
+
const _hoisted_2 = { key: 5 };
|
|
933
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
934
|
+
__name: "ViewEntry",
|
|
935
|
+
props: {
|
|
936
|
+
context: {},
|
|
937
|
+
entry: {},
|
|
938
|
+
persistedDoms: {},
|
|
939
|
+
iframeStyle: {},
|
|
940
|
+
divStyle: {}
|
|
941
|
+
},
|
|
942
|
+
setup(__props) {
|
|
943
|
+
return (_ctx, _cache) => {
|
|
944
|
+
return __props.entry.type === "~builtin" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.entry.id === "~terminals" ? (openBlock(), createBlock(ViewBuiltinTerminals_default, {
|
|
945
|
+
key: 0,
|
|
946
|
+
context: __props.context,
|
|
947
|
+
entry: __props.entry
|
|
948
|
+
}, null, 8, ["context", "entry"])) : (openBlock(), createElementBlock("div", _hoisted_1, " Unknown builtin entry: " + toDisplayString(__props.entry), 1))], 64)) : __props.entry.type === "action" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Entry for Actions ")], 64)) : __props.entry.type === "iframe" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" User-defined entries "), createVNode(ViewIframe_default, {
|
|
949
|
+
context: __props.context,
|
|
950
|
+
entry: __props.entry,
|
|
951
|
+
"persisted-doms": __props.persistedDoms,
|
|
952
|
+
"iframe-style": __props.iframeStyle
|
|
953
|
+
}, null, 8, [
|
|
954
|
+
"context",
|
|
955
|
+
"entry",
|
|
956
|
+
"persisted-doms",
|
|
957
|
+
"iframe-style"
|
|
958
|
+
])], 2112)) : __props.entry.type === "custom-render" ? (openBlock(), createBlock(ViewCustomRenderer_default, {
|
|
959
|
+
key: 3,
|
|
960
|
+
context: __props.context,
|
|
961
|
+
entry: __props.entry,
|
|
962
|
+
"persisted-doms": __props.persistedDoms,
|
|
963
|
+
"div-style": __props.divStyle
|
|
964
|
+
}, null, 8, [
|
|
965
|
+
"context",
|
|
966
|
+
"entry",
|
|
967
|
+
"persisted-doms",
|
|
968
|
+
"div-style"
|
|
969
|
+
])) : __props.entry.type === "launcher" ? (openBlock(), createBlock(ViewLauncher_default, {
|
|
970
|
+
key: 4,
|
|
971
|
+
context: __props.context,
|
|
972
|
+
entry: __props.entry
|
|
973
|
+
}, null, 8, ["context", "entry"])) : (openBlock(), createElementBlock("div", _hoisted_2, " Unknown entry: " + toDisplayString(__props.entry), 1));
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
var ViewEntry_default = _sfc_main$3;
|
|
978
|
+
|
|
979
|
+
//#endregion
|
|
980
|
+
//#region src/client/webcomponents/components/DockPanel.vue
|
|
981
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
982
|
+
__name: "DockPanel",
|
|
983
|
+
props: {
|
|
984
|
+
context: {},
|
|
985
|
+
selected: {},
|
|
986
|
+
dockEl: {},
|
|
987
|
+
panelMargins: {}
|
|
988
|
+
},
|
|
989
|
+
setup(__props) {
|
|
990
|
+
const props = __props;
|
|
991
|
+
const context = props.context;
|
|
992
|
+
const { selected, panelMargins } = toRefs(props);
|
|
993
|
+
const windowSize = reactive(useWindowSize());
|
|
994
|
+
const isHovering = ref(false);
|
|
995
|
+
const mousePosition = reactive({
|
|
996
|
+
x: 0,
|
|
997
|
+
y: 0
|
|
998
|
+
});
|
|
999
|
+
const dockPanel = useTemplateRef("dockPanel");
|
|
1000
|
+
const viewsContainer = useTemplateRef("viewsContainer");
|
|
1001
|
+
const persistedDoms = markRaw(new PersistedDomViewsManager(viewsContainer));
|
|
1002
|
+
function clamp(value, min, max) {
|
|
1003
|
+
return Math.min(Math.max(value, min), max);
|
|
1004
|
+
}
|
|
1005
|
+
const anchorPos = computed(() => {
|
|
1006
|
+
const halfWidth = (props.dockEl?.clientWidth || 0) / 2;
|
|
1007
|
+
const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
|
|
1008
|
+
const store = context.panel.store;
|
|
1009
|
+
const left = store.left * windowSize.width / 100;
|
|
1010
|
+
const top = store.top * windowSize.height / 100;
|
|
1011
|
+
switch (store.position) {
|
|
1012
|
+
case "top": return {
|
|
1013
|
+
left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
|
|
1014
|
+
top: panelMargins.value.top + halfHeight
|
|
1015
|
+
};
|
|
1016
|
+
case "right": return {
|
|
1017
|
+
left: windowSize.width - panelMargins.value.right - halfHeight,
|
|
1018
|
+
top: clamp(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
|
|
1019
|
+
};
|
|
1020
|
+
case "left": return {
|
|
1021
|
+
left: panelMargins.value.left + halfHeight,
|
|
1022
|
+
top: clamp(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
|
|
1023
|
+
};
|
|
1024
|
+
case "bottom":
|
|
1025
|
+
default: return {
|
|
1026
|
+
left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
|
|
1027
|
+
top: windowSize.height - panelMargins.value.bottom - halfHeight
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
let _timer = null;
|
|
1032
|
+
function bringUp() {
|
|
1033
|
+
isHovering.value = true;
|
|
1034
|
+
if (context.panel.store.inactiveTimeout < 0) return;
|
|
1035
|
+
if (_timer) clearTimeout(_timer);
|
|
1036
|
+
_timer = setTimeout(() => {
|
|
1037
|
+
isHovering.value = false;
|
|
1038
|
+
}, +context.panel.store.inactiveTimeout || 0);
|
|
1039
|
+
}
|
|
1040
|
+
const { width: frameWidth, height: frameHeight } = useElementBounding(dockPanel);
|
|
1041
|
+
const panelStyle = computed(() => {
|
|
1042
|
+
mousePosition.x, mousePosition.y;
|
|
1043
|
+
const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
|
|
1044
|
+
const frameMargin = {
|
|
1045
|
+
left: panelMargins.value.left + halfHeight,
|
|
1046
|
+
top: panelMargins.value.top + halfHeight,
|
|
1047
|
+
right: panelMargins.value.right + halfHeight,
|
|
1048
|
+
bottom: panelMargins.value.bottom + halfHeight
|
|
1049
|
+
};
|
|
1050
|
+
const marginHorizontal = frameMargin.left + frameMargin.right;
|
|
1051
|
+
const marginVertical = frameMargin.top + frameMargin.bottom;
|
|
1052
|
+
const maxWidth = windowSize.width - marginHorizontal;
|
|
1053
|
+
const maxHeight = windowSize.height - marginVertical;
|
|
1054
|
+
const panel = context.panel;
|
|
1055
|
+
const store = panel.store;
|
|
1056
|
+
const style = {
|
|
1057
|
+
position: "fixed",
|
|
1058
|
+
pointerEvents: panel.isDragging || panel.isResizing ? "none" : "auto",
|
|
1059
|
+
width: `min(${store.width}vw, calc(100vw - ${marginHorizontal}px))`,
|
|
1060
|
+
height: `min(${store.height}vh, calc(100vh - ${marginVertical}px))`
|
|
1061
|
+
};
|
|
1062
|
+
const anchor = anchorPos.value;
|
|
1063
|
+
const width = Math.min(maxWidth, store.width * windowSize.width / 100);
|
|
1064
|
+
const height = Math.min(maxHeight, store.height * windowSize.height / 100);
|
|
1065
|
+
const anchorX = anchor?.left || 0;
|
|
1066
|
+
const anchorY = anchor?.top || 0;
|
|
1067
|
+
switch (store.position) {
|
|
1068
|
+
case "top":
|
|
1069
|
+
case "bottom":
|
|
1070
|
+
style.left = `${-frameWidth.value / 2}px`;
|
|
1071
|
+
style.transform = "translate(0, 0)";
|
|
1072
|
+
if (anchorX - frameMargin.left < width / 2) style.left = `${width / 2 - anchorX + frameMargin.left - frameWidth.value / 2}px`;
|
|
1073
|
+
else if (windowSize.width - anchorX - frameMargin.right < width / 2) style.left = `${windowSize.width - anchorX - width / 2 - frameMargin.right - frameWidth.value / 2}px`;
|
|
1074
|
+
break;
|
|
1075
|
+
case "right":
|
|
1076
|
+
case "left":
|
|
1077
|
+
style.top = `${-frameHeight.value / 2}px`;
|
|
1078
|
+
style.transform = "translate(0, 0)";
|
|
1079
|
+
if (anchorY - frameMargin.top < height / 2) style.top = `${height / 2 - anchorY + frameMargin.top - frameHeight.value / 2}px`;
|
|
1080
|
+
else if (windowSize.height - anchorY - frameMargin.bottom < height / 2) style.top = `${windowSize.height - anchorY - height / 2 - frameMargin.bottom - frameHeight.value / 2}px`;
|
|
1081
|
+
break;
|
|
1082
|
+
}
|
|
1083
|
+
switch (store.position) {
|
|
1084
|
+
case "top":
|
|
1085
|
+
style.top = 0;
|
|
1086
|
+
break;
|
|
1087
|
+
case "right":
|
|
1088
|
+
style.right = 0;
|
|
1089
|
+
break;
|
|
1090
|
+
case "left":
|
|
1091
|
+
style.left = 0;
|
|
1092
|
+
break;
|
|
1093
|
+
case "bottom":
|
|
1094
|
+
default:
|
|
1095
|
+
style.bottom = 0;
|
|
1096
|
+
break;
|
|
1097
|
+
}
|
|
1098
|
+
return style;
|
|
1099
|
+
});
|
|
1100
|
+
onMounted(() => {
|
|
1101
|
+
bringUp();
|
|
1102
|
+
});
|
|
1103
|
+
return (_ctx, _cache) => {
|
|
1104
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1105
|
+
ref_key: "dockPanel",
|
|
1106
|
+
ref: dockPanel,
|
|
1107
|
+
class: "bg-glass rounded-lg border border-base shadow",
|
|
1108
|
+
style: normalizeStyle(panelStyle.value)
|
|
1109
|
+
}, [
|
|
1110
|
+
createVNode(DockPanelResizer_default, { panel: unref(context).panel }, null, 8, ["panel"]),
|
|
1111
|
+
unref(selected) && viewsContainer.value ? (openBlock(), createBlock(ViewEntry_default, {
|
|
1112
|
+
key: unref(selected).id,
|
|
1113
|
+
context: unref(context),
|
|
1114
|
+
entry: unref(selected),
|
|
1115
|
+
"persisted-doms": unref(persistedDoms),
|
|
1116
|
+
"iframe-style": {
|
|
1117
|
+
border: "1px solid #8883",
|
|
1118
|
+
borderRadius: "0.5rem"
|
|
1119
|
+
}
|
|
1120
|
+
}, null, 8, [
|
|
1121
|
+
"context",
|
|
1122
|
+
"entry",
|
|
1123
|
+
"persisted-doms"
|
|
1124
|
+
])) : createCommentVNode("v-if", true),
|
|
1125
|
+
createBaseVNode("div", {
|
|
1126
|
+
id: "vite-devtools-views-container",
|
|
1127
|
+
ref_key: "viewsContainer",
|
|
1128
|
+
ref: viewsContainer,
|
|
1129
|
+
class: "absolute inset-0 pointer-events-none"
|
|
1130
|
+
}, null, 512)
|
|
1131
|
+
], 4)), [[vShow, unref(context).docks.selected && unref(context).docks.selected.type !== "action"]]);
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
var DockPanel_default = _sfc_main$2;
|
|
1136
|
+
|
|
1137
|
+
//#endregion
|
|
1138
|
+
//#region src/client/webcomponents/components/FloatingTooltip.vue
|
|
1139
|
+
const DETECT_MARGIN = 100;
|
|
1140
|
+
const GAP = 10;
|
|
1141
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1142
|
+
__name: "FloatingTooltip",
|
|
1143
|
+
setup(__props) {
|
|
1144
|
+
const current = useFloatingTooltip();
|
|
1145
|
+
const box = ref({
|
|
1146
|
+
text: "",
|
|
1147
|
+
width: 0,
|
|
1148
|
+
height: 0,
|
|
1149
|
+
left: 0,
|
|
1150
|
+
top: 0
|
|
1151
|
+
});
|
|
1152
|
+
const align = computed(() => {
|
|
1153
|
+
const vw = window.innerWidth;
|
|
1154
|
+
const vh = window.innerHeight;
|
|
1155
|
+
if (box.value.left < DETECT_MARGIN) return "right";
|
|
1156
|
+
if (box.value.left + box.value.width > vw - DETECT_MARGIN) return "left";
|
|
1157
|
+
if (box.value.top < DETECT_MARGIN) return "bottom";
|
|
1158
|
+
if (box.value.top + box.value.height > vh - DETECT_MARGIN) return "top";
|
|
1159
|
+
return "bottom";
|
|
1160
|
+
});
|
|
1161
|
+
const style = computed(() => {
|
|
1162
|
+
switch (align.value) {
|
|
1163
|
+
case "bottom": return {
|
|
1164
|
+
left: `${box.value.left + box.value.width / 2}px`,
|
|
1165
|
+
top: `${box.value.top + box.value.height + GAP}px`,
|
|
1166
|
+
transform: "translateX(-50%)"
|
|
1167
|
+
};
|
|
1168
|
+
case "top": return {
|
|
1169
|
+
left: `${box.value.left + box.value.width / 2}px`,
|
|
1170
|
+
bottom: `${window.innerHeight - box.value.top + GAP}px`,
|
|
1171
|
+
transform: "translateX(-50%)"
|
|
1172
|
+
};
|
|
1173
|
+
case "left": return {
|
|
1174
|
+
right: `${window.innerWidth - box.value.left + GAP}px`,
|
|
1175
|
+
top: `${box.value.top + box.value.height / 2}px`,
|
|
1176
|
+
transform: "translateY(-50%)"
|
|
1177
|
+
};
|
|
1178
|
+
case "right": return {
|
|
1179
|
+
left: `${box.value.left + box.value.width + GAP}px`,
|
|
1180
|
+
top: `${box.value.top + box.value.height / 2}px`,
|
|
1181
|
+
transform: "translateY(-50%)"
|
|
1182
|
+
};
|
|
1183
|
+
default: throw new Error("Unreachable");
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
watchEffect(() => {
|
|
1187
|
+
if (current.value) box.value = { ...current.value };
|
|
1188
|
+
});
|
|
1189
|
+
return (_ctx, _cache) => {
|
|
1190
|
+
return box.value.text ? (openBlock(), createElementBlock("div", {
|
|
1191
|
+
key: 0,
|
|
1192
|
+
class: normalizeClass(["z-floating-tooltip text-xs transition-all duration-300 w-max bg-glass border border-base rounded px2 fixed p1", unref(current) ? "op100" : "op0 pointer-events-none"]),
|
|
1193
|
+
style: normalizeStyle(style.value)
|
|
1194
|
+
}, toDisplayString(box.value.text), 7)) : createCommentVNode("v-if", true);
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
});
|
|
1198
|
+
var FloatingTooltip_default = _sfc_main$1;
|
|
1199
|
+
|
|
1200
|
+
//#endregion
|
|
1201
|
+
//#region src/client/webcomponents/components/DockEmbedded.vue
|
|
1202
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1203
|
+
__name: "DockEmbedded",
|
|
1204
|
+
props: { context: {} },
|
|
1205
|
+
setup(__props) {
|
|
1206
|
+
return (_ctx, _cache) => {
|
|
1207
|
+
return openBlock(), createElementBlock(Fragment, null, [createVNode(Dock_default, { context: __props.context }, {
|
|
1208
|
+
default: withCtx(({ dockEl, panelMargins, selected }) => [createVNode(DockPanel_default, {
|
|
1209
|
+
context: __props.context,
|
|
1210
|
+
selected,
|
|
1211
|
+
"dock-el": dockEl,
|
|
1212
|
+
"panel-margins": panelMargins
|
|
1213
|
+
}, null, 8, [
|
|
1214
|
+
"context",
|
|
1215
|
+
"selected",
|
|
1216
|
+
"dock-el",
|
|
1217
|
+
"panel-margins"
|
|
1218
|
+
])]),
|
|
1219
|
+
_: 1
|
|
1220
|
+
}, 8, ["context"]), createVNode(FloatingTooltip_default)], 64);
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
});
|
|
1224
|
+
var DockEmbedded_default = _sfc_main;
|
|
1225
|
+
|
|
1226
|
+
//#endregion
|
|
1227
|
+
//#region src/client/webcomponents/components/DockEmbedded.ts
|
|
1228
|
+
const DockEmbedded = defineCustomElement(DockEmbedded_default, {
|
|
1229
|
+
shadowRoot: true,
|
|
1230
|
+
styles: [css_default]
|
|
1231
|
+
});
|
|
1232
|
+
customElements.define("vite-devtools-dock-embedded", DockEmbedded);
|
|
1233
|
+
|
|
1234
|
+
//#endregion
|
|
1235
|
+
export { DEFAULT_DOCK_PANEL_STORE, DockEmbedded, PersistedDomHolder, PersistedDomViewsManager, createDockEntryState, useDocksEntries };
|