@vitejs/devtools 0.0.0-alpha.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/DockIcon-Jbdv1CYn.js +1720 -0
  2. package/dist/DockStandalone-Dd6Dcd5B.js +81 -0
  3. package/dist/LogItem-CfTxUV6A.js +204 -0
  4. package/dist/ToastOverlay-BVErqkif.js +1048 -0
  5. package/dist/ViewBuiltinLogs-DQLxnQ1c.js +427 -0
  6. package/dist/ViewBuiltinTerminals-B83FB-cT.js +10407 -0
  7. package/dist/cli-commands-DRp01A04.js +178 -0
  8. package/dist/cli-commands.js +3 -5
  9. package/dist/cli.js +3 -6
  10. package/dist/client/inject.js +170 -18
  11. package/dist/client/standalone/assets/DockStandalone-B8W-HO8N.js +1 -0
  12. package/dist/client/standalone/assets/LogItem-B-ayIBi6.js +1 -0
  13. package/dist/client/standalone/assets/ViewBuiltinLogs-B8M7lPbt.js +1 -0
  14. package/dist/client/standalone/assets/ViewBuiltinTerminals-Dkd5qdlN.js +36 -0
  15. package/dist/client/standalone/assets/dist-ZC9UAo6H.js +1 -0
  16. package/dist/client/standalone/assets/index-6F2y1lxr.css +1 -0
  17. package/dist/client/standalone/assets/index-odNIfapG.js +4 -0
  18. package/dist/client/standalone/index.html +5 -3
  19. package/dist/client/webcomponents.d.ts +21657 -31
  20. package/dist/client/webcomponents.js +305 -455
  21. package/dist/config.d.ts +25 -0
  22. package/dist/config.js +14 -0
  23. package/dist/dirs.js +7 -3
  24. package/dist/{dist-2aLfy0Lc.js → dist-3NIYLDlS.js} +2261 -936
  25. package/dist/index.d.ts +256 -13
  26. package/dist/index.js +2 -4
  27. package/dist/plugins-6tW2SoNv.js +2115 -0
  28. package/dist/popup-EDv_a9nQ.js +358 -0
  29. package/dist/utils--qjmgani.js +6 -0
  30. package/package.json +50 -21
  31. package/dist/cli-commands-CWESTkWI.js +0 -97
  32. package/dist/client/standalone/assets/index-CXKamp9k.js +0 -7
  33. package/dist/client/standalone/assets/index-DULlvzQC.css +0 -1
  34. package/dist/dirs-DcSK9l9L.js +0 -9
  35. package/dist/index-C-9eMTqf.d.ts +0 -142
  36. package/dist/plugins-5VE4Mfdt.js +0 -1365
@@ -1,118 +1,123 @@
1
- import { A as withDirectives, C as renderList, D as watch, E as useTemplateRef, F as unref, I as normalizeClass, L as normalizeStyle, M as reactive, N as ref, O as watchEffect, P as toRefs, R as toDisplayString, S as openBlock, T as useModel, _ as defineComponent, a as useWindowSize, b as onMounted, c as vShow, d as computed, f as createBaseVNode, g as createVNode, h as createElementBlock, i as useScreenSafeArea, j as markRaw, k as withCtx, l as withModifiers, m as createCommentVNode, n as useEventListener, o as toRefs$1, p as createBlock, s as defineCustomElement, t as useElementBounding, u as Fragment, v as mergeModels, w as renderSlot, x as onUnmounted, y as nextTick } from "../dist-2aLfy0Lc.js";
2
-
3
- //#region src/client/webcomponents/.generated/css.ts
4
- 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}:root{--un-text-opacity:100%}.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:2147483645}.vite-devtools-resize-handle:hover{background-color:rgba(156,163,175,.1)}#vite-devtools-anchor{z-index:2147483645;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:44px;position:absolute;top:0;left:0;transform:translate(-50%,-50%)}#vite-devtools-anchor.vite-devtools-vertical #vite-devtools-dock-container{transition:all .6s,max-width .6s,padding .5s,transform .4s,opacity .2s;transform:translate(-50%,-50%)rotate(90deg)}#vite-devtools-anchor #vite-devtools-dock{touch-action:none;user-select:none;--vdt-border-opacity:.13;border-width:1px;border-color:rgba(136,136,136,var(--vdt-border-opacity));--vdt-backdrop-blur:blur(5px);min-width:100%;height:100%;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);background-color:rgba(255,255,255,.75);-webkit-border-radius:9999px;border-radius:9999px;padding-left:1rem;padding-right:1rem;transition:all .6s,max-width .6s,padding .5s,transform .4s,opacity .2s}@media (prefers-color-scheme:dark){#vite-devtools-anchor #vite-devtools-dock{background-color:rgba(17,17,17,.75)}}#vite-devtools-anchor.vite-devtools-minimized #vite-devtools-dock{width:52px;height:8px;padding:2px 0}#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-dock-label{--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));bottom:-1.75rem;left:50%}.vite-devtools-vertical .vite-devtools-dock-label{--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));bottom:-2.5rem}*{--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: }.container{width:100%}.border-base{--vdt-border-opacity:.13;border-color:rgba(136,136,136,var(--vdt-border-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,.75)}@media (prefers-color-scheme:dark){.bg-glass{background-color:rgba(17,17,17,.75)}}@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}}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{top:0;bottom:0;left:0;right:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z--1{z-index:-1}.z-10{z-index:10}.h-5{height:1.25rem}.h-full{height:100%}.w-5{width:1.25rem}.w-full{width:100%}.w-max{width:max-content}.flex{display:flex}.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))}.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}.border{border-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}.hover\\:bg-\\[\\#8881\\]:hover{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.p1{padding:.25rem}.p1\\.5{padding:.375rem}.px{padding-left:1rem;padding-right:1rem}.px2{padding-left:.5rem;padding-right:.5rem}.text-xs{font-size:.75rem;line-height:1rem}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.op50{opacity:.5}.opacity-0{opacity:0}.opacity-100{opacity:1}.group:hover .group-hover\\:opacity-100{opacity:1}.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-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-300{transition-duration:.3s}";
5
-
6
- //#endregion
7
- //#region src/client/webcomponents/components/DockIcon.vue
8
- const _hoisted_1$2 = ["srcset"];
9
- const _hoisted_2$1 = ["srcset"];
10
- const _hoisted_3$1 = ["src", "alt"];
11
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
12
- __name: "DockIcon",
13
- props: {
14
- icon: {},
15
- title: {}
16
- },
17
- setup(__props) {
18
- const props = __props;
19
- function getIconUrl(str, color) {
20
- if (str.includes("/")) return str;
21
- const match = str.match(/^([\w-]+):([\w-]+)$/);
22
- if (match) {
23
- const [, collection, icon2] = match;
24
- return `https://api.iconify.design/${collection}/${icon2}.svg${color === "dark" ? "?color=%23eee" : "?color=%23111"}`;
25
- }
26
- return str;
27
- }
28
- const icon = computed(() => {
29
- return {
30
- dark: getIconUrl(props.icon, "dark"),
31
- light: getIconUrl(props.icon, "light")
32
- };
33
- });
34
- return (_ctx, _cache) => {
35
- return openBlock(), createElementBlock("picture", null, [
36
- createBaseVNode("source", {
37
- srcset: icon.value.dark,
38
- media: "(prefers-color-scheme: dark)"
39
- }, null, 8, _hoisted_1$2),
40
- createBaseVNode("source", {
41
- srcset: icon.value.light,
42
- media: "(prefers-color-scheme: light)"
43
- }, null, 8, _hoisted_2$1),
44
- createBaseVNode("img", {
45
- src: icon.value.light,
46
- alt: __props.title,
47
- draggable: "false"
48
- }, null, 8, _hoisted_3$1)
49
- ]);
50
- };
51
- }
52
- });
53
- var DockIcon_default = _sfc_main$7;
54
-
55
- //#endregion
56
- //#region src/client/webcomponents/components/DockEntries.vue
57
- const _hoisted_1$1 = { class: "vite-devtools-dock-entries flex items-center w-full h-full justify-center transition-opacity duration-300" };
58
- const _hoisted_2 = ["title", "onClick"];
59
- const _hoisted_3 = { class: "vite-devtools-dock-label text-xs group-hover:opacity-100 opacity-0 transition-opacity duration-300 w-max bg-glass border border-base z-10 rounded px2 absolute p1" };
1
+ import { B as withDirectives, C as createElementBlock, E as createVNode, F as renderSlot, G as toRefs, H as reactive, I as useTemplateRef, J as normalizeStyle, K as unref, L as watch, M as onUnmounted, N as openBlock, O as defineComponent, R as watchEffect, S as createCommentVNode, U as ref, V as markRaw, _ as Fragment, a as useScreenSafeArea, b as createBaseVNode, f as defineCustomElement, g as withModifiers, j as onMounted, k as h, l as watchDebounced, m as vShow, n as useElementBounding, q as normalizeClass, r as useEventListener, s as useWindowSize, x as createBlock, y as computed, z as withCtx } from "../dist-3NIYLDlS.js";
2
+ import { _ as useDocksEntries, f as useDocksOverflowPanel, g as sharedStateToRef, h as createDockEntryState, l as setDocksOverflowPanel, m as DEFAULT_DOCK_PANEL_STORE, n as filterPopupDockEntry, r as isDockPopupEntryVisible, s as useIsDockPopupOpen, t as closeDockPopup, x as BUILTIN_ENTRY_CLIENT_AUTH_NOTICE, y as docksSplitGroupsWithCapacity } from "../popup-EDv_a9nQ.js";
3
+ import { c as _sfc_main$7, d as css_default, l as _sfc_main$8, n as _sfc_main$10, o as PersistedDomHolder, r as _sfc_main$9, s as PersistedDomViewsManager, t as _sfc_main$11, u as openDockContextMenu } from "../ToastOverlay-BVErqkif.js";
4
+ import { n as VitePlusCore_default, r as export_helper_default } from "../DockIcon-Jbdv1CYn.js";
5
+ //#region src/client/webcomponents/components/DockOverflowButton.vue
60
6
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
61
- __name: "DockEntries",
7
+ __name: "DockOverflowButton",
62
8
  props: {
63
- selected: {},
9
+ context: {},
64
10
  isVertical: { type: Boolean },
65
- entries: {}
11
+ groups: {},
12
+ selected: {}
66
13
  },
