@vitejs/devtools 0.0.0-alpha.9 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/DockIcon-BtMEW4VE.js +97 -0
  2. package/dist/DockStandalone-CZAqITKs.js +81 -0
  3. package/dist/LogItem-BTrEubKY.js +205 -0
  4. package/dist/ToastOverlay-DO3Kl_rY.js +1055 -0
  5. package/dist/ViewBuiltinLogs-BL373XPJ.js +428 -0
  6. package/dist/ViewBuiltinTerminals-DdpE1Ftb.js +10409 -0
  7. package/dist/ViewJsonRender-coidkW9b.js +6835 -0
  8. package/dist/cli-commands-BRswBnHn.js +180 -0
  9. package/dist/cli-commands.js +3 -5
  10. package/dist/cli.js +3 -6
  11. package/dist/client/inject.js +171 -18
  12. package/dist/client/standalone/assets/DockStandalone-DDaYjGO1.js +1 -0
  13. package/dist/client/standalone/assets/LogItem-CKbVrExA.js +1 -0
  14. package/dist/client/standalone/assets/ViewBuiltinLogs-9oWDdl1G.js +1 -0
  15. package/dist/client/standalone/assets/ViewBuiltinTerminals-CpexS-ib.js +36 -0
  16. package/dist/client/standalone/assets/ViewJsonRender-CKPzRgqQ.js +43 -0
  17. package/dist/client/standalone/assets/dist-JpCJ4ieR.js +1 -0
  18. package/dist/client/standalone/assets/iconify-C-CPDXMf.js +2 -0
  19. package/dist/client/standalone/assets/index-3wlMt-60.js +3 -0
  20. package/dist/client/standalone/assets/index-6F2y1lxr.css +1 -0
  21. package/dist/client/standalone/assets/runtime-core.esm-bundler-oO31W4LZ.js +1 -0
  22. package/dist/client/standalone/index.html +7 -3
  23. package/dist/client/webcomponents.d.ts +21657 -31
  24. package/dist/client/webcomponents.js +307 -455
  25. package/dist/config.d.ts +25 -0
  26. package/dist/config.js +14 -0
  27. package/dist/dirs.js +7 -3
  28. package/dist/dist-Cgqg5_oP.js +1113 -0
  29. package/dist/iconify-YyqAMHKf.js +1625 -0
  30. package/dist/index.d.ts +256 -13
  31. package/dist/index.js +2 -4
  32. package/dist/plugins-Cvy_lJ0L.js +2135 -0
  33. package/dist/popup-ffZHGm5D.js +358 -0
  34. package/dist/utils-Csuu5uNf.js +10 -0
  35. package/dist/{dist-2aLfy0Lc.js → vue.runtime.esm-bundler-D2MZbyFr.js} +1948 -1734
  36. package/package.json +53 -21
  37. package/dist/cli-commands-CWESTkWI.js +0 -97
  38. package/dist/client/standalone/assets/index-CXKamp9k.js +0 -7
  39. package/dist/client/standalone/assets/index-DULlvzQC.css +0 -1
  40. package/dist/dirs-DcSK9l9L.js +0 -9
  41. package/dist/index-C-9eMTqf.d.ts +0 -142
  42. package/dist/plugins-5VE4Mfdt.js +0 -1365
@@ -1,118 +1,125 @@
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 { A as renderSlot, D as openBlock, E as onUnmounted, F as withDirectives, M as watch, N as watchEffect, P as withCtx, T as onMounted, U as ref, V as reactive, X as normalizeClass, Y as unref, Z as normalizeStyle, b as h, d as createBlock, f as createCommentVNode, g as createVNode, i as vShow, j as useTemplateRef, l as computed, n as defineCustomElement, o as withModifiers, p as createElementBlock, q as toRefs, s as Fragment, u as createBaseVNode, v as defineComponent, z as markRaw } from "../vue.runtime.esm-bundler-D2MZbyFr.js";
2
+ import { a as useScreenSafeArea, l as watchDebounced, n as useElementBounding, r as useEventListener, s as useWindowSize } from "../dist-Cgqg5_oP.js";
3
+ 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-ffZHGm5D.js";
4
+ 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-DO3Kl_rY.js";
5
+ import "../iconify-YyqAMHKf.js";
6
+ import { n as VitePlusCore_default, r as export_helper_default } from "../DockIcon-BtMEW4VE.js";
7
+ //#region src/client/webcomponents/components/DockOverflowButton.vue
60
8
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
61
- __name: "DockEntries",
9
+ __name: "DockOverflowButton",
62
10
  props: {
63
- selected: {},
11
+ context: {},
64
12
  isVertical: { type: Boolean },
65
- entries: {}
13
+ groups: {},
14
+ selected: {}
66
15
  },
