@vitejs/devtools 0.0.0-alpha.12 → 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.
- package/dist/{cli-commands-BlB9kpfS.js → cli-commands-BRo4A4PO.js} +8 -10
- package/dist/cli-commands.js +2 -2
- package/dist/cli.js +2 -2
- package/dist/client/inject.js +6 -11
- package/dist/client/standalone/assets/index-D8I_zW-0.js +1 -0
- package/dist/client/standalone/index.html +1 -1
- package/dist/client/webcomponents.d.ts +25 -30
- package/dist/client/webcomponents.js +2 -1088
- package/dist/{index-DdVYVGyC.d.ts → index-CuyjTfKA.d.ts} +91 -10
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/{plugins-znai7bMv.js → plugins-C-9mB5Hx.js} +5 -36
- package/dist/{dist-B0hQ6r05.js → webcomponents-B0JGu3h4.js} +1210 -118
- package/package.json +11 -9
- package/dist/client/standalone/assets/index-CaFsuaK3.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@vue+shared@3.5.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@vue+shared@3.5.24/node_modules/@vue/shared/dist/shared.esm-bundler.js
|
|
2
2
|
/**
|
|
3
|
-
* @vue/shared v3.5.
|
|
3
|
+
* @vue/shared v3.5.24
|
|
4
4
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5
5
|
* @license MIT
|
|
6
6
|
**/
|
|
@@ -155,7 +155,12 @@ const stringifySymbol = (v, i = "") => {
|
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
//#endregion
|
|
158
|
-
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.
|
|
158
|
+
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.24/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
|
159
|
+
/**
|
|
160
|
+
* @vue/reactivity v3.5.24
|
|
161
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
162
|
+
* @license MIT
|
|
163
|
+
**/
|
|
159
164
|
function warn$2(msg, ...args) {
|
|
160
165
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
161
166
|
}
|
|
@@ -1275,7 +1280,7 @@ var CustomRefImpl = class {
|
|
|
1275
1280
|
function customRef(factory) {
|
|
1276
1281
|
return new CustomRefImpl(factory);
|
|
1277
1282
|
}
|
|
1278
|
-
function toRefs
|
|
1283
|
+
function toRefs(object) {
|
|
1279
1284
|
if (!!(process.env.NODE_ENV !== "production") && !isProxy(object)) warn$2(`toRefs() expects a reactive object but received a plain one.`);
|
|
1280
1285
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1281
1286
|
for (const key in object) ret[key] = propertyToRef(object, key);
|
|
@@ -1548,7 +1553,12 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
1548
1553
|
}
|
|
1549
1554
|
|
|
1550
1555
|
//#endregion
|
|
1551
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.
|
|
1556
|
+
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.24/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
|
|
1557
|
+
/**
|
|
1558
|
+
* @vue/runtime-core v3.5.24
|
|
1559
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1560
|
+
* @license MIT
|
|
1561
|
+
**/
|
|
1552
1562
|
const stack = [];
|
|
1553
1563
|
function pushWarningContext(vnode) {
|
|
1554
1564
|
stack.push(vnode);
|
|
@@ -2382,7 +2392,7 @@ const publicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create
|
|
|
2382
2392
|
$watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
|
|
2383
2393
|
});
|
|
2384
2394
|
const isReservedPrefix = (key) => key === "_" || key === "$";
|
|
2385
|
-
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn$1(state, key);
|
|
2395
|
+
const hasSetupBinding = (state$1, key) => state$1 !== EMPTY_OBJ && !state$1.__isScriptSetup && hasOwn$1(state$1, key);
|
|
2386
2396
|
const PublicInstanceProxyHandlers = {
|
|
2387
2397
|
get({ _: instance }, key) {
|
|
2388
2398
|
if (key === "__v_skip") return true;
|
|
@@ -2400,7 +2410,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
2400
2410
|
else if (hasSetupBinding(setupState, key)) {
|
|
2401
2411
|
accessCache[key] = 1;
|
|
2402
2412
|
return setupState[key];
|
|
2403
|
-
} else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) {
|
|
2413
|
+
} else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn$1(data, key)) {
|
|
2404
2414
|
accessCache[key] = 2;
|
|
2405
2415
|
return data[key];
|
|
2406
2416
|
} else if ((normalizedProps = instance.propsOptions[0]) && hasOwn$1(normalizedProps, key)) {
|
|
@@ -2437,7 +2447,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
2437
2447
|
} else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn$1(setupState, key)) {
|
|
2438
2448
|
warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
2439
2449
|
return false;
|
|
2440
|
-
} else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) {
|
|
2450
|
+
} else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn$1(data, key)) {
|
|
2441
2451
|
data[key] = value;
|
|
2442
2452
|
return true;
|
|
2443
2453
|
} else if (hasOwn$1(instance.props, key)) {
|
|
@@ -2457,7 +2467,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
2457
2467
|
},
|
|
2458
2468
|
has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions, type } }, key) {
|
|
2459
2469
|
let normalizedProps, cssModules;
|
|
2460
|
-
return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn$1(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
2470
|
+
return !!(accessCache[key] || __VUE_OPTIONS_API__ && data !== EMPTY_OBJ && key[0] !== "$" && hasOwn$1(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
2461
2471
|
},
|
|
2462
2472
|
defineProperty(target, key, descriptor) {
|
|
2463
2473
|
if (descriptor.get != null) target._.accessCache[key] = 0;
|
|
@@ -2517,11 +2527,6 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
2517
2527
|
function normalizePropsOrEmits(props) {
|
|
2518
2528
|
return isArray(props) ? props.reduce((normalized, p$1) => (normalized[p$1] = null, normalized), {}) : props;
|
|
2519
2529
|
}
|
|
2520
|
-
function mergeModels(a, b) {
|
|
2521
|
-
if (!a || !b) return a || b;
|
|
2522
|
-
if (isArray(a) && isArray(b)) return a.concat(b);
|
|
2523
|
-
return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
2524
|
-
}
|
|
2525
2530
|
function createDuplicateChecker() {
|
|
2526
2531
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
2527
2532
|
return (type, key) => {
|
|
@@ -3389,7 +3394,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3389
3394
|
if (n2.type === "svg") namespace = "svg";
|
|
3390
3395
|
else if (n2.type === "math") namespace = "mathml";
|
|
3391
3396
|
if (n1 == null) mountElement(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3392
|
-
else
|
|
3397
|
+
else {
|
|
3398
|
+
const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
|
|
3399
|
+
try {
|
|
3400
|
+
if (customElement) customElement._beginPatch();
|
|
3401
|
+
patchElement(n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3402
|
+
} finally {
|
|
3403
|
+
if (customElement) customElement._endPatch();
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3393
3406
|
};
|
|
3394
3407
|
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
3395
3408
|
let el;
|
|
@@ -4064,9 +4077,6 @@ const useSSRContext = () => {
|
|
|
4064
4077
|
function watchEffect(effect$1, options) {
|
|
4065
4078
|
return doWatch(effect$1, null, options);
|
|
4066
4079
|
}
|
|
4067
|
-
function watchSyncEffect(effect$1, options) {
|
|
4068
|
-
return doWatch(effect$1, null, !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" });
|
|
4069
|
-
}
|
|
4070
4080
|
function watch(source, cb, options) {
|
|
4071
4081
|
if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
|
|
4072
4082
|
return doWatch(source, cb, options);
|
|
@@ -4146,62 +4156,6 @@ function createPathGetter(ctx, path) {
|
|
|
4146
4156
|
return cur;
|
|
4147
4157
|
};
|
|
4148
4158
|
}
|
|
4149
|
-
function useModel(props, name, options = EMPTY_OBJ) {
|
|
4150
|
-
const i = getCurrentInstance();
|
|
4151
|
-
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
|
4152
|
-
warn$1(`useModel() called without active instance.`);
|
|
4153
|
-
return ref();
|
|
4154
|
-
}
|
|
4155
|
-
const camelizedName = camelize$1(name);
|
|
4156
|
-
if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][camelizedName]) {
|
|
4157
|
-
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
4158
|
-
return ref();
|
|
4159
|
-
}
|
|
4160
|
-
const hyphenatedName = hyphenate$1(name);
|
|
4161
|
-
const modifiers = getModelModifiers(props, camelizedName);
|
|
4162
|
-
const res = customRef((track$1, trigger$1) => {
|
|
4163
|
-
let localValue;
|
|
4164
|
-
let prevSetValue = EMPTY_OBJ;
|
|
4165
|
-
let prevEmittedValue;
|
|
4166
|
-
watchSyncEffect(() => {
|
|
4167
|
-
const propValue = props[camelizedName];
|
|
4168
|
-
if (hasChanged(localValue, propValue)) {
|
|
4169
|
-
localValue = propValue;
|
|
4170
|
-
trigger$1();
|
|
4171
|
-
}
|
|
4172
|
-
});
|
|
4173
|
-
return {
|
|
4174
|
-
get() {
|
|
4175
|
-
track$1();
|
|
4176
|
-
return options.get ? options.get(localValue) : localValue;
|
|
4177
|
-
},
|
|
4178
|
-
set(value) {
|
|
4179
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
4180
|
-
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) return;
|
|
4181
|
-
const rawProps = i.vnode.props;
|
|
4182
|
-
if (!(rawProps && (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
|
|
4183
|
-
localValue = value;
|
|
4184
|
-
trigger$1();
|
|
4185
|
-
}
|
|
4186
|
-
i.emit(`update:${name}`, emittedValue);
|
|
4187
|
-
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) trigger$1();
|
|
4188
|
-
prevSetValue = value;
|
|
4189
|
-
prevEmittedValue = emittedValue;
|
|
4190
|
-
}
|
|
4191
|
-
};
|
|
4192
|
-
});
|
|
4193
|
-
res[Symbol.iterator] = () => {
|
|
4194
|
-
let i2 = 0;
|
|
4195
|
-
return { next() {
|
|
4196
|
-
if (i2 < 2) return {
|
|
4197
|
-
value: i2++ ? modifiers || EMPTY_OBJ : res,
|
|
4198
|
-
done: false
|
|
4199
|
-
};
|
|
4200
|
-
else return { done: true };
|
|
4201
|
-
} };
|
|
4202
|
-
};
|
|
4203
|
-
return res;
|
|
4204
|
-
}
|
|
4205
4159
|
const getModelModifiers = (props, modelName) => {
|
|
4206
4160
|
return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize$1(modelName)}Modifiers`] || props[`${hyphenate$1(modelName)}Modifiers`];
|
|
4207
4161
|
};
|
|
@@ -5185,13 +5139,18 @@ function initCustomFormatter() {
|
|
|
5185
5139
|
if (window.devtoolsFormatters) window.devtoolsFormatters.push(formatter);
|
|
5186
5140
|
else window.devtoolsFormatters = [formatter];
|
|
5187
5141
|
}
|
|
5188
|
-
const version = "3.5.
|
|
5142
|
+
const version = "3.5.24";
|
|
5189
5143
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
5190
5144
|
const devtools = (process.env.NODE_ENV, devtools$1);
|
|
5191
5145
|
const setDevtoolsHook = (process.env.NODE_ENV, setDevtoolsHook$1);
|
|
5192
5146
|
|
|
5193
5147
|
//#endregion
|
|
5194
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.
|
|
5148
|
+
//#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.24/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
5149
|
+
/**
|
|
5150
|
+
* @vue/runtime-dom v3.5.24
|
|
5151
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5152
|
+
* @license MIT
|
|
5153
|
+
**/
|
|
5195
5154
|
let policy = void 0;
|
|
5196
5155
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
5197
5156
|
if (tt) try {
|
|
@@ -5480,6 +5439,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
5480
5439
|
return false;
|
|
5481
5440
|
}
|
|
5482
5441
|
if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") return false;
|
|
5442
|
+
if (key === "sandbox" && el.tagName === "IFRAME") return false;
|
|
5483
5443
|
if (key === "form") return false;
|
|
5484
5444
|
if (key === "list" && el.tagName === "INPUT") return false;
|
|
5485
5445
|
if (key === "type" && el.tagName === "TEXTAREA") return false;
|
|
@@ -5525,6 +5485,8 @@ var VueElement = class VueElement extends BaseClass {
|
|
|
5525
5485
|
this._nonce = this._def.nonce;
|
|
5526
5486
|
this._connected = false;
|
|
5527
5487
|
this._resolved = false;
|
|
5488
|
+
this._patching = false;
|
|
5489
|
+
this._dirty = false;
|
|
5528
5490
|
this._numberProps = null;
|
|
5529
5491
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
5530
5492
|
this._ob = null;
|
|
@@ -5637,7 +5599,7 @@ var VueElement = class VueElement extends BaseClass {
|
|
|
5637
5599
|
return this._getProp(key);
|
|
5638
5600
|
},
|
|
5639
5601
|
set(val) {
|
|
5640
|
-
this._setProp(key, val, true,
|
|
5602
|
+
this._setProp(key, val, true, !this._patching);
|
|
5641
5603
|
}
|
|
5642
5604
|
});
|
|
5643
5605
|
}
|
|
@@ -5660,6 +5622,7 @@ var VueElement = class VueElement extends BaseClass {
|
|
|
5660
5622
|
*/
|
|
5661
5623
|
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
5662
5624
|
if (val !== this._props[key]) {
|
|
5625
|
+
this._dirty = true;
|
|
5663
5626
|
if (val === REMOVAL) delete this._props[key];
|
|
5664
5627
|
else {
|
|
5665
5628
|
this._props[key] = val;
|
|
@@ -5777,10 +5740,12 @@ var VueElement = class VueElement extends BaseClass {
|
|
|
5777
5740
|
_getSlots() {
|
|
5778
5741
|
const roots = [this];
|
|
5779
5742
|
if (this._teleportTargets) roots.push(...this._teleportTargets);
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5743
|
+
const slots = /* @__PURE__ */ new Set();
|
|
5744
|
+
for (const root of roots) {
|
|
5745
|
+
const found = root.querySelectorAll("slot");
|
|
5746
|
+
for (let i = 0; i < found.length; i++) slots.add(found[i]);
|
|
5747
|
+
}
|
|
5748
|
+
return Array.from(slots);
|
|
5784
5749
|
}
|
|
5785
5750
|
/**
|
|
5786
5751
|
* @internal
|
|
@@ -5791,6 +5756,20 @@ var VueElement = class VueElement extends BaseClass {
|
|
|
5791
5756
|
/**
|
|
5792
5757
|
* @internal
|
|
5793
5758
|
*/
|
|
5759
|
+
_beginPatch() {
|
|
5760
|
+
this._patching = true;
|
|
5761
|
+
this._dirty = false;
|
|
5762
|
+
}
|
|
5763
|
+
/**
|
|
5764
|
+
* @internal
|
|
5765
|
+
*/
|
|
5766
|
+
_endPatch() {
|
|
5767
|
+
this._patching = false;
|
|
5768
|
+
if (this._dirty && this._instance) this._update();
|
|
5769
|
+
}
|
|
5770
|
+
/**
|
|
5771
|
+
* @internal
|
|
5772
|
+
*/
|
|
5794
5773
|
_removeChildStyle(comp) {
|
|
5795
5774
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5796
5775
|
this._styleChildren.delete(comp);
|
|
@@ -5915,14 +5894,19 @@ function normalizeContainer(container) {
|
|
|
5915
5894
|
}
|
|
5916
5895
|
|
|
5917
5896
|
//#endregion
|
|
5918
|
-
//#region ../../node_modules/.pnpm/vue@3.5.
|
|
5897
|
+
//#region ../../node_modules/.pnpm/vue@3.5.24_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
|
|
5898
|
+
/**
|
|
5899
|
+
* vue v3.5.24
|
|
5900
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5901
|
+
* @license MIT
|
|
5902
|
+
**/
|
|
5919
5903
|
function initDev() {
|
|
5920
5904
|
initCustomFormatter();
|
|
5921
5905
|
}
|
|
5922
5906
|
if (!!(process.env.NODE_ENV !== "production")) initDev();
|
|
5923
5907
|
|
|
5924
5908
|
//#endregion
|
|
5925
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.0.0_vue@3.5.
|
|
5909
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.0.0_vue@3.5.24_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
|
|
5926
5910
|
/**
|
|
5927
5911
|
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
|
|
5928
5912
|
*
|
|
@@ -6113,39 +6097,6 @@ function watchPausable(source, cb, options = {}) {
|
|
|
6113
6097
|
/** @deprecated use `watchPausable` instead */
|
|
6114
6098
|
const pausableWatch = watchPausable;
|
|
6115
6099
|
/**
|
|
6116
|
-
* Extended `toRefs` that also accepts refs of an object.
|
|
6117
|
-
*
|
|
6118
|
-
* @see https://vueuse.org/toRefs
|
|
6119
|
-
* @param objectRef A ref or normal object or array.
|
|
6120
|
-
* @param options Options
|
|
6121
|
-
*/
|
|
6122
|
-
function toRefs(objectRef, options = {}) {
|
|
6123
|
-
if (!isRef(objectRef)) return toRefs$1(objectRef);
|
|
6124
|
-
const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};
|
|
6125
|
-
for (const key in objectRef.value) result[key] = customRef(() => ({
|
|
6126
|
-
get() {
|
|
6127
|
-
return objectRef.value[key];
|
|
6128
|
-
},
|
|
6129
|
-
set(v) {
|
|
6130
|
-
var _toValue;
|
|
6131
|
-
if ((_toValue = toValue(options.replaceRef)) !== null && _toValue !== void 0 ? _toValue : true) if (Array.isArray(objectRef.value)) {
|
|
6132
|
-
const copy = [...objectRef.value];
|
|
6133
|
-
copy[key] = v;
|
|
6134
|
-
objectRef.value = copy;
|
|
6135
|
-
} else {
|
|
6136
|
-
const newObject = {
|
|
6137
|
-
...objectRef.value,
|
|
6138
|
-
[key]: v
|
|
6139
|
-
};
|
|
6140
|
-
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
|
|
6141
|
-
objectRef.value = newObject;
|
|
6142
|
-
}
|
|
6143
|
-
else objectRef.value[key] = v;
|
|
6144
|
-
}
|
|
6145
|
-
}));
|
|
6146
|
-
return result;
|
|
6147
|
-
}
|
|
6148
|
-
/**
|
|
6149
6100
|
* Call onMounted() if it's inside a component lifecycle, if not, just call the function
|
|
6150
6101
|
*
|
|
6151
6102
|
* @param fn
|
|
@@ -6170,7 +6121,7 @@ function watchImmediate(source, cb, options) {
|
|
|
6170
6121
|
}
|
|
6171
6122
|
|
|
6172
6123
|
//#endregion
|
|
6173
|
-
//#region ../../node_modules/.pnpm/@vueuse+core@14.0.0_vue@3.5.
|
|
6124
|
+
//#region ../../node_modules/.pnpm/@vueuse+core@14.0.0_vue@3.5.24_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js
|
|
6174
6125
|
const defaultWindow = isClient ? window : void 0;
|
|
6175
6126
|
const defaultDocument = isClient ? window.document : void 0;
|
|
6176
6127
|
const defaultNavigator = isClient ? window.navigator : void 0;
|
|
@@ -6776,4 +6727,1145 @@ function useWindowSize(options = {}) {
|
|
|
6776
6727
|
}
|
|
6777
6728
|
|
|
6778
6729
|
//#endregion
|
|
6779
|
-
|
|
6730
|
+
//#region src/client/webcomponents/.generated/css.ts
|
|
6731
|
+
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))}}";
|
|
6732
|
+
|
|
6733
|
+
//#endregion
|
|
6734
|
+
//#region src/client/webcomponents/state/state.ts
|
|
6735
|
+
function useStateHandlers(context) {
|
|
6736
|
+
function importScript(entry) {
|
|
6737
|
+
const id = `${entry.type}:${entry.id}`;
|
|
6738
|
+
return import(
|
|
6739
|
+
/* @vite-ignore */
|
|
6740
|
+
["/.devtools", "imports"].join("-")
|
|
6741
|
+
).then((module) => {
|
|
6742
|
+
const importFn = module.importsMap[id];
|
|
6743
|
+
if (!importFn) return Promise.reject(/* @__PURE__ */ new Error(`[VITE DEVTOOLS] No import found for id: ${id}`));
|
|
6744
|
+
return importFn();
|
|
6745
|
+
}).catch((error) => {
|
|
6746
|
+
console.error("[VITE DEVTOOLS] Error executing import action", error);
|
|
6747
|
+
return Promise.reject(error);
|
|
6748
|
+
});
|
|
6749
|
+
}
|
|
6750
|
+
async function selectDockEntry(entry) {
|
|
6751
|
+
if (!entry) {
|
|
6752
|
+
context.panel.store.open = false;
|
|
6753
|
+
context.docks.selected = null;
|
|
6754
|
+
return;
|
|
6755
|
+
}
|
|
6756
|
+
if (context.docks.selected?.id === entry.id) return;
|
|
6757
|
+
const current = context.docks.getStateById(entry.id);
|
|
6758
|
+
const scriptContext = reactive({
|
|
6759
|
+
...toRefs(context),
|
|
6760
|
+
current
|
|
6761
|
+
});
|
|
6762
|
+
if (entry?.type === "action") return await importScript(entry).then((fn) => fn(scriptContext));
|
|
6763
|
+
context.docks.selected = entry;
|
|
6764
|
+
context.panel.store.open = true;
|
|
6765
|
+
if (entry.type === "custom-render" || entry.type === "iframe" && entry.clientScript) await importScript(entry).then((fn) => fn(scriptContext));
|
|
6766
|
+
}
|
|
6767
|
+
return { selectDockEntry };
|
|
6768
|
+
}
|
|
6769
|
+
|
|
6770
|
+
//#endregion
|
|
6771
|
+
//#region src/client/webcomponents/state/floating-tooltip.ts
|
|
6772
|
+
const state = shallowRef(null);
|
|
6773
|
+
function setFloatingTooltip(info) {
|
|
6774
|
+
state.value = info;
|
|
6775
|
+
}
|
|
6776
|
+
function useFloatingTooltip() {
|
|
6777
|
+
return state;
|
|
6778
|
+
}
|
|
6779
|
+
|
|
6780
|
+
//#endregion
|
|
6781
|
+
//#region \0/plugin-vue/export-helper
|
|
6782
|
+
var export_helper_default = (sfc, props) => {
|
|
6783
|
+
const target = sfc.__vccOpts || sfc;
|
|
6784
|
+
for (const [key, val] of props) target[key] = val;
|
|
6785
|
+
return target;
|
|
6786
|
+
};
|
|
6787
|
+
|
|
6788
|
+
//#endregion
|
|
6789
|
+
//#region src/client/webcomponents/components/icons/VitePlusCore.vue
|
|
6790
|
+
const _sfc_main$13 = {};
|
|
6791
|
+
const _hoisted_1$6 = {
|
|
6792
|
+
viewBox: "0 0 22 22",
|
|
6793
|
+
fill: "none",
|
|
6794
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
6795
|
+
};
|
|
6796
|
+
function _sfc_render$2(_ctx, _cache) {
|
|
6797
|
+
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)])]);
|
|
6798
|
+
}
|
|
6799
|
+
var VitePlusCore_default = /* @__PURE__ */ export_helper_default(_sfc_main$13, [["render", _sfc_render$2]]);
|
|
6800
|
+
|
|
6801
|
+
//#endregion
|
|
6802
|
+
//#region src/client/webcomponents/components/DockIcon.vue
|
|
6803
|
+
const _hoisted_1$5 = { key: 1 };
|
|
6804
|
+
const _hoisted_2 = ["srcset"];
|
|
6805
|
+
const _hoisted_3 = ["srcset"];
|
|
6806
|
+
const _hoisted_4 = ["src", "alt"];
|
|
6807
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
6808
|
+
__name: "DockIcon",
|
|
6809
|
+
props: {
|
|
6810
|
+
icon: {},
|
|
6811
|
+
title: {}
|
|
6812
|
+
},
|
|
6813
|
+
setup(__props) {
|
|
6814
|
+
const props = __props;
|
|
6815
|
+
function getIconUrl(str, color) {
|
|
6816
|
+
if (str.includes("/") || str.startsWith("data:") || str.startsWith("builtin:")) return str;
|
|
6817
|
+
const match = str.match(/^([\w-]+):([\w-]+)$/);
|
|
6818
|
+
if (match) {
|
|
6819
|
+
const [, collection, icon2] = match;
|
|
6820
|
+
return `https://api.iconify.design/${collection}/${icon2}.svg${color === "dark" ? "?color=%23eee" : "?color=%23111"}`;
|
|
6821
|
+
}
|
|
6822
|
+
return str;
|
|
6823
|
+
}
|
|
6824
|
+
const icon = computed(() => {
|
|
6825
|
+
if (typeof props.icon === "string") return {
|
|
6826
|
+
dark: getIconUrl(props.icon, "dark"),
|
|
6827
|
+
light: getIconUrl(props.icon, "light")
|
|
6828
|
+
};
|
|
6829
|
+
return {
|
|
6830
|
+
dark: getIconUrl(props.icon.dark, "dark"),
|
|
6831
|
+
light: getIconUrl(props.icon.light, "light")
|
|
6832
|
+
};
|
|
6833
|
+
});
|
|
6834
|
+
return (_ctx, _cache) => {
|
|
6835
|
+
return icon.value.light === "builtin:vite-plus-core" ? (openBlock(), createBlock(VitePlusCore_default, { key: 0 })) : (openBlock(), createElementBlock("picture", _hoisted_1$5, [
|
|
6836
|
+
createBaseVNode("source", {
|
|
6837
|
+
srcset: icon.value.dark,
|
|
6838
|
+
media: "(prefers-color-scheme: dark)"
|
|
6839
|
+
}, null, 8, _hoisted_2),
|
|
6840
|
+
createBaseVNode("source", {
|
|
6841
|
+
srcset: icon.value.light,
|
|
6842
|
+
media: "(prefers-color-scheme: light)"
|
|
6843
|
+
}, null, 8, _hoisted_3),
|
|
6844
|
+
createBaseVNode("img", {
|
|
6845
|
+
src: icon.value.light,
|
|
6846
|
+
alt: __props.title,
|
|
6847
|
+
class: "w-full h-full m-auto",
|
|
6848
|
+
draggable: "false"
|
|
6849
|
+
}, null, 8, _hoisted_4)
|
|
6850
|
+
]));
|
|
6851
|
+
};
|
|
6852
|
+
}
|
|
6853
|
+
});
|
|
6854
|
+
var DockIcon_default = _sfc_main$12;
|
|
6855
|
+
|
|
6856
|
+
//#endregion
|
|
6857
|
+
//#region src/client/webcomponents/components/DockEntry.vue
|
|
6858
|
+
const _hoisted_1$4 = ["title"];
|
|
6859
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
6860
|
+
__name: "DockEntry",
|
|
6861
|
+
props: {
|
|
6862
|
+
dock: {},
|
|
6863
|
+
isSelected: { type: Boolean },
|
|
6864
|
+
isDimmed: { type: Boolean },
|
|
6865
|
+
isVertical: { type: Boolean }
|
|
6866
|
+
},
|
|
6867
|
+
setup(__props) {
|
|
6868
|
+
const props = __props;
|
|
6869
|
+
const button = useTemplateRef("button");
|
|
6870
|
+
function updatePos() {
|
|
6871
|
+
const rect = button.value?.getBoundingClientRect();
|
|
6872
|
+
if (rect) setFloatingTooltip({
|
|
6873
|
+
text: props.dock.title,
|
|
6874
|
+
width: rect.width,
|
|
6875
|
+
height: rect.height,
|
|
6876
|
+
left: rect.left,
|
|
6877
|
+
top: rect.top
|
|
6878
|
+
});
|
|
6879
|
+
}
|
|
6880
|
+
function showTitle() {
|
|
6881
|
+
updatePos();
|
|
6882
|
+
}
|
|
6883
|
+
function clearTitle() {
|
|
6884
|
+
setFloatingTooltip(null);
|
|
6885
|
+
}
|
|
6886
|
+
useEventListener("pointerdown", () => {
|
|
6887
|
+
setFloatingTooltip(null);
|
|
6888
|
+
});
|
|
6889
|
+
return (_ctx, _cache) => {
|
|
6890
|
+
return openBlock(), createElementBlock("div", {
|
|
6891
|
+
key: __props.dock.id,
|
|
6892
|
+
class: "relative group vite-devtools-dock-entry",
|
|
6893
|
+
onPointerenter: showTitle,
|
|
6894
|
+
onPointerleave: clearTitle
|
|
6895
|
+
}, [createBaseVNode("button", {
|
|
6896
|
+
ref_key: "button",
|
|
6897
|
+
ref: button,
|
|
6898
|
+
title: __props.dock.title,
|
|
6899
|
+
class: normalizeClass([[
|
|
6900
|
+
__props.isVertical ? "rotate-270" : "",
|
|
6901
|
+
__props.isDimmed ? "op50 saturate-0" : "",
|
|
6902
|
+
__props.isSelected ? "scale-120 text-purple" : ""
|
|
6903
|
+
], "flex items-center justify-center p1.5 rounded-xl hover:bg-[#8881] hover:scale-120 transition-all duration-300 relative"])
|
|
6904
|
+
}, [createVNode(DockIcon_default, {
|
|
6905
|
+
icon: __props.dock.icon,
|
|
6906
|
+
title: __props.dock.title,
|
|
6907
|
+
class: "w-5 h-5 select-none"
|
|
6908
|
+
}, null, 8, ["icon", "title"])], 10, _hoisted_1$4)], 32);
|
|
6909
|
+
};
|
|
6910
|
+
}
|
|
6911
|
+
});
|
|
6912
|
+
var DockEntry_default = _sfc_main$11;
|
|
6913
|
+
|
|
6914
|
+
//#endregion
|
|
6915
|
+
//#region src/client/webcomponents/components/DockEntries.vue
|
|
6916
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
6917
|
+
__name: "DockEntries",
|
|
6918
|
+
props: {
|
|
6919
|
+
entries: {},
|
|
6920
|
+
selected: {},
|
|
6921
|
+
isVertical: { type: Boolean }
|
|
6922
|
+
},
|
|
6923
|
+
emits: ["select"],
|
|
6924
|
+
setup(__props, { emit: __emit }) {
|
|
6925
|
+
const props = __props;
|
|
6926
|
+
const emit$2 = __emit;
|
|
6927
|
+
const { selected, isVertical, entries } = toRefs(props);
|
|
6928
|
+
function toggleDockEntry(dock) {
|
|
6929
|
+
if (selected.value?.id === dock.id) emit$2("select", void 0);
|
|
6930
|
+
else emit$2("select", dock);
|
|
6931
|
+
}
|
|
6932
|
+
return (_ctx, _cache) => {
|
|
6933
|
+
return openBlock(), createElementBlock("div", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(entries), (dock) => {
|
|
6934
|
+
return openBlock(), createBlock(DockEntry_default, {
|
|
6935
|
+
key: dock.id,
|
|
6936
|
+
dock,
|
|
6937
|
+
"is-selected": unref(selected)?.id === dock.id,
|
|
6938
|
+
"is-dimmed": unref(selected) ? unref(selected).id !== dock.id : false,
|
|
6939
|
+
"is-vertical": unref(isVertical),
|
|
6940
|
+
onClick: ($event) => toggleDockEntry(dock)
|
|
6941
|
+
}, null, 8, [
|
|
6942
|
+
"dock",
|
|
6943
|
+
"is-selected",
|
|
6944
|
+
"is-dimmed",
|
|
6945
|
+
"is-vertical",
|
|
6946
|
+
"onClick"
|
|
6947
|
+
]);
|
|
6948
|
+
}), 128))]);
|
|
6949
|
+
};
|
|
6950
|
+
}
|
|
6951
|
+
});
|
|
6952
|
+
var DockEntries_default = _sfc_main$10;
|
|
6953
|
+
|
|
6954
|
+
//#endregion
|
|
6955
|
+
//#region src/client/webcomponents/components/icons/BracketLeft.vue
|
|
6956
|
+
const _sfc_main$9 = {};
|
|
6957
|
+
const _hoisted_1$3 = {
|
|
6958
|
+
viewBox: "0 0 9 20",
|
|
6959
|
+
fill: "none",
|
|
6960
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
6961
|
+
};
|
|
6962
|
+
function _sfc_render$1(_ctx, _cache) {
|
|
6963
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
6964
|
+
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",
|
|
6965
|
+
class: "fill-black dark:fill-white"
|
|
6966
|
+
}, null, -1)])]);
|
|
6967
|
+
}
|
|
6968
|
+
var BracketLeft_default = /* @__PURE__ */ export_helper_default(_sfc_main$9, [["render", _sfc_render$1]]);
|
|
6969
|
+
|
|
6970
|
+
//#endregion
|
|
6971
|
+
//#region src/client/webcomponents/components/icons/BracketRight.vue
|
|
6972
|
+
const _sfc_main$8 = {};
|
|
6973
|
+
const _hoisted_1$2 = {
|
|
6974
|
+
viewBox: "0 0 9 20",
|
|
6975
|
+
fill: "none",
|
|
6976
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
6977
|
+
};
|
|
6978
|
+
function _sfc_render(_ctx, _cache) {
|
|
6979
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [createBaseVNode("path", {
|
|
6980
|
+
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",
|
|
6981
|
+
class: "fill-black dark:fill-white"
|
|
6982
|
+
}, null, -1)])]);
|
|
6983
|
+
}
|
|
6984
|
+
var BracketRight_default = /* @__PURE__ */ export_helper_default(_sfc_main$8, [["render", _sfc_render]]);
|
|
6985
|
+
|
|
6986
|
+
//#endregion
|
|
6987
|
+
//#region src/client/webcomponents/components/Dock.vue
|
|
6988
|
+
const PANEL_MARGIN = 5;
|
|
6989
|
+
const SNAP_THRESHOLD = 2;
|
|
6990
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
6991
|
+
__name: "Dock",
|
|
6992
|
+
props: { context: {} },
|
|
6993
|
+
setup(__props) {
|
|
6994
|
+
const context = __props.context;
|
|
6995
|
+
const isSafari = navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome");
|
|
6996
|
+
const panelMargins = reactive({
|
|
6997
|
+
left: PANEL_MARGIN,
|
|
6998
|
+
top: PANEL_MARGIN,
|
|
6999
|
+
right: PANEL_MARGIN,
|
|
7000
|
+
bottom: PANEL_MARGIN
|
|
7001
|
+
});
|
|
7002
|
+
const safeArea = useScreenSafeArea();
|
|
7003
|
+
function toNumber$1(value) {
|
|
7004
|
+
const num = +value;
|
|
7005
|
+
if (Number.isNaN(num)) return 0;
|
|
7006
|
+
return num;
|
|
7007
|
+
}
|
|
7008
|
+
watchEffect(() => {
|
|
7009
|
+
panelMargins.left = toNumber$1(safeArea.left.value) + PANEL_MARGIN;
|
|
7010
|
+
panelMargins.top = toNumber$1(safeArea.top.value) + PANEL_MARGIN;
|
|
7011
|
+
panelMargins.right = toNumber$1(safeArea.right.value) + PANEL_MARGIN;
|
|
7012
|
+
panelMargins.bottom = toNumber$1(safeArea.bottom.value) + PANEL_MARGIN;
|
|
7013
|
+
});
|
|
7014
|
+
const dockEl = useTemplateRef("dockEl");
|
|
7015
|
+
const anchorEl = useTemplateRef("anchorEl");
|
|
7016
|
+
const recalculateCounter = ref(0);
|
|
7017
|
+
const isHovering = ref(false);
|
|
7018
|
+
const windowSize = reactive({
|
|
7019
|
+
width: window.innerWidth,
|
|
7020
|
+
height: window.innerHeight
|
|
7021
|
+
});
|
|
7022
|
+
const draggingOffset = reactive({
|
|
7023
|
+
x: 0,
|
|
7024
|
+
y: 0
|
|
7025
|
+
});
|
|
7026
|
+
const mousePosition = reactive({
|
|
7027
|
+
x: 0,
|
|
7028
|
+
y: 0
|
|
7029
|
+
});
|
|
7030
|
+
function onPointerDown(e) {
|
|
7031
|
+
if (!dockEl.value) return;
|
|
7032
|
+
context.panel.isDragging = true;
|
|
7033
|
+
const { left, top, width, height } = dockEl.value.getBoundingClientRect();
|
|
7034
|
+
draggingOffset.x = e.clientX - left - width / 2;
|
|
7035
|
+
draggingOffset.y = e.clientY - top - height / 2;
|
|
7036
|
+
}
|
|
7037
|
+
onMounted(() => {
|
|
7038
|
+
windowSize.width = window.innerWidth;
|
|
7039
|
+
windowSize.height = window.innerHeight;
|
|
7040
|
+
useEventListener(window, "resize", () => {
|
|
7041
|
+
windowSize.width = window.innerWidth;
|
|
7042
|
+
windowSize.height = window.innerHeight;
|
|
7043
|
+
});
|
|
7044
|
+
useEventListener(window, "pointermove", (e) => {
|
|
7045
|
+
if (!context.panel.isDragging) return;
|
|
7046
|
+
const store = context.panel.store;
|
|
7047
|
+
const centerX = window.innerWidth / 2;
|
|
7048
|
+
const centerY = window.innerHeight / 2;
|
|
7049
|
+
const x = e.clientX - draggingOffset.x;
|
|
7050
|
+
const y = e.clientY - draggingOffset.y;
|
|
7051
|
+
if (Number.isNaN(x) || Number.isNaN(y)) return;
|
|
7052
|
+
mousePosition.x = x;
|
|
7053
|
+
mousePosition.y = y;
|
|
7054
|
+
const deg = Math.atan2(y - centerY, x - centerX);
|
|
7055
|
+
const HORIZONTAL_MARGIN = 70;
|
|
7056
|
+
const TL = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, 0 - centerX);
|
|
7057
|
+
const TR = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, window.innerWidth - centerX);
|
|
7058
|
+
const BL = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, 0 - centerX);
|
|
7059
|
+
const BR = Math.atan2(window.innerHeight - HORIZONTAL_MARGIN - centerY, window.innerWidth - centerX);
|
|
7060
|
+
store.position = deg >= TL && deg <= TR ? "top" : deg >= TR && deg <= BR ? "right" : deg >= BR && deg <= BL ? "bottom" : "left";
|
|
7061
|
+
store.left = snapToPoints(x / window.innerWidth * 100);
|
|
7062
|
+
store.top = snapToPoints(y / window.innerHeight * 100);
|
|
7063
|
+
});
|
|
7064
|
+
useEventListener(window, "pointerup", () => {
|
|
7065
|
+
context.panel.isDragging = false;
|
|
7066
|
+
});
|
|
7067
|
+
useEventListener(window, "pointerleave", () => {
|
|
7068
|
+
context.panel.isDragging = false;
|
|
7069
|
+
});
|
|
7070
|
+
});
|
|
7071
|
+
function snapToPoints(value) {
|
|
7072
|
+
if (value < 5) return 0;
|
|
7073
|
+
if (value > 95) return 100;
|
|
7074
|
+
if (Math.abs(value - 50) < SNAP_THRESHOLD) return 50;
|
|
7075
|
+
return value;
|
|
7076
|
+
}
|
|
7077
|
+
function clamp$1(value, min, max) {
|
|
7078
|
+
return Math.min(Math.max(value, min), max);
|
|
7079
|
+
}
|
|
7080
|
+
const anchorPos = computed(() => {
|
|
7081
|
+
recalculateCounter.value;
|
|
7082
|
+
const store = context.panel.store;
|
|
7083
|
+
const halfWidth = (dockEl.value?.clientWidth || 0) / 2;
|
|
7084
|
+
const halfHeight = (dockEl.value?.clientHeight || 0) / 2;
|
|
7085
|
+
const left = store.left * windowSize.width / 100;
|
|
7086
|
+
const top = store.top * windowSize.height / 100;
|
|
7087
|
+
switch (store.position) {
|
|
7088
|
+
case "top": return {
|
|
7089
|
+
left: clamp$1(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
|
|
7090
|
+
top: panelMargins.top + halfHeight
|
|
7091
|
+
};
|
|
7092
|
+
case "right": return {
|
|
7093
|
+
left: windowSize.width - panelMargins.right - halfHeight,
|
|
7094
|
+
top: clamp$1(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
|
|
7095
|
+
};
|
|
7096
|
+
case "left": return {
|
|
7097
|
+
left: panelMargins.left + halfHeight,
|
|
7098
|
+
top: clamp$1(top, halfWidth + panelMargins.top, windowSize.height - halfWidth - panelMargins.bottom)
|
|
7099
|
+
};
|
|
7100
|
+
case "bottom":
|
|
7101
|
+
default: return {
|
|
7102
|
+
left: clamp$1(left, halfWidth + panelMargins.left, windowSize.width - halfWidth - panelMargins.right),
|
|
7103
|
+
top: windowSize.height - panelMargins.bottom - halfHeight
|
|
7104
|
+
};
|
|
7105
|
+
}
|
|
7106
|
+
});
|
|
7107
|
+
let _timer = null;
|
|
7108
|
+
function bringUp() {
|
|
7109
|
+
isHovering.value = true;
|
|
7110
|
+
if (context.panel.store.inactiveTimeout < 0) return;
|
|
7111
|
+
if (_timer) clearTimeout(_timer);
|
|
7112
|
+
_timer = setTimeout(() => {
|
|
7113
|
+
isHovering.value = false;
|
|
7114
|
+
}, +context.panel.store.inactiveTimeout || 0);
|
|
7115
|
+
}
|
|
7116
|
+
const isHidden = computed(() => false);
|
|
7117
|
+
const isMinimized = computed(() => {
|
|
7118
|
+
if (context.panel.store.inactiveTimeout < 0) return false;
|
|
7119
|
+
if (context.panel.store.inactiveTimeout === 0) return true;
|
|
7120
|
+
const isTouchDevice = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
7121
|
+
return !context.panel.isDragging && !context.panel.store.open && !isHovering.value && !isTouchDevice && context.panel.store.inactiveTimeout;
|
|
7122
|
+
});
|
|
7123
|
+
const anchorStyle = computed(() => {
|
|
7124
|
+
return {
|
|
7125
|
+
left: `${anchorPos.value.left}px`,
|
|
7126
|
+
top: `${anchorPos.value.top}px`,
|
|
7127
|
+
pointerEvents: isHidden.value ? "none" : "auto"
|
|
7128
|
+
};
|
|
7129
|
+
});
|
|
7130
|
+
const panelStyle = computed(() => {
|
|
7131
|
+
const style = { transform: context.panel.isVertical ? `translate(-50%, -50%) rotate(90deg)` : `translate(-50%, -50%)` };
|
|
7132
|
+
if (isHidden.value) {
|
|
7133
|
+
style.opacity = 0;
|
|
7134
|
+
style.pointerEvents = "none";
|
|
7135
|
+
}
|
|
7136
|
+
if (context.panel.isDragging) style.transition = "none !important";
|
|
7137
|
+
return style;
|
|
7138
|
+
});
|
|
7139
|
+
const { selectDockEntry } = useStateHandlers(context);
|
|
7140
|
+
onMounted(() => {
|
|
7141
|
+
bringUp();
|
|
7142
|
+
recalculateCounter.value++;
|
|
7143
|
+
});
|
|
7144
|
+
return (_ctx, _cache) => {
|
|
7145
|
+
return openBlock(), createElementBlock("div", {
|
|
7146
|
+
id: "vite-devtools-anchor",
|
|
7147
|
+
ref_key: "anchorEl",
|
|
7148
|
+
ref: anchorEl,
|
|
7149
|
+
style: normalizeStyle([anchorStyle.value]),
|
|
7150
|
+
class: normalizeClass({
|
|
7151
|
+
"vite-devtools-horizontal": !unref(context).panel.isVertical,
|
|
7152
|
+
"vite-devtools-vertical": unref(context).panel.isVertical,
|
|
7153
|
+
"vite-devtools-minimized": isMinimized.value
|
|
7154
|
+
}),
|
|
7155
|
+
onMousemove: bringUp
|
|
7156
|
+
}, [
|
|
7157
|
+
!unref(isSafari) ? (openBlock(), createElementBlock("div", {
|
|
7158
|
+
key: 0,
|
|
7159
|
+
id: "vite-devtools-glowing",
|
|
7160
|
+
class: normalizeClass(unref(context).panel.isDragging ? "op60!" : "")
|
|
7161
|
+
}, null, 2)) : createCommentVNode("v-if", true),
|
|
7162
|
+
createBaseVNode("div", {
|
|
7163
|
+
id: "vite-devtools-dock-container",
|
|
7164
|
+
ref_key: "dockEl",
|
|
7165
|
+
ref: dockEl,
|
|
7166
|
+
style: normalizeStyle(panelStyle.value)
|
|
7167
|
+
}, [createBaseVNode("div", {
|
|
7168
|
+
id: "vite-devtools-dock",
|
|
7169
|
+
onPointerdown: onPointerDown
|
|
7170
|
+
}, [
|
|
7171
|
+
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" }),
|
|
7172
|
+
createVNode(BracketRight_default, { class: normalizeClass(["vite-devtools-dock-bracket absolute right--1 top-1/2 translate-y--1/2 bottom-0 w-2.5 op75 transition-opacity duration-300", unref(context).panel.isVertical ? "scale-y--100" : ""]) }, null, 8, ["class"]),
|
|
7173
|
+
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"]),
|
|
7174
|
+
createVNode(DockEntries_default, {
|
|
7175
|
+
entries: unref(context).docks.entries,
|
|
7176
|
+
class: normalizeClass(["transition duration-200 flex items-center w-full h-full justify-center", isMinimized.value ? "opacity-0 pointer-events-none" : "opacity-100"]),
|
|
7177
|
+
"is-vertical": unref(context).panel.isVertical,
|
|
7178
|
+
selected: unref(context).docks.selected,
|
|
7179
|
+
onSelect: unref(selectDockEntry)
|
|
7180
|
+
}, null, 8, [
|
|
7181
|
+
"entries",
|
|
7182
|
+
"class",
|
|
7183
|
+
"is-vertical",
|
|
7184
|
+
"selected",
|
|
7185
|
+
"onSelect"
|
|
7186
|
+
])
|
|
7187
|
+
], 32)], 4),
|
|
7188
|
+
renderSlot(_ctx.$slots, "default", {
|
|
7189
|
+
context: unref(context),
|
|
7190
|
+
dockEl: dockEl.value,
|
|
7191
|
+
selected: unref(context).docks.selected,
|
|
7192
|
+
panelMargins
|
|
7193
|
+
})
|
|
7194
|
+
], 38);
|
|
7195
|
+
};
|
|
7196
|
+
}
|
|
7197
|
+
});
|
|
7198
|
+
var Dock_default = _sfc_main$7;
|
|
7199
|
+
|
|
7200
|
+
//#endregion
|
|
7201
|
+
//#region src/client/webcomponents/utils/PresistedDomViewsManager.ts
|
|
7202
|
+
var PresistedDomViewsManager = class {
|
|
7203
|
+
holders = {};
|
|
7204
|
+
constructor(container) {
|
|
7205
|
+
this.container = container;
|
|
7206
|
+
}
|
|
7207
|
+
getHolder(id, _type) {
|
|
7208
|
+
return this.holders[id];
|
|
7209
|
+
}
|
|
7210
|
+
getOrCreateHolder(id, type) {
|
|
7211
|
+
if (!this.container.value) throw new Error("[VITE DEVTOOLS] PresistedDomViewsManager: container is not set");
|
|
7212
|
+
let holder;
|
|
7213
|
+
if (!this.holders[id]) {
|
|
7214
|
+
const el = document.createElement(type);
|
|
7215
|
+
this.holders[id] = new PresistedDomHolder(id, el);
|
|
7216
|
+
this.container.value.appendChild(el);
|
|
7217
|
+
holder = this.holders[id];
|
|
7218
|
+
} else holder = this.holders[id];
|
|
7219
|
+
return holder;
|
|
7220
|
+
}
|
|
7221
|
+
removeHolder(id) {
|
|
7222
|
+
const holder = this.holders[id];
|
|
7223
|
+
if (!holder) return false;
|
|
7224
|
+
holder.unmount();
|
|
7225
|
+
holder.element.remove();
|
|
7226
|
+
delete this.holders[id];
|
|
7227
|
+
return true;
|
|
7228
|
+
}
|
|
7229
|
+
};
|
|
7230
|
+
var PresistedDomHolder = class {
|
|
7231
|
+
element;
|
|
7232
|
+
id;
|
|
7233
|
+
parent;
|
|
7234
|
+
_cleanups = [];
|
|
7235
|
+
constructor(id, iframe) {
|
|
7236
|
+
this.id = id;
|
|
7237
|
+
this.element = iframe;
|
|
7238
|
+
}
|
|
7239
|
+
cleanup() {
|
|
7240
|
+
this._cleanups.forEach((cleanup) => cleanup());
|
|
7241
|
+
this._cleanups = [];
|
|
7242
|
+
}
|
|
7243
|
+
mount(parent) {
|
|
7244
|
+
if (this.parent === parent) {
|
|
7245
|
+
this.show();
|
|
7246
|
+
return;
|
|
7247
|
+
}
|
|
7248
|
+
this.cleanup();
|
|
7249
|
+
this.parent = parent;
|
|
7250
|
+
const func = () => this.update();
|
|
7251
|
+
window.addEventListener("resize", func);
|
|
7252
|
+
this._cleanups.push(() => window.removeEventListener("resize", func));
|
|
7253
|
+
this.show();
|
|
7254
|
+
}
|
|
7255
|
+
hide() {
|
|
7256
|
+
this.element.style.display = "none";
|
|
7257
|
+
}
|
|
7258
|
+
show() {
|
|
7259
|
+
this.element.style.display = "block";
|
|
7260
|
+
this.update();
|
|
7261
|
+
}
|
|
7262
|
+
update() {
|
|
7263
|
+
if (!this.parent) return;
|
|
7264
|
+
const rect = this.parent.getBoundingClientRect();
|
|
7265
|
+
this.element.style.position = "absolute";
|
|
7266
|
+
this.element.style.width = `${rect.width}px`;
|
|
7267
|
+
this.element.style.height = `${rect.height}px`;
|
|
7268
|
+
}
|
|
7269
|
+
unmount() {
|
|
7270
|
+
this.cleanup();
|
|
7271
|
+
this.hide();
|
|
7272
|
+
this.parent = void 0;
|
|
7273
|
+
}
|
|
7274
|
+
};
|
|
7275
|
+
|
|
7276
|
+
//#endregion
|
|
7277
|
+
//#region src/client/webcomponents/components/DockPanelResizer.vue
|
|
7278
|
+
const PANEL_MIN = 20;
|
|
7279
|
+
const PANEL_MAX = 100;
|
|
7280
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
7281
|
+
__name: "DockPanelResizer",
|
|
7282
|
+
props: { panel: {} },
|
|
7283
|
+
setup(__props) {
|
|
7284
|
+
const props = __props;
|
|
7285
|
+
const container = ref();
|
|
7286
|
+
const resizingState = ref(false);
|
|
7287
|
+
function handleResize(e) {
|
|
7288
|
+
if (!resizingState.value) return;
|
|
7289
|
+
const box = container.value?.getBoundingClientRect();
|
|
7290
|
+
if (!box) return;
|
|
7291
|
+
const store = props.panel.store;
|
|
7292
|
+
let widthPx, heightPx;
|
|
7293
|
+
if (resizingState.value.right) {
|
|
7294
|
+
widthPx = Math.abs(e instanceof MouseEvent ? e.clientX : (e.touches[0]?.clientX || 0) - (box?.left || 0));
|
|
7295
|
+
store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
|
|
7296
|
+
} else if (resizingState.value.left) {
|
|
7297
|
+
widthPx = Math.abs((box?.right || 0) - (e instanceof MouseEvent ? e.clientX : e.touches[0]?.clientX || 0));
|
|
7298
|
+
store.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100));
|
|
7299
|
+
}
|
|
7300
|
+
if (resizingState.value.top) {
|
|
7301
|
+
heightPx = Math.abs((box?.bottom || 0) - (e instanceof MouseEvent ? e.clientY : e.touches[0]?.clientY || 0));
|
|
7302
|
+
store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
|
|
7303
|
+
} else if (resizingState.value.bottom) {
|
|
7304
|
+
heightPx = Math.abs(e instanceof MouseEvent ? e.clientY : (e.touches[0]?.clientY || 0) - (box?.top || 0));
|
|
7305
|
+
store.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100));
|
|
7306
|
+
}
|
|
7307
|
+
}
|
|
7308
|
+
useEventListener(window, "mousemove", handleResize);
|
|
7309
|
+
useEventListener(window, "touchmove", handleResize);
|
|
7310
|
+
useEventListener(window, "mouseup", () => resizingState.value = false);
|
|
7311
|
+
useEventListener(window, "touchend", () => resizingState.value = false);
|
|
7312
|
+
useEventListener(window, "mouseleave", () => resizingState.value = false);
|
|
7313
|
+
watch(resizingState, (value) => {
|
|
7314
|
+
props.panel.isResizing = !!value;
|
|
7315
|
+
}, { flush: "sync" });
|
|
7316
|
+
return (_ctx, _cache) => {
|
|
7317
|
+
return openBlock(), createElementBlock("div", {
|
|
7318
|
+
id: "vite-devtools-resize-container",
|
|
7319
|
+
ref_key: "container",
|
|
7320
|
+
ref: container,
|
|
7321
|
+
class: "w-full h-full absolute left-0 right-0 bottom-0 top-0 antialiased"
|
|
7322
|
+
}, [
|
|
7323
|
+
createCommentVNode(" Handlers "),
|
|
7324
|
+
withDirectives(createBaseVNode("div", {
|
|
7325
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
|
|
7326
|
+
style: { top: 0 },
|
|
7327
|
+
onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => resizingState.value = { top: true }, ["prevent"])),
|
|
7328
|
+
onTouchstartPassive: _cache[1] || (_cache[1] = () => resizingState.value = { top: true })
|
|
7329
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "top"]]),
|
|
7330
|
+
withDirectives(createBaseVNode("div", {
|
|
7331
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-horizontal",
|
|
7332
|
+
style: { bottom: 0 },
|
|
7333
|
+
onMousedown: _cache[2] || (_cache[2] = withModifiers(() => resizingState.value = { bottom: true }, ["prevent"])),
|
|
7334
|
+
onTouchstartPassive: _cache[3] || (_cache[3] = () => resizingState.value = { bottom: true })
|
|
7335
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "bottom"]]),
|
|
7336
|
+
withDirectives(createBaseVNode("div", {
|
|
7337
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
|
|
7338
|
+
style: { left: 0 },
|
|
7339
|
+
onMousedown: _cache[4] || (_cache[4] = withModifiers(() => resizingState.value = { left: true }, ["prevent"])),
|
|
7340
|
+
onTouchstartPassive: _cache[5] || (_cache[5] = () => resizingState.value = { left: true })
|
|
7341
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "left"]]),
|
|
7342
|
+
withDirectives(createBaseVNode("div", {
|
|
7343
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-vertical",
|
|
7344
|
+
style: { right: 0 },
|
|
7345
|
+
onMousedown: _cache[6] || (_cache[6] = withModifiers(() => resizingState.value = { right: true }, ["prevent"])),
|
|
7346
|
+
onTouchstartPassive: _cache[7] || (_cache[7] = () => resizingState.value = { right: true })
|
|
7347
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "right"]]),
|
|
7348
|
+
withDirectives(createBaseVNode("div", {
|
|
7349
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
7350
|
+
style: {
|
|
7351
|
+
top: 0,
|
|
7352
|
+
left: 0,
|
|
7353
|
+
cursor: "nwse-resize"
|
|
7354
|
+
},
|
|
7355
|
+
onMousedown: _cache[8] || (_cache[8] = withModifiers(() => resizingState.value = {
|
|
7356
|
+
top: true,
|
|
7357
|
+
left: true
|
|
7358
|
+
}, ["prevent"])),
|
|
7359
|
+
onTouchstartPassive: _cache[9] || (_cache[9] = () => resizingState.value = {
|
|
7360
|
+
top: true,
|
|
7361
|
+
left: true
|
|
7362
|
+
})
|
|
7363
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "left"]]),
|
|
7364
|
+
withDirectives(createBaseVNode("div", {
|
|
7365
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
7366
|
+
style: {
|
|
7367
|
+
top: 0,
|
|
7368
|
+
right: 0,
|
|
7369
|
+
cursor: "nesw-resize"
|
|
7370
|
+
},
|
|
7371
|
+
onMousedown: _cache[10] || (_cache[10] = withModifiers(() => resizingState.value = {
|
|
7372
|
+
top: true,
|
|
7373
|
+
right: true
|
|
7374
|
+
}, ["prevent"])),
|
|
7375
|
+
onTouchstartPassive: _cache[11] || (_cache[11] = () => resizingState.value = {
|
|
7376
|
+
top: true,
|
|
7377
|
+
right: true
|
|
7378
|
+
})
|
|
7379
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "top" && __props.panel.store.position !== "right"]]),
|
|
7380
|
+
withDirectives(createBaseVNode("div", {
|
|
7381
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
7382
|
+
style: {
|
|
7383
|
+
bottom: 0,
|
|
7384
|
+
left: 0,
|
|
7385
|
+
cursor: "nesw-resize"
|
|
7386
|
+
},
|
|
7387
|
+
onMousedown: _cache[12] || (_cache[12] = withModifiers(() => resizingState.value = {
|
|
7388
|
+
bottom: true,
|
|
7389
|
+
left: true
|
|
7390
|
+
}, ["prevent"])),
|
|
7391
|
+
onTouchstartPassive: _cache[13] || (_cache[13] = () => resizingState.value = {
|
|
7392
|
+
bottom: true,
|
|
7393
|
+
left: true
|
|
7394
|
+
})
|
|
7395
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "left"]]),
|
|
7396
|
+
withDirectives(createBaseVNode("div", {
|
|
7397
|
+
class: "vite-devtools-resize-handle vite-devtools-resize-handle-corner",
|
|
7398
|
+
style: {
|
|
7399
|
+
bottom: 0,
|
|
7400
|
+
right: 0,
|
|
7401
|
+
cursor: "nwse-resize"
|
|
7402
|
+
},
|
|
7403
|
+
onMousedown: _cache[14] || (_cache[14] = withModifiers(() => resizingState.value = {
|
|
7404
|
+
bottom: true,
|
|
7405
|
+
right: true
|
|
7406
|
+
}, ["prevent"])),
|
|
7407
|
+
onTouchstartPassive: _cache[15] || (_cache[15] = () => resizingState.value = {
|
|
7408
|
+
bottom: true,
|
|
7409
|
+
right: true
|
|
7410
|
+
})
|
|
7411
|
+
}, null, 544), [[vShow, __props.panel.store.position !== "bottom" && __props.panel.store.position !== "right"]])
|
|
7412
|
+
], 512);
|
|
7413
|
+
};
|
|
7414
|
+
}
|
|
7415
|
+
});
|
|
7416
|
+
var DockPanelResizer_default = _sfc_main$6;
|
|
7417
|
+
|
|
7418
|
+
//#endregion
|
|
7419
|
+
//#region src/client/webcomponents/components/ViewCustomRenderer.vue
|
|
7420
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
7421
|
+
__name: "ViewCustomRenderer",
|
|
7422
|
+
props: {
|
|
7423
|
+
context: {},
|
|
7424
|
+
entry: {},
|
|
7425
|
+
presistedDoms: {},
|
|
7426
|
+
divStyle: {}
|
|
7427
|
+
},
|
|
7428
|
+
setup(__props) {
|
|
7429
|
+
const props = __props;
|
|
7430
|
+
const isLoading = ref(true);
|
|
7431
|
+
const viewFrame = useTemplateRef("viewFrame");
|
|
7432
|
+
onMounted(() => {
|
|
7433
|
+
const holder = props.presistedDoms.getOrCreateHolder(props.entry.id, "div");
|
|
7434
|
+
holder.element.style.boxShadow = "none";
|
|
7435
|
+
holder.element.style.outline = "none";
|
|
7436
|
+
Object.assign(holder.element.style, props.divStyle);
|
|
7437
|
+
const entryState = props.context.docks.getStateById(props.entry.id);
|
|
7438
|
+
if (entryState) entryState.domElements.panel = holder.element;
|
|
7439
|
+
holder.mount(viewFrame.value);
|
|
7440
|
+
isLoading.value = false;
|
|
7441
|
+
nextTick(() => {
|
|
7442
|
+
holder.update();
|
|
7443
|
+
});
|
|
7444
|
+
watch(() => props.context.panel, () => {
|
|
7445
|
+
holder.update();
|
|
7446
|
+
}, { deep: true });
|
|
7447
|
+
watchEffect(() => {
|
|
7448
|
+
holder.element.style.pointerEvents = props.context.panel.isDragging || props.context.panel.isResizing ? "none" : "auto";
|
|
7449
|
+
}, { flush: "sync" });
|
|
7450
|
+
});
|
|
7451
|
+
onUnmounted(() => {
|
|
7452
|
+
props.presistedDoms.getHolder(props.entry.id, "div")?.unmount();
|
|
7453
|
+
});
|
|
7454
|
+
return (_ctx, _cache) => {
|
|
7455
|
+
return openBlock(), createElementBlock("div", {
|
|
7456
|
+
ref_key: "viewFrame",
|
|
7457
|
+
ref: viewFrame,
|
|
7458
|
+
class: "vite-devtools-view-custom-renderer w-full h-full flex items-center justify-center"
|
|
7459
|
+
}, null, 512);
|
|
7460
|
+
};
|
|
7461
|
+
}
|
|
7462
|
+
});
|
|
7463
|
+
var ViewCustomRenderer_default = _sfc_main$5;
|
|
7464
|
+
|
|
7465
|
+
//#endregion
|
|
7466
|
+
//#region src/client/webcomponents/components/ViewIframe.vue
|
|
7467
|
+
const _hoisted_1$1 = {
|
|
7468
|
+
key: 0,
|
|
7469
|
+
class: "op50 z--1"
|
|
7470
|
+
};
|
|
7471
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
7472
|
+
__name: "ViewIframe",
|
|
7473
|
+
props: {
|
|
7474
|
+
context: {},
|
|
7475
|
+
entry: {},
|
|
7476
|
+
presistedDoms: {},
|
|
7477
|
+
iframeStyle: {}
|
|
7478
|
+
},
|
|
7479
|
+
setup(__props) {
|
|
7480
|
+
const props = __props;
|
|
7481
|
+
const isLoading = ref(true);
|
|
7482
|
+
const viewFrame = useTemplateRef("viewFrame");
|
|
7483
|
+
onMounted(() => {
|
|
7484
|
+
const holder = props.presistedDoms.getOrCreateHolder(props.entry.id, "iframe");
|
|
7485
|
+
holder.element.style.boxShadow = "none";
|
|
7486
|
+
holder.element.style.outline = "none";
|
|
7487
|
+
Object.assign(holder.element.style, props.iframeStyle);
|
|
7488
|
+
if (!holder.element.src) holder.element.src = props.entry.url;
|
|
7489
|
+
const entryState = props.context.docks.getStateById(props.entry.id);
|
|
7490
|
+
if (entryState) entryState.domElements.iframe = holder.element;
|
|
7491
|
+
holder.mount(viewFrame.value);
|
|
7492
|
+
isLoading.value = false;
|
|
7493
|
+
nextTick(() => {
|
|
7494
|
+
holder.update();
|
|
7495
|
+
});
|
|
7496
|
+
watch(() => props.context.panel, () => {
|
|
7497
|
+
holder.update();
|
|
7498
|
+
}, { deep: true });
|
|
7499
|
+
watchEffect(() => {
|
|
7500
|
+
holder.element.style.pointerEvents = props.context.panel.isDragging || props.context.panel.isResizing ? "none" : "auto";
|
|
7501
|
+
}, { flush: "sync" });
|
|
7502
|
+
});
|
|
7503
|
+
onUnmounted(() => {
|
|
7504
|
+
props.presistedDoms.getHolder(props.entry.id, "iframe")?.unmount();
|
|
7505
|
+
});
|
|
7506
|
+
return (_ctx, _cache) => {
|
|
7507
|
+
return openBlock(), createElementBlock("div", {
|
|
7508
|
+
ref_key: "viewFrame",
|
|
7509
|
+
ref: viewFrame,
|
|
7510
|
+
class: "vite-devtools-view-iframe w-full h-full flex items-center justify-center"
|
|
7511
|
+
}, [isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, " Loading iframe... ")) : createCommentVNode("v-if", true)], 512);
|
|
7512
|
+
};
|
|
7513
|
+
}
|
|
7514
|
+
});
|
|
7515
|
+
var ViewIframe_default = _sfc_main$4;
|
|
7516
|
+
|
|
7517
|
+
//#endregion
|
|
7518
|
+
//#region src/client/webcomponents/components/ViewEntry.vue
|
|
7519
|
+
const _hoisted_1 = { key: 3 };
|
|
7520
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
7521
|
+
__name: "ViewEntry",
|
|
7522
|
+
props: {
|
|
7523
|
+
context: {},
|
|
7524
|
+
entry: {},
|
|
7525
|
+
presistedDoms: {},
|
|
7526
|
+
iframeStyle: {},
|
|
7527
|
+
divStyle: {}
|
|
7528
|
+
},
|
|
7529
|
+
setup(__props) {
|
|
7530
|
+
return (_ctx, _cache) => {
|
|
7531
|
+
return __props.entry.type === "action" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [], 64)) : __props.entry.type === "iframe" ? (openBlock(), createBlock(ViewIframe_default, {
|
|
7532
|
+
key: 1,
|
|
7533
|
+
context: __props.context,
|
|
7534
|
+
entry: __props.entry,
|
|
7535
|
+
"presisted-doms": __props.presistedDoms,
|
|
7536
|
+
"iframe-style": __props.iframeStyle
|
|
7537
|
+
}, null, 8, [
|
|
7538
|
+
"context",
|
|
7539
|
+
"entry",
|
|
7540
|
+
"presisted-doms",
|
|
7541
|
+
"iframe-style"
|
|
7542
|
+
])) : __props.entry.type === "custom-render" ? (openBlock(), createBlock(ViewCustomRenderer_default, {
|
|
7543
|
+
key: 2,
|
|
7544
|
+
context: __props.context,
|
|
7545
|
+
entry: __props.entry,
|
|
7546
|
+
"presisted-doms": __props.presistedDoms,
|
|
7547
|
+
"div-style": __props.divStyle
|
|
7548
|
+
}, null, 8, [
|
|
7549
|
+
"context",
|
|
7550
|
+
"entry",
|
|
7551
|
+
"presisted-doms",
|
|
7552
|
+
"div-style"
|
|
7553
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1, " Unknown entry: " + toDisplayString(__props.entry), 1));
|
|
7554
|
+
};
|
|
7555
|
+
}
|
|
7556
|
+
});
|
|
7557
|
+
var ViewEntry_default = _sfc_main$3;
|
|
7558
|
+
|
|
7559
|
+
//#endregion
|
|
7560
|
+
//#region src/client/webcomponents/components/DockPanel.vue
|
|
7561
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
7562
|
+
__name: "DockPanel",
|
|
7563
|
+
props: {
|
|
7564
|
+
context: {},
|
|
7565
|
+
selected: {},
|
|
7566
|
+
dockEl: {},
|
|
7567
|
+
panelMargins: {}
|
|
7568
|
+
},
|
|
7569
|
+
setup(__props) {
|
|
7570
|
+
const props = __props;
|
|
7571
|
+
const context = props.context;
|
|
7572
|
+
const { selected, panelMargins } = toRefs(props);
|
|
7573
|
+
const windowSize = reactive(useWindowSize());
|
|
7574
|
+
const isHovering = ref(false);
|
|
7575
|
+
const mousePosition = reactive({
|
|
7576
|
+
x: 0,
|
|
7577
|
+
y: 0
|
|
7578
|
+
});
|
|
7579
|
+
const dockPanel = useTemplateRef("dockPanel");
|
|
7580
|
+
const viewsContainer = useTemplateRef("viewsContainer");
|
|
7581
|
+
const presistedDoms = markRaw(new PresistedDomViewsManager(viewsContainer));
|
|
7582
|
+
function clamp$1(value, min, max) {
|
|
7583
|
+
return Math.min(Math.max(value, min), max);
|
|
7584
|
+
}
|
|
7585
|
+
const anchorPos = computed(() => {
|
|
7586
|
+
const halfWidth = (props.dockEl?.clientWidth || 0) / 2;
|
|
7587
|
+
const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
|
|
7588
|
+
const store = context.panel.store;
|
|
7589
|
+
const left = store.left * windowSize.width / 100;
|
|
7590
|
+
const top = store.top * windowSize.height / 100;
|
|
7591
|
+
switch (store.position) {
|
|
7592
|
+
case "top": return {
|
|
7593
|
+
left: clamp$1(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
|
|
7594
|
+
top: panelMargins.value.top + halfHeight
|
|
7595
|
+
};
|
|
7596
|
+
case "right": return {
|
|
7597
|
+
left: windowSize.width - panelMargins.value.right - halfHeight,
|
|
7598
|
+
top: clamp$1(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
|
|
7599
|
+
};
|
|
7600
|
+
case "left": return {
|
|
7601
|
+
left: panelMargins.value.left + halfHeight,
|
|
7602
|
+
top: clamp$1(top, halfWidth + panelMargins.value.top, windowSize.height - halfWidth - panelMargins.value.bottom)
|
|
7603
|
+
};
|
|
7604
|
+
case "bottom":
|
|
7605
|
+
default: return {
|
|
7606
|
+
left: clamp$1(left, halfWidth + panelMargins.value.left, windowSize.width - halfWidth - panelMargins.value.right),
|
|
7607
|
+
top: windowSize.height - panelMargins.value.bottom - halfHeight
|
|
7608
|
+
};
|
|
7609
|
+
}
|
|
7610
|
+
});
|
|
7611
|
+
let _timer = null;
|
|
7612
|
+
function bringUp() {
|
|
7613
|
+
isHovering.value = true;
|
|
7614
|
+
if (context.panel.store.inactiveTimeout < 0) return;
|
|
7615
|
+
if (_timer) clearTimeout(_timer);
|
|
7616
|
+
_timer = setTimeout(() => {
|
|
7617
|
+
isHovering.value = false;
|
|
7618
|
+
}, +context.panel.store.inactiveTimeout || 0);
|
|
7619
|
+
}
|
|
7620
|
+
const { width: frameWidth, height: frameHeight } = useElementBounding(dockPanel);
|
|
7621
|
+
const iframeStyle = computed(() => {
|
|
7622
|
+
mousePosition.x, mousePosition.y;
|
|
7623
|
+
const halfHeight = (props.dockEl?.clientHeight || 0) / 2;
|
|
7624
|
+
const frameMargin = {
|
|
7625
|
+
left: panelMargins.value.left + halfHeight,
|
|
7626
|
+
top: panelMargins.value.top + halfHeight,
|
|
7627
|
+
right: panelMargins.value.right + halfHeight,
|
|
7628
|
+
bottom: panelMargins.value.bottom + halfHeight
|
|
7629
|
+
};
|
|
7630
|
+
const marginHorizontal = frameMargin.left + frameMargin.right;
|
|
7631
|
+
const marginVertical = frameMargin.top + frameMargin.bottom;
|
|
7632
|
+
const maxWidth = windowSize.width - marginHorizontal;
|
|
7633
|
+
const maxHeight = windowSize.height - marginVertical;
|
|
7634
|
+
const panel = context.panel;
|
|
7635
|
+
const store = panel.store;
|
|
7636
|
+
const style = {
|
|
7637
|
+
position: "fixed",
|
|
7638
|
+
zIndex: -1,
|
|
7639
|
+
pointerEvents: panel.isDragging || panel.isResizing ? "none" : "auto",
|
|
7640
|
+
width: `min(${store.width}vw, calc(100vw - ${marginHorizontal}px))`,
|
|
7641
|
+
height: `min(${store.height}vh, calc(100vh - ${marginVertical}px))`
|
|
7642
|
+
};
|
|
7643
|
+
const anchor = anchorPos.value;
|
|
7644
|
+
const width = Math.min(maxWidth, store.width * windowSize.width / 100);
|
|
7645
|
+
const height = Math.min(maxHeight, store.height * windowSize.height / 100);
|
|
7646
|
+
const anchorX = anchor?.left || 0;
|
|
7647
|
+
const anchorY = anchor?.top || 0;
|
|
7648
|
+
switch (store.position) {
|
|
7649
|
+
case "top":
|
|
7650
|
+
case "bottom":
|
|
7651
|
+
style.left = `${-frameWidth.value / 2}px`;
|
|
7652
|
+
style.transform = "translate(0, 0)";
|
|
7653
|
+
if (anchorX - frameMargin.left < width / 2) style.left = `${width / 2 - anchorX + frameMargin.left - frameWidth.value / 2}px`;
|
|
7654
|
+
else if (windowSize.width - anchorX - frameMargin.right < width / 2) style.left = `${windowSize.width - anchorX - width / 2 - frameMargin.right - frameWidth.value / 2}px`;
|
|
7655
|
+
break;
|
|
7656
|
+
case "right":
|
|
7657
|
+
case "left":
|
|
7658
|
+
style.top = `${-frameHeight.value / 2}px`;
|
|
7659
|
+
style.transform = "translate(0, 0)";
|
|
7660
|
+
if (anchorY - frameMargin.top < height / 2) style.top = `${height / 2 - anchorY + frameMargin.top - frameHeight.value / 2}px`;
|
|
7661
|
+
else if (windowSize.height - anchorY - frameMargin.bottom < height / 2) style.top = `${windowSize.height - anchorY - height / 2 - frameMargin.bottom - frameHeight.value / 2}px`;
|
|
7662
|
+
break;
|
|
7663
|
+
}
|
|
7664
|
+
switch (store.position) {
|
|
7665
|
+
case "top":
|
|
7666
|
+
style.top = 0;
|
|
7667
|
+
break;
|
|
7668
|
+
case "right":
|
|
7669
|
+
style.right = 0;
|
|
7670
|
+
break;
|
|
7671
|
+
case "left":
|
|
7672
|
+
style.left = 0;
|
|
7673
|
+
break;
|
|
7674
|
+
case "bottom":
|
|
7675
|
+
default:
|
|
7676
|
+
style.bottom = 0;
|
|
7677
|
+
break;
|
|
7678
|
+
}
|
|
7679
|
+
return style;
|
|
7680
|
+
});
|
|
7681
|
+
onMounted(() => {
|
|
7682
|
+
bringUp();
|
|
7683
|
+
});
|
|
7684
|
+
return (_ctx, _cache) => {
|
|
7685
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
7686
|
+
ref_key: "dockPanel",
|
|
7687
|
+
ref: dockPanel,
|
|
7688
|
+
class: "bg-glass rounded-lg border border-base shadow",
|
|
7689
|
+
style: normalizeStyle(iframeStyle.value)
|
|
7690
|
+
}, [
|
|
7691
|
+
createVNode(DockPanelResizer_default, { panel: unref(context).panel }, null, 8, ["panel"]),
|
|
7692
|
+
unref(selected) && viewsContainer.value ? (openBlock(), createBlock(ViewEntry_default, {
|
|
7693
|
+
key: unref(selected).id,
|
|
7694
|
+
context: unref(context),
|
|
7695
|
+
entry: unref(selected),
|
|
7696
|
+
"presisted-doms": unref(presistedDoms),
|
|
7697
|
+
"iframe-style": {
|
|
7698
|
+
border: "1px solid #8883",
|
|
7699
|
+
borderRadius: "0.5rem"
|
|
7700
|
+
},
|
|
7701
|
+
rounded: ""
|
|
7702
|
+
}, null, 8, [
|
|
7703
|
+
"context",
|
|
7704
|
+
"entry",
|
|
7705
|
+
"presisted-doms"
|
|
7706
|
+
])) : createCommentVNode("v-if", true),
|
|
7707
|
+
createBaseVNode("div", {
|
|
7708
|
+
id: "vite-devtools-views-container",
|
|
7709
|
+
ref_key: "viewsContainer",
|
|
7710
|
+
ref: viewsContainer,
|
|
7711
|
+
class: "absolute inset-0"
|
|
7712
|
+
}, null, 512)
|
|
7713
|
+
], 4)), [[vShow, unref(context).docks.selected]]);
|
|
7714
|
+
};
|
|
7715
|
+
}
|
|
7716
|
+
});
|
|
7717
|
+
var DockPanel_default = _sfc_main$2;
|
|
7718
|
+
|
|
7719
|
+
//#endregion
|
|
7720
|
+
//#region src/client/webcomponents/components/FloatingTooltip.vue
|
|
7721
|
+
const DETECT_MARGIN = 100;
|
|
7722
|
+
const GAP = 10;
|
|
7723
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7724
|
+
__name: "FloatingTooltip",
|
|
7725
|
+
setup(__props) {
|
|
7726
|
+
const current = useFloatingTooltip();
|
|
7727
|
+
const box = ref({
|
|
7728
|
+
text: "",
|
|
7729
|
+
width: 0,
|
|
7730
|
+
height: 0,
|
|
7731
|
+
left: 0,
|
|
7732
|
+
top: 0
|
|
7733
|
+
});
|
|
7734
|
+
const align = computed(() => {
|
|
7735
|
+
const vw = window.innerWidth;
|
|
7736
|
+
const vh = window.innerHeight;
|
|
7737
|
+
if (box.value.left < DETECT_MARGIN) return "right";
|
|
7738
|
+
if (box.value.left + box.value.width > vw - DETECT_MARGIN) return "left";
|
|
7739
|
+
if (box.value.top < DETECT_MARGIN) return "bottom";
|
|
7740
|
+
if (box.value.top + box.value.height > vh - DETECT_MARGIN) return "top";
|
|
7741
|
+
return "bottom";
|
|
7742
|
+
});
|
|
7743
|
+
const style = computed(() => {
|
|
7744
|
+
switch (align.value) {
|
|
7745
|
+
case "bottom": return {
|
|
7746
|
+
left: `${box.value.left + box.value.width / 2}px`,
|
|
7747
|
+
top: `${box.value.top + box.value.height + GAP}px`,
|
|
7748
|
+
transform: "translateX(-50%)"
|
|
7749
|
+
};
|
|
7750
|
+
case "top": return {
|
|
7751
|
+
left: `${box.value.left + box.value.width / 2}px`,
|
|
7752
|
+
bottom: `${window.innerHeight - box.value.top + GAP}px`,
|
|
7753
|
+
transform: "translateX(-50%)"
|
|
7754
|
+
};
|
|
7755
|
+
case "left": return {
|
|
7756
|
+
right: `${window.innerWidth - box.value.left + GAP}px`,
|
|
7757
|
+
top: `${box.value.top + box.value.height / 2}px`,
|
|
7758
|
+
transform: "translateY(-50%)"
|
|
7759
|
+
};
|
|
7760
|
+
case "right": return {
|
|
7761
|
+
left: `${box.value.left + box.value.width + GAP}px`,
|
|
7762
|
+
top: `${box.value.top + box.value.height / 2}px`,
|
|
7763
|
+
transform: "translateY(-50%)"
|
|
7764
|
+
};
|
|
7765
|
+
default: throw new Error("Unreachable");
|
|
7766
|
+
}
|
|
7767
|
+
});
|
|
7768
|
+
watchEffect(() => {
|
|
7769
|
+
if (current.value) box.value = { ...current.value };
|
|
7770
|
+
});
|
|
7771
|
+
return (_ctx, _cache) => {
|
|
7772
|
+
return box.value.text ? (openBlock(), createElementBlock("div", {
|
|
7773
|
+
key: 0,
|
|
7774
|
+
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"]),
|
|
7775
|
+
style: normalizeStyle(style.value)
|
|
7776
|
+
}, toDisplayString(box.value.text), 7)) : createCommentVNode("v-if", true);
|
|
7777
|
+
};
|
|
7778
|
+
}
|
|
7779
|
+
});
|
|
7780
|
+
var FloatingTooltip_default = _sfc_main$1;
|
|
7781
|
+
|
|
7782
|
+
//#endregion
|
|
7783
|
+
//#region src/client/webcomponents/components/DockEmbedded.vue
|
|
7784
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7785
|
+
__name: "DockEmbedded",
|
|
7786
|
+
props: { context: {} },
|
|
7787
|
+
setup(__props) {
|
|
7788
|
+
return (_ctx, _cache) => {
|
|
7789
|
+
return openBlock(), createElementBlock(Fragment, null, [createVNode(Dock_default, { context: __props.context }, {
|
|
7790
|
+
default: withCtx(({ dockEl, panelMargins, selected }) => [createVNode(DockPanel_default, {
|
|
7791
|
+
context: __props.context,
|
|
7792
|
+
selected,
|
|
7793
|
+
"dock-el": dockEl,
|
|
7794
|
+
"panel-margins": panelMargins
|
|
7795
|
+
}, null, 8, [
|
|
7796
|
+
"context",
|
|
7797
|
+
"selected",
|
|
7798
|
+
"dock-el",
|
|
7799
|
+
"panel-margins"
|
|
7800
|
+
])]),
|
|
7801
|
+
_: 1
|
|
7802
|
+
}, 8, ["context"]), createVNode(FloatingTooltip_default)], 64);
|
|
7803
|
+
};
|
|
7804
|
+
}
|
|
7805
|
+
});
|
|
7806
|
+
var DockEmbedded_default = _sfc_main;
|
|
7807
|
+
|
|
7808
|
+
//#endregion
|
|
7809
|
+
//#region src/client/webcomponents/components/DockEmbedded.ts
|
|
7810
|
+
const DockEmbedded = defineCustomElement(DockEmbedded_default, {
|
|
7811
|
+
shadowRoot: true,
|
|
7812
|
+
styles: [css_default]
|
|
7813
|
+
});
|
|
7814
|
+
customElements.define("vite-devtools-dock-embedded", DockEmbedded);
|
|
7815
|
+
|
|
7816
|
+
//#endregion
|
|
7817
|
+
//#region src/client/webcomponents/state/dock.ts
|
|
7818
|
+
function DEFAULT_DOCK_PANEL_STORE() {
|
|
7819
|
+
return {
|
|
7820
|
+
width: 80,
|
|
7821
|
+
height: 80,
|
|
7822
|
+
top: 0,
|
|
7823
|
+
left: 10,
|
|
7824
|
+
position: "bottom",
|
|
7825
|
+
open: false,
|
|
7826
|
+
inactiveTimeout: 3e3
|
|
7827
|
+
};
|
|
7828
|
+
}
|
|
7829
|
+
async function createDocksContext(clientType, rpc, panelStore) {
|
|
7830
|
+
const selected = ref(null);
|
|
7831
|
+
const dockEntries = shallowRef((await rpc["vite:core:list-dock-entries"]()).map((entry) => Object.freeze(entry)));
|
|
7832
|
+
console.log("[VITE DEVTOOLS] Docks Entries", [...dockEntries.value]);
|
|
7833
|
+
const dockEntryStateMap = reactive(/* @__PURE__ */ new Map());
|
|
7834
|
+
for (const entry of dockEntries.value) dockEntryStateMap.set(entry.id, reactive({
|
|
7835
|
+
entryMeta: entry,
|
|
7836
|
+
get isActive() {
|
|
7837
|
+
return selected.value?.id === entry.id;
|
|
7838
|
+
},
|
|
7839
|
+
domElements: {}
|
|
7840
|
+
}));
|
|
7841
|
+
panelStore ||= ref(DEFAULT_DOCK_PANEL_STORE());
|
|
7842
|
+
return reactive({
|
|
7843
|
+
panel: {
|
|
7844
|
+
store: panelStore,
|
|
7845
|
+
isDragging: false,
|
|
7846
|
+
isResizing: false,
|
|
7847
|
+
isVertical: computed(() => panelStore.value.position === "left" || panelStore.value.position === "right")
|
|
7848
|
+
},
|
|
7849
|
+
docks: {
|
|
7850
|
+
selected,
|
|
7851
|
+
entries: dockEntries.value,
|
|
7852
|
+
entryToStateMap: dockEntryStateMap,
|
|
7853
|
+
getStateById: (id) => dockEntryStateMap.get(id),
|
|
7854
|
+
switchEntry: async (id) => {
|
|
7855
|
+
if (id === null) {
|
|
7856
|
+
selected.value = null;
|
|
7857
|
+
return true;
|
|
7858
|
+
}
|
|
7859
|
+
const entry = dockEntries.value.find((e) => e.id === id);
|
|
7860
|
+
if (!entry) return false;
|
|
7861
|
+
selected.value = entry;
|
|
7862
|
+
return true;
|
|
7863
|
+
}
|
|
7864
|
+
},
|
|
7865
|
+
rpc,
|
|
7866
|
+
clientType
|
|
7867
|
+
});
|
|
7868
|
+
}
|
|
7869
|
+
|
|
7870
|
+
//#endregion
|
|
7871
|
+
export { PresistedDomViewsManager as a, PresistedDomHolder as i, createDocksContext as n, useLocalStorage as o, DockEmbedded as r, DEFAULT_DOCK_PANEL_STORE as t };
|