67
14
  emits: ["select"],
68
15
  setup(__props, { emit: __emit }) {
69
16
  const props = __props;
70
17
  const emit = __emit;
71
- const { selected, isVertical, entries } = toRefs(props);
72
- function toggleDockEntry(dock) {
73
- if (selected.value?.id === dock.id) emit("select", void 0);
74
- else emit("select", dock);
18
+ const overflowButton = useTemplateRef("overflowButton");
19
+ const overflowBadge = computed(() => {
20
+ const count = props.groups.reduce((acc, [_, items]) => acc + items.length, 0);
21
+ if (count > 9) return "9+";
22
+ return count.toString();
23
+ });
24
+ const isOverflowPanelVisible = ref(false);
25
+ const docksOverflowPanel = useDocksOverflowPanel();
26
+ function showOverflowPanel() {
27
+ if (!overflowButton.value) return;
28
+ isOverflowPanelVisible.value = true;
29
+ setDocksOverflowPanel({
30
+ content: () => h("div", { class: "flex gap-0 flex-wrap max-w-220px" }, [h(_sfc_main$7, {
31
+ context: props.context,
32
+ groups: props.groups,
33
+ isVertical: false,
34
+ selected: props.selected,
35
+ onSelect: (e) => emit("select", e)
36
+ })]),
37
+ el: overflowButton.value
38
+ });
39
+ }
40
+ watchDebounced(() => docksOverflowPanel.value, (value) => {
41
+ isOverflowPanelVisible.value = !!value;
42
+ }, { debounce: 1e3 });
43
+ function toggleOverflowPanel() {
44
+ if (isOverflowPanelVisible.value) hideOverflowPanel();
45
+ else showOverflowPanel();
46
+ }
47
+ function hideOverflowPanel() {
48
+ isOverflowPanelVisible.value = false;
49
+ setDocksOverflowPanel(null);
75
50
  }
76
51
  return (_ctx, _cache) => {
77
- return openBlock(), createElementBlock("div", _hoisted_1$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(entries), (dock) => {
78
- return openBlock(), createElementBlock("div", {
79
- key: dock.id,
80
- class: "relative group vite-devtools-dock-entry"
81
- }, [createBaseVNode("button", {
82
- title: dock.title,
83
- class: normalizeClass([[unref(isVertical) ? "rotate-270" : "", unref(selected) ? unref(selected).id !== dock.id ? "op50 saturate-0" : "scale-120" : ""], "flex items-center justify-center p1.5 rounded-xl hover:bg-[#8881] hover:scale-120 transition-all duration-300 relative"]),
84
- onClick: ($event) => toggleDockEntry(dock)
85
- }, [createVNode(DockIcon_default, {
86
- icon: dock.icon,
87
- title: dock.title,
88
- class: "w-5 h-5 select-none"
89
- }, null, 8, ["icon", "title"])], 10, _hoisted_2), createBaseVNode("div", _hoisted_3, toDisplayString(dock.title), 1)]);
90
- }), 128))]);
52
+ return openBlock(), createElementBlock("div", {
53
+ ref_key: "overflowButton",
54
+ ref: overflowButton
55
+ }, [createVNode(_sfc_main$8, {
56
+ context: __props.context,
57
+ dock: {
58
+ id: "overflow",
59
+ title: "Overflow",
60
+ icon: "ph:dots-three-circle-duotone"
61
+ },
62
+ class: "overflow-button",
63
+ tooltip: false,
64
+ badge: overflowBadge.value,
65
+ "is-vertical": __props.isVertical,
66
+ "is-selected": false,
67
+ "is-dimmed": false,
68
+ onClick: toggleOverflowPanel
69
+ }, null, 8, [
70
+ "context",
71
+ "badge",
72
+ "is-vertical"
73
+ ])], 512);
91
74
  };