67
16
  emits: ["select"],
68
17
  setup(__props, { emit: __emit }) {
69
18
  const props = __props;
70
19
  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);
20
+ const overflowButton = useTemplateRef("overflowButton");
21
+ const overflowBadge = computed(() => {
22
+ const count = props.groups.reduce((acc, [_, items]) => acc + items.length, 0);
23
+ if (count > 9) return "9+";
24
+ return count.toString();
25
+ });
26
+ const isOverflowPanelVisible = ref(false);
27
+ const docksOverflowPanel = useDocksOverflowPanel();
28
+ function showOverflowPanel() {
29
+ if (!overflowButton.value) return;
30
+ isOverflowPanelVisible.value = true;
31
+ setDocksOverflowPanel({
32
+ content: () => h("div", { class: "flex gap-0 flex-wrap max-w-220px" }, [h(_sfc_main$7, {
33
+ context: props.context,
34
+ groups: props.groups,
35
+ isVertical: false,
36
+ selected: props.selected,
37
+ onSelect: (e) => emit("select", e)
38
+ })]),
39
+ el: overflowButton.value
40
+ });
41
+ }
42
+ watchDebounced(() => docksOverflowPanel.value, (value) => {
43
+ isOverflowPanelVisible.value = !!value;
44
+ }, { debounce: 1e3 });
45
+ function toggleOverflowPanel() {
46
+ if (isOverflowPanelVisible.value) hideOverflowPanel();
47
+ else showOverflowPanel();
48
+ }
49
+ function hideOverflowPanel() {
50
+ isOverflowPanelVisible.value = false;
51
+ setDocksOverflowPanel(null);
75
52
  }
76
53
  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))]);
54
+ return openBlock(), createElementBlock("div", {
55
+ ref_key: "overflowButton",
56
+ ref: overflowButton
57
+ }, [createVNode(_sfc_main$8, {
58
+ context: __props.context,
59
+ dock: {
60
+ id: "overflow",
61
+ title: "Overflow",
62
+ icon: "ph:dots-three-circle-duotone"
63
+ },
64
+ class: "overflow-button",
65
+ tooltip: false,
66
+ badge: overflowBadge.value,
67
+ "is-vertical": __props.isVertical,
68
+ "is-selected": false,
69
+ "is-dimmed": false,
70
+ onClick: toggleOverflowPanel
71
+ }, null, 8, [
72
+ "context",
73
+ "badge",
74
+ "is-vertical"
75
+ ])], 512);
91
76
  };
92
77
  }
93
78
  });
94
- var DockEntries_default = _sfc_main$6;
95
-
79
+ //#endregion
80
+ //#region src/client/webcomponents/components/icons/BracketLeft.vue
81
+ const _sfc_main$5 = {};
82
+ const _hoisted_1$2 = {
83
+ viewBox: "0 0 9 20",
84
+ fill: "none",
85
+ xmlns: "http://www.w3.org/2000/svg"
86
+ };
87
+ function _sfc_render$1(_ctx, _cache) {
88
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
89
+ 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",
90
+ class: "fill-black dark:fill-white"
91
+ }, null, -1)])]);
92
+ }
93
+ var BracketLeft_default = /* @__PURE__ */ export_helper_default(_sfc_main$5, [["render", _sfc_render$1]]);
94
+ //#endregion
95
+ //#region src/client/webcomponents/components/icons/BracketRight.vue
96
+ const _sfc_main$4 = {};
97
+ const _hoisted_1$1 = {
98
+ viewBox: "0 0 9 20",
99
+ fill: "none",
100
+ xmlns: "http://www.w3.org/2000/svg"
101
+ };
102
+ function _sfc_render(_ctx, _cache) {
103
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
104
+ 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",
105
+ class: "fill-black dark:fill-white"
106
+ }, null, -1)])]);
107
+ }
108
+ var BracketRight_default = /* @__PURE__ */ export_helper_default(_sfc_main$4, [["render", _sfc_render]]);
96
109
  //#endregion
97
110
  //#region src/client/webcomponents/components/Dock.vue
