@vitejs/devtools 0.0.0-alpha.1 → 0.0.0-alpha.3

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 (66) hide show
  1. package/{bin.mjs → bin.js} +1 -1
  2. package/dist/cli.js +99 -0
  3. package/dist/client/inject.d.ts +4 -0
  4. package/dist/client/inject.js +33 -0
  5. package/dist/client/standalone/assets/index-C0WqLnSL.js +7 -0
  6. package/dist/client/standalone/assets/index-DLsPMQDX.css +1 -0
  7. package/dist/client/standalone/index.html +14 -0
  8. package/dist/client/webcomponents.d.ts +45 -0
  9. package/dist/client/webcomponents.js +807 -0
  10. package/dist/core-uTAXYiA1.js +6650 -0
  11. package/dist/dirs-B7dOX6eI.js +9 -0
  12. package/dist/dirs.d.ts +5 -0
  13. package/dist/dirs.js +3 -0
  14. package/dist/index.d.ts +36 -0
  15. package/dist/index.js +4 -0
  16. package/dist/plugins-DDjui9Ga.js +1314 -0
  17. package/package.json +48 -57
  18. package/dist/cli-B_fm1Ing.mjs +0 -1039
  19. package/dist/cli.d.mts +0 -1
  20. package/dist/cli.mjs +0 -3
  21. package/dist/dirs-6LDFDMFM.mjs +0 -7
  22. package/dist/dirs.d.mts +0 -4
  23. package/dist/dirs.mjs +0 -3
  24. package/dist/functions-BdbZxtmk.mjs +0 -3
  25. package/dist/functions-d6vvbndK.mjs +0 -234
  26. package/dist/index.d.mts +0 -13
  27. package/dist/index.mjs +0 -7
  28. package/dist/nitro.json +0 -15
  29. package/dist/node/cli.d.mts +0 -1
  30. package/dist/node/cli.mjs +0 -3
  31. package/dist/public/200.html +0 -16
  32. package/dist/public/404.html +0 -16
  33. package/dist/public/_nuxt/B4lqwDon.js +0 -1
  34. package/dist/public/_nuxt/BMB3EEfo.js +0 -1
  35. package/dist/public/_nuxt/BYYDnj5Q.js +0 -1
  36. package/dist/public/_nuxt/BeSFnMzD.js +0 -1
  37. package/dist/public/_nuxt/BfzgVO01.js +0 -1
  38. package/dist/public/_nuxt/BpyJ-U40.js +0 -1
  39. package/dist/public/_nuxt/BxkFQq1F.js +0 -1
  40. package/dist/public/_nuxt/C1DPtPHu.js +0 -1
  41. package/dist/public/_nuxt/C8oXVTvZ.js +0 -1
  42. package/dist/public/_nuxt/CWPvh8od.js +0 -1
  43. package/dist/public/_nuxt/CiwsH4Q6.js +0 -33
  44. package/dist/public/_nuxt/CsnZqsGp.js +0 -16
  45. package/dist/public/_nuxt/CzEHI6hC.js +0 -1
  46. package/dist/public/_nuxt/D-iXojuv.js +0 -1
  47. package/dist/public/_nuxt/DHpfOFMA.js +0 -1
  48. package/dist/public/_nuxt/DsbJux3u.js +0 -1
  49. package/dist/public/_nuxt/builds/latest.json +0 -1
  50. package/dist/public/_nuxt/builds/meta/3597016d-955b-44d8-83dd-f083d7311779.json +0 -1
  51. package/dist/public/_nuxt/diff.worker-9IK9E-UB.js +0 -10
  52. package/dist/public/_nuxt/entry.BHghYYEP.css +0 -1
  53. package/dist/public/_nuxt/error-404.7Y6KY23b.css +0 -1
  54. package/dist/public/_nuxt/error-500.CaUb23JJ.css +0 -1
  55. package/dist/public/_nuxt/graph.BGBTj9Q7.css +0 -1
  56. package/dist/public/dot-grid-dark.png +0 -0
  57. package/dist/public/dot-grid-light.png +0 -0
  58. package/dist/public/favicon.svg +0 -15
  59. package/dist/public/fonts/dmmono-612bc94f.woff2 +0 -0
  60. package/dist/public/fonts/dmmono-cbe07c46.woff2 +0 -0
  61. package/dist/public/fonts/dmsans-b28079ff.woff2 +0 -0
  62. package/dist/public/fonts/dmsans-b4f1d45c.woff2 +0 -0
  63. package/dist/public/index.html +0 -16
  64. package/dist/public/vite-devtools.svg +0 -17
  65. /package/{LICENSE.md → LICENSE} +0 -0
  66. /package/dist/{cli-C3YoliaZ.d.mts → cli.d.ts} +0 -0