92
75
  }
93
76
  });
94
- var DockEntries_default = _sfc_main$6;
95
-
77
+ //#endregion
78
+ //#region src/client/webcomponents/components/icons/BracketLeft.vue
79
+ const _sfc_main$5 = {};
80
+ const _hoisted_1$2 = {
81
+ viewBox: "0 0 9 20",
82
+ fill: "none",
83
+ xmlns: "http://www.w3.org/2000/svg"
84
+ };
85
+ function _sfc_render$1(_ctx, _cache) {
86
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
87
+ 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",
88
+ class: "fill-black dark:fill-white"
89
+ }, null, -1)])]);
90
+ }
91
+ var BracketLeft_default = /* @__PURE__ */ export_helper_default(_sfc_main$5, [["render", _sfc_render$1]]);
92
+ //#endregion
93
+ //#region src/client/webcomponents/components/icons/BracketRight.vue
94
+ const _sfc_main$4 = {};
95
+ const _hoisted_1$1 = {
96
+ viewBox: "0 0 9 20",
97
+ fill: "none",
98
+ xmlns: "http://www.w3.org/2000/svg"
99
+ };
100
+ function _sfc_render(_ctx, _cache) {
101
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
102
+ 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",
103
+ class: "fill-black dark:fill-white"
104
+ }, null, -1)])]);
105
+ }
106
+ var BracketRight_default = /* @__PURE__ */ export_helper_default(_sfc_main$4, [["render", _sfc_render]]);
96
107
  //#endregion
97
108
  //#region src/client/webcomponents/components/Dock.vue
98
- const PANEL_MARGIN = 5;
109
+ const _hoisted_1 = {
110
+ key: 0,
111
+ class: "i-fluent-emoji-flat-warning absolute bottom-0 right--1px w-1.5 h-1.5"
112
+ };
113
+ const _hoisted_2 = { class: "flex items-center gap-1" };
114
+ const PANEL_MARGIN = 2;
99
115
  const SNAP_THRESHOLD = 2;
100
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
116
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
101
117
  __name: "Dock",
102
- props: /* @__PURE__ */ mergeModels({
103
- state: {},
104
- docks: {}
105
- }, {
106
- "isDragging": {
107
- type: Boolean,
108
- default: false
109
- },
110
- "isDraggingModifiers": {}
111
- }),
112
- emits: ["update:isDragging"],
118
+ props: { context: {} },
113
119
  setup(__props) {
114
- const { state, docks } = toRefs(__props);
115
- const isDragging = useModel(__props, "isDragging");
120
+ const context = __props.context;
116
121
  const isSafari = navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome");
117
122
  const panelMargins = reactive({
118
123
  left: PANEL_MARGIN,
@@ -134,6 +139,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
134
139
  });
135
140
  const dockEl = useTemplateRef("dockEl");
136
141
  const anchorEl = useTemplateRef("anchorEl");
142
+ const recalculateCounter = ref(0);
143
+ const isHovering = ref(false);
137
144
  const windowSize = reactive({
138
145
  width: window.innerWidth,
139
146
  height: window.innerHeight
@@ -148,12 +155,28 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
148
155
  });
149
156
  function onPointerDown(e) {
150
157
  if (!dockEl.value) return;
151
- isDragging.value = true;
158
+ context.panel.isDragging = true;
152
159
  const { left, top, width, height } = dockEl.value.getBoundingClientRect();
153
160
  draggingOffset.x = e.clientX - left - width / 2;
154
161
  draggingOffset.y = e.clientY - top - height / 2;
155
162
  }
156
- onMounted(() => {
163
+ const isRpcTrusted = ref(context.rpc.isTrusted);
164
+ context.rpc.events.on("rpc:is-trusted:updated", (isTrusted) => {
165
+ isRpcTrusted.value = isTrusted;
166
+ if (isTrusted && context.docks.selected?.id === BUILTIN_ENTRY_CLIENT_AUTH_NOTICE.id) context.docks.switchEntry(null);
167
+ });
168
+ const isPopupEntryVisible = computed(() => isDockPopupEntryVisible(context.clientType));
169
+ const groupedEntries = computed(() => {
170
+ if (isPopupEntryVisible.value) return context.docks.groupedEntries;
171
+ return filterPopupDockEntry(context.docks.groupedEntries);
172
+ });
173
+ const splitEntries = computed(() => {
174
+ return docksSplitGroupsWithCapacity(groupedEntries.value, 5);
175
+ });
176
+ const selectedEntry = computed(() => {
177
+ return context.docks.selected;
178
+ });
179
+ onMounted(async () => {
157
180
  windowSize.width = window.innerWidth;
158
181
  windowSize.height = window.innerHeight;
159
182
  useEventListener(window, "resize", () => {
@@ -161,7 +184,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
161
184
  windowSize.height = window.innerHeight;
162
185
  });
163
186
  useEventListener(window, "pointermove", (e) => {
164
- if (!isDragging.value) return;
187
+ if (!context.panel.isDragging) return;
188
+ const store = context.panel.store;
165
189
  const centerX = window.innerWidth / 2;
166
190
  const centerY = window.innerHeight / 2;
167
191
  const x = e.clientX - draggingOffset.x;
@@ -175,15 +199,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
175
199
  const TR = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, window.innerWidth - centerX);
176
200
  const BL = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, 0 - centerX);
177
201
  const BR = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, window.innerWidth - centerX);
178
- state.value.position = deg >= TL && deg <= TR ? "top" : deg >= TR && deg <= BR ? "right" : deg >= BR && deg <= BL ? "bottom" : "left";
179
- state.value.left = snapToPoints(x / window.innerWidth * 100);
180
- state.value.top = snapToPoints(y / window.innerHeight * 100);
202
+ store.position = deg >= TL && deg <= TR ? "top" : deg >= TR && deg <= BR ? "right" : deg >= BR && deg <= BL ? "bottom" : "left";
203
+ store.left = snapToPoints(x / window.innerWidth * 100);
204
+ store.top = snapToPoints(y / window.innerHeight * 100);
181
205
  });
182
206
  useEventListener(window, "pointerup", () => {
183
- isDragging.value = false;
207
+ context.panel.isDragging = false;
184
208
  });
185
209
  useEventListener(window, "pointerleave", () => {
186
- isDragging.value = false;
210
+ context.panel.isDragging = false;
187
211
  });
188
212
  });