98
- const PANEL_MARGIN = 5;
111
+ const _hoisted_1 = {
112
+ key: 0,
113
+ class: "i-fluent-emoji-flat-warning absolute bottom-0 right--1px w-1.5 h-1.5"
114
+ };
115
+ const _hoisted_2 = { class: "flex items-center gap-1" };
116
+ const PANEL_MARGIN = 2;
99
117
  const SNAP_THRESHOLD = 2;
100
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
118
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
101
119
  __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"],
120
+ props: { context: {} },
113
121
  setup(__props) {
114
- const { state, docks } = toRefs(__props);
115
- const isDragging = useModel(__props, "isDragging");
122
+ const context = __props.context;
116
123
  const isSafari = navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome");
117
124
  const panelMargins = reactive({
118
125
  left: PANEL_MARGIN,
@@ -134,6 +141,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
134
141
  });
135
142
  const dockEl = useTemplateRef("dockEl");
136
143
  const anchorEl = useTemplateRef("anchorEl");
144
+ const recalculateCounter = ref(0);
145
+ const isHovering = ref(false);
137
146
  const windowSize = reactive({
138
147
  width: window.innerWidth,
139
148
  height: window.innerHeight
@@ -148,12 +157,28 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
148
157
  });
149
158
  function onPointerDown(e) {
150
159
  if (!dockEl.value) return;
151
- isDragging.value = true;
160
+ context.panel.isDragging = true;
152
161
  const { left, top, width, height } = dockEl.value.getBoundingClientRect();
153
162
  draggingOffset.x = e.clientX - left - width / 2;
154
163
  draggingOffset.y = e.clientY - top - height / 2;
155
164
  }
156
- onMounted(() => {
165
+ const isRpcTrusted = ref(context.rpc.isTrusted);
166
+ context.rpc.events.on("rpc:is-trusted:updated", (isTrusted) => {
167
+ isRpcTrusted.value = isTrusted;
168
+ if (isTrusted && context.docks.selected?.id === BUILTIN_ENTRY_CLIENT_AUTH_NOTICE.id) context.docks.switchEntry(null);
169
+ });
170
+ const isPopupEntryVisible = computed(() => isDockPopupEntryVisible(context.clientType));
171
+ const groupedEntries = computed(() => {
172
+ if (isPopupEntryVisible.value) return context.docks.groupedEntries;
173
+ return filterPopupDockEntry(context.docks.groupedEntries);
174
+ });
175
+ const splitEntries = computed(() => {
176
+ return docksSplitGroupsWithCapacity(groupedEntries.value, 5);
177
+ });
178
+ const selectedEntry = computed(() => {
179
+ return context.docks.selected;
180
+ });
181
+ onMounted(async () => {
157
182
  windowSize.width = window.innerWidth;
158
183
  windowSize.height = window.innerHeight;
159
184
  useEventListener(window, "resize", () => {
@@ -161,7 +186,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
161
186
  windowSize.height = window.innerHeight;
162
187
  });
163
188
  useEventListener(window, "pointermove", (e) => {
164
- if (!isDragging.value) return;
189
+ if (!context.panel.isDragging) return;
190
+ const store = context.panel.store;
165
191
  const centerX = window.innerWidth / 2;
166
192
  const centerY = window.innerHeight / 2;
167
193
  const x = e.clientX - draggingOffset.x;
@@ -175,15 +201,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
175
201
  const TR = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, window.innerWidth - centerX);
176
202
  const BL = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, 0 - centerX);
177
203
  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);
204
+ store.position = deg >= TL && deg <= TR ? "top" : deg >= TR && deg <= BR ? "right" : deg >= BR && deg <= BL ? "bottom" : "left";
205
+ store.left = snapToPoints(x / window.innerWidth * 100);
206
+ store.top = snapToPoints(y / window.innerHeight * 100);
181
207
  });
182
208
  useEventListener(window, "pointerup", () => {
183
- isDragging.value = false;
209
+ context.panel.isDragging = false;
184
210
  });
185
211
  useEventListener(window, "pointerleave", () => {
186
- isDragging.value = false;
212
+ context.panel.isDragging = false;
187
213
  });
188
214
  });