@@ -0,0 +1,807 @@
1
+ import { Fragment, computed, createBaseVNode, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, defineCustomElement, markRaw, mergeModels, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, toDisplayString, toRefs as toRefs$1, toRefs$1 as toRefs, unref, useElementBounding, useEventListener, useModel, useScreenSafeArea, useTemplateRef, useWindowSize, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "../core-uTAXYiA1.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{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;--un-border-opacity:.13;border-width:1px;border-color:rgba(136,136,136,var(--un-border-opacity));--un-backdrop-blur:blur(5px);min-width:100%;height:100%;backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset)0 1px 3px 0 var(--un-shadow-color,rgba(0,0,0,.1)),var(--un-shadow-inset)0 1px 2px -1px var(--un-shadow-color,rgba(0,0,0,.1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);background-color:rgba(255,255,255,.75);-webkit-border-radius:9999px;border-radius:9999px;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;--un-blur:blur(60px);width:160px;height:160px;filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia);background-image:linear-gradient(45deg,#00dc82,#00dc82,#00dc82);-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{--un-translate-x:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z));bottom:-1.75rem;left:50%}.vite-devtools-vertical .vite-devtools-dock-label{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:270deg;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z));bottom:-2.5rem}*{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.container{width:100%}.border-base{--un-border-opacity:.13;border-color:rgba(136,136,136,var(--un-border-opacity))}.bg-glass{--un-backdrop-blur:blur(5px);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-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-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{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:270deg;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-120{--un-scale-x:1.2;--un-scale-y:1.2;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.hover\\:scale-120:hover{--un-scale-x:1.2;--un-scale-y:1.2;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.transform{transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-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{--un-bg-opacity:.07;background-color:rgba(136,136,136,var(--un-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{--un-shadow:var(--un-shadow-inset)0 1px 3px 0 var(--un-shadow-color,rgba(0,0,0,.1)),var(--un-shadow-inset)0 1px 2px -1px var(--un-shadow-color,rgba(0,0,0,.1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.saturate-0{--un-saturate:saturate(0);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-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/DockEntries.vue?vue&type=script&setup=true&lang.ts
8
+ const _hoisted_1$1 = { class: "vite-devtools-dock-entries flex items-center w-full h-full justify-center transition-opacity duration-300" };
9
+ const _hoisted_2 = ["title", "onClick"];
10
+ const _hoisted_3 = ["src", "alt"];
11
+ const _hoisted_4 = { 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" };
12
+ var DockEntries_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
13
+ __name: "DockEntries",
14
+ props: {
15
+ selected: {},
16
+ isVertical: { type: Boolean },
17
+ entries: {}
18
+ },
19
+ emits: ["select"],
20
+ setup(__props, { emit: __emit }) {
21
+ const props = __props;
22
+ const emit = __emit;
23
+ const { selected, isVertical, entries } = toRefs(props);
24
+ function toggleDockEntry(dock) {
25
+ if (selected.value?.id === dock.id) emit("select", void 0);
26
+ else emit("select", dock);
27
+ }
28
+ return (_ctx, _cache) => {
29
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(entries), (dock) => {
30
+ return openBlock(), createElementBlock("div", {
31
+ key: dock.id,
32
+ class: "relative group vite-devtools-dock-entry"
33
+ }, [createBaseVNode("button", {
34
+ title: dock.title,
35
+ 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"]),
36
+ onClick: ($event) => toggleDockEntry(dock)
37
+ }, [createBaseVNode("img", {
38
+ src: dock.icon,
39
+ alt: dock.title,
40
+ class: "w-5 h-5 select-none",
41
+ draggable: "false"
42
+ }, null, 8, _hoisted_3)], 10, _hoisted_2), createBaseVNode("div", _hoisted_4, toDisplayString(dock.title), 1)]);
43
+ }), 128))]);
44
+ };
45
+ }
46
+ });
47
+
48
+ //#endregion
49
+ //#region src/client/webcomponents/components/DockEntries.vue
50
+ var DockEntries_default = DockEntries_vue_vue_type_script_setup_true_lang_default;
51
+
52
+ //#endregion
53
+ //#region src/client/webcomponents/components/Dock.vue?vue&type=script&setup=true&lang.ts
54
+ const PANEL_MARGIN = 5;
55
+ const SNAP_THRESHOLD = 2;
56
+ var Dock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
57
+ __name: "Dock",
58
+ props: /* @__PURE__ */ mergeModels({
59
+ state: {},
60
+ docks: {}
61
+ }, {
62
+ "isDragging": {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ "isDraggingModifiers": {}
67
+ }),
68
+ emits: ["update:isDragging"],
69
+ setup(__props) {
70
+ const { state, docks } = toRefs(__props);
71
+ const isDragging = useModel(__props, "isDragging");
72
+ const isSafari = navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome");
73
+ const panelMargins = reactive({
74
+ left: PANEL_MARGIN,
75
+ top: PANEL_MARGIN,
76
+ right: PANEL_MARGIN,
77
+ bottom: PANEL_MARGIN
78
+ });
79
+ const safeArea = useScreenSafeArea();
80
+ function toNumber(value) {
81
+ const num = +value;
82
+ if (Number.isNaN(num)) return 0;
83
+ return num;
84
+ }
85
+ watchEffect(() => {
86
+ panelMargins.left = toNumber(safeArea.left.value) + PANEL_MARGIN;
87
+ panelMargins.top = toNumber(safeArea.top.value) + PANEL_MARGIN;
88
+ panelMargins.right = toNumber(safeArea.right.value) + PANEL_MARGIN;
89
+ panelMargins.bottom = toNumber(safeArea.bottom.value) + PANEL_MARGIN;
90
+ });
91
+ const dockEl = useTemplateRef("dockEl");
92
+ const anchorEl = useTemplateRef("anchorEl");
93
+ const windowSize = reactive({
94
+ width: window.innerWidth,
95
+ height: window.innerHeight
96
+ });
97
+ const draggingOffset = reactive({
98
+ x: 0,
99
+ y: 0
100
+ });
101
+ const mousePosition = reactive({
102
+ x: 0,
103
+ y: 0
104
+ });
105
+ function onPointerDown(e) {
106
+ if (!dockEl.value) return;
107
+ isDragging.value = true;
108
+ const { left, top, width, height } = dockEl.value.getBoundingClientRect();
109
+ draggingOffset.x = e.clientX - left - width / 2;
110
+ draggingOffset.y = e.clientY - top - height / 2;
111
+ }
112
+ onMounted(() => {
113
+ windowSize.width = window.innerWidth;
114
+ windowSize.height = window.innerHeight;
115
+ useEventListener(window, "resize", () => {
116
+ windowSize.width = window.innerWidth;
117
+ windowSize.height = window.innerHeight;
118
+ });
119
+ useEventListener(window, "pointermove", (e) => {
120
+ if (!isDragging.value) return;
121
+ const centerX = window.innerWidth / 2;
122
+ const centerY = window.innerHeight / 2;
123
+ const x = e.clientX - draggingOffset.x;
124
+ const y = e.clientY - draggingOffset.y;
125
+ if (Number.isNaN(x) || Number.isNaN(y)) return;
126
+ mousePosition.x = x;
127
+ mousePosition.y = y;
128
+ const deg = Math.atan2(y - centerY, x - centerX);
129
+ const HORIZONTAL_MARGIN = 70;
130
+ const TL = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, 0 - centerX);
131
+ const TR = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, window.innerWidth - centerX);
132
+ const BL = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, 0 - centerX);
133
+ const BR = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, window.innerWidth - centerX);
134
+ state.value.position = deg >= TL && deg <= TR ? "top" : deg >= TR && deg <= BR ? "right" : deg >= BR && deg <= BL ? "bottom" : "left";
135
+ state.value.left = snapToPoints(x / window.innerWidth * 100);
136
+ state.value.top = snapToPoints(y / window.innerHeight * 100);
137
+ });
138
+ useEventListener(window, "pointerup", () => {
139
+ isDragging.value = false;
140
+ });
141
+ useEventListener(window, "pointerleave", () => {
142
+ isDragging.value = false;
143
+ });
144
+ });
145
+ function snapToPoints(value) {
146
+ if (value < 5) return 0;
147
+ if (value > 95) return 100;
148
+ if (Math.abs(value - 50) < SNAP_THRESHOLD) return 50;
149
+ return value;
150
+ }
151
+ function clamp(value, min, max) {
152
+ return Math.min(Math.max(value, min), max);
153
+ }
154
+ const recalculateCounter = ref(0);
155
+ const isHovering = ref(false);
156
+ const isVertical = computed(() => state.value.position === "left" || state.value.position === "right");
157
+ const anchorPos = computed(() => {
158
+ recalculateCounter.value;
159
+ const halfWidth = (dockEl.value?.clientWidth || 0) / 2;
160
+ const halfHeight = (dockEl.value?.clientHeight || 0) / 2;
161
+ const left = state.value.left * windowSize.width / 100;
162
+ const top = state.value.top * windowSize.height / 100;
163
+ switch (state.value.position) {
164
+ case "top": return {
165
+ left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
166
+ top: panelMargins.top + halfHeight
167
+ };
168
+ case "right": return {
169
+ left: windowSize.width - panelMargins.right - halfHeight,
170
+ top: clamp(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
171
+ };
172
+ case "left": return {
173
+ left: panelMargins.left + halfHeight,
174
+ top: clamp(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
175
+ };
176
+ case "bottom":
177
+ default: return {
178
+ left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
179
+ top: windowSize.height - panelMargins.bottom - halfHeight
180
+ };
181
+ }
182
+ });
183
+ let _timer = null;
184
+ function bringUp() {
185
+ isHovering.value = true;
186
+ if (state.value.minimizePanelInactive < 0) return;
187
+ if (_timer) clearTimeout(_timer);
188
+ _timer = setTimeout(() => {
189
+ isHovering.value = false;
190
+ }, +state.value.minimizePanelInactive || 0);
191
+ }
192
+ const isHidden = computed(() => false);
193
+ const isMinimized = computed(() => {
194
+ if (state.value.minimizePanelInactive < 0) return false;
195
+ if (state.value.minimizePanelInactive === 0) return true;
196
+ const isTouchDevice = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
197
+ return !isDragging.value && !state.value.open && !isHovering.value && !isTouchDevice && state.value.minimizePanelInactive;
198
+ });
199
+ const anchorStyle = computed(() => {
200
+ return {
201
+ left: `${anchorPos.value.left}px`,
202
+ top: `${anchorPos.value.top}px`,
203
+ pointerEvents: isHidden.value ? "none" : "auto"
204
+ };
205
+ });
206
+ const panelStyle = computed(() => {
207
+ const style = { transform: isVertical.value ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
208
+ if (isHidden.value) {
209
+ style.opacity = 0;
210
+ style.pointerEvents = "none";
211
+ }
212
+ if (isDragging.value) style.transition = "none !important";
213
+ return style;
214
+ });
215
+ onMounted(() => {
216
+ bringUp();
217
+ recalculateCounter.value++;
218
+ });
219
+ return (_ctx, _cache) => {
220
+ return openBlock(), createElementBlock("div", {
221
+ id: "vite-devtools-anchor",
222
+ ref_key: "anchorEl",
223
+ ref: anchorEl,
224
+ style: normalizeStyle([anchorStyle.value]),
225
+ class: normalizeClass({
226
+ "vite-devtools-horizontal": !isVertical.value,
227
+ "vite-devtools-vertical": isVertical.value,
228
+ "vite-devtools-minimized": isMinimized.value
229
+ }),
230
+ onMousemove: bringUp
231
+ }, [
232
+ !unref(isSafari) ? (openBlock(), createElementBlock("div", {
233
+ key: 0,
234
+ id: "vite-devtools-glowing",
235
+ style: normalizeStyle(isDragging.value ? "opacity: 0.6 !important" : "")
236
+ }, null, 4)) : createCommentVNode("v-if", true),
237
+ createBaseVNode("div", {
238
+ id: "vite-devtools-dock-container",
239
+ ref_key: "dockEl",
240
+ ref: dockEl,
241
+ style: normalizeStyle(panelStyle.value)
242
+ }, [createBaseVNode("div", {
243
+ id: "vite-devtools-dock",
244
+ onPointerdown: onPointerDown
245
+ }, [createVNode(DockEntries_default, {
246
+ entries: unref(docks),
247
+ class: normalizeClass(isMinimized.value ? "opacity-0" : "opacity-100"),
248
+ "is-vertical": isVertical.value,
249
+ selected: unref(state).dockEntry,
250
+ onSelect: _cache[0] || (_cache[0] = (s) => unref(state).dockEntry = s)
251
+ }, null, 8, [
252
+ "entries",
253
+ "class",
254
+ "is-vertical",
255
+ "selected"
256
+ ])], 32)], 4),
257
+ renderSlot(_ctx.$slots, "default", {
258
+ dockEl: dockEl.value,
259
+ panelMargins,
260
+ state: unref(state),
261
+ entry: unref(state).dockEntry
262
+ })
263
+ ], 38);
264
+ };
265
+ }
266
+ });
267
+
268
+ //#endregion
269
+ //#region src/client/webcomponents/components/Dock.vue
270
+ var Dock_default = Dock_vue_vue_type_script_setup_true_lang_default;
271
+
272
+ //#endregion
273
+ //#region src/client/webcomponents/components/DockPanelResizer.vue?vue&type=script&setup=true&lang.ts
274
+ const PANEL_MIN = 20;
275
+ const PANEL_MAX = 100;
276
+ var DockPanelResizer_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
277
+ __name: "DockPanelResizer",
278
+ props: /* @__PURE__ */ mergeModels({
279
+ state: {},
280
+ isDragging: { type: Boolean }
281
+ }, {
282
+ "isResizing": {
283
+ type: Boolean,
284
+ default: false
285
+ },
286
+ "isResizingModifiers": {}
287
+ }),
288
+ emits: ["update:isResizing"],
289
+ setup(__props) {
290
+ const props = __props;
291
+ const isResizing = useModel(__props, "isResizing");
292
+ const { state } = toRefs$1(props);
293
+ const container = ref();
294
+ const resizingState = ref(false);
295
+ function handleResize(e) {
296
+ if (!resizingState.value) return;
297
+ const box = container.value?.getBoundingClientRect();
298
+ if (!box) return;
299
+ let widthPx, heightPx;
300
+ if (resizingState.value.right) {
301
+ widthPx = Math.abs(e instanceof MouseEvent ? e.clientX : (e.touches[0]?.clientX || 0) - (box?.left || 0));
302
+ state.value.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
303
+ } else if (resizingState.value.left) {
304
+ widthPx = Math.abs((box?.right || 0) - (e instanceof MouseEvent ? e.clientX : e.touches[0]?.clientX || 0));
305
+ state.value.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
306
+ }
307
+ if (resizingState.value.top) {
308
+ heightPx = Math.abs((box?.bottom || 0) - (e instanceof MouseEvent ? e.clientY : e.touches[0]?.clientY || 0));
309
+ state.value.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
310
+ } else if (resizingState.value.bottom) {
311
+ heightPx = Math.abs(e instanceof MouseEvent ? e.clientY : (e.touches[0]?.clientY || 0) - (box?.top || 0));
312
+ state.value.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
313
+ }
314
+ }
315
+ useEventListener(window, "mousemove", handleResize);
316
+ useEventListener(window, "touchmove", handleResize);
317
+ useEventListener(window, "mouseup", () => resizingState.value = false);
318
+ useEventListener(window, "touchend", () => resizingState.value = false);
319
+ useEventListener(window, "mouseleave", () => resizingState.value = false);
320
+ watch(resizingState, (value) => {
321
+ isResizing.value = !!value;
322
+ }, { flush: "sync" });
323
+ return (_ctx, _cache) => {
324
+ return openBlock(), createElementBlock("div", {
325
+ id: "vite-devtools-resize-container",
326
+ ref_key: "container",
327
+ ref: container,
328
+ class: "w-full h-full absolute left-0 right-0 bottom-0 top-0 antialiased"
329
+ }, [
330
+ createCommentVNode(" Handlers "),
331
+ withDirectives(createBaseVNode("div", {
332
+ class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
333
+ style: { top: 0 },
334
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => resizingState.value = { top: true }, ["prevent"])),
335
+ onTouchstartPassive: _cache[1] || (_cache[1] = () => resizingState.value = { top: true })
336
+ }, null, 544), [[vShow, unref(state).position !== "top"]]),
337
+ withDirectives(createBaseVNode("div", {
338
+ class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
339
+ style: { bottom: 0 },
340
+ onMousedown: _cache[2] || (_cache[2] = withModifiers(() => resizingState.value = { bottom: true }, ["prevent"])),
341
+ onTouchstartPassive: _cache[3] || (_cache[3] = () => resizingState.value = { bottom: true })
342
+ }, null, 544), [[vShow, unref(state).position !== "bottom"]]),
343
+ withDirectives(createBaseVNode("div", {
344
+ class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
345
+ style: { left: 0 },
346
+ onMousedown: _cache[4] || (_cache[4] = withModifiers(() => resizingState.value = { left: true }, ["prevent"])),
347
+ onTouchstartPassive: _cache[5] || (_cache[5] = () => resizingState.value = { left: true })
348
+ }, null, 544), [[vShow, unref(state).position !== "left"]]),
349
+ withDirectives(createBaseVNode("div", {
350
+ class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
351
+ style: { right: 0 },
352
+ onMousedown: _cache[6] || (_cache[6] = withModifiers(() => resizingState.value = { right: true }, ["prevent"])),
353
+ onTouchstartPassive: _cache[7] || (_cache[7] = () => resizingState.value = { right: true })
354
+ }, null, 544), [[vShow, unref(state).position !== "right"]]),
355
+ withDirectives(createBaseVNode("div", {
356
+ class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
357
+ style: {
358
+ top: 0,
359
+ left: 0,
360
+ cursor: "nwse-resize"
361
+ },
362
+ onMousedown: _cache[8] || (_cache[8] = withModifiers(() => resizingState.value = {
363
+ top: true,
364
+ left: true
365
+ }, ["prevent"])),
366
+ onTouchstartPassive: _cache[9] || (_cache[9] = () => resizingState.value = {
367
+ top: true,
368
+ left: true
369
+ })
370
+ }, null, 544), [[vShow, unref(state).position !== "top" && unref(state).position !== "left"]]),
371
+ withDirectives(createBaseVNode("div", {
372
+ class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
373
+ style: {
374
+ top: 0,
375
+ right: 0,
376
+ cursor: "nesw-resize"
377
+ },
378
+ onMousedown: _cache[10] || (_cache[10] = withModifiers(() => resizingState.value = {
379
+ top: true,
380
+ right: true
381
+ }, ["prevent"])),
382
+ onTouchstartPassive: _cache[11] || (_cache[11] = () => resizingState.value = {
383
+ top: true,
384
+ right: true
385
+ })
386
+ }, null, 544), [[vShow, unref(state).position !== "top" && unref(state).position !== "right"]]),
387
+ withDirectives(createBaseVNode("div", {
388
+ class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
389
+ style: {
390
+ bottom: 0,
391
+ left: 0,
392
+ cursor: "nesw-resize"
393
+ },
394
+ onMousedown: _cache[12] || (_cache[12] = withModifiers(() => resizingState.value = {
395
+ bottom: true,
396
+ left: true
397
+ }, ["prevent"])),
398
+ onTouchstartPassive: _cache[13] || (_cache[13] = () => resizingState.value = {
399
+ bottom: true,
400
+ left: true
401
+ })
402
+ }, null, 544), [[vShow, unref(state).position !== "bottom" && unref(state).position !== "left"]]),
403
+ withDirectives(createBaseVNode("div", {
404
+ class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
405
+ style: {
406
+ bottom: 0,
407
+ right: 0,
408
+ cursor: "nwse-resize"
409
+ },
410
+ onMousedown: _cache[14] || (_cache[14] = withModifiers(() => resizingState.value = {
411
+ bottom: true,
412
+ right: true
413
+ }, ["prevent"])),
414
+ onTouchstartPassive: _cache[15] || (_cache[15] = () => resizingState.value = {
415
+ bottom: true,
416
+ right: true
417
+ })
418
+ }, null, 544), [[vShow, unref(state).position !== "bottom" && unref(state).position !== "right"]])
419
+ ], 512);
420
+ };
421
+ }
422
+ });
423
+
424
+ //#endregion
425
+ //#region src/client/webcomponents/components/DockPanelResizer.vue
426
+ var DockPanelResizer_default = DockPanelResizer_vue_vue_type_script_setup_true_lang_default;
427
+
428
+ //#endregion
429
+ //#region src/client/webcomponents/components/IframeManager.ts
430
+ var IframeManager = class {
431
+ iframes = {};
432
+ container = void 0;
433
+ constructor() {}
434
+ setContainer(container) {
435
+ this.container = container;
436
+ }
437
+ getIframeHolder(id) {
438
+ let iframe;
439
+ if (!this.iframes[id]) {
440
+ const el = document.createElement("iframe");
441
+ this.iframes[id] = new IframeHolder(id, el);
442
+ this.container.appendChild(el);
443
+ iframe = this.iframes[id];
444
+ } else iframe = this.iframes[id];
445
+ return iframe;
446
+ }
447
+ };
448
+ var IframeHolder = class {
449
+ iframe;
450
+ id;
451
+ parent;
452
+ _cleanups = [];
453
+ constructor(id, iframe) {
454
+ this.id = id;
455
+ this.iframe = iframe;
456
+ }
457
+ cleanup() {
458
+ this._cleanups.forEach((cleanup) => cleanup());
459
+ this._cleanups = [];
460
+ }
461
+ mount(parent) {
462
+ if (this.parent === parent) {
463
+ this.show();
464
+ return;
465
+ }
466
+ this.cleanup();
467
+ this.parent = parent;
468
+ const func = () => this.update();
469
+ window.addEventListener("resize", func);
470
+ this._cleanups.push(() => window.removeEventListener("resize", func));
471
+ this.show();
472
+ }
473
+ hide() {
474
+ this.iframe.style.display = "none";
475
+ }
476
+ show() {
477
+ this.iframe.style.display = "block";
478
+ this.update();
479
+ }
480
+ update() {
481
+ if (!this.parent) return;
482
+ const rect = this.parent.getBoundingClientRect();
483
+ this.iframe.style.position = "absolute";
484
+ this.iframe.style.width = `${rect.width}px`;
485
+ this.iframe.style.height = `${rect.height}px`;
486
+ }
487
+ unmount() {
488
+ this.cleanup();
489
+ this.hide();
490
+ this.parent = void 0;
491
+ }
492
+ };
493
+
494
+ //#endregion
495
+ //#region src/client/webcomponents/components/ViewIframe.vue?vue&type=script&setup=true&lang.ts
496
+ var ViewIframe_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
497
+ __name: "ViewIframe",
498
+ props: {
499
+ state: {},
500
+ isDragging: { type: Boolean },
501
+ isResizing: { type: Boolean },
502
+ entry: {},
503
+ iframes: {},
504
+ iframeStyle: {}
505
+ },
506
+ setup(__props) {
507
+ const props = __props;
508
+ const viewFrame = useTemplateRef("viewFrame");
509
+ onMounted(() => {
510
+ const holder = props.iframes.getIframeHolder(props.entry.id);
511
+ holder.iframe.style.boxShadow = "none";
512
+ holder.iframe.style.outline = "none";
513
+ Object.assign(holder.iframe.style, props.iframeStyle);
514
+ if (!holder.iframe.src) holder.iframe.src = props.entry.url;
515
+ holder.mount(viewFrame.value);
516
+ nextTick(() => {
517
+ holder.update();
518
+ });
519
+ watch(() => props.state, () => {
520
+ holder.update();
521
+ }, { deep: true });
522
+ watchEffect(() => {
523
+ holder.iframe.style.pointerEvents = props.isDragging || props.isResizing ? "none" : "auto";
524
+ }, { flush: "sync" });
525
+ });
526
+ onUnmounted(() => {
527
+ props.iframes.getIframeHolder(props.entry.id).unmount();
528
+ });
529
+ return (_ctx, _cache) => {
530
+ return openBlock(), createElementBlock("div", {
531
+ ref_key: "viewFrame",
532
+ ref: viewFrame,
533
+ class: "vite-devtools-view-iframe w-full h-full flex items-center justify-center"
534
+ }, [..._cache[0] || (_cache[0] = [createBaseVNode("div", { class: "op50" }, " Loading iframe... ", -1)])], 512);
535
+ };
536
+ }
537
+ });
538
+
539
+ //#endregion
540
+ //#region src/client/webcomponents/components/ViewIframe.vue
541
+ var ViewIframe_default = ViewIframe_vue_vue_type_script_setup_true_lang_default;
542
+
543
+ //#endregion
544
+ //#region src/client/webcomponents/components/ViewEntry.vue?vue&type=script&setup=true&lang.ts
545
+ const _hoisted_1 = { key: 1 };
546
+ var ViewEntry_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
547
+ __name: "ViewEntry",
548
+ props: {
549
+ state: {},
550
+ isDragging: { type: Boolean },
551
+ isResizing: { type: Boolean },
552
+ entry: {},
553
+ iframes: {},
554
+ iframeStyle: {}
555
+ },
556
+ setup(__props) {
557
+ return (_ctx, _cache) => {
558
+ return __props.entry.type === "iframe" ? (openBlock(), createBlock(ViewIframe_default, {
559
+ key: 0,
560
+ state: __props.state,
561
+ "is-dragging": __props.isDragging,
562
+ "is-resizing": __props.isResizing,
563
+ entry: __props.entry,
564
+ iframes: __props.iframes,
565
+ "iframe-style": __props.iframeStyle
566
+ }, null, 8, [
567
+ "state",
568
+ "is-dragging",
569
+ "is-resizing",
570
+ "entry",
571
+ "iframes",
572
+ "iframe-style"
573
+ ])) : (openBlock(), createElementBlock("div", _hoisted_1, " Unknown entry: " + toDisplayString(__props.entry), 1));
574
+ };
575
+ }
576
+ });
577
+
578
+ //#endregion
579
+ //#region src/client/webcomponents/components/ViewEntry.vue
580
+ var ViewEntry_default = ViewEntry_vue_vue_type_script_setup_true_lang_default;
581
+
582
+ //#endregion
583
+ //#region src/client/webcomponents/components/DockPanel.vue?vue&type=script&setup=true&lang.ts
584
+ var DockPanel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
585
+ __name: "DockPanel",
586
+ props: {
587
+ state: {},
588
+ entry: {},
589
+ dockEl: {},
590
+ panelMargins: {}
591
+ },
592
+ setup(__props) {
593
+ const props = __props;
594
+ const { state, entry, panelMargins } = toRefs(props);
595
+ const dockPanel = useTemplateRef("dockPanel");
596
+ const iframesContainer = useTemplateRef("iframesContainer");
597
+ const iframes = markRaw(new IframeManager());
598
+ watchEffect(() => {
599
+ iframes.setContainer(iframesContainer.value);
600
+ }, { flush: "sync" });
601
+ const windowSize = reactive(useWindowSize());
602
+ const isDragging = ref(false);
603
+ const isResizing = ref(false);
604
+ const isHovering = ref(false);
605
+ const mousePosition = reactive({
606
+ x: 0,
607
+ y: 0
608
+ });
609
+ function clamp(value, min, max) {
610
+ return Math.min(Math.max(value, min), max);
611
+ }
612
+ const anchorPos = computed(() => {
613
+ const halfWidth = (props.dockEl?.clientWidth || 0) / 2;
614
+ const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
615
+ const left = state.value.left * windowSize.width / 100;
616
+ const top = state.value.top * windowSize.height / 100;
617
+ switch (state.value.position) {
618
+ case "top": return {
619
+ left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
620
+ top: panelMargins.value.top + halfHeight
621
+ };
622
+ case "right": return {
623
+ left: windowSize.width - panelMargins.value.right - halfHeight,
624
+ top: clamp(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
625
+ };
626
+ case "left": return {
627
+ left: panelMargins.value.left + halfHeight,
628
+ top: clamp(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
629
+ };
630
+ case "bottom":
631
+ default: return {
632
+ left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
633
+ top: windowSize.height - panelMargins.value.bottom - halfHeight
634
+ };
635
+ }
636
+ });
637
+ let _timer = null;
638
+ function bringUp() {
639
+ isHovering.value = true;
640
+ if (state.value.minimizePanelInactive < 0) return;
641
+ if (_timer) clearTimeout(_timer);
642
+ _timer = setTimeout(() => {
643
+ isHovering.value = false;
644
+ }, +state.value.minimizePanelInactive || 0);
645
+ }
646
+ const { width: frameWidth, height: frameHeight } = useElementBounding(dockPanel);
647
+ const iframeStyle = computed(() => {
648
+ mousePosition.x, mousePosition.y;
649
+ const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
650
+ const frameMargin = {
651
+ left: panelMargins.value.left + halfHeight,
652
+ top: panelMargins.value.top + halfHeight,
653
+ right: panelMargins.value.right + halfHeight,
654
+ bottom: panelMargins.value.bottom + halfHeight
655
+ };
656
+ const marginHorizontal = frameMargin.left + frameMargin.right;
657
+ const marginVertical = frameMargin.top + frameMargin.bottom;
658
+ const maxWidth = windowSize.width - marginHorizontal;
659
+ const maxHeight = windowSize.height - marginVertical;
660
+ const style = {
661
+ position: "fixed",
662
+ zIndex: -1,
663
+ pointerEvents: isDragging.value || isResizing.value ? "none" : "auto",
664
+ width: `min(${state.value.width}vw, calc(100vw - ${marginHorizontal}px))`,
665
+ height: `min(${state.value.height}vh, calc(100vh - ${marginVertical}px))`
666
+ };
667
+ const anchor = anchorPos.value;
668
+ const width = Math.min(maxWidth, state.value.width * windowSize.width / 100);
669
+ const height = Math.min(maxHeight, state.value.height * windowSize.height / 100);
670
+ const anchorX = anchor?.left || 0;
671
+ const anchorY = anchor?.top || 0;
672
+ switch (state.value.position) {
673
+ case "top":
674
+ case "bottom":
675
+ style.left = `${-frameWidth.value / 2}px`;
676
+ style.transform = "translate(0, 0)";
677
+ if (anchorX - frameMargin.left < width / 2) style.left = `${width / 2 - anchorX + frameMargin.left - frameWidth.value / 2}px`;
678
+ else if (windowSize.width - anchorX - frameMargin.right < width / 2) style.left = `${windowSize.width - anchorX - width / 2 - frameMargin.right - frameWidth.value / 2}px`;
679
+ break;
680
+ case "right":
681
+ case "left":
682
+ style.top = `${-frameHeight.value / 2}px`;
683
+ style.transform = "translate(0, 0)";
684
+ if (anchorY - frameMargin.top < height / 2) style.top = `${height / 2 - anchorY + frameMargin.top - frameHeight.value / 2}px`;
685
+ else if (windowSize.height - anchorY - frameMargin.bottom < height / 2) style.top = `${windowSize.height - anchorY - height / 2 - frameMargin.bottom - frameHeight.value / 2}px`;
686
+ break;
687
+ }
688
+ switch (state.value.position) {
689
+ case "top":
690
+ style.top = 0;
691
+ break;
692
+ case "right":
693
+ style.right = 0;
694
+ break;
695
+ case "left":
696
+ style.left = 0;
697
+ break;
698
+ case "bottom":
699
+ default:
700
+ style.bottom = 0;
701
+ break;
702
+ }
703
+ return style;
704
+ });
705
+ onMounted(() => {
706
+ bringUp();
707
+ });
708
+ return (_ctx, _cache) => {
709
+ return withDirectives((openBlock(), createElementBlock("div", {
710
+ id: "vite-devtools-dock-panel",
711
+ ref_key: "dockPanel",
712
+ ref: dockPanel,
713
+ class: "bg-glass rounded-lg border border-base shadow",
714
+ style: normalizeStyle(iframeStyle.value)
715
+ }, [
716
+ createVNode(DockPanelResizer_default, {
717
+ "is-resizing": isResizing.value,
718
+ "onUpdate:isResizing": _cache[0] || (_cache[0] = ($event) => isResizing.value = $event),
719
+ "is-dragging": isDragging.value,
720
+ state: unref(state),
721
+ entry: unref(entry)
722
+ }, null, 8, [
723
+ "is-resizing",
724
+ "is-dragging",
725
+ "state",
726
+ "entry"
727
+ ]),
728
+ unref(entry) && iframesContainer.value ? (openBlock(), createBlock(ViewEntry_default, {
729
+ key: unref(entry).id,
730
+ state: unref(state),
731
+ "is-dragging": isDragging.value,
732
+ "is-resizing": isResizing.value,
733
+ entry: unref(entry),
734
+ iframes: unref(iframes),
735
+ "iframe-style": {
736
+ border: "1px solid #8885",
737
+ borderRadius: "0.5rem",
738
+ zIndex: "2147483645"
739
+ },
740
+ rounded: ""
741
+ }, null, 8, [
742
+ "state",
743
+ "is-dragging",
744
+ "is-resizing",
745
+ "entry",
746
+ "iframes"
747
+ ])) : createCommentVNode("v-if", true),
748
+ createBaseVNode("div", {
749
+ id: "vite-devtools-iframe-container",
750
+ ref_key: "iframesContainer",
751
+ ref: iframesContainer,
752
+ class: "absolute inset-0"
753
+ }, null, 512)
754
+ ], 4)), [[vShow, unref(entry)]]);
755
+ };
756
+ }
757
+ });
758
+
759
+ //#endregion
760
+ //#region src/client/webcomponents/components/DockPanel.vue
761
+ var DockPanel_default = DockPanel_vue_vue_type_script_setup_true_lang_default;
762
+
763
+ //#endregion
764
+ //#region src/client/webcomponents/components/DockEmbedded.vue?vue&type=script&setup=true&lang.ts
765
+ var DockEmbedded_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
766
+ __name: "DockEmbedded",
767
+ props: {
768
+ state: {},
769
+ docks: {}
770
+ },
771
+ setup(__props) {
772
+ return (_ctx, _cache) => {
773
+ return openBlock(), createBlock(Dock_default, {
774
+ state: __props.state,
775
+ docks: __props.docks
776
+ }, {
777
+ default: withCtx(({ dockEl, entry, panelMargins }) => [createVNode(DockPanel_default, {
778
+ "dock-el": dockEl,
779
+ state: __props.state,
780
+ "panel-margins": panelMargins,
781
+ entry
782
+ }, null, 8, [
783
+ "dock-el",
784
+ "state",
785
+ "panel-margins",
786
+ "entry"
787
+ ])]),
788
+ _: 1
789
+ }, 8, ["state", "docks"]);
790
+ };
791
+ }
792
+ });
793
+
794
+ //#endregion
795
+ //#region src/client/webcomponents/components/DockEmbedded.vue
796
+ var DockEmbedded_default = DockEmbedded_vue_vue_type_script_setup_true_lang_default;
797
+
798
+ //#endregion
799
+ //#region src/client/webcomponents/components/DockEmbedded.ts
800
+ const DockEmbedded = defineCustomElement(DockEmbedded_default, {
801
+ shadowRoot: true,
802
+ styles: [css_default]
803
+ });
804
+ customElements.define("vite-devtools-dock-embedded", DockEmbedded);
805
+
806
+ //#endregion
807
+ export { DockEmbedded, IframeHolder, IframeManager };