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

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