189
215
  function snapToPoints(value) {
@@ -195,16 +221,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
195
221
  function clamp(value, min, max) {
196
222
  return Math.min(Math.max(value, min), max);
197
223
  }
198
- const recalculateCounter = ref(0);
199
- const isHovering = ref(false);
200
- const isVertical = computed(() => state.value.position === "left" || state.value.position === "right");
201
224
  const anchorPos = computed(() => {
202
225
  recalculateCounter.value;
226
+ const store = context.panel.store;
203
227
  const halfWidth = (dockEl.value?.clientWidth || 0) / 2;
204
228
  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) {
229
+ const left = store.left * windowSize.width / 100;
230
+ const top = store.top * windowSize.height / 100;
231
+ switch (store.position) {
208
232
  case "top": return {
209
233
  left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
210
234
  top: panelMargins.top + halfHeight
@@ -217,7 +241,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
217
241
  left: panelMargins.left + halfHeight,
218
242
  top: clamp(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
219
243
  };
220
- case "bottom":
221
244
  default: return {
222
245
  left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
223
246
  top: windowSize.height - panelMargins.bottom - halfHeight
@@ -227,18 +250,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
227
250
  let _timer = null;
228
251
  function bringUp() {
229
252
  isHovering.value = true;
230
- if (state.value.minimizePanelInactive < 0) return;
253
+ if (context.panel.store.inactiveTimeout < 0) return;
231
254
  if (_timer) clearTimeout(_timer);
232
255
  _timer = setTimeout(() => {
233
256
  isHovering.value = false;
234
- }, +state.value.minimizePanelInactive || 0);
257
+ }, +context.panel.store.inactiveTimeout || 0);
235
258
  }
236
259
  const isHidden = computed(() => false);
237
260
  const isMinimized = computed(() => {
238
- if (state.value.minimizePanelInactive < 0) return false;
239
- if (state.value.minimizePanelInactive === 0) return true;
261
+ if (context.panel.store.inactiveTimeout < 0) return false;
262
+ if (context.panel.store.inactiveTimeout === 0) return true;
240
263
  const isTouchDevice = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
241
- return !isDragging.value && !state.value.open && !isHovering.value && !isTouchDevice && state.value.minimizePanelInactive;
264
+ return !context.panel.isDragging && !context.panel.store.open && !isHovering.value && !isTouchDevice && context.panel.store.inactiveTimeout;
242
265
  });
243
266
  const anchorStyle = computed(() => {
244
267
  return {
@@ -248,45 +271,17 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
248
271
  };
249
272
  });
250
273
  const panelStyle = computed(() => {
251
- const style = { transform: isVertical.value ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
274
+ const style = { transform: context.panel.isVertical ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
252
275
  if (isHidden.value) {
253
276
  style.opacity = 0;
254
277
  style.pointerEvents = "none";
255
278
  }
256
- if (isDragging.value) style.transition = "none !important";
279
+ if (context.panel.isDragging) style.transition = "none !important";
257
280
  return style;
258
281
  });
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
282
  onMounted(() => {
289
- bringUp();
283
+ if (context.panel.store.open && !isRpcTrusted.value) context.panel.store.open = false;
284
+ if (isRpcTrusted.value) bringUp();
290
285
  recalculateCounter.value++;
291
286
  });
292
287
  return (_ctx, _cache) => {
@@ -295,18 +290,24 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
295
290
  ref_key: "anchorEl",
296
291
  ref: anchorEl,
297
292
  style: normalizeStyle([anchorStyle.value]),
298
- class: normalizeClass({
299
- "vite-devtools-horizontal": !isVertical.value,
300
- "vite-devtools-vertical": isVertical.value,
293
+ class: normalizeClass([{
294
+ "vite-devtools-horizontal": !unref(context).panel.isVertical,
295
+ "vite-devtools-vertical": unref(context).panel.isVertical,
301
296
  "vite-devtools-minimized": isMinimized.value
302
- }),
297
+ }, "color-base"]),
303
298
  onMousemove: bringUp
304
299
  }, [
305
300
  !unref(isSafari) ? (openBlock(), createElementBlock("div", {
306
301
  key: 0,
307
302
  id: "vite-devtools-glowing",
308
- style: normalizeStyle(isDragging.value ? "opacity: 0.6 !important" : "")
309
- }, null, 4)) : createCommentVNode("v-if", true),
303
+ class: normalizeClass(unref(context).panel.isDragging ? "op60!" : "")
304
+ }, null, 2)) : createCommentVNode("v-if", true),
305
+ renderSlot(_ctx.$slots, "default", {
306
+ context: unref(context),
307
+ dockEl: dockEl.value,
308
+ selected: unref(context).docks.selected,
309
+ panelMargins
310
+ }),
310
311
  createBaseVNode("div", {
311
312
  id: "vite-devtools-dock-container",
312
313
  ref_key: "dockEl",
@@ -315,71 +316,76 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
315
316
  }, [createBaseVNode("div", {
316
317
  id: "vite-devtools-dock",
317
318
  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
- })
319
+ }, [
320
+ 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" }),
321
+ 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"]),
322
+ 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),
323
+ !isRpcTrusted.value ? (openBlock(), createElementBlock("div", {
324
+ key: 0,
325
+ class: normalizeClass(["transition duration-300 delay-200", isMinimized.value ? "opacity-0 pointer-events-none ws-nowrap text-sm text-orange of-hidden" : "opacity-100"])
326
+ }, [createBaseVNode("button", {
327
+ class: "p2 transition hover:bg-active rounded-full px4",
328
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(context).docks.toggleEntry(unref(BUILTIN_ENTRY_CLIENT_AUTH_NOTICE).id))
329
+ }, [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),
330
+ 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, {
331
+ context: unref(context),
332
+ groups: splitEntries.value.visible,
333
+ "is-vertical": unref(context).panel.isVertical,
334
+ selected: selectedEntry.value,
335
+ onSelect: _cache[1] || (_cache[1] = (e) => unref(context).docks.switchEntry(e?.id))
336
+ }, null, 8, [
337
+ "context",
338
+ "groups",
339
+ "is-vertical",
340
+ "selected"
341
+ ]), 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, {
342
+ context: unref(context),
343
+ "is-vertical": unref(context).panel.isVertical,
344
+ groups: splitEntries.value.overflow,
345
+ selected: selectedEntry.value,
346
+ onSelect: _cache[2] || (_cache[2] = (e) => unref(context).docks.switchEntry(e?.id))
347
+ }, null, 8, [
348
+ "context",
349
+ "is-vertical",
350
+ "groups",
351
+ "selected"
352
+ ])], 64)) : createCommentVNode("v-if", true)], 2)
353
+ ], 32)], 4)
336
354
  ], 38);
