@vitejs/devtools 0.0.0-alpha.11 → 0.0.0-alpha.13

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.
@@ -1,1089 +1,3 @@
1
- import { A as withCtx, B as toDisplayString, C as openBlock, D as useTemplateRef, E as useModel, F as shallowRef, I as toRefs, L as unref, M as markRaw, N as reactive, O as watch, P as ref, R as normalizeClass, S as onUnmounted, T as renderSlot, _ as createVNode, a as useWindowSize, b as nextTick, c as vShow, d as computed, f as createBaseVNode, g as createStaticVNode, h as createElementBlock, i as useScreenSafeArea, j as withDirectives, k as watchEffect, l as withModifiers, m as createCommentVNode, n as useEventListener, o as toRefs$1, p as createBlock, s as defineCustomElement, t as useElementBounding, u as Fragment, v as defineComponent, w as renderList, x as onMounted, y as mergeModels, z as normalizeStyle } from "../dist-B0hQ6r05.js";
1
+ import { a as PresistedDomViewsManager, i as PresistedDomHolder, n as createDocksContext, r as DockEmbedded, t as DEFAULT_DOCK_PANEL_STORE } from "../webcomponents-B0JGu3h4.js";
2
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-anchor{z-index:2147483644;box-sizing:border-box;transform-origin:50%;width:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:15px;position:fixed;transform:translate(-50%,-50%)rotate(0)}#vite-devtools-anchor #vite-devtools-dock-container{width:max-content;min-width:100px;height:40px;display:flex;position:absolute;top:0;left:0;transform:translate(-50%,-50%)}#vite-devtools-anchor.vite-devtools-vertical #vite-devtools-dock-container{transition-property:all;transition-duration:.5s;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(-50%,-50%)rotate(90deg)}#vite-devtools-anchor #vite-devtools-dock{touch-action:none;user-select:none;--vdt-backdrop-blur:blur(5px);height:40px;backdrop-filter:var(--vdt-backdrop-blur)var(--vdt-backdrop-brightness)var(--vdt-backdrop-contrast)var(--vdt-backdrop-grayscale)var(--vdt-backdrop-hue-rotate)var(--vdt-backdrop-invert)var(--vdt-backdrop-opacity)var(--vdt-backdrop-saturate)var(--vdt-backdrop-sepia);--vdt-text-opacity:1;color:rgba(255,255,255,var(--vdt-text-opacity));--vdt-shadow:var(--vdt-shadow-inset)0 1px 3px 0 var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset)0 1px 2px -1px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow),var(--vdt-ring-shadow),var(--vdt-shadow);width:calc-size(max-content,size);background-color:rgba(255,255,255,.5);-webkit-border-radius:9999px;border-radius:9999px;margin:auto;padding-left:1rem;padding-right:1rem;transition-property:all;transition-duration:.5s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (prefers-color-scheme:dark){#vite-devtools-anchor #vite-devtools-dock{background-color:rgba(17,17,17,.5)}}#vite-devtools-anchor.vite-devtools-minimized #vite-devtools-dock{width:22px;height:22px;padding:2px 0}#vite-devtools-anchor.vite-devtools-minimized .vite-devtools-dock-bracket{opacity:.5;width:.375rem}#vite-devtools-anchor:hover #vite-devtools-glowing{opacity:.6}#vite-devtools-anchor #vite-devtools-glowing{pointer-events:none;z-index:-1;opacity:0;--vdt-blur:blur(60px);width:160px;height:160px;filter:var(--vdt-blur)var(--vdt-brightness)var(--vdt-contrast)var(--vdt-drop-shadow)var(--vdt-grayscale)var(--vdt-hue-rotate)var(--vdt-invert)var(--vdt-saturate)var(--vdt-sepia);background-image:linear-gradient(45deg,#61d9ff,#7a23a1,#715ebd);-webkit-border-radius:9999px;border-radius:9999px;transition-property:all;transition-duration:1s;transition-timing-function:cubic-bezier(0,0,.2,1);position:absolute;top:0;left:0;transform:translate(-50%,-50%)}@media print{#vite-devtools-anchor{display:none}}.vite-devtools-resize-handle-horizontal{cursor:ns-resize;-webkit-border-radius:.375rem;border-radius:.375rem;height:10px;margin-top:-5px;margin-bottom:-5px;position:absolute;left:6px;right:6px}.vite-devtools-resize-handle-vertical{cursor:ew-resize;-webkit-border-radius:.375rem;border-radius:.375rem;width:10px;margin-left:-5px;margin-right:-5px;position:absolute;top:6px;bottom:0}.vite-devtools-resize-handle-corner{-webkit-border-radius:.375rem;border-radius:.375rem;width:14px;height:14px;margin:-6px;position:absolute}.vite-devtools-resize-handle{z-index:30}.vite-devtools-resize-handle:hover{background-color:rgba(156,163,175,.1)}*{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }:before{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }:after{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }::backdrop{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }.container{width:100%}.z-floating-tooltip{z-index:2147483645}.border-base{--vdt-border-opacity:.13;border-color:rgba(136,136,136,var(--vdt-border-opacity))}.bg-glass{--vdt-backdrop-blur:blur(5px);backdrop-filter:var(--vdt-backdrop-blur)var(--vdt-backdrop-brightness)var(--vdt-backdrop-contrast)var(--vdt-backdrop-grayscale)var(--vdt-backdrop-hue-rotate)var(--vdt-backdrop-invert)var(--vdt-backdrop-opacity)var(--vdt-backdrop-saturate)var(--vdt-backdrop-sepia);background-color:rgba(255,255,255,.5)}@media (prefers-color-scheme:dark){.bg-glass{background-color:rgba(17,17,17,.5)}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{top:0;bottom:0;left:0;right:0}.bottom-0{bottom:0}.left--1{left:-.25rem}.left-0{left:0}.left-1\\/2{left:50%}.right--1{right:-.25rem}.right-0{right:0}.top-0{top:0}.top-1\\/2{top:50%}.z--1{z-index:-1}.m-auto{margin:auto}.h-3{height:.75rem}.h-5{height:1.25rem}.h-full{height:100%}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-full{width:100%}.w-max{width:max-content}.flex{display:flex}.translate-x--1\\/2{--vdt-translate-x:-50%;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.translate-y--1\\/2{--vdt-translate-y:-50%;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.rotate-270{--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-rotate:270deg;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.scale-120{--vdt-scale-x:1.2;--vdt-scale-y:1.2;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.hover\\:scale-120:hover{--vdt-scale-x:1.2;--vdt-scale-y:1.2;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.scale-y--100{--vdt-scale-y:-1;transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.transform{transform:translateX(var(--vdt-translate-x))translateY(var(--vdt-translate-y))translateZ(var(--vdt-translate-z))rotate(var(--vdt-rotate))rotateX(var(--vdt-rotate-x))rotateY(var(--vdt-rotate-y))rotateZ(var(--vdt-rotate-z))skewX(var(--vdt-skew-x))skewY(var(--vdt-skew-y))scaleX(var(--vdt-scale-x))scaleY(var(--vdt-scale-y))scaleZ(var(--vdt-scale-z))}.select-none{user-select:none}.resize{resize:both}.items-center{align-items:center}.justify-center{justify-content:center}.border{border-width:1px}.rounded{-webkit-border-radius:.25rem;border-radius:.25rem}.rounded-lg{-webkit-border-radius:.5rem;border-radius:.5rem}.rounded-xl{-webkit-border-radius:.75rem;border-radius:.75rem}.hover\\:bg-\\[\\#8881\\]:hover{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.fill-black{--vdt-fill-opacity:1;fill:rgba(0,0,0,var(--vdt-fill-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}.text-purple{--vdt-text-opacity:1;color:rgba(192,132,252,var(--vdt-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.op0,.opacity-0{opacity:0}.op100,.opacity-100{opacity:1}.op50{opacity:.5}.op60\\!{opacity:.6!important}.op75{opacity:.75}.shadow{--vdt-shadow:var(--vdt-shadow-inset)0 1px 3px 0 var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset)0 1px 2px -1px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow),var(--vdt-ring-shadow),var(--vdt-shadow)}.saturate-0{--vdt-saturate:saturate(0);filter:var(--vdt-blur)var(--vdt-brightness)var(--vdt-contrast)var(--vdt-drop-shadow)var(--vdt-grayscale)var(--vdt-hue-rotate)var(--vdt-invert)var(--vdt-saturate)var(--vdt-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}@media (prefers-color-scheme:dark){.dark\\:fill-white{--vdt-fill-opacity:1;fill:rgba(255,255,255,var(--vdt-fill-opacity))}}";
5
-
6
- //#endregion
7
- //#region src/client/webcomponents/state/state.ts
8
- function useStateHandlers(state$1) {
9
- function importScript(entry) {
10
- const id = `${entry.type}:${entry.id}`;
11
- return import(
12
- /* @vite-ignore */
13
- ["/.devtools", "imports"].join("-")
14
- ).then((module) => {
15
- const importFn = module.importsMap[id];
16
- if (!importFn) return Promise.reject(/* @__PURE__ */ new Error(`[VITE DEVTOOLS] No import found for id: ${id}`));
17
- return importFn();
18
- }).catch((error) => {
19
- console.error("[VITE DEVTOOLS] Error executing import action", error);
20
- return Promise.reject(error);
21
- });
22
- }
23
- async function selectDockEntry(entry) {
24
- if (!entry) {
25
- state$1.value.open = false;
26
- state$1.value.dockEntry = void 0;
27
- return;
28
- }
29
- const scriptContext = reactive({
30
- dockEntry: entry,
31
- dockState: computed({
32
- get() {
33
- return state$1.value.dockEntry?.id === entry.id ? "active" : "inactive";
34
- },
35
- set(val) {
36
- if (val === "active") state$1.value.dockEntry = entry;
37
- else if (state$1.value.dockEntry?.id === entry.id) state$1.value.dockEntry = void 0;
38
- }
39
- }),
40
- hidePanel() {
41
- state$1.value.open = false;
42
- }
43
- });
44
- if (entry?.type === "action") return await importScript(entry).then((fn) => fn(scriptContext));
45
- state$1.value.dockEntry = entry;
46
- state$1.value.open = true;
47
- await importScript(entry).then((fn) => fn?.(scriptContext));
48
- }
49
- return { selectDockEntry };
50
- }
51
-
52
- //#endregion
53
- //#region src/client/webcomponents/state/floating-tooltip.ts
54
- const state = shallowRef(null);
55
- function setFloatingTooltip(info) {
56
- state.value = info;
57
- }
58
- function useFloatingTooltip() {
59
- return state;
60
- }
61
-
62
- //#endregion
63
- //#region \0/plugin-vue/export-helper
64
- var export_helper_default = (sfc, props) => {
65
- const target = sfc.__vccOpts || sfc;
66
- for (const [key, val] of props) target[key] = val;
67
- return target;
68
- };
69
-
70
- //#endregion
71
- //#region src/client/webcomponents/components/icons/VitePlusCore.vue
72
- const _sfc_main$12 = {};
73
- const _hoisted_1$6 = {
74
- viewBox: "0 0 22 22",
75
- fill: "none",
76
- xmlns: "http://www.w3.org/2000/svg"
77
- };
78
- function _sfc_render$2(_ctx, _cache) {
79
- return openBlock(), createElementBlock("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [createStaticVNode("<g clip-path=\"url(#clip0_2_2)\"><path d=\"M11.85 20.535C11.7881 20.6144 11.7029 20.6726 11.6064 20.7012C11.5098 20.7298 11.4067 20.7276 11.3115 20.6947C11.2163 20.6619 11.1337 20.6001 11.0754 20.5181C11.017 20.436 10.9858 20.3377 10.986 20.237V15.834C10.986 15.5775 10.8841 15.3316 10.7028 15.1502C10.5214 14.9689 10.2755 14.867 10.019 14.867H5.157C5.06821 14.867 4.98114 14.8426 4.90534 14.7964C4.82954 14.7501 4.76795 14.6839 4.72734 14.6049C4.68673 14.526 4.66866 14.4374 4.67513 14.3488C4.6816 14.2603 4.71235 14.1752 4.764 14.103L7.961 9.62801C8.06459 9.48335 8.12626 9.31291 8.13923 9.13546C8.15219 8.95801 8.11594 8.78042 8.03448 8.62224C7.95301 8.46406 7.82948 8.33143 7.67749 8.23893C7.52549 8.14644 7.35093 8.09768 7.173 8.09801H1.29C1.20122 8.09803 1.11414 8.07359 1.03834 8.02736C0.962542 7.98113 0.900953 7.91489 0.86034 7.83594C0.819727 7.75699 0.801662 7.66837 0.80813 7.57982C0.814597 7.49127 0.845347 7.40622 0.897 7.33401L5.04 1.53301C5.08452 1.46999 5.14358 1.41864 5.21217 1.38331C5.28075 1.34797 5.35685 1.32969 5.434 1.33001H17.782C18.175 1.33001 18.404 1.77501 18.175 2.09401L14.978 6.57001C14.521 7.21001 14.978 8.10001 15.766 8.10001H20.627C21.031 8.10001 21.257 8.56401 21.007 8.88201L11.85 20.535Z\" fill=\"#6254FE\"></path><mask id=\"mask0_2_2\" style=\"mask-type:alpha;\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"1\" width=\"22\" height=\"20\"><path d=\"M11.85 20.535C11.7881 20.6144 11.7029 20.6726 11.6064 20.7012C11.5098 20.7298 11.4067 20.7276 11.3115 20.6947C11.2163 20.6619 11.1337 20.6001 11.0754 20.5181C11.017 20.436 10.9858 20.3377 10.986 20.237V15.834C10.986 15.5775 10.8841 15.3316 10.7028 15.1502C10.5214 14.9689 10.2755 14.867 10.019 14.867H5.157C5.06821 14.867 4.98114 14.8426 4.90534 14.7964C4.82954 14.7501 4.76795 14.6839 4.72734 14.6049C4.68673 14.526 4.66866 14.4374 4.67513 14.3488C4.6816 14.2603 4.71235 14.1752 4.764 14.103L7.961 9.62801C8.06459 9.48335 8.12626 9.31291 8.13923 9.13546C8.15219 8.95801 8.11594 8.78042 8.03448 8.62224C7.95301 8.46406 7.82948 8.33143 7.67749 8.23893C7.52549 8.14644 7.35093 8.09768 7.173 8.09801H1.29C1.20122 8.09803 1.11414 8.07359 1.03834 8.02736C0.962542 7.98113 0.900953 7.91489 0.86034 7.83594C0.819727 7.75699 0.801662 7.66837 0.80813 7.57982C0.814597 7.49127 0.845347 7.40622 0.897 7.33401L5.04 1.53301C5.08452 1.46999 5.14358 1.41864 5.21217 1.38331C5.28075 1.34797 5.35685 1.32969 5.434 1.33001H17.782C18.175 1.33001 18.404 1.77501 18.175 2.09401L14.978 6.57001C14.521 7.21001 14.978 8.10001 15.766 8.10001H20.627C21.031 8.10001 21.257 8.56401 21.007 8.88201L11.85 20.535Z\" fill=\"#833BFF\"></path></mask><g mask=\"url(#mask0_2_2)\"><g filter=\"url(#filter0_f_2_2)\"><path d=\"M11.4271 17.1119C11.4313 18.412 8.62134 19.475 5.1508 19.4863C1.68026 19.4975 -1.13659 18.4528 -1.14081 17.1527C-1.14503 15.8526 1.66497 14.7896 5.13551 14.7783C8.60605 14.767 11.4229 15.8118 11.4271 17.1119Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter1_f_2_2)\"><path d=\"M9.48364 9.06048C9.49161 11.5148 3.78614 13.523 -3.25987 13.5459C-10.3059 13.5688 -16.0243 11.5977 -16.0322 9.14332C-16.0402 6.68898 -10.3347 4.6808 -3.28872 4.65792C3.75729 4.63505 9.47567 6.60614 9.48364 9.06048Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter2_f_2_2)\"><path d=\"M9.53104 8.43813C9.53526 9.7382 3.70543 10.8111 -3.49025 10.8344C-10.6859 10.8578 -16.5226 9.82279 -16.5268 8.52272C-16.531 7.22265 -10.7012 6.1498 -3.50554 6.12644C3.69014 6.10308 9.52682 7.13806 9.53104 8.43813Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter3_f_2_2)\"><path d=\"M11.5916 16.1293C11.5958 17.4293 5.74448 18.5022 -1.47775 18.5256C-8.69997 18.549 -14.5582 17.5141 -14.5624 16.214C-14.5666 14.9139 -8.71523 13.841 -1.493 13.8176C5.72923 13.7942 11.5874 14.8292 11.5916 16.1293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter4_f_2_2)\"><path d=\"M12.2473 16.6206C12.2515 17.9206 6.40021 18.9935 -0.821978 19.017C-8.04417 19.0404 -13.9023 18.0055 -13.9066 16.7055C-13.9108 15.4054 -8.05945 14.3325 -0.837261 14.309C6.38493 14.2856 12.2431 15.3205 12.2473 16.6206Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter5_f_2_2)\"><path d=\"M14.047 5.7039C14.2411 2.38813 18.6158 -0.0529585 23.8183 0.251568C29.0207 0.556095 33.0808 3.49092 32.8867 6.80669C32.6926 10.1225 28.3179 12.5635 23.1154 12.259C17.913 11.9545 13.8529 9.01966 14.047 5.7039Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter6_f_2_2)\"><path d=\"M14.7518 7.88531C14.7376 7.06639 18.8396 6.33138 23.9137 6.2436C28.9879 6.15583 33.1129 6.74854 33.127 7.56745C33.1412 8.38637 29.0392 9.12139 23.965 9.20916C18.8909 9.29693 14.7659 8.70422 14.7518 7.88531Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter7_f_2_2)\"><path d=\"M14.7518 7.88531C14.7376 7.06639 18.8396 6.33138 23.9137 6.2436C28.9879 6.15583 33.1129 6.74854 33.127 7.56745C33.1412 8.38637 29.0392 9.12139 23.965 9.20916C18.8909 9.29693 14.7659 8.70422 14.7518 7.88531Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter8_f_2_2)\"><path d=\"M-6.98848 14.7616C-6.18615 15.4233 -1.99229 11.6626 2.37876 6.362C6.74982 1.06138 9.64283 -3.77199 8.84049 -4.43362C8.03816 -5.09525 3.8443 -1.3346 -0.526755 3.96602C-4.89781 9.26665 -7.79082 14.1 -6.98848 14.7616Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter9_f_2_2)\"><path d=\"M13.4305 8.5449C14.2512 9.18361 18.3372 5.30605 22.5568 -0.115883C26.7764 -5.53781 29.5318 -10.4509 28.7111 -11.0896C27.8904 -11.7284 23.8044 -7.8508 19.5848 -2.42887C15.3651 2.99306 12.6098 7.90619 13.4305 8.5449Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter10_f_2_2)\"><path d=\"M14.9501 9.73878C16.4926 10.9392 19.2111 10.026 21.0221 7.69897C22.8331 5.37198 23.0507 2.51245 21.5083 1.31202C19.9658 0.111596 17.2473 1.02485 15.4363 3.35184C13.6253 5.67882 13.4077 8.53835 14.9501 9.73878Z\" fill=\"#2BFDD2\"></path></g><g filter=\"url(#filter11_f_2_2)\"><path d=\"M-7.68233 27.5293C-6.86163 28.168 -2.77563 24.2904 1.44401 18.8685C5.66365 13.4466 8.41904 8.53346 7.59834 7.89474C6.77764 7.25603 2.69164 11.1336 -1.528 16.5555C-5.74764 21.9775 -8.50303 26.8906 -7.68233 27.5293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter12_f_2_2)\"><path d=\"M-7.68233 27.5293C-6.86163 28.168 -2.77563 24.2904 1.44401 18.8685C5.66365 13.4466 8.41904 8.53346 7.59834 7.89474C6.77764 7.25603 2.69164 11.1336 -1.528 16.5555C-5.74764 21.9775 -8.50303 26.8906 -7.68233 27.5293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter13_f_2_2)\"><path d=\"M8.26366 23.8563C9.13579 24.535 13.2635 20.6899 17.4831 15.268C21.7028 9.84604 24.4165 4.90047 23.5443 4.22173C22.6722 3.54299 18.5445 7.38811 14.3249 12.81C10.1052 18.232 7.39153 23.1775 8.26366 23.8563Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter14_f_2_2)\"><path d=\"M12.2866 22.5389C13.7846 23.7047 17.4746 21.4689 20.5284 17.5449C23.5822 13.621 24.8434 9.49495 23.3454 8.32912C21.8474 7.16329 18.1574 9.39917 15.1036 13.3231C12.0498 17.247 10.7886 21.3731 12.2866 22.5389Z\" fill=\"#2BFDD2\"></path></g></g></g><defs><filter id=\"filter0_f_2_2\" x=\"-7.68682\" y=\"8.2322\" width=\"25.6599\" height=\"17.8002\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter1_f_2_2\" x=\"-22.5782\" y=\"-1.88827\" width=\"38.6079\" height=\"21.9804\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter2_f_2_2\" x=\"-20.4548\" y=\"2.19805\" width=\"33.9139\" height=\"12.5647\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter3_f_2_2\" x=\"-18.4904\" y=\"9.88925\" width=\"34.01\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter4_f_2_2\" x=\"-17.8346\" y=\"10.3806\" width=\"34.0099\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter5_f_2_2\" x=\"7.4943\" y=\"-6.32009\" width=\"31.9451\" height=\"25.1508\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter6_f_2_2\" x=\"10.8237\" y=\"2.30699\" width=\"26.2313\" height=\"10.8388\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter7_f_2_2\" x=\"10.8237\" y=\"2.30699\" width=\"26.2313\" height=\"10.8388\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter8_f_2_2\" x=\"-11.0501\" y=\"-8.43711\" width=\"23.9523\" height=\"27.2022\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter9_f_2_2\" x=\"9.35783\" y=\"-15.0865\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter10_f_2_2\" x=\"9.99386\" y=\"-3.14457\" width=\"16.4707\" height=\"17.3399\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter11_f_2_2\" x=\"-11.755\" y=\"3.89791\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter12_f_2_2\" x=\"-11.755\" y=\"3.89791\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter13_f_2_2\" x=\"4.17262\" y=\"0.216058\" width=\"23.4628\" height=\"27.6459\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><filter id=\"filter14_f_2_2\" x=\"7.72776\" y=\"4.09222\" width=\"20.1765\" height=\"22.6836\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_2_2\"></feGaussianBlur></filter><clipPath id=\"clip0_2_2\"><rect width=\"22\" height=\"22\" fill=\"white\"></rect></clipPath></defs>", 2)])]);
80
- }
81
- var VitePlusCore_default = /* @__PURE__ */ export_helper_default(_sfc_main$12, [["render", _sfc_render$2]]);
82
-
83
- //#endregion
84
- //#region src/client/webcomponents/components/DockIcon.vue
85
- const _hoisted_1$5 = { key: 1 };
86
- const _hoisted_2 = ["srcset"];
87
- const _hoisted_3 = ["srcset"];
88
- const _hoisted_4 = ["src", "alt"];
89
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
90
- __name: "DockIcon",
91
- props: {
92
- icon: {},
93
- title: {}
94
- },
95
- setup(__props) {
96
- const props = __props;
97
- function getIconUrl(str, color) {
98
- if (str.includes("/") || str.startsWith("data:") || str.startsWith("builtin:")) return str;
99
- const match = str.match(/^([\w-]+):([\w-]+)$/);
100
- if (match) {
101
- const [, collection, icon2] = match;
102
- return `https://api.iconify.design/${collection}/${icon2}.svg${color === "dark" ? "?color=%23eee" : "?color=%23111"}`;
103
- }
104
- return str;
105
- }
106
- const icon = computed(() => {
107
- if (typeof props.icon === "string") return {
108
- dark: getIconUrl(props.icon, "dark"),
109
- light: getIconUrl(props.icon, "light")
110
- };
111
- return {
112
- dark: getIconUrl(props.icon.dark, "dark"),
113
- light: getIconUrl(props.icon.light, "light")
114
- };
115
- });
116
- return (_ctx, _cache) => {
117
- return icon.value.light === "builtin:vite-plus-core" ? (openBlock(), createBlock(VitePlusCore_default, { key: 0 })) : (openBlock(), createElementBlock("picture", _hoisted_1$5, [
118
- createBaseVNode("source", {
119
- srcset: icon.value.dark,
120
- media: "(prefers-color-scheme: dark)"
121
- }, null, 8, _hoisted_2),
122
- createBaseVNode("source", {
123
- srcset: icon.value.light,
124
- media: "(prefers-color-scheme: light)"
125
- }, null, 8, _hoisted_3),
126
- createBaseVNode("img", {
127
- src: icon.value.light,
128
- alt: __props.title,
129
- class: "w-full h-full m-auto",
130
- draggable: "false"
131
- }, null, 8, _hoisted_4)
132
- ]));
133
- };
134
- }
135
- });
136
- var DockIcon_default = _sfc_main$11;
137
-
138
- //#endregion
139
- //#region src/client/webcomponents/components/DockEntry.vue
140
- const _hoisted_1$4 = ["title"];
141
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
142
- __name: "DockEntry",
143
- props: {
144
- dock: {},
145
- isSelected: { type: Boolean },
146
- isDimmed: { type: Boolean },
147
- isVertical: { type: Boolean }
148
- },
149
- setup(__props) {
150
- const props = __props;
151
- const button = useTemplateRef("button");
152
- function updatePos() {
153
- const rect = button.value?.getBoundingClientRect();
154
- if (rect) setFloatingTooltip({
155
- text: props.dock.title,
156
- width: rect.width,
157
- height: rect.height,
158
- left: rect.left,
159
- top: rect.top
160
- });
161
- }
162
- function showTitle() {
163
- updatePos();
164
- }
165
- function clearTitle() {
166
- setFloatingTooltip(null);
167
- }
168
- useEventListener("pointerdown", () => {
169
- setFloatingTooltip(null);
170
- });
171
- return (_ctx, _cache) => {
172
- return openBlock(), createElementBlock("div", {
173
- key: __props.dock.id,
174
- class: "relative group vite-devtools-dock-entry",
175
- onPointerenter: showTitle,
176
- onPointerleave: clearTitle
177
- }, [createBaseVNode("button", {
178
- ref_key: "button",
179
- ref: button,
180
- title: __props.dock.title,
181
- class: normalizeClass([[
182
- __props.isVertical ? "rotate-270" : "",
183
- __props.isDimmed ? "op50 saturate-0" : "",
184
- __props.isSelected ? "scale-120 text-purple" : ""
185
- ], "flex items-center justify-center p1.5 rounded-xl hover:bg-[#8881] hover:scale-120 transition-all duration-300 relative"])
186
- }, [createVNode(DockIcon_default, {
187
- icon: __props.dock.icon,
188
- title: __props.dock.title,
189
- class: "w-5 h-5 select-none"
190
- }, null, 8, ["icon", "title"])], 10, _hoisted_1$4)], 32);
191
- };
192
- }
193
- });
194
- var DockEntry_default = _sfc_main$10;
195
-
196
- //#endregion
197
- //#region src/client/webcomponents/components/DockEntries.vue
198
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
199
- __name: "DockEntries",
200
- props: {
201
- selected: {},
202
- isVertical: { type: Boolean },
203
- entries: {}
204
- },
205
- emits: ["select"],
206
- setup(__props, { emit: __emit }) {
207
- const props = __props;
208
- const emit = __emit;
209
- const { selected, isVertical, entries } = toRefs(props);
210
- function toggleDockEntry(dock) {
211
- if (selected.value?.id === dock.id) emit("select", void 0);
212
- else emit("select", dock);
213
- }
214
- return (_ctx, _cache) => {
215
- return openBlock(), createElementBlock("div", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(entries), (dock) => {
216
- return openBlock(), createBlock(DockEntry_default, {
217
- key: dock.id,
218
- dock,
219
- "is-selected": unref(selected)?.id === dock.id,
220
- "is-dimmed": unref(selected) && unref(selected).id !== dock.id,
221
- "is-vertical": unref(isVertical),
222
- onClick: ($event) => toggleDockEntry(dock)
223
- }, null, 8, [
224
- "dock",
225
- "is-selected",
226
- "is-dimmed",
227
- "is-vertical",
228
- "onClick"
229
- ]);
230
- }), 128))]);
231
- };
232
- }
233
- });
234
- var DockEntries_default = _sfc_main$9;
235
-
236
- //#endregion
237
- //#region src/client/webcomponents/components/icons/BracketLeft.vue
238
- const _sfc_main$8 = {};
239
- const _hoisted_1$3 = {
240
- viewBox: "0 0 9 20",
241
- fill: "none",
242
- xmlns: "http://www.w3.org/2000/svg"
243
- };
244
- function _sfc_render$1(_ctx, _cache) {
245
- return openBlock(), createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
246
- d: "M4.95763 0C1.02563 5.628 1.00263 14.351 4.95763 20H7.61363C3.65963 14.35 3.68363 5.627 7.61363 0H4.95763Z",
247
- class: "fill-black dark:fill-white"
248
- }, null, -1)])]);
249
- }
250
- var BracketLeft_default = /* @__PURE__ */ export_helper_default(_sfc_main$8, [["render", _sfc_render$1]]);
251
-
252
- //#endregion
253
- //#region src/client/webcomponents/components/icons/BracketRight.vue
254
- const _sfc_main$7 = {};
255
- const _hoisted_1$2 = {
256
- viewBox: "0 0 9 20",
257
- fill: "none",
258
- xmlns: "http://www.w3.org/2000/svg"
259
- };
260
- function _sfc_render(_ctx, _cache) {
261
- return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
262
- d: "M4.246 10H6.903C6.902 6.407 5.913 2.816 3.946 0H1.29C3.256 2.816 4.244 6.407 4.246 10ZM8.935 14.907H6.27C6.46624 14.1665 6.61752 13.4148 6.723 12.656H4.066C3.96052 13.4148 3.80924 14.1665 3.613 14.907H0.944C0.703507 15.8176 0.387753 16.7067 0 17.565H2.669C2.2859 18.4179 1.82388 19.2331 1.289 20H3.945C4.47988 19.2331 4.9419 18.4179 5.325 17.565H7.99C8.376 16.714 8.691 15.823 8.935 14.907Z",
263
- class: "fill-black dark:fill-white"
264
- }, null, -1)])]);
265
- }
266
- var BracketRight_default = /* @__PURE__ */ export_helper_default(_sfc_main$7, [["render", _sfc_render]]);
267
-
268
- //#endregion
269
- //#region src/client/webcomponents/components/Dock.vue
270
- const PANEL_MARGIN = 5;
271
- const SNAP_THRESHOLD = 2;
272
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
273
- __name: "Dock",
274
- props: /* @__PURE__ */ mergeModels({
275
- state: {},
276
- docks: {}
277
- }, {
278
- "isDragging": {
279
- type: Boolean,
280
- default: false
281
- },
282
- "isDraggingModifiers": {}
283
- }),
284
- emits: ["update:isDragging"],
285
- setup(__props) {
286
- const { state: state$1, docks } = toRefs(__props);
287
- const isDragging = useModel(__props, "isDragging");
288
- const isSafari = navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome");
289
- const panelMargins = reactive({
290
- left: PANEL_MARGIN,
291
- top: PANEL_MARGIN,
292
- right: PANEL_MARGIN,
293
- bottom: PANEL_MARGIN
294
- });
295
- const safeArea = useScreenSafeArea();
296
- function toNumber(value) {
297
- const num = +value;
298
- if (Number.isNaN(num)) return 0;
299
- return num;
300
- }
301
- watchEffect(() => {
302
- panelMargins.left = toNumber(safeArea.left.value) + PANEL_MARGIN;
303
- panelMargins.top = toNumber(safeArea.top.value) + PANEL_MARGIN;
304
- panelMargins.right = toNumber(safeArea.right.value) + PANEL_MARGIN;
305
- panelMargins.bottom = toNumber(safeArea.bottom.value) + PANEL_MARGIN;
306
- });
307
- const dockEl = useTemplateRef("dockEl");
308
- const anchorEl = useTemplateRef("anchorEl");
309
- const windowSize = reactive({
310
- width: window.innerWidth,
311
- height: window.innerHeight
312
- });
313
- const draggingOffset = reactive({
314
- x: 0,
315
- y: 0
316
- });
317
- const mousePosition = reactive({
318
- x: 0,
319
- y: 0
320
- });
321
- function onPointerDown(e) {
322
- if (!dockEl.value) return;
323
- isDragging.value = true;
324
- const { left, top, width, height } = dockEl.value.getBoundingClientRect();
325
- draggingOffset.x = e.clientX - left - width / 2;
326
- draggingOffset.y = e.clientY - top - height / 2;
327
- }
328
- onMounted(() => {
329
- windowSize.width = window.innerWidth;
330
- windowSize.height = window.innerHeight;
331
- useEventListener(window, "resize", () => {
332
- windowSize.width = window.innerWidth;
333
- windowSize.height = window.innerHeight;
334
- });
335
- useEventListener(window, "pointermove", (e) => {
336
- if (!isDragging.value) return;
337
- const centerX = window.innerWidth / 2;
338
- const centerY = window.innerHeight / 2;
339
- const x = e.clientX - draggingOffset.x;
340
- const y = e.clientY - draggingOffset.y;
341
- if (Number.isNaN(x) || Number.isNaN(y)) return;
342
- mousePosition.x = x;
343
- mousePosition.y = y;
344
- const deg = Math.atan2(y - centerY, x - centerX);
345
- const HORIZONTAL_MARGIN = 70;
346
- const TL = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, 0 - centerX);
347
- const TR = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, window.innerWidth - centerX);
348
- const BL = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, 0 - centerX);
349
- const BR = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, window.innerWidth - centerX);
350
- state$1.value.position = deg >= TL && deg <= TR ? "top" : deg >= TR && deg <= BR ? "right" : deg >= BR && deg <= BL ? "bottom" : "left";
351
- state$1.value.left = snapToPoints(x / window.innerWidth * 100);
352
- state$1.value.top = snapToPoints(y / window.innerHeight * 100);
353
- });
354
- useEventListener(window, "pointerup", () => {
355
- isDragging.value = false;
356
- });
357
- useEventListener(window, "pointerleave", () => {
358
- isDragging.value = false;
359
- });
360
- });
361
- function snapToPoints(value) {
362
- if (value < 5) return 0;
363
- if (value > 95) return 100;
364
- if (Math.abs(value - 50) < SNAP_THRESHOLD) return 50;
365
- return value;
366
- }
367
- function clamp(value, min, max) {
368
- return Math.min(Math.max(value, min), max);
369
- }
370
- const recalculateCounter = ref(0);
371
- const isHovering = ref(false);
372
- const isVertical = computed(() => state$1.value.position === "left" || state$1.value.position === "right");
373
- const anchorPos = computed(() => {
374
- recalculateCounter.value;
375
- const halfWidth = (dockEl.value?.clientWidth || 0) / 2;
376
- const halfHeight = (dockEl.value?.clientHeight || 0) / 2;
377
- const left = state$1.value.left * windowSize.width / 100;
378
- const top = state$1.value.top * windowSize.height / 100;
379
- switch (state$1.value.position) {
380
- case "top": return {
381
- left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
382
- top: panelMargins.top + halfHeight
383
- };
384
- case "right": return {
385
- left: windowSize.width - panelMargins.right - halfHeight,
386
- top: clamp(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
387
- };
388
- case "left": return {
389
- left: panelMargins.left + halfHeight,
390
- top: clamp(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
391
- };
392
- case "bottom":
393
- default: return {
394
- left: clamp(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
395
- top: windowSize.height - panelMargins.bottom - halfHeight
396
- };
397
- }
398
- });
399
- let _timer = null;
400
- function bringUp() {
401
- isHovering.value = true;
402
- if (state$1.value.minimizePanelInactive < 0) return;
403
- if (_timer) clearTimeout(_timer);
404
- _timer = setTimeout(() => {
405
- isHovering.value = false;
406
- }, +state$1.value.minimizePanelInactive || 0);
407
- }
408
- const isHidden = computed(() => false);
409
- const isMinimized = computed(() => {
410
- if (state$1.value.minimizePanelInactive < 0) return false;
411
- if (state$1.value.minimizePanelInactive === 0) return true;
412
- const isTouchDevice = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
413
- return !isDragging.value && !state$1.value.open && !isHovering.value && !isTouchDevice && state$1.value.minimizePanelInactive;
414
- });
415
- const anchorStyle = computed(() => {
416
- return {
417
- left: `${anchorPos.value.left}px`,
418
- top: `${anchorPos.value.top}px`,
419
- pointerEvents: isHidden.value ? "none" : "auto"
420
- };
421
- });
422
- const panelStyle = computed(() => {
423
- const style = { transform: isVertical.value ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
424
- if (isHidden.value) {
425
- style.opacity = 0;
426
- style.pointerEvents = "none";
427
- }
428
- if (isDragging.value) style.transition = "none !important";
429
- return style;
430
- });
431
- const { selectDockEntry } = useStateHandlers(state$1);
432
- onMounted(() => {
433
- bringUp();
434
- recalculateCounter.value++;
435
- });
436
- return (_ctx, _cache) => {
437
- return openBlock(), createElementBlock("div", {
438
- id: "vite-devtools-anchor",
439
- ref_key: "anchorEl",
440
- ref: anchorEl,
441
- style: normalizeStyle([anchorStyle.value]),
442
- class: normalizeClass({
443
- "vite-devtools-horizontal": !isVertical.value,
444
- "vite-devtools-vertical": isVertical.value,
445
- "vite-devtools-minimized": isMinimized.value
446
- }),
447
- onMousemove: bringUp
448
- }, [
449
- !unref(isSafari) ? (openBlock(), createElementBlock("div", {
450
- key: 0,
451
- id: "vite-devtools-glowing",
452
- class: normalizeClass(isDragging.value ? "op60!" : "")
453
- }, null, 2)) : createCommentVNode("v-if", true),
454
- createBaseVNode("div", {
455
- id: "vite-devtools-dock-container",
456
- ref_key: "dockEl",
457
- ref: dockEl,
458
- style: normalizeStyle(panelStyle.value)
459
- }, [createBaseVNode("div", {
460
- id: "vite-devtools-dock",
461
- onPointerdown: onPointerDown
462
- }, [
463
- createVNode(BracketLeft_default, { class: "vite-devtools-dock-bracket absolute left--1 top-1/2 translate-y--1/2 bottom-0 w-2.5 op75 transition-opacity duration-300" }),
464
- createVNode(BracketRight_default, { class: normalizeClass(["vite-devtools-dock-bracket absolute right--1 top-1/2 translate-y--1/2 bottom-0 w-2.5 op75 transition-opacity duration-300", isVertical.value ? "scale-y--100" : ""]) }, null, 8, ["class"]),
465
- createVNode(VitePlusCore_default, { class: normalizeClass(["w-3 h-3 absolute left-1/2 top-1/2 translate-x--1/2 translate-y--1/2 transition-opacity duration-300", isMinimized.value ? "op100" : "op0"]) }, null, 8, ["class"]),
466
- createVNode(DockEntries_default, {
467
- entries: unref(docks),
468
- class: normalizeClass(["transition duration-200 flex items-center w-full h-full justify-center", isMinimized.value ? "opacity-0 pointer-events-none" : "opacity-100"]),
469
- "is-vertical": isVertical.value,
470
- selected: unref(state$1).dockEntry,
471
- onSelect: unref(selectDockEntry)
472
- }, null, 8, [
473
- "entries",
474
- "class",
475
- "is-vertical",
476
- "selected",
477
- "onSelect"
478
- ])
479
- ], 32)], 4),
480
- renderSlot(_ctx.$slots, "default", {
481
- dockEl: dockEl.value,
482
- panelMargins,
483
- state: unref(state$1),
484
- isDragging: isDragging.value,
485
- entry: unref(state$1).dockEntry?.type === "action" ? void 0 : unref(state$1).dockEntry
486
- })
487
- ], 38);
488
- };
489
- }
490
- });
491
- var Dock_default = _sfc_main$6;
492
-
493
- //#endregion
494
- //#region src/client/webcomponents/components/DockPanelResizer.vue
495
- const PANEL_MIN = 20;
496
- const PANEL_MAX = 100;
497
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
498
- __name: "DockPanelResizer",
499
- props: /* @__PURE__ */ mergeModels({
500
- state: {},
501
- isDragging: { type: Boolean }
502
- }, {
503
- "isResizing": {
504
- type: Boolean,
505
- default: false
506
- },
507
- "isResizingModifiers": {}
508
- }),
509
- emits: ["update:isResizing"],
510
- setup(__props) {
511
- const props = __props;
512
- const isResizing = useModel(__props, "isResizing");
513
- const { state: state$1 } = toRefs$1(props);
514
- const container = ref();
515
- const resizingState = ref(false);
516
- function handleResize(e) {
517
- if (!resizingState.value) return;
518
- const box = container.value?.getBoundingClientRect();
519
- if (!box) return;
520
- let widthPx, heightPx;
521
- if (resizingState.value.right) {
522
- widthPx = Math.abs(e instanceof MouseEvent ? e.clientX : (e.touches[0]?.clientX || 0) - (box?.left || 0));
523
- state$1.value.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
524
- } else if (resizingState.value.left) {
525
- widthPx = Math.abs((box?.right || 0) - (e instanceof MouseEvent ? e.clientX : e.touches[0]?.clientX || 0));
526
- state$1.value.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
527
- }
528
- if (resizingState.value.top) {
529
- heightPx = Math.abs((box?.bottom || 0) - (e instanceof MouseEvent ? e.clientY : e.touches[0]?.clientY || 0));
530
- state$1.value.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
531
- } else if (resizingState.value.bottom) {
532
- heightPx = Math.abs(e instanceof MouseEvent ? e.clientY : (e.touches[0]?.clientY || 0) - (box?.top || 0));
533
- state$1.value.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
534
- }
535
- }
536
- useEventListener(window, "mousemove", handleResize);
537
- useEventListener(window, "touchmove", handleResize);
538
- useEventListener(window, "mouseup", () => resizingState.value = false);
539
- useEventListener(window, "touchend", () => resizingState.value = false);
540
- useEventListener(window, "mouseleave", () => resizingState.value = false);
541
- watch(resizingState, (value) => {
542
- isResizing.value = !!value;
543
- }, { flush: "sync" });
544
- return (_ctx, _cache) => {
545
- return openBlock(), createElementBlock("div", {
546
- id: "vite-devtools-resize-container",
547
- ref_key: "container",
548
- ref: container,
549
- class: "w-full h-full absolute left-0 right-0 bottom-0 top-0 antialiased"
550
- }, [
551
- createCommentVNode(" Handlers "),
552
- withDirectives(createBaseVNode("div", {
553
- class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
554
- style: { top: 0 },
555
- onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => resizingState.value = { top: true }, ["prevent"])),
556
- onTouchstartPassive: _cache[1] || (_cache[1] = () => resizingState.value = { top: true })
557
- }, null, 544), [[vShow, unref(state$1).position !== "top"]]),
558
- withDirectives(createBaseVNode("div", {
559
- class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
560
- style: { bottom: 0 },
561
- onMousedown: _cache[2] || (_cache[2] = withModifiers(() => resizingState.value = { bottom: true }, ["prevent"])),
562
- onTouchstartPassive: _cache[3] || (_cache[3] = () => resizingState.value = { bottom: true })
563
- }, null, 544), [[vShow, unref(state$1).position !== "bottom"]]),
564
- withDirectives(createBaseVNode("div", {
565
- class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
566
- style: { left: 0 },
567
- onMousedown: _cache[4] || (_cache[4] = withModifiers(() => resizingState.value = { left: true }, ["prevent"])),
568
- onTouchstartPassive: _cache[5] || (_cache[5] = () => resizingState.value = { left: true })
569
- }, null, 544), [[vShow, unref(state$1).position !== "left"]]),
570
- withDirectives(createBaseVNode("div", {
571
- class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
572
- style: { right: 0 },
573
- onMousedown: _cache[6] || (_cache[6] = withModifiers(() => resizingState.value = { right: true }, ["prevent"])),
574
- onTouchstartPassive: _cache[7] || (_cache[7] = () => resizingState.value = { right: true })
575
- }, null, 544), [[vShow, unref(state$1).position !== "right"]]),
576
- withDirectives(createBaseVNode("div", {
577
- class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
578
- style: {
579
- top: 0,
580
- left: 0,
581
- cursor: "nwse-resize"
582
- },
583
- onMousedown: _cache[8] || (_cache[8] = withModifiers(() => resizingState.value = {
584
- top: true,
585
- left: true
586
- }, ["prevent"])),
587
- onTouchstartPassive: _cache[9] || (_cache[9] = () => resizingState.value = {
588
- top: true,
589
- left: true
590
- })
591
- }, null, 544), [[vShow, unref(state$1).position !== "top" && unref(state$1).position !== "left"]]),
592
- withDirectives(createBaseVNode("div", {
593
- class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
594
- style: {
595
- top: 0,
596
- right: 0,
597
- cursor: "nesw-resize"
598
- },
599
- onMousedown: _cache[10] || (_cache[10] = withModifiers(() => resizingState.value = {
600
- top: true,
601
- right: true
602
- }, ["prevent"])),
603
- onTouchstartPassive: _cache[11] || (_cache[11] = () => resizingState.value = {
604
- top: true,
605
- right: true
606
- })
607
- }, null, 544), [[vShow, unref(state$1).position !== "top" && unref(state$1).position !== "right"]]),
608
- withDirectives(createBaseVNode("div", {
609
- class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
610
- style: {
611
- bottom: 0,
612
- left: 0,
613
- cursor: "nesw-resize"
614
- },
615
- onMousedown: _cache[12] || (_cache[12] = withModifiers(() => resizingState.value = {
616
- bottom: true,
617
- left: true
618
- }, ["prevent"])),
619
- onTouchstartPassive: _cache[13] || (_cache[13] = () => resizingState.value = {
620
- bottom: true,
621
- left: true
622
- })
623
- }, null, 544), [[vShow, unref(state$1).position !== "bottom" && unref(state$1).position !== "left"]]),
624
- withDirectives(createBaseVNode("div", {
625
- class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
626
- style: {
627
- bottom: 0,
628
- right: 0,
629
- cursor: "nwse-resize"
630
- },
631
- onMousedown: _cache[14] || (_cache[14] = withModifiers(() => resizingState.value = {
632
- bottom: true,
633
- right: true
634
- }, ["prevent"])),
635
- onTouchstartPassive: _cache[15] || (_cache[15] = () => resizingState.value = {
636
- bottom: true,
637
- right: true
638
- })
639
- }, null, 544), [[vShow, unref(state$1).position !== "bottom" && unref(state$1).position !== "right"]])
640
- ], 512);
641
- };
642
- }
643
- });
644
- var DockPanelResizer_default = _sfc_main$5;
645
-
646
- //#endregion
647
- //#region src/client/webcomponents/components/IframeManager.ts
648
- var IframeManager = class {
649
- iframes = {};
650
- container = void 0;
651
- constructor() {}
652
- setContainer(container) {
653
- this.container = container;
654
- }
655
- getIframeHolder(id) {
656
- let iframe;
657
- if (!this.iframes[id]) {
658
- const el = document.createElement("iframe");
659
- this.iframes[id] = new IframeHolder(id, el);
660
- this.container.appendChild(el);
661
- iframe = this.iframes[id];
662
- } else iframe = this.iframes[id];
663
- return iframe;
664
- }
665
- };
666
- var IframeHolder = class {
667
- iframe;
668
- id;
669
- parent;
670
- _cleanups = [];
671
- constructor(id, iframe) {
672
- this.id = id;
673
- this.iframe = iframe;
674
- }
675
- cleanup() {
676
- this._cleanups.forEach((cleanup) => cleanup());
677
- this._cleanups = [];
678
- }
679
- mount(parent) {
680
- if (this.parent === parent) {
681
- this.show();
682
- return;
683
- }
684
- this.cleanup();
685
- this.parent = parent;
686
- const func = () => this.update();
687
- window.addEventListener("resize", func);
688
- this._cleanups.push(() => window.removeEventListener("resize", func));
689
- this.show();
690
- }
691
- hide() {
692
- this.iframe.style.display = "none";
693
- }
694
- show() {
695
- this.iframe.style.display = "block";
696
- this.update();
697
- }
698
- update() {
699
- if (!this.parent) return;
700
- const rect = this.parent.getBoundingClientRect();
701
- this.iframe.style.position = "absolute";
702
- this.iframe.style.width = `${rect.width}px`;
703
- this.iframe.style.height = `${rect.height}px`;
704
- }
705
- unmount() {
706
- this.cleanup();
707
- this.hide();
708
- this.parent = void 0;
709
- }
710
- };
711
-
712
- //#endregion
713
- //#region src/client/webcomponents/components/ViewIframe.vue
714
- const _hoisted_1$1 = {
715
- key: 0,
716
- class: "op50 z--1"
717
- };
718
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
719
- __name: "ViewIframe",
720
- props: {
721
- state: {},
722
- isDragging: { type: Boolean },
723
- isResizing: { type: Boolean },
724
- entry: {},
725
- iframes: {},
726
- iframeStyle: {}
727
- },
728
- setup(__props) {
729
- const props = __props;
730
- const isLoading = ref(true);
731
- const viewFrame = useTemplateRef("viewFrame");
732
- onMounted(() => {
733
- const holder = props.iframes.getIframeHolder(props.entry.id);
734
- holder.iframe.style.boxShadow = "none";
735
- holder.iframe.style.outline = "none";
736
- Object.assign(holder.iframe.style, props.iframeStyle);
737
- if (!holder.iframe.src) holder.iframe.src = props.entry.url;
738
- holder.mount(viewFrame.value);
739
- isLoading.value = false;
740
- nextTick(() => {
741
- holder.update();
742
- });
743
- watch(() => props.state, () => {
744
- holder.update();
745
- }, { deep: true });
746
- watchEffect(() => {
747
- holder.iframe.style.pointerEvents = props.isDragging || props.isResizing ? "none" : "auto";
748
- }, { flush: "sync" });
749
- });
750
- onUnmounted(() => {
751
- props.iframes.getIframeHolder(props.entry.id).unmount();
752
- });
753
- return (_ctx, _cache) => {
754
- return openBlock(), createElementBlock("div", {
755
- ref_key: "viewFrame",
756
- ref: viewFrame,
757
- class: "vite-devtools-view-iframe w-full h-full flex items-center justify-center"
758
- }, [isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, " Loading iframe... ")) : createCommentVNode("v-if", true)], 512);
759
- };
760
- }
761
- });
762
- var ViewIframe_default = _sfc_main$4;
763
-
764
- //#endregion
765
- //#region src/client/webcomponents/components/ViewEntry.vue
766
- const _hoisted_1 = { key: 1 };
767
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
768
- __name: "ViewEntry",
769
- props: {
770
- state: {},
771
- isDragging: { type: Boolean },
772
- isResizing: { type: Boolean },
773
- entry: {},
774
- iframes: {},
775
- iframeStyle: {}
776
- },
777
- setup(__props) {
778
- return (_ctx, _cache) => {
779
- return __props.entry.type === "iframe" ? (openBlock(), createBlock(ViewIframe_default, {
780
- key: 0,
781
- state: __props.state,
782
- "is-dragging": __props.isDragging,
783
- "is-resizing": __props.isResizing,
784
- entry: __props.entry,
785
- iframes: __props.iframes,
786
- "iframe-style": __props.iframeStyle
787
- }, null, 8, [
788
- "state",
789
- "is-dragging",
790
- "is-resizing",
791
- "entry",
792
- "iframes",
793
- "iframe-style"
794
- ])) : (openBlock(), createElementBlock("div", _hoisted_1, " Unknown entry: " + toDisplayString(__props.entry), 1));
795
- };
796
- }
797
- });
798
- var ViewEntry_default = _sfc_main$3;
799
-
800
- //#endregion
801
- //#region src/client/webcomponents/components/DockPanel.vue
802
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
803
- __name: "DockPanel",
804
- props: /* @__PURE__ */ mergeModels({
805
- state: {},
806
- entry: {},
807
- dockEl: {},
808
- panelMargins: {}
809
- }, {
810
- "isDragging": {
811
- type: Boolean,
812
- default: false
813
- },
814
- "isDraggingModifiers": {}
815
- }),
816
- emits: ["update:isDragging"],
817
- setup(__props) {
818
- const props = __props;
819
- const { state: state$1, entry, panelMargins } = toRefs(props);
820
- const windowSize = reactive(useWindowSize());
821
- const isResizing = ref(false);
822
- const isHovering = ref(false);
823
- const isDragging = useModel(__props, "isDragging");
824
- const mousePosition = reactive({
825
- x: 0,
826
- y: 0
827
- });
828
- const dockPanel = useTemplateRef("dockPanel");
829
- const iframesContainer = useTemplateRef("iframesContainer");
830
- const iframes = markRaw(new IframeManager());
831
- watchEffect(() => {
832
- iframes.setContainer(iframesContainer.value);
833
- }, { flush: "sync" });
834
- function clamp(value, min, max) {
835
- return Math.min(Math.max(value, min), max);
836
- }
837
- const anchorPos = computed(() => {
838
- const halfWidth = (props.dockEl?.clientWidth || 0) / 2;
839
- const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
840
- const left = state$1.value.left * windowSize.width / 100;
841
- const top = state$1.value.top * windowSize.height / 100;
842
- switch (state$1.value.position) {
843
- case "top": return {
844
- left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
845
- top: panelMargins.value.top + halfHeight
846
- };
847
- case "right": return {
848
- left: windowSize.width - panelMargins.value.right - halfHeight,
849
- top: clamp(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
850
- };
851
- case "left": return {
852
- left: panelMargins.value.left + halfHeight,
853
- top: clamp(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
854
- };
855
- case "bottom":
856
- default: return {
857
- left: clamp(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
858
- top: windowSize.height - panelMargins.value.bottom - halfHeight
859
- };
860
- }
861
- });
862
- let _timer = null;
863
- function bringUp() {
864
- isHovering.value = true;
865
- if (state$1.value.minimizePanelInactive < 0) return;
866
- if (_timer) clearTimeout(_timer);
867
- _timer = setTimeout(() => {
868
- isHovering.value = false;
869
- }, +state$1.value.minimizePanelInactive || 0);
870
- }
871
- const { width: frameWidth, height: frameHeight } = useElementBounding(dockPanel);
872
- const iframeStyle = computed(() => {
873
- mousePosition.x, mousePosition.y;
874
- const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
875
- const frameMargin = {
876
- left: panelMargins.value.left + halfHeight,
877
- top: panelMargins.value.top + halfHeight,
878
- right: panelMargins.value.right + halfHeight,
879
- bottom: panelMargins.value.bottom + halfHeight
880
- };
881
- const marginHorizontal = frameMargin.left + frameMargin.right;
882
- const marginVertical = frameMargin.top + frameMargin.bottom;
883
- const maxWidth = windowSize.width - marginHorizontal;
884
- const maxHeight = windowSize.height - marginVertical;
885
- const style = {
886
- position: "fixed",
887
- zIndex: -1,
888
- pointerEvents: isDragging.value || isResizing.value ? "none" : "auto",
889
- width: `min(${state$1.value.width}vw, calc(100vw - ${marginHorizontal}px))`,
890
- height: `min(${state$1.value.height}vh, calc(100vh - ${marginVertical}px))`
891
- };
892
- const anchor = anchorPos.value;
893
- const width = Math.min(maxWidth, state$1.value.width * windowSize.width / 100);
894
- const height = Math.min(maxHeight, state$1.value.height * windowSize.height / 100);
895
- const anchorX = anchor?.left || 0;
896
- const anchorY = anchor?.top || 0;
897
- switch (state$1.value.position) {
898
- case "top":
899
- case "bottom":
900
- style.left = `${-frameWidth.value / 2}px`;
901
- style.transform = "translate(0, 0)";
902
- if (anchorX - frameMargin.left < width / 2) style.left = `${width / 2 - anchorX + frameMargin.left - frameWidth.value / 2}px`;
903
- else if (windowSize.width - anchorX - frameMargin.right < width / 2) style.left = `${windowSize.width - anchorX - width / 2 - frameMargin.right - frameWidth.value / 2}px`;
904
- break;
905
- case "right":
906
- case "left":
907
- style.top = `${-frameHeight.value / 2}px`;
908
- style.transform = "translate(0, 0)";
909
- if (anchorY - frameMargin.top < height / 2) style.top = `${height / 2 - anchorY + frameMargin.top - frameHeight.value / 2}px`;
910
- else if (windowSize.height - anchorY - frameMargin.bottom < height / 2) style.top = `${windowSize.height - anchorY - height / 2 - frameMargin.bottom - frameHeight.value / 2}px`;
911
- break;
912
- }
913
- switch (state$1.value.position) {
914
- case "top":
915
- style.top = 0;
916
- break;
917
- case "right":
918
- style.right = 0;
919
- break;
920
- case "left":
921
- style.left = 0;
922
- break;
923
- case "bottom":
924
- default:
925
- style.bottom = 0;
926
- break;
927
- }
928
- return style;
929
- });
930
- onMounted(() => {
931
- bringUp();
932
- });
933
- return (_ctx, _cache) => {
934
- return withDirectives((openBlock(), createElementBlock("div", {
935
- ref_key: "dockPanel",
936
- ref: dockPanel,
937
- class: "bg-glass rounded-lg border border-base shadow",
938
- style: normalizeStyle(iframeStyle.value)
939
- }, [
940
- createVNode(DockPanelResizer_default, {
941
- "is-resizing": isResizing.value,
942
- "onUpdate:isResizing": _cache[0] || (_cache[0] = ($event) => isResizing.value = $event),
943
- "is-dragging": isDragging.value,
944
- state: unref(state$1),
945
- entry: unref(entry)
946
- }, null, 8, [
947
- "is-resizing",
948
- "is-dragging",
949
- "state",
950
- "entry"
951
- ]),
952
- unref(entry) && iframesContainer.value ? (openBlock(), createBlock(ViewEntry_default, {
953
- key: unref(entry).id,
954
- state: unref(state$1),
955
- "is-dragging": isDragging.value,
956
- "is-resizing": isResizing.value,
957
- entry: unref(entry),
958
- iframes: unref(iframes),
959
- "iframe-style": {
960
- border: "1px solid #8883",
961
- borderRadius: "0.5rem"
962
- },
963
- rounded: ""
964
- }, null, 8, [
965
- "state",
966
- "is-dragging",
967
- "is-resizing",
968
- "entry",
969
- "iframes"
970
- ])) : createCommentVNode("v-if", true),
971
- createBaseVNode("div", {
972
- id: "vite-devtools-iframe-container",
973
- ref_key: "iframesContainer",
974
- ref: iframesContainer,
975
- class: "absolute inset-0"
976
- }, null, 512)
977
- ], 4)), [[vShow, unref(entry)]]);
978
- };
979
- }
980
- });
981
- var DockPanel_default = _sfc_main$2;
982
-
983
- //#endregion
984
- //#region src/client/webcomponents/components/FloatingTooltip.vue
985
- const DETECT_MARGIN = 100;
986
- const GAP = 10;
987
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
988
- __name: "FloatingTooltip",
989
- setup(__props) {
990
- const current = useFloatingTooltip();
991
- const box = ref({
992
- text: "",
993
- width: 0,
994
- height: 0,
995
- left: 0,
996
- top: 0
997
- });
998
- const align = computed(() => {
999
- const vw = window.innerWidth;
1000
- const vh = window.innerHeight;
1001
- if (box.value.left < DETECT_MARGIN) return "right";
1002
- if (box.value.left + box.value.width > vw - DETECT_MARGIN) return "left";
1003
- if (box.value.top < DETECT_MARGIN) return "bottom";
1004
- if (box.value.top + box.value.height > vh - DETECT_MARGIN) return "top";
1005
- return "bottom";
1006
- });
1007
- const style = computed(() => {
1008
- switch (align.value) {
1009
- case "bottom": return {
1010
- left: `${box.value.left + box.value.width / 2}px`,
1011
- top: `${box.value.top + box.value.height + GAP}px`,
1012
- transform: "translateX(-50%)"
1013
- };
1014
- case "top": return {
1015
- left: `${box.value.left + box.value.width / 2}px`,
1016
- bottom: `${window.innerHeight - box.value.top + GAP}px`,
1017
- transform: "translateX(-50%)"
1018
- };
1019
- case "left": return {
1020
- right: `${window.innerWidth - box.value.left + GAP}px`,
1021
- top: `${box.value.top + box.value.height / 2}px`,
1022
- transform: "translateY(-50%)"
1023
- };
1024
- case "right": return {
1025
- left: `${box.value.left + box.value.width + GAP}px`,
1026
- top: `${box.value.top + box.value.height / 2}px`,
1027
- transform: "translateY(-50%)"
1028
- };
1029
- default: throw new Error("Unreachable");
1030
- }
1031
- });
1032
- watchEffect(() => {
1033
- if (current.value) box.value = { ...current.value };
1034
- });
1035
- return (_ctx, _cache) => {
1036
- return box.value.text ? (openBlock(), createElementBlock("div", {
1037
- key: 0,
1038
- class: normalizeClass(["z-floating-tooltip text-xs transition-all duration-300 w-max bg-glass border border-base rounded px2 fixed p1", unref(current) ? "op100" : "op0 pointer-events-none"]),
1039
- style: normalizeStyle(style.value)
1040
- }, toDisplayString(box.value.text), 7)) : createCommentVNode("v-if", true);
1041
- };
1042
- }
1043
- });
1044
- var FloatingTooltip_default = _sfc_main$1;
1045
-
1046
- //#endregion
1047
- //#region src/client/webcomponents/components/DockEmbedded.vue
1048
- const _sfc_main = /* @__PURE__ */ defineComponent({
1049
- __name: "DockEmbedded",
1050
- props: {
1051
- state: {},
1052
- docks: {}
1053
- },
1054
- setup(__props) {
1055
- return (_ctx, _cache) => {
1056
- return openBlock(), createElementBlock(Fragment, null, [createVNode(Dock_default, {
1057
- state: __props.state,
1058
- docks: __props.docks
1059
- }, {
1060
- default: withCtx(({ dockEl, entry, panelMargins, isDragging }) => [createVNode(DockPanel_default, {
1061
- "dock-el": dockEl,
1062
- state: __props.state,
1063
- "is-dragging": isDragging,
1064
- "panel-margins": panelMargins,
1065
- entry
1066
- }, null, 8, [
1067
- "dock-el",
1068
- "state",
1069
- "is-dragging",
1070
- "panel-margins",
1071
- "entry"
1072
- ])]),
1073
- _: 1
1074
- }, 8, ["state", "docks"]), createVNode(FloatingTooltip_default)], 64);
1075
- };
1076
- }
1077
- });
1078
- var DockEmbedded_default = _sfc_main;
1079
-
1080
- //#endregion
1081
- //#region src/client/webcomponents/components/DockEmbedded.ts
1082
- const DockEmbedded = defineCustomElement(DockEmbedded_default, {
1083
- shadowRoot: true,
1084
- styles: [css_default]
1085
- });
1086
- customElements.define("vite-devtools-dock-embedded", DockEmbedded);
1087
-
1088
- //#endregion
1089
- export { DockEmbedded, IframeHolder, IframeManager };
3
+ export { DEFAULT_DOCK_PANEL_STORE, DockEmbedded, PresistedDomHolder, PresistedDomViewsManager, createDocksContext };