189
213
  function snapToPoints(value) {
@@ -195,16 +219,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
195
219
  function clamp(value, min, max) {
196
220
  return Math.min(Math.max(value, min), max);
197
221
  }
198
- const recalculateCounter = ref(0);
199
- const isHovering = ref(false);
200
- const isVertical = computed(() => state.value.position === "left" || state.value.position === "right");
201
222
  const anchorPos = computed(() => {
202
223
  recalculateCounter.value;
224
+ const store = context.panel.store;
203
225
  const halfWidth = (dockEl.value?.clientWidth || 0) / 2;
204
226
  const halfHeight = (dockEl.value?.clientHeight || 0) / 2;
205
- const left = state.value.left * windowSize.width / 100;
206
- const top = state.value.top * windowSize.height / 100;
207
- switch (state.value.position) {
227
+ const left = store.left * windowSize.width / 100;
228
+ const top = store.top * windowSize.height / 100;
229
+ switch (store.position) {
208
230
  case "top": return {
209
231
  left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
210
232
  top: panelMargins.top + halfHeight
@@ -217,7 +239,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
217
239
  left: panelMargins.left + halfHeight,
218
240
  top: clamp(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
219
241
  };
220
- case "bottom":
221
242
  default: return {
222
243
  left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
223
244
  top: windowSize.height - panelMargins.bottom - halfHeight
@@ -227,18 +248,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
227
248
  let _timer = null;
228
249
  function bringUp() {
229
250
  isHovering.value = true;
230
- if (state.value.minimizePanelInactive < 0) return;
251
+ if (context.panel.store.inactiveTimeout < 0) return;
231
252
  if (_timer) clearTimeout(_timer);
232
253
  _timer = setTimeout(() => {
233
254
  isHovering.value = false;
234
- }, +state.value.minimizePanelInactive || 0);
255
+ }, +context.panel.store.inactiveTimeout || 0);
235
256
  }
236
257
  const isHidden = computed(() => false);
237
258
  const isMinimized = computed(() => {
238
- if (state.value.minimizePanelInactive < 0) return false;
239
- if (state.value.minimizePanelInactive === 0) return true;
259
+ if (context.panel.store.inactiveTimeout < 0) return false;
260
+ if (context.panel.store.inactiveTimeout === 0) return true;
240
261
  const isTouchDevice = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
241
- return !isDragging.value && !state.value.open && !isHovering.value && !isTouchDevice && state.value.minimizePanelInactive;
262
+ return !context.panel.isDragging && !context.panel.store.open && !isHovering.value && !isTouchDevice && context.panel.store.inactiveTimeout;
242
263
  });
243
264
  const anchorStyle = computed(() => {
244
265
  return {
@@ -248,45 +269,17 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
248
269
  };
249
270
  });
250
271
  const panelStyle = computed(() => {
251
- const style = { transform: isVertical.value ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
272
+ const style = { transform: context.panel.isVertical ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
252
273
  if (isHidden.value) {
253
274
  style.opacity = 0;
254
275
  style.pointerEvents = "none";
255
276
  }
256
- if (isDragging.value) style.transition = "none !important";
277
+ if (context.panel.isDragging) style.transition = "none !important";
257
278
  return style;
258
279
  });
259
- function importScript(entry) {
260
- const id = entry.id;
261
- return import(["/.devtools", "imports"].join("-")).then((module) => {
262
- const importFn = module.importsMap[id];
263
- if (!importFn) return Promise.reject(/* @__PURE__ */ new Error(`[VITE DEVTOOLS] No import found for id: ${id}`));
264
- return importFn();
265
- }).catch((error) => {
266
- console.error("[VITE DEVTOOLS] Error executing import action", error);
267
- return Promise.reject(error);
268
- });
269
- }
270
- function onSelected(entry) {
271
- const context = reactive({
272
- dockEntry: entry,
273
- dockState: computed({
274
- get() {
275
- return state.value.dockEntry?.id === entry.id ? "active" : "inactive";
276
- },
277
- set(val) {
278
- if (val === "active") state.value.dockEntry = entry;
279
- else if (state.value.dockEntry?.id === entry.id) state.value.dockEntry = void 0;
280
- }
281
- }),
282
- hidePanel() {
283
- state.value.open = false;
284
- }
285
- });
286
- if (entry?.type === "action") return importScript(entry).then((fn) => fn(context));
287
- }
288
280
  onMounted(() => {
289
- bringUp();
281
+ if (context.panel.store.open && !isRpcTrusted.value) context.panel.store.open = false;
282
+ if (isRpcTrusted.value) bringUp();
290
283
  recalculateCounter.value++;
291
284
  });
292
285
  return (_ctx, _cache) => {
@@ -295,18 +288,24 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
295
288
  ref_key: "anchorEl",
296
289
  ref: anchorEl,
297
290
  style: normalizeStyle([anchorStyle.value]),
298
- class: normalizeClass({
299
- "vite-devtools-horizontal": !isVertical.value,
300
- "vite-devtools-vertical": isVertical.value,
291
+ class: normalizeClass([{
292
+ "vite-devtools-horizontal": !unref(context).panel.isVertical,
293
+ "vite-devtools-vertical": unref(context).panel.isVertical,
301
294
  "vite-devtools-minimized": isMinimized.value
302
- }),
295
+ }, "color-base"]),
303
296
  onMousemove: bringUp
304
297
  }, [
305
298
  !unref(isSafari) ? (openBlock(), createElementBlock("div", {
306
299
  key: 0,
307
300
  id: "vite-devtools-glowing",
308
- style: normalizeStyle(isDragging.value ? "opacity: 0.6 !important" : "")
309
- }, null, 4)) : createCommentVNode("v-if", true),
301
+ class: normalizeClass(unref(context).panel.isDragging ? "op60!" : "")
302
+ }, null, 2)) : createCommentVNode("v-if", true),
303
+ renderSlot(_ctx.$slots, "default", {
304
+ context: unref(context),
305
+ dockEl: dockEl.value,
306
+ selected: unref(context).docks.selected,
307
+ panelMargins
308
+ }),
310
309
  createBaseVNode("div", {
311
310
  id: "vite-devtools-dock-container",
312
311
  ref_key: "dockEl",
@@ -315,71 +314,76 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
315
314
  }, [createBaseVNode("div", {
316
315
  id: "vite-devtools-dock",
317
316
  onPointerdown: onPointerDown
318
- }, [createVNode(DockEntries_default, {
319
- entries: unref(docks),
320
- class: normalizeClass(isMinimized.value ? "opacity-0" : "opacity-100"),
321
- "is-vertical": isVertical.value,
322
- selected: unref(state).dockEntry,
323
- onSelect: onSelected
324
- }, null, 8, [
325
- "entries",
326
- "class",
327
- "is-vertical",
328
- "selected"
329
- ])], 32)], 4),
330
- renderSlot(_ctx.$slots, "default", {
331
- dockEl: dockEl.value,
332
- panelMargins,
333
- state: unref(state),
334
- entry: unref(state).dockEntry
335
- })
317
+ }, [
318
+ 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" }),
319
+ 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"]),
320
+ createBaseVNode("div", { 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", unref(context).panel.isVertical ? "rotate-270" : "rotate-0"]]) }, [createVNode(VitePlusCore_default), !isRpcTrusted.value ? (openBlock(), createElementBlock("div", _hoisted_1)) : createCommentVNode("v-if", true)], 2),
321
+ !isRpcTrusted.value ? (openBlock(), createElementBlock("div", {
322
+ key: 0,
323
+ class: normalizeClass(["transition duration-300 delay-200", isMinimized.value ? "opacity-0 pointer-events-none ws-nowrap text-sm text-orange of-hidden" : "opacity-100"])
324
+ }, [createBaseVNode("button", {
325
+ class: "p2 transition hover:bg-active rounded-full px4",
326
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(context).docks.toggleEntry(unref(BUILTIN_ENTRY_CLIENT_AUTH_NOTICE).id))
327
+ }, [createBaseVNode("div", _hoisted_2, [createBaseVNode("div", { class: normalizeClass(["i-fluent-emoji-flat-warning flex-none", unref(context).panel.isVertical ? "rotate-270" : "rotate-0"]) }, null, 2), _cache[3] || (_cache[3] = createBaseVNode("div", { class: "ws-nowrap text-amber" }, " Unauthorized ", -1))])])], 2)) : createCommentVNode("v-if", true),
328
+ createBaseVNode("div", { class: normalizeClass([isMinimized.value ? "opacity-0 pointer-events-none" : "opacity-100", "transition duration-200 flex items-center w-full h-full justify-center px3"]) }, [createVNode(_sfc_main$7, {
329
+ context: unref(context),
330
+ groups: splitEntries.value.visible,
331
+ "is-vertical": unref(context).panel.isVertical,
332
+ selected: selectedEntry.value,
333
+ onSelect: _cache[1] || (_cache[1] = (e) => unref(context).docks.switchEntry(e?.id))
334
+ }, null, 8, [
335
+ "context",
336
+ "groups",
337
+ "is-vertical",
338
+ "selected"
339
+ ]), splitEntries.value.overflow.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[4] || (_cache[4] = createBaseVNode("div", { class: "border-base m1 h-20px w-px border-r-1.5" }, null, -1)), createVNode(_sfc_main$6, {
340
+ context: unref(context),
341
+ "is-vertical": unref(context).panel.isVertical,
342
+ groups: splitEntries.value.overflow,
343
+ selected: selectedEntry.value,
344
+ onSelect: _cache[2] || (_cache[2] = (e) => unref(context).docks.switchEntry(e?.id))
345
+ }, null, 8, [
346
+ "context",
347
+ "is-vertical",
348
+ "groups",
349
+ "selected"
350
+ ])], 64)) : createCommentVNode("v-if", true)], 2)
351
+ ], 32)], 4)
336
352
  ], 38);