337
355
  };
338
356
  }
339
357
  });
340
- var Dock_default = _sfc_main$5;
341
-
342
358
  //#endregion
343
359
  //#region src/client/webcomponents/components/DockPanelResizer.vue
344
360
  const PANEL_MIN = 20;
345
361
  const PANEL_MAX = 100;
346
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
362
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
347
363
  __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"],
364
+ props: { panel: {} },
359
365
  setup(__props) {
360
366
  const props = __props;
361
- const isResizing = useModel(__props, "isResizing");
362
- const { state } = toRefs$1(props);
363
- const container = ref();
367
+ const topHandle = useTemplateRef("topHandle");
368
+ const container = computed(() => topHandle.value?.parentElement);
364
369
  const resizingState = ref(false);
365
370
  function handleResize(e) {
366
371
  if (!resizingState.value) return;
367
372
  const box = container.value?.getBoundingClientRect();
368
373
  if (!box) return;
374
+ const store = props.panel.store;
369
375
  let widthPx, heightPx;
370
376
  if (resizingState.value.right) {
371
377
  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));
378
+ store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
373
379
  } else if (resizingState.value.left) {
374
380
  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));
381
+ store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
376
382
  }
377
383
  if (resizingState.value.top) {
378
384
  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));
385
+ store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
380
386
  } else if (resizingState.value.bottom) {
381
387
  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));
388
+ store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
383
389
  }
384
390
  }
385
391
  useEventListener(window, "mousemove", handleResize);
@@ -388,40 +394,37 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
388
394
  useEventListener(window, "touchend", () => resizingState.value = false);
389
395
  useEventListener(window, "mouseleave", () => resizingState.value = false);
390
396
  watch(resizingState, (value) => {
391
- isResizing.value = !!value;
397
+ props.panel.isResizing = !!value;
392
398
  }, { flush: "sync" });
393
399
  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
- }, [
400
+ return openBlock(), createElementBlock(Fragment, null, [
400
401
  createCommentVNode(" Handlers "),
401
402
  withDirectives(createBaseVNode("div", {
403
+ ref_key: "topHandle",
404
+ ref: topHandle,
402
405
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
403
406
  style: { top: 0 },
404
407
  onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => resizingState.value = { top: true }, ["prevent"])),
405
408
  onTouchstartPassive: _cache[1] || (_cache[1] = () => resizingState.value = { top: true })
406
- }, null, 544), [[vShow, unref(state).position !== "top"]]),
409
+ }, null, 544), [[vShow, __props.panel.store.position !== "top"]]),
407
410
  withDirectives(createBaseVNode("div", {
408
411
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
409
412
  style: { bottom: 0 },
410
413
  onMousedown: _cache[2] || (_cache[2] = withModifiers(() => resizingState.value = { bottom: true }, ["prevent"])),
411
414
  onTouchstartPassive: _cache[3] || (_cache[3] = () => resizingState.value = { bottom: true })
412
- }, null, 544), [[vShow, unref(state).position !== "bottom"]]),
415
+ }, null, 544), [[vShow, __props.panel.store.position !== "bottom"]]),
413
416
  withDirectives(createBaseVNode("div", {
414
417
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
415
418
  style: { left: 0 },
416
419
  onMousedown: _cache[4] || (_cache[4] = withModifiers(() => resizingState.value = { left: true }, ["prevent"])),
417
420
  onTouchstartPassive: _cache[5] || (_cache[5] = () => resizingState.value = { left: true })
418
- }, null, 544), [[vShow, unref(state).position !== "left"]]),
421
+ }, null, 544), [[vShow, __props.panel.store.position !== "left"]]),
419
422
  withDirectives(createBaseVNode("div", {
420
423
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
421
424
  style: { right: 0 },
422
425
  onMousedown: _cache[6] || (_cache[6] = withModifiers(() => resizingState.value = { right: true }, ["prevent"])),
423
426
  onTouchstartPassive: _cache[7] || (_cache[7] = () => resizingState.value = { right: true })
424
- }, null, 544), [[vShow, unref(state).position !== "right"]]),
427
+ }, null, 544), [[vShow, __props.panel.store.position !== "right"]]),
425
428
  withDirectives(createBaseVNode("div", {
426
429
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
427
430
  style: {
@@ -437,7 +440,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
437
440
  top: true,
438
441
  left: true
439
442
  })
440
- }, null, 544), [[vShow, unref(state).position !== "top" && unref(state).position !== "left"]]),
443
+ }, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "left"]]),
441
444
  withDirectives(createBaseVNode("div", {
442
445
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
443
446
  style: {
@@ -453,7 +456,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
453
456
  top: true,
454
457
  right: true
455
458
  })
456
- }, null, 544), [[vShow, unref(state).position !== "top" && unref(state).position !== "right"]]),
459
+ }, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "right"]]),
457
460
  withDirectives(createBaseVNode("div", {
458
461
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
459
462
  style: {
@@ -469,7 +472,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
469
472
  bottom: true,
470
473
  left: true
471
474
  })
472
- }, null, 544), [[vShow, unref(state).position !== "bottom" && unref(state).position !== "left"]]),
475
+ }, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "left"]]),
473
476
  withDirectives(createBaseVNode("div", {
474
477
  class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
475
478
  style: {
@@ -485,197 +488,56 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
485
488
  bottom: true,
486
489
  right: true
487
490
  })
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));
491
+ }, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "right"]])
492
+ ], 64);
638
493
  };
639
494
  }
640
495
  });
641
- var ViewEntry_default = _sfc_main$2;
642
-
643
496
  //#endregion
644
497
  //#region src/client/webcomponents/components/DockPanel.vue
645
498
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
646
499
  __name: "DockPanel",
647
500
  props: {
648
- state: {},
649
- entry: {},
501
+ context: {},
502
+ selected: {},
650
503
  dockEl: {},
651
504
  panelMargins: {}
652
505
  },