337
353
  };
338
354
  }
339
355
  });
340
- var Dock_default = _sfc_main$5;
341
-
342
356
  //#endregion
343
357
  //#region src/client/webcomponents/components/DockPanelResizer.vue
344
358
  const PANEL_MIN = 20;
345
359
  const PANEL_MAX = 100;
346
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
360
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
347
361
  __name: "DockPanelResizer",
348
- props: /* @__PURE__ */ mergeModels({
349
- state: {},
350
- isDragging: { type: Boolean }
351
- }, {
352
- "isResizing": {
353
- type: Boolean,
354
- default: false
355
- },
356
- "isResizingModifiers": {}
357
- }),
358
- emits: ["update:isResizing"],
362
+ props: { panel: {} },
359
363
  setup(__props) {
360
364
  const props = __props;
361
- const isResizing = useModel(__props, "isResizing");
362
- const { state } = toRefs$1(props);
363
- const container = ref();
365
+ const topHandle = useTemplateRef("topHandle");
366
+ const container = computed(() => topHandle.value?.parentElement);
364
367
  const resizingState = ref(false);
365
368
  function handleResize(e) {
366
369
  if (!resizingState.value) return;
367
370
  const box = container.value?.getBoundingClientRect();
368
371
  if (!box) return;
372
+ const store = props.panel.store;
369
373
  let widthPx, heightPx;
370
374
  if (resizingState.value.right) {
371
375
  widthPx = Math.abs(e instanceof MouseEvent ? e.clientX : (e.touches[0]?.clientX || 0) - (box?.left || 0));
372
- state.value.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
376
+ store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
373
377
  } else if (resizingState.value.left) {
374
378
  widthPx = Math.abs((box?.right || 0) - (e instanceof MouseEvent ? e.clientX : e.touches[0]?.clientX || 0));
375
- state.value.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
379
+ store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
376
380
  }
377
381
  if (resizingState.value.top) {
378
382
  heightPx = Math.abs((box?.bottom || 0) - (e instanceof MouseEvent ? e.clientY : e.touches[0]?.clientY || 0));
379
- state.value.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
383
+ store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
380
384
  } else if (resizingState.value.bottom) {
381
385
  heightPx = Math.abs(e instanceof MouseEvent ? e.clientY : (e.touches[0]?.clientY || 0) - (box?.top || 0));
382
- state.value.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
386
+ store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
383
387
  }
384
388
  }
385
389
  useEventListener(window, "mousemove", handleResize);
@@ -388,40 +392,37 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
388
392
  useEventListener(window, "touchend", () => resizingState.value = false);
389
393
  useEventListener(window, "mouseleave", () => resizingState.value = false);
390
394
  watch(resizingState, (value) => {
391
- isResizing.value = !!value;
395
+ props.panel.isResizing = !!value;
392
396
  }, { flush: "sync" });
393
397
  return (_ctx, _cache) => {
394
- return openBlock(), createElementBlock("div", {
395
- id: "vite-devtools-resize-container",
396
- ref_key: "container",
397
- ref: container,
398
- class: "w-full h-full absolute left-0 right-0 bottom-0 top-0 antialiased"
399
- }, [
398
+ return openBlock(), createElementBlock(Fragment, null, [
400
399
  createCommentVNode(" Handlers "),
401
400
  withDirectives(createBaseVNode("div", {
401
+ ref_key: "topHandle",
402
+ ref: topHandle,
402
403
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
403
404
  style: { top: 0 },
404
405
  onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => resizingState.value = { top: true }, ["prevent"])),
405
406
  onTouchstartPassive: _cache[1] || (_cache[1] = () => resizingState.value = { top: true })
406
- }, null, 544), [[vShow, unref(state).position !== "top"]]),
407
+ }, null, 544), [[vShow, __props.panel.store.position !== "top"]]),
407
408
  withDirectives(createBaseVNode("div", {
408
409
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
409
410
  style: { bottom: 0 },
410
411
  onMousedown: _cache[2] || (_cache[2] = withModifiers(() => resizingState.value = { bottom: true }, ["prevent"])),
411
412
  onTouchstartPassive: _cache[3] || (_cache[3] = () => resizingState.value = { bottom: true })
412
- }, null, 544), [[vShow, unref(state).position !== "bottom"]]),
413
+ }, null, 544), [[vShow, __props.panel.store.position !== "bottom"]]),
413
414
  withDirectives(createBaseVNode("div", {
414
415
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
415
416
  style: { left: 0 },
416
417
  onMousedown: _cache[4] || (_cache[4] = withModifiers(() => resizingState.value = { left: true }, ["prevent"])),
417
418
  onTouchstartPassive: _cache[5] || (_cache[5] = () => resizingState.value = { left: true })
418
- }, null, 544), [[vShow, unref(state).position !== "left"]]),
419
+ }, null, 544), [[vShow, __props.panel.store.position !== "left"]]),
419
420
  withDirectives(createBaseVNode("div", {
420
421
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
421
422
  style: { right: 0 },
422
423
  onMousedown: _cache[6] || (_cache[6] = withModifiers(() => resizingState.value = { right: true }, ["prevent"])),
423
424
  onTouchstartPassive: _cache[7] || (_cache[7] = () => resizingState.value = { right: true })
424
- }, null, 544), [[vShow, unref(state).position !== "right"]]),
425
+ }, null, 544), [[vShow, __props.panel.store.position !== "right"]]),
425
426
  withDirectives(createBaseVNode("div", {
426
427
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
427
428
  style: {
@@ -437,7 +438,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
437
438
  top: true,
438
439
  left: true
439
440
  })
440
- }, null, 544), [[vShow, unref(state).position !== "top" && unref(state).position !== "left"]]),
441
+ }, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "left"]]),
441
442
  withDirectives(createBaseVNode("div", {
442
443
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
443
444
  style: {
@@ -453,7 +454,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
453
454
  top: true,
454
455
  right: true
455
456
  })
456
- }, null, 544), [[vShow, unref(state).position !== "top" && unref(state).position !== "right"]]),
457
+ }, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "right"]]),
457
458
  withDirectives(createBaseVNode("div", {
458
459
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
459
460
  style: {
@@ -469,7 +470,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
469
470
  bottom: true,
470
471
  left: true
471
472
  })
472
- }, null, 544), [[vShow, unref(state).position !== "bottom" && unref(state).position !== "left"]]),
473
+ }, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "left"]]),
473
474
  withDirectives(createBaseVNode("div", {
474
475
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
475
476
  style: {
@@ -485,197 +486,56 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
485
486
  bottom: true,
486
487
  right: true
487
488
  })
488
- }, null, 544), [[vShow, unref(state).position !== "bottom" && unref(state).position !== "right"]])
489
- ], 512);
490
- };
491
- }
492
- });
493
- var DockPanelResizer_default = _sfc_main$4;
494
-
495
- //#endregion
496
- //#region src/client/webcomponents/components/IframeManager.ts
497
- var IframeManager = class {
498
- iframes = {};
499
- container = void 0;
500
- constructor() {}
501
- setContainer(container) {
502
- this.container = container;
503
- }
504
- getIframeHolder(id) {
505
- let iframe;
506
- if (!this.iframes[id]) {
507
- const el = document.createElement("iframe");
508
- this.iframes[id] = new IframeHolder(id, el);
509
- this.container.appendChild(el);
510
- iframe = this.iframes[id];
511
- } else iframe = this.iframes[id];
512
- return iframe;
513
- }
514
- };
515
- var IframeHolder = class {
516
- iframe;
517
- id;
518
- parent;
519
- _cleanups = [];
520
- constructor(id, iframe) {
521
- this.id = id;
522
- this.iframe = iframe;
523
- }
524
- cleanup() {
525
- this._cleanups.forEach((cleanup) => cleanup());
526
- this._cleanups = [];
527
- }
528
- mount(parent) {
529
- if (this.parent === parent) {
530
- this.show();
531
- return;
532
- }
533
- this.cleanup();
534
- this.parent = parent;
535
- const func = () => this.update();
536
- window.addEventListener("resize", func);
537
- this._cleanups.push(() => window.removeEventListener("resize", func));
538
- this.show();
539
- }
540
- hide() {
541
- this.iframe.style.display = "none";
542
- }
543
- show() {
544
- this.iframe.style.display = "block";
545
- this.update();
546
- }
547
- update() {
548
- if (!this.parent) return;
549
- const rect = this.parent.getBoundingClientRect();
550
- this.iframe.style.position = "absolute";
551
- this.iframe.style.width = `${rect.width}px`;
552
- this.iframe.style.height = `${rect.height}px`;
553
- }
554
- unmount() {
555
- this.cleanup();
556
- this.hide();
557
- this.parent = void 0;
558
- }
559
- };
560
-
561
- //#endregion
562
- //#region src/client/webcomponents/components/ViewIframe.vue
563
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
564
- __name: "ViewIframe",
565
- props: {
566
- state: {},
567
- isDragging: { type: Boolean },
568
- isResizing: { type: Boolean },
569
- entry: {},
570
- iframes: {},
571
- iframeStyle: {}
572
- },
573
- setup(__props) {
574
- const props = __props;
575
- const viewFrame = useTemplateRef("viewFrame");
576
- onMounted(() => {
577
- const holder = props.iframes.getIframeHolder(props.entry.id);
578
- holder.iframe.style.boxShadow = "none";
579
- holder.iframe.style.outline = "none";
580
- Object.assign(holder.iframe.style, props.iframeStyle);
581
- if (!holder.iframe.src) holder.iframe.src = props.entry.url;
582
- holder.mount(viewFrame.value);
583
- nextTick(() => {
584
- holder.update();
585
- });
586
- watch(() => props.state, () => {
587
- holder.update();
588
- }, { deep: true });
589
- watchEffect(() => {
590
- holder.iframe.style.pointerEvents = props.isDragging || props.isResizing ? "none" : "auto";
591
- }, { flush: "sync" });
592
- });
593
- onUnmounted(() => {
594
- props.iframes.getIframeHolder(props.entry.id).unmount();
595
- });
596
- return (_ctx, _cache) => {
597
- return openBlock(), createElementBlock("div", {
598
- ref_key: "viewFrame",
599
- ref: viewFrame,
600
- class: "vite-devtools-view-iframe w-full h-full flex items-center justify-center"
601
- }, [..._cache[0] || (_cache[0] = [createBaseVNode("div", { class: "op50 z--1" }, " Loading iframe... ", -1)])], 512);
602
- };
603
- }
604
- });
605
- var ViewIframe_default = _sfc_main$3;
606
-
607
- //#endregion
608
- //#region src/client/webcomponents/components/ViewEntry.vue
609
- const _hoisted_1 = { key: 1 };
610
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
611
- __name: "ViewEntry",
612
- props: {
613
- state: {},
614
- isDragging: { type: Boolean },
615
- isResizing: { type: Boolean },
616
- entry: {},
617
- iframes: {},
618
- iframeStyle: {}
619
- },
620
- setup(__props) {
621
- return (_ctx, _cache) => {
622
- return __props.entry.type === "iframe" ? (openBlock(), createBlock(ViewIframe_default, {
623
- key: 0,
624
- state: __props.state,
625
- "is-dragging": __props.isDragging,
626
- "is-resizing": __props.isResizing,
627
- entry: __props.entry,
628
- iframes: __props.iframes,
629
- "iframe-style": __props.iframeStyle
630
- }, null, 8, [
631
- "state",
632
- "is-dragging",
633
- "is-resizing",
634
- "entry",
635
- "iframes",
636
- "iframe-style"
637
- ])) : (openBlock(), createElementBlock("div", _hoisted_1, " Unknown entry: " + toDisplayString(__props.entry), 1));
489
+ }, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "right"]])
490
+ ], 64);
638
491
  };