653
506
  setup(__props) {
654
507
  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" });
508
+ const context = props.context;
509
+ const { selected, panelMargins } = toRefs(props);
662
510
  const windowSize = reactive(useWindowSize());
663
- const isDragging = ref(false);
664
- const isResizing = ref(false);
665
511
  const isHovering = ref(false);
666
512
  const mousePosition = reactive({
667
513
  x: 0,
668
514
  y: 0
669
515
  });
516
+ const dockPanel = useTemplateRef("dockPanel");
517
+ const viewsContainer = useTemplateRef("viewsContainer");
518
+ const persistedDoms = markRaw(new PersistedDomViewsManager(viewsContainer));
670
519
  function clamp(value, min, max) {
671
520
  return Math.min(Math.max(value, min), max);
672
521
  }
522
+ function openContextMenu(e) {
523
+ if (!dockPanel.value) return;
524
+ const entry = selected.value;
525
+ if (!entry) return;
526
+ e.preventDefault();
527
+ openDockContextMenu({
528
+ context,
529
+ entry,
530
+ el: dockPanel.value,
531
+ gap: 6
532
+ });
533
+ }
673
534
  const anchorPos = computed(() => {
674
535
  const halfWidth = (props.dockEl?.clientWidth || 0) / 2;
675
536
  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) {
537
+ const store = context.panel.store;
538
+ const left = store.left * windowSize.width / 100;
539
+ const top = store.top * windowSize.height / 100;
540
+ switch (store.position) {
679
541
  case "top": return {
680
542
  left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
681
543
  top: panelMargins.value.top + halfHeight
@@ -688,7 +550,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
688
550
  left: panelMargins.value.left + halfHeight,
689
551
  top: clamp(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
690
552
  };
691
- case "bottom":
692
553
  default: return {
693
554
  left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
694
555
  top: windowSize.height - panelMargins.value.bottom - halfHeight
@@ -698,14 +559,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
698
559
  let _timer = null;
699
560
  function bringUp() {
700
561
  isHovering.value = true;
701
- if (state.value.minimizePanelInactive < 0) return;
562
+ if (context.panel.store.inactiveTimeout < 0) return;
702
563
  if (_timer) clearTimeout(_timer);
703
564
  _timer = setTimeout(() => {
704
565
  isHovering.value = false;
705
- }, +state.value.minimizePanelInactive || 0);
566
+ }, +context.panel.store.inactiveTimeout || 0);
706
567
  }
707
568
  const { width: frameWidth, height: frameHeight } = useElementBounding(dockPanel);
708
- const iframeStyle = computed(() => {
569
+ const panelStyle = computed(() => {
709
570
  mousePosition.x, mousePosition.y;
710
571
  const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
711
572
  const frameMargin = {
@@ -718,19 +579,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
718
579
  const marginVertical = frameMargin.top + frameMargin.bottom;
719
580
  const maxWidth = windowSize.width - marginHorizontal;
720
581
  const maxHeight = windowSize.height - marginVertical;
582
+ const panel = context.panel;
583
+ const store = panel.store;
721
584
  const style = {
722
585
  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))`
586
+ pointerEvents: panel.isDragging || panel.isResizing ? "none" : "auto",
587
+ width: `min(${store.width}vw, calc(100vw - ${marginHorizontal}px))`,
588
+ height: `min(${store.height}vh, calc(100vh - ${marginVertical}px))`
727
589
  };
728
590
  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);
591
+ const width = Math.min(maxWidth, store.width * windowSize.width / 100);
592
+ const height = Math.min(maxHeight, store.height * windowSize.height / 100);
731
593
  const anchorX = anchor?.left || 0;
732
594
  const anchorY = anchor?.top || 0;
733
- switch (state.value.position) {
595
+ switch (store.position) {
734
596
  case "top":
735
597
  case "bottom":
736
598
  style.left = `${-frameWidth.value / 2}px`;
@@ -746,7 +608,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
746
608
  else if (windowSize.height - anchorY - frameMargin.bottom < height / 2) style.top = `${windowSize.height - anchorY - height / 2 - frameMargin.bottom - frameHeight.value / 2}px`;
747
609
  break;
748
610
  }
749
- switch (state.value.position) {
611
+ switch (store.position) {
750
612
  case "top":
751
613
  style.top = 0;
752
614
  break;
@@ -756,7 +618,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
756
618
  case "left":
757
619
  style.left = 0;
758
620
  break;
759
- case "bottom":
760
621
  default:
761
622
  style.bottom = 0;
762
623
  break;
@@ -768,95 +629,86 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
768
629
  });
769
630
  return (_ctx, _cache) => {
770
631
  return withDirectives((openBlock(), createElementBlock("div", {
771
- id: "vite-devtools-dock-panel",
772
632
  ref_key: "dockPanel",
773
633
  ref: dockPanel,
774
- class: "bg-glass rounded-lg border border-base shadow",
775
- style: normalizeStyle(iframeStyle.value)
634
+ class: "bg-glass:75 rounded-lg border border-base color-base shadow overflow-hidden",
635
+ style: normalizeStyle(panelStyle.value),
636
+ onContextmenu: openContextMenu
776
637
  }, [
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),
638
+ createVNode(_sfc_main$2, { panel: unref(context).panel }, null, 8, ["panel"]),
639
+ unref(selected) && viewsContainer.value ? (openBlock(), createBlock(_sfc_main$9, {
640
+ key: unref(selected).id,
641
+ context: unref(context),
642
+ entry: unref(selected),
643
+ "persisted-doms": unref(persistedDoms),
796
644
  "iframe-style": {
797
645
  border: "1px solid #8883",
798
- borderRadius: "0.5rem",
799
- zIndex: "2147483645"
800
- },
801
- rounded: ""
646
+ borderRadius: "0.5rem"
647
+ }
802
648
  }, null, 8, [
803
- "state",
804
- "is-dragging",
805
- "is-resizing",
649
+ "context",
806
650
  "entry",
807
- "iframes"
651
+ "persisted-doms"
808
652
  ])) : createCommentVNode("v-if", true),
809
653
  createBaseVNode("div", {
810
- id: "vite-devtools-iframe-container",
811
- ref_key: "iframesContainer",
812
- ref: iframesContainer,
813
- class: "absolute inset-0"
654
+ id: "vite-devtools-views-container",
655
+ ref_key: "viewsContainer",
656
+ ref: viewsContainer,
657
+ class: "absolute inset-0 pointer-events-none"
814
658
  }, null, 512)
815
- ], 4)), [[vShow, unref(entry)]]);
659
+ ], 36)), [[vShow, unref(context).docks.selected && unref(context).docks.selected.type !== "action"]]);
816
660
  };
817
661
  }
818
662
  });
819
- var DockPanel_default = _sfc_main$1;
820
-
821
663
  //#endregion
822
- //#region src/client/webcomponents/components/DockEmbedded.vue
823
- const _sfc_main = /* @__PURE__ */ defineComponent({
664
+ //#region src/client/webcomponents/components/DockEmbedded.ts
665
+ const DockEmbedded = defineCustomElement(/* @__PURE__ */ defineComponent({
824
666
  __name: "DockEmbedded",
825
- props: {
826
- state: {},
827
- docks: {}
828
- },
667
+ props: { context: {} },
829
668
  setup(__props) {
669
+ const props = __props;
670
+ const isDockPopupOpen = useIsDockPopupOpen();
671
+ const settings = sharedStateToRef(props.context.docks.settings);
672
+ useEventListener(window, "mousedown", (e) => {
673
+ if (!settings.value.closeOnOutsideClick) return;
674
+ if (isDockPopupOpen.value) return;
675
+ if (!props.context.panel.store.open || props.context.panel.isDragging || props.context.panel.isResizing) return;
676
+ if (!e.composedPath().find((_el) => {
677
+ const el = _el;
678
+ return [...el.classList || []].some((c) => c.startsWith("vite-devtools-")) || el.id?.startsWith("vite-devtools-") || el.tagName?.toLowerCase() === "iframe";
679
+ })) props.context.docks.switchEntry(null);
680
+ });
681
+ onUnmounted(() => {
682
+ closeDockPopup();
683
+ });
830
684
  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"]);
685
+ return openBlock(), createElementBlock(Fragment, null, [
686
+ !unref(isDockPopupOpen) ? (openBlock(), createBlock(_sfc_main$3, {
687
+ key: 0,
688
+ context: __props.context
689
+ }, {
690
+ default: withCtx(({ dockEl, panelMargins, selected }) => [createVNode(_sfc_main$1, {
691
+ context: __props.context,
692
+ selected,
693
+ "dock-el": dockEl,
694
+ "panel-margins": panelMargins
695
+ }, null, 8, [
696
+ "context",
697
+ "selected",
698
+ "dock-el",
699
+ "panel-margins"
700
+ ])]),
701
+ _: 1
702
+ }, 8, ["context"])) : createCommentVNode("v-if", true),
703
+ !unref(isDockPopupOpen) ? (openBlock(), createBlock(_sfc_main$10, { key: 1 })) : createCommentVNode("v-if", true),
704
+ createVNode(_sfc_main$11, { context: __props.context }, null, 8, ["context"])
705
+ ], 64);
848
706
  };
849
707
  }
850
- });
851
- var DockEmbedded_default = _sfc_main;
852
-
853
- //#endregion
854
- //#region src/client/webcomponents/components/DockEmbedded.ts
855
- const DockEmbedded = defineCustomElement(DockEmbedded_default, {
708
+ }), {
856
709
  shadowRoot: true,
857
710
  styles: [css_default]
858
711
  });
859
712
  customElements.define("vite-devtools-dock-embedded", DockEmbedded);
860
-
861
713
  //#endregion
862
- export { DockEmbedded, IframeHolder, IframeManager };
714
+ export { DEFAULT_DOCK_PANEL_STORE, DockEmbedded, PersistedDomHolder, PersistedDomViewsManager, createDockEntryState, sharedStateToRef, useDocksEntries };