639
492
  }
640
493
  });
641
- var ViewEntry_default = _sfc_main$2;
642
-
643
494
  //#endregion
644
495
  //#region src/client/webcomponents/components/DockPanel.vue
645
496
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
646
497
  __name: "DockPanel",
647
498
  props: {
648
- state: {},
649
- entry: {},
499
+ context: {},
500
+ selected: {},
650
501
  dockEl: {},
651
502
  panelMargins: {}
652
503
  },
653
504
  setup(__props) {
654
505
  const props = __props;
655
- const { state, entry, panelMargins } = toRefs(props);
656
- const dockPanel = useTemplateRef("dockPanel");
657
- const iframesContainer = useTemplateRef("iframesContainer");
658
- const iframes = markRaw(new IframeManager());
659
- watchEffect(() => {
660
- iframes.setContainer(iframesContainer.value);
661
- }, { flush: "sync" });
506
+ const context = props.context;
507
+ const { selected, panelMargins } = toRefs(props);
662
508
  const windowSize = reactive(useWindowSize());
663
- const isDragging = ref(false);
664
- const isResizing = ref(false);
665
509
  const isHovering = ref(false);
666
510
  const mousePosition = reactive({
667
511
  x: 0,
668
512
  y: 0
669
513
  });
514
+ const dockPanel = useTemplateRef("dockPanel");
515
+ const viewsContainer = useTemplateRef("viewsContainer");
516
+ const persistedDoms = markRaw(new PersistedDomViewsManager(viewsContainer));
670
517
  function clamp(value, min, max) {
671
518
  return Math.min(Math.max(value, min), max);
672
519
  }
520
+ function openContextMenu(e) {
521
+ if (!dockPanel.value) return;
522
+ const entry = selected.value;
523
+ if (!entry) return;
524
+ e.preventDefault();
525
+ openDockContextMenu({
526
+ context,
527
+ entry,
528
+ el: dockPanel.value,
529
+ gap: 6
530
+ });
531
+ }
673
532
  const anchorPos = computed(() => {
674
533
  const halfWidth = (props.dockEl?.clientWidth || 0) / 2;
675
534
  const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
676
- const left = state.value.left * windowSize.width / 100;
677
- const top = state.value.top * windowSize.height / 100;
678
- switch (state.value.position) {
535
+ const store = context.panel.store;
536
+ const left = store.left * windowSize.width / 100;
537
+ const top = store.top * windowSize.height / 100;
538
+ switch (store.position) {
679
539
  case "top": return {
680
540
  left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
681
541
  top: panelMargins.value.top + halfHeight
@@ -688,7 +548,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
688
548
  left: panelMargins.value.left + halfHeight,
689
549
  top: clamp(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
690
550
  };
691
- case "bottom":
692
551
  default: return {
693
552
  left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
694
553
  top: windowSize.height - panelMargins.value.bottom - halfHeight
@@ -698,14 +557,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
698
557
  let _timer = null;
699
558
  function bringUp() {
700
559
  isHovering.value = true;
701
- if (state.value.minimizePanelInactive < 0) return;
560
+ if (context.panel.store.inactiveTimeout < 0) return;
702
561
  if (_timer) clearTimeout(_timer);
703
562
  _timer = setTimeout(() => {
704
563
  isHovering.value = false;
705
- }, +state.value.minimizePanelInactive || 0);
564
+ }, +context.panel.store.inactiveTimeout || 0);
706
565
  }
707
566
  const { width: frameWidth, height: frameHeight } = useElementBounding(dockPanel);
708
- const iframeStyle = computed(() => {
567
+ const panelStyle = computed(() => {
709
568
  mousePosition.x, mousePosition.y;
710
569
  const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
711
570
  const frameMargin = {
@@ -718,19 +577,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
718
577
  const marginVertical = frameMargin.top + frameMargin.bottom;
719
578
  const maxWidth = windowSize.width - marginHorizontal;
720
579
  const maxHeight = windowSize.height - marginVertical;
580
+ const panel = context.panel;
581
+ const store = panel.store;
721
582
  const style = {
722
583
  position: "fixed",
723
- zIndex: -1,
724
- pointerEvents: isDragging.value || isResizing.value ? "none" : "auto",
725
- width: `min(${state.value.width}vw, calc(100vw - ${marginHorizontal}px))`,
726
- height: `min(${state.value.height}vh, calc(100vh - ${marginVertical}px))`
584
+ pointerEvents: panel.isDragging || panel.isResizing ? "none" : "auto",
585
+ width: `min(${store.width}vw, calc(100vw - ${marginHorizontal}px))`,
586
+ height: `min(${store.height}vh, calc(100vh - ${marginVertical}px))`
727
587
  };
728
588
  const anchor = anchorPos.value;
729
- const width = Math.min(maxWidth, state.value.width * windowSize.width / 100);
730
- const height = Math.min(maxHeight, state.value.height * windowSize.height / 100);
589
+ const width = Math.min(maxWidth, store.width * windowSize.width / 100);
590
+ const height = Math.min(maxHeight, store.height * windowSize.height / 100);
731
591
  const anchorX = anchor?.left || 0;
732
592
  const anchorY = anchor?.top || 0;
733
- switch (state.value.position) {
593
+ switch (store.position) {
734
594
  case "top":
735
595
  case "bottom":
736
596
  style.left = `${-frameWidth.value / 2}px`;
@@ -746,7 +606,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
746
606
  else if (windowSize.height - anchorY - frameMargin.bottom < height / 2) style.top = `${windowSize.height - anchorY - height / 2 - frameMargin.bottom - frameHeight.value / 2}px`;
747
607
  break;
748
608
  }
749
- switch (state.value.position) {
609
+ switch (store.position) {
750
610
  case "top":
751
611
  style.top = 0;
752
612
  break;
@@ -756,7 +616,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
756
616
  case "left":
757
617
  style.left = 0;
758
618
  break;
759
- case "bottom":
760
619
  default:
761
620
  style.bottom = 0;
762
621
  break;
@@ -768,95 +627,86 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
768
627
  });
769
628
  return (_ctx, _cache) => {
770
629
  return withDirectives((openBlock(), createElementBlock("div", {
771
- id: "vite-devtools-dock-panel",
772
630
  ref_key: "dockPanel",
773
631
  ref: dockPanel,
774
- class: "bg-glass rounded-lg border border-base shadow",
775
- style: normalizeStyle(iframeStyle.value)
632
+ class: "bg-glass:75 rounded-lg border border-base color-base shadow overflow-hidden",
633
+ style: normalizeStyle(panelStyle.value),
634
+ onContextmenu: openContextMenu
776
635
  }, [
777
- createVNode(DockPanelResizer_default, {
778
- "is-resizing": isResizing.value,
779
- "onUpdate:isResizing": _cache[0] || (_cache[0] = ($event) => isResizing.value = $event),
780
- "is-dragging": isDragging.value,
781
- state: unref(state),
782
- entry: unref(entry)
783
- }, null, 8, [
784
- "is-resizing",
785
- "is-dragging",
786
- "state",
787
- "entry"
788
- ]),
789
- unref(entry) && iframesContainer.value ? (openBlock(), createBlock(ViewEntry_default, {
790
- key: unref(entry).id,
791
- state: unref(state),
792
- "is-dragging": isDragging.value,
793
- "is-resizing": isResizing.value,
794
- entry: unref(entry),
795
- iframes: unref(iframes),
636
+ createVNode(_sfc_main$2, { panel: unref(context).panel }, null, 8, ["panel"]),
637
+ unref(selected) && viewsContainer.value ? (openBlock(), createBlock(_sfc_main$9, {
638
+ key: unref(selected).id,
639
+ context: unref(context),
640
+ entry: unref(selected),
641
+ "persisted-doms": unref(persistedDoms),
796
642
  "iframe-style": {
797
643
  border: "1px solid #8883",
798
- borderRadius: "0.5rem",
799
- zIndex: "2147483645"
800
- },
801
- rounded: ""
644
+ borderRadius: "0.5rem"
645
+ }
802
646
  }, null, 8, [
803
- "state",
804
- "is-dragging",
805
- "is-resizing",
647
+ "context",
806
648
  "entry",
807
- "iframes"
649
+ "persisted-doms"
808
650
  ])) : createCommentVNode("v-if", true),
809
651
  createBaseVNode("div", {
810
- id: "vite-devtools-iframe-container",
811
- ref_key: "iframesContainer",
812
- ref: iframesContainer,
813
- class: "absolute inset-0"
652
+ id: "vite-devtools-views-container",
653
+ ref_key: "viewsContainer",
654
+ ref: viewsContainer,
655
+ class: "absolute inset-0 pointer-events-none"
814
656
  }, null, 512)
815
- ], 4)), [[vShow, unref(entry)]]);
657
+ ], 36)), [[vShow, unref(context).docks.selected && unref(context).docks.selected.type !== "action"]]);
816
658
  };
817
659
  }
818
660
  });
819
- var DockPanel_default = _sfc_main$1;
820
-
821
661
  //#endregion
822
- //#region src/client/webcomponents/components/DockEmbedded.vue
823
- const _sfc_main = /* @__PURE__ */ defineComponent({
662
+ //#region src/client/webcomponents/components/DockEmbedded.ts
663
+ const DockEmbedded = defineCustomElement(/* @__PURE__ */ defineComponent({
824
664
  __name: "DockEmbedded",
825
- props: {
826
- state: {},
827
- docks: {}
828
- },
665
+ props: { context: {} },
829
666
  setup(__props) {
667
+ const props = __props;
668
+ const isDockPopupOpen = useIsDockPopupOpen();
669
+ const settings = sharedStateToRef(props.context.docks.settings);
670
+ useEventListener(window, "mousedown", (e) => {
671
+ if (!settings.value.closeOnOutsideClick) return;
672
+ if (isDockPopupOpen.value) return;
673
+ if (!props.context.panel.store.open || props.context.panel.isDragging || props.context.panel.isResizing) return;
674
+ if (!e.composedPath().find((_el) => {
675
+ const el = _el;
676
+ return [...el.classList || []].some((c) => c.startsWith("vite-devtools-")) || el.id?.startsWith("vite-devtools-") || el.tagName?.toLowerCase() === "iframe";
677
+ })) props.context.docks.switchEntry(null);
678
+ });
679
+ onUnmounted(() => {
680
+ closeDockPopup();
681
+ });
830
682
  return (_ctx, _cache) => {
831
- return openBlock(), createBlock(Dock_default, {
832
- state: __props.state,
833
- docks: __props.docks
834
- }, {
835
- default: withCtx(({ dockEl, entry, panelMargins }) => [createVNode(DockPanel_default, {
836
- "dock-el": dockEl,
837
- state: __props.state,
838
- "panel-margins": panelMargins,
839
- entry
840
- }, null, 8, [
841
- "dock-el",
842
- "state",
843
- "panel-margins",
844
- "entry"
845
- ])]),
846
- _: 1
847
- }, 8, ["state", "docks"]);
683
+ return openBlock(), createElementBlock(Fragment, null, [
684
+ !unref(isDockPopupOpen) ? (openBlock(), createBlock(_sfc_main$3, {
685
+ key: 0,
686
+ context: __props.context
687
+ }, {
688
+ default: withCtx(({ dockEl, panelMargins, selected }) => [createVNode(_sfc_main$1, {
689
+ context: __props.context,
690
+ selected,
691
+ "dock-el": dockEl,
692
+ "panel-margins": panelMargins
693
+ }, null, 8, [
694
+ "context",
695
+ "selected",
696
+ "dock-el",
697
+ "panel-margins"
698
+ ])]),
699
+ _: 1
700
+ }, 8, ["context"])) : createCommentVNode("v-if", true),
701
+ !unref(isDockPopupOpen) ? (openBlock(), createBlock(_sfc_main$10, { key: 1 })) : createCommentVNode("v-if", true),
702
+ createVNode(_sfc_main$11, { context: __props.context }, null, 8, ["context"])
703
+ ], 64);
848
704
  };
849
705
  }
850
- });
851
- var DockEmbedded_default = _sfc_main;
852
-
853
- //#endregion
854
- //#region src/client/webcomponents/components/DockEmbedded.ts
855
- const DockEmbedded = defineCustomElement(DockEmbedded_default, {
706
+ }), {
856
707
  shadowRoot: true,
857
708
  styles: [css_default]
858
709
  });
859
710
  customElements.define("vite-devtools-dock-embedded", DockEmbedded);
860
-
861
711
  //#endregion
862
- export { DockEmbedded, IframeHolder, IframeManager };
712
+ export { DEFAULT_DOCK_PANEL_STORE, DockEmbedded, PersistedDomHolder, PersistedDomViewsManager, createDockEntryState, sharedStateToRef, useDocksEntries };