vite-plugin-vue-devtools 7.4.4 → 7.4.5
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/client/assets/index-Ba1A_el2.css +1 -0
- package/client/assets/index-BtmHFqwF.js +1092 -0
- package/client/index.html +2 -2
- package/dist/vite.cjs +225 -225
- package/dist/vite.mjs +224 -224
- package/package.json +5 -5
- package/src/overlay/devtools-overlay.css +1 -1
- package/src/overlay/devtools-overlay.mjs +5 -5
- package/src/overlay.js +1 -1
- package/client/assets/index-C5B0ozEB.css +0 -1
- package/client/assets/index-DQiClRQr.js +0 -1092
package/dist/vite.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
-
import path$a, { dirname, resolve as resolve$1 } from 'node:path';
|
|
3
1
|
import fs$8 from 'node:fs';
|
|
4
|
-
import {
|
|
2
|
+
import path$a, { dirname, resolve as resolve$1 } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { createViteServerRpc } from '@vue/devtools-core';
|
|
5
|
+
import { getViteRpcServer, setViteServerContext } from '@vue/devtools-kit';
|
|
5
6
|
import sirv from 'sirv';
|
|
7
|
+
import { normalizePath } from 'vite';
|
|
6
8
|
import Inspect from 'vite-plugin-inspect';
|
|
7
|
-
import { getViteRpcServer, setViteServerContext } from '@vue/devtools-kit';
|
|
8
9
|
import VueInspector from 'vite-plugin-vue-inspector';
|
|
9
|
-
import { createViteServerRpc } from '@vue/devtools-core';
|
|
10
10
|
import fsp from 'node:fs/promises';
|
|
11
11
|
import require$$0 from 'os';
|
|
12
12
|
import require$$0$1 from 'path';
|
|
@@ -98,62 +98,6 @@ const cyan = kolorist(36, 39);
|
|
|
98
98
|
const DIR_DIST = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
|
|
99
99
|
const DIR_CLIENT = resolve$1(DIR_DIST, "../client");
|
|
100
100
|
|
|
101
|
-
const DEBOUNCE_DEFAULTS = {
|
|
102
|
-
trailing: true
|
|
103
|
-
};
|
|
104
|
-
function debounce(fn, wait = 25, options = {}) {
|
|
105
|
-
options = { ...DEBOUNCE_DEFAULTS, ...options };
|
|
106
|
-
if (!Number.isFinite(wait)) {
|
|
107
|
-
throw new TypeError("Expected `wait` to be a finite number");
|
|
108
|
-
}
|
|
109
|
-
let leadingValue;
|
|
110
|
-
let timeout;
|
|
111
|
-
let resolveList = [];
|
|
112
|
-
let currentPromise;
|
|
113
|
-
let trailingArgs;
|
|
114
|
-
const applyFn = (_this, args) => {
|
|
115
|
-
currentPromise = _applyPromised(fn, _this, args);
|
|
116
|
-
currentPromise.finally(() => {
|
|
117
|
-
currentPromise = null;
|
|
118
|
-
if (options.trailing && trailingArgs && !timeout) {
|
|
119
|
-
const promise = applyFn(_this, trailingArgs);
|
|
120
|
-
trailingArgs = null;
|
|
121
|
-
return promise;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
return currentPromise;
|
|
125
|
-
};
|
|
126
|
-
return function(...args) {
|
|
127
|
-
if (currentPromise) {
|
|
128
|
-
if (options.trailing) {
|
|
129
|
-
trailingArgs = args;
|
|
130
|
-
}
|
|
131
|
-
return currentPromise;
|
|
132
|
-
}
|
|
133
|
-
return new Promise((resolve) => {
|
|
134
|
-
const shouldCallNow = !timeout && options.leading;
|
|
135
|
-
clearTimeout(timeout);
|
|
136
|
-
timeout = setTimeout(() => {
|
|
137
|
-
timeout = null;
|
|
138
|
-
const promise = options.leading ? leadingValue : applyFn(this, args);
|
|
139
|
-
for (const _resolve of resolveList) {
|
|
140
|
-
_resolve(promise);
|
|
141
|
-
}
|
|
142
|
-
resolveList = [];
|
|
143
|
-
}, wait);
|
|
144
|
-
if (shouldCallNow) {
|
|
145
|
-
leadingValue = applyFn(this, args);
|
|
146
|
-
resolve(leadingValue);
|
|
147
|
-
} else {
|
|
148
|
-
resolveList.push(resolve);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
async function _applyPromised(fn, _this, args) {
|
|
154
|
-
return await fn.apply(_this, args);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
101
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
158
102
|
|
|
159
103
|
function getDefaultExportFromCjs (x) {
|
|
@@ -6876,169 +6820,6 @@ var out = FastGlob;
|
|
|
6876
6820
|
|
|
6877
6821
|
const fg = /*@__PURE__*/getDefaultExportFromCjs(out);
|
|
6878
6822
|
|
|
6879
|
-
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
6880
|
-
function normalizeWindowsPath(input = "") {
|
|
6881
|
-
if (!input) {
|
|
6882
|
-
return input;
|
|
6883
|
-
}
|
|
6884
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
6885
|
-
}
|
|
6886
|
-
|
|
6887
|
-
const _UNC_REGEX = /^[/\\]{2}/;
|
|
6888
|
-
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
6889
|
-
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
6890
|
-
const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
6891
|
-
const normalize = function(path) {
|
|
6892
|
-
if (path.length === 0) {
|
|
6893
|
-
return ".";
|
|
6894
|
-
}
|
|
6895
|
-
path = normalizeWindowsPath(path);
|
|
6896
|
-
const isUNCPath = path.match(_UNC_REGEX);
|
|
6897
|
-
const isPathAbsolute = isAbsolute(path);
|
|
6898
|
-
const trailingSeparator = path[path.length - 1] === "/";
|
|
6899
|
-
path = normalizeString(path, !isPathAbsolute);
|
|
6900
|
-
if (path.length === 0) {
|
|
6901
|
-
if (isPathAbsolute) {
|
|
6902
|
-
return "/";
|
|
6903
|
-
}
|
|
6904
|
-
return trailingSeparator ? "./" : ".";
|
|
6905
|
-
}
|
|
6906
|
-
if (trailingSeparator) {
|
|
6907
|
-
path += "/";
|
|
6908
|
-
}
|
|
6909
|
-
if (_DRIVE_LETTER_RE.test(path)) {
|
|
6910
|
-
path += "/";
|
|
6911
|
-
}
|
|
6912
|
-
if (isUNCPath) {
|
|
6913
|
-
if (!isPathAbsolute) {
|
|
6914
|
-
return `//./${path}`;
|
|
6915
|
-
}
|
|
6916
|
-
return `//${path}`;
|
|
6917
|
-
}
|
|
6918
|
-
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
6919
|
-
};
|
|
6920
|
-
const join = function(...arguments_) {
|
|
6921
|
-
if (arguments_.length === 0) {
|
|
6922
|
-
return ".";
|
|
6923
|
-
}
|
|
6924
|
-
let joined;
|
|
6925
|
-
for (const argument of arguments_) {
|
|
6926
|
-
if (argument && argument.length > 0) {
|
|
6927
|
-
if (joined === void 0) {
|
|
6928
|
-
joined = argument;
|
|
6929
|
-
} else {
|
|
6930
|
-
joined += `/${argument}`;
|
|
6931
|
-
}
|
|
6932
|
-
}
|
|
6933
|
-
}
|
|
6934
|
-
if (joined === void 0) {
|
|
6935
|
-
return ".";
|
|
6936
|
-
}
|
|
6937
|
-
return normalize(joined.replace(/\/\/+/g, "/"));
|
|
6938
|
-
};
|
|
6939
|
-
function cwd() {
|
|
6940
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
6941
|
-
return process.cwd().replace(/\\/g, "/");
|
|
6942
|
-
}
|
|
6943
|
-
return "/";
|
|
6944
|
-
}
|
|
6945
|
-
const resolve = function(...arguments_) {
|
|
6946
|
-
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
6947
|
-
let resolvedPath = "";
|
|
6948
|
-
let resolvedAbsolute = false;
|
|
6949
|
-
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
6950
|
-
const path = index >= 0 ? arguments_[index] : cwd();
|
|
6951
|
-
if (!path || path.length === 0) {
|
|
6952
|
-
continue;
|
|
6953
|
-
}
|
|
6954
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
6955
|
-
resolvedAbsolute = isAbsolute(path);
|
|
6956
|
-
}
|
|
6957
|
-
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
6958
|
-
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
6959
|
-
return `/${resolvedPath}`;
|
|
6960
|
-
}
|
|
6961
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
6962
|
-
};
|
|
6963
|
-
function normalizeString(path, allowAboveRoot) {
|
|
6964
|
-
let res = "";
|
|
6965
|
-
let lastSegmentLength = 0;
|
|
6966
|
-
let lastSlash = -1;
|
|
6967
|
-
let dots = 0;
|
|
6968
|
-
let char = null;
|
|
6969
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
6970
|
-
if (index < path.length) {
|
|
6971
|
-
char = path[index];
|
|
6972
|
-
} else if (char === "/") {
|
|
6973
|
-
break;
|
|
6974
|
-
} else {
|
|
6975
|
-
char = "/";
|
|
6976
|
-
}
|
|
6977
|
-
if (char === "/") {
|
|
6978
|
-
if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
|
|
6979
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
6980
|
-
if (res.length > 2) {
|
|
6981
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
6982
|
-
if (lastSlashIndex === -1) {
|
|
6983
|
-
res = "";
|
|
6984
|
-
lastSegmentLength = 0;
|
|
6985
|
-
} else {
|
|
6986
|
-
res = res.slice(0, lastSlashIndex);
|
|
6987
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
6988
|
-
}
|
|
6989
|
-
lastSlash = index;
|
|
6990
|
-
dots = 0;
|
|
6991
|
-
continue;
|
|
6992
|
-
} else if (res.length > 0) {
|
|
6993
|
-
res = "";
|
|
6994
|
-
lastSegmentLength = 0;
|
|
6995
|
-
lastSlash = index;
|
|
6996
|
-
dots = 0;
|
|
6997
|
-
continue;
|
|
6998
|
-
}
|
|
6999
|
-
}
|
|
7000
|
-
if (allowAboveRoot) {
|
|
7001
|
-
res += res.length > 0 ? "/.." : "..";
|
|
7002
|
-
lastSegmentLength = 2;
|
|
7003
|
-
}
|
|
7004
|
-
} else {
|
|
7005
|
-
if (res.length > 0) {
|
|
7006
|
-
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
7007
|
-
} else {
|
|
7008
|
-
res = path.slice(lastSlash + 1, index);
|
|
7009
|
-
}
|
|
7010
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
7011
|
-
}
|
|
7012
|
-
lastSlash = index;
|
|
7013
|
-
dots = 0;
|
|
7014
|
-
} else if (char === "." && dots !== -1) {
|
|
7015
|
-
++dots;
|
|
7016
|
-
} else {
|
|
7017
|
-
dots = -1;
|
|
7018
|
-
}
|
|
7019
|
-
}
|
|
7020
|
-
return res;
|
|
7021
|
-
}
|
|
7022
|
-
const isAbsolute = function(p) {
|
|
7023
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
7024
|
-
};
|
|
7025
|
-
const relative = function(from, to) {
|
|
7026
|
-
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
7027
|
-
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
7028
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7029
|
-
return _to.join("/");
|
|
7030
|
-
}
|
|
7031
|
-
const _fromCopy = [..._from];
|
|
7032
|
-
for (const segment of _fromCopy) {
|
|
7033
|
-
if (_to[0] !== segment) {
|
|
7034
|
-
break;
|
|
7035
|
-
}
|
|
7036
|
-
_from.shift();
|
|
7037
|
-
_to.shift();
|
|
7038
|
-
}
|
|
7039
|
-
return [..._from.map(() => ".."), ..._to].join("/");
|
|
7040
|
-
};
|
|
7041
|
-
|
|
7042
6823
|
const decoder = new TextDecoder();
|
|
7043
6824
|
const toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
|
|
7044
6825
|
const toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce((memo, i) => memo + ("0" + i.toString(16)).slice(-2), "");
|
|
@@ -7823,6 +7604,225 @@ function imageMeta(input) {
|
|
|
7823
7604
|
throw new TypeError(`Unsupported file type: ${type}`);
|
|
7824
7605
|
}
|
|
7825
7606
|
|
|
7607
|
+
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
7608
|
+
function normalizeWindowsPath(input = "") {
|
|
7609
|
+
if (!input) {
|
|
7610
|
+
return input;
|
|
7611
|
+
}
|
|
7612
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
7613
|
+
}
|
|
7614
|
+
|
|
7615
|
+
const _UNC_REGEX = /^[/\\]{2}/;
|
|
7616
|
+
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
7617
|
+
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
7618
|
+
const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
7619
|
+
const normalize = function(path) {
|
|
7620
|
+
if (path.length === 0) {
|
|
7621
|
+
return ".";
|
|
7622
|
+
}
|
|
7623
|
+
path = normalizeWindowsPath(path);
|
|
7624
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
7625
|
+
const isPathAbsolute = isAbsolute(path);
|
|
7626
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
7627
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
7628
|
+
if (path.length === 0) {
|
|
7629
|
+
if (isPathAbsolute) {
|
|
7630
|
+
return "/";
|
|
7631
|
+
}
|
|
7632
|
+
return trailingSeparator ? "./" : ".";
|
|
7633
|
+
}
|
|
7634
|
+
if (trailingSeparator) {
|
|
7635
|
+
path += "/";
|
|
7636
|
+
}
|
|
7637
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
7638
|
+
path += "/";
|
|
7639
|
+
}
|
|
7640
|
+
if (isUNCPath) {
|
|
7641
|
+
if (!isPathAbsolute) {
|
|
7642
|
+
return `//./${path}`;
|
|
7643
|
+
}
|
|
7644
|
+
return `//${path}`;
|
|
7645
|
+
}
|
|
7646
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
7647
|
+
};
|
|
7648
|
+
const join = function(...arguments_) {
|
|
7649
|
+
if (arguments_.length === 0) {
|
|
7650
|
+
return ".";
|
|
7651
|
+
}
|
|
7652
|
+
let joined;
|
|
7653
|
+
for (const argument of arguments_) {
|
|
7654
|
+
if (argument && argument.length > 0) {
|
|
7655
|
+
if (joined === void 0) {
|
|
7656
|
+
joined = argument;
|
|
7657
|
+
} else {
|
|
7658
|
+
joined += `/${argument}`;
|
|
7659
|
+
}
|
|
7660
|
+
}
|
|
7661
|
+
}
|
|
7662
|
+
if (joined === void 0) {
|
|
7663
|
+
return ".";
|
|
7664
|
+
}
|
|
7665
|
+
return normalize(joined.replace(/\/\/+/g, "/"));
|
|
7666
|
+
};
|
|
7667
|
+
function cwd() {
|
|
7668
|
+
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
7669
|
+
return process.cwd().replace(/\\/g, "/");
|
|
7670
|
+
}
|
|
7671
|
+
return "/";
|
|
7672
|
+
}
|
|
7673
|
+
const resolve = function(...arguments_) {
|
|
7674
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
7675
|
+
let resolvedPath = "";
|
|
7676
|
+
let resolvedAbsolute = false;
|
|
7677
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
7678
|
+
const path = index >= 0 ? arguments_[index] : cwd();
|
|
7679
|
+
if (!path || path.length === 0) {
|
|
7680
|
+
continue;
|
|
7681
|
+
}
|
|
7682
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
7683
|
+
resolvedAbsolute = isAbsolute(path);
|
|
7684
|
+
}
|
|
7685
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
7686
|
+
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
7687
|
+
return `/${resolvedPath}`;
|
|
7688
|
+
}
|
|
7689
|
+
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
7690
|
+
};
|
|
7691
|
+
function normalizeString(path, allowAboveRoot) {
|
|
7692
|
+
let res = "";
|
|
7693
|
+
let lastSegmentLength = 0;
|
|
7694
|
+
let lastSlash = -1;
|
|
7695
|
+
let dots = 0;
|
|
7696
|
+
let char = null;
|
|
7697
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
7698
|
+
if (index < path.length) {
|
|
7699
|
+
char = path[index];
|
|
7700
|
+
} else if (char === "/") {
|
|
7701
|
+
break;
|
|
7702
|
+
} else {
|
|
7703
|
+
char = "/";
|
|
7704
|
+
}
|
|
7705
|
+
if (char === "/") {
|
|
7706
|
+
if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
|
|
7707
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
7708
|
+
if (res.length > 2) {
|
|
7709
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
7710
|
+
if (lastSlashIndex === -1) {
|
|
7711
|
+
res = "";
|
|
7712
|
+
lastSegmentLength = 0;
|
|
7713
|
+
} else {
|
|
7714
|
+
res = res.slice(0, lastSlashIndex);
|
|
7715
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
7716
|
+
}
|
|
7717
|
+
lastSlash = index;
|
|
7718
|
+
dots = 0;
|
|
7719
|
+
continue;
|
|
7720
|
+
} else if (res.length > 0) {
|
|
7721
|
+
res = "";
|
|
7722
|
+
lastSegmentLength = 0;
|
|
7723
|
+
lastSlash = index;
|
|
7724
|
+
dots = 0;
|
|
7725
|
+
continue;
|
|
7726
|
+
}
|
|
7727
|
+
}
|
|
7728
|
+
if (allowAboveRoot) {
|
|
7729
|
+
res += res.length > 0 ? "/.." : "..";
|
|
7730
|
+
lastSegmentLength = 2;
|
|
7731
|
+
}
|
|
7732
|
+
} else {
|
|
7733
|
+
if (res.length > 0) {
|
|
7734
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
7735
|
+
} else {
|
|
7736
|
+
res = path.slice(lastSlash + 1, index);
|
|
7737
|
+
}
|
|
7738
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
7739
|
+
}
|
|
7740
|
+
lastSlash = index;
|
|
7741
|
+
dots = 0;
|
|
7742
|
+
} else if (char === "." && dots !== -1) {
|
|
7743
|
+
++dots;
|
|
7744
|
+
} else {
|
|
7745
|
+
dots = -1;
|
|
7746
|
+
}
|
|
7747
|
+
}
|
|
7748
|
+
return res;
|
|
7749
|
+
}
|
|
7750
|
+
const isAbsolute = function(p) {
|
|
7751
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
7752
|
+
};
|
|
7753
|
+
const relative = function(from, to) {
|
|
7754
|
+
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
7755
|
+
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
7756
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7757
|
+
return _to.join("/");
|
|
7758
|
+
}
|
|
7759
|
+
const _fromCopy = [..._from];
|
|
7760
|
+
for (const segment of _fromCopy) {
|
|
7761
|
+
if (_to[0] !== segment) {
|
|
7762
|
+
break;
|
|
7763
|
+
}
|
|
7764
|
+
_from.shift();
|
|
7765
|
+
_to.shift();
|
|
7766
|
+
}
|
|
7767
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
7768
|
+
};
|
|
7769
|
+
|
|
7770
|
+
const DEBOUNCE_DEFAULTS = {
|
|
7771
|
+
trailing: true
|
|
7772
|
+
};
|
|
7773
|
+
function debounce(fn, wait = 25, options = {}) {
|
|
7774
|
+
options = { ...DEBOUNCE_DEFAULTS, ...options };
|
|
7775
|
+
if (!Number.isFinite(wait)) {
|
|
7776
|
+
throw new TypeError("Expected `wait` to be a finite number");
|
|
7777
|
+
}
|
|
7778
|
+
let leadingValue;
|
|
7779
|
+
let timeout;
|
|
7780
|
+
let resolveList = [];
|
|
7781
|
+
let currentPromise;
|
|
7782
|
+
let trailingArgs;
|
|
7783
|
+
const applyFn = (_this, args) => {
|
|
7784
|
+
currentPromise = _applyPromised(fn, _this, args);
|
|
7785
|
+
currentPromise.finally(() => {
|
|
7786
|
+
currentPromise = null;
|
|
7787
|
+
if (options.trailing && trailingArgs && !timeout) {
|
|
7788
|
+
const promise = applyFn(_this, trailingArgs);
|
|
7789
|
+
trailingArgs = null;
|
|
7790
|
+
return promise;
|
|
7791
|
+
}
|
|
7792
|
+
});
|
|
7793
|
+
return currentPromise;
|
|
7794
|
+
};
|
|
7795
|
+
return function(...args) {
|
|
7796
|
+
if (currentPromise) {
|
|
7797
|
+
if (options.trailing) {
|
|
7798
|
+
trailingArgs = args;
|
|
7799
|
+
}
|
|
7800
|
+
return currentPromise;
|
|
7801
|
+
}
|
|
7802
|
+
return new Promise((resolve) => {
|
|
7803
|
+
const shouldCallNow = !timeout && options.leading;
|
|
7804
|
+
clearTimeout(timeout);
|
|
7805
|
+
timeout = setTimeout(() => {
|
|
7806
|
+
timeout = null;
|
|
7807
|
+
const promise = options.leading ? leadingValue : applyFn(this, args);
|
|
7808
|
+
for (const _resolve of resolveList) {
|
|
7809
|
+
_resolve(promise);
|
|
7810
|
+
}
|
|
7811
|
+
resolveList = [];
|
|
7812
|
+
}, wait);
|
|
7813
|
+
if (shouldCallNow) {
|
|
7814
|
+
leadingValue = applyFn(this, args);
|
|
7815
|
+
resolve(leadingValue);
|
|
7816
|
+
} else {
|
|
7817
|
+
resolveList.push(resolve);
|
|
7818
|
+
}
|
|
7819
|
+
});
|
|
7820
|
+
};
|
|
7821
|
+
}
|
|
7822
|
+
async function _applyPromised(fn, _this, args) {
|
|
7823
|
+
return await fn.apply(_this, args);
|
|
7824
|
+
}
|
|
7825
|
+
|
|
7826
7826
|
function guessType(path) {
|
|
7827
7827
|
if (/\.(?:png|jpe?g|jxl|gif|svg|webp|avif|ico|bmp|tiff?)$/i.test(path))
|
|
7828
7828
|
return "image";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-vue-devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.4.
|
|
4
|
+
"version": "7.4.5",
|
|
5
5
|
"description": "A vite plugin for Vue DevTools",
|
|
6
6
|
"author": "webfansplz",
|
|
7
7
|
"license": "MIT",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"sirv": "^2.0.4",
|
|
51
51
|
"vite-plugin-inspect": "^0.8.7",
|
|
52
52
|
"vite-plugin-vue-inspector": "^5.2.0",
|
|
53
|
-
"@vue/devtools-core": "^7.4.
|
|
54
|
-
"@vue/devtools-
|
|
55
|
-
"@vue/devtools-
|
|
53
|
+
"@vue/devtools-core": "^7.4.5",
|
|
54
|
+
"@vue/devtools-kit": "^7.4.5",
|
|
55
|
+
"@vue/devtools-shared": "^7.4.5"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@types/node": "^20.16.
|
|
58
|
+
"@types/node": "^20.16.5",
|
|
59
59
|
"fast-glob": "^3.3.2",
|
|
60
60
|
"image-meta": "^0.2.1",
|
|
61
61
|
"pathe": "^1.1.2"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vue-devtools-frame[data-v-
|
|
1
|
+
.vue-devtools-frame[data-v-57103419]{position:fixed;z-index:2147483645}.vue-devtools-frame[data-v-57103419] iframe{width:100%;height:100%;outline:none;background:var(--vue-devtools-widget-bg);border:1px solid rgba(125,125,125,.2);border-radius:10px}.vue-devtools-frame.view-mode-xs[data-v-57103419]{width:400px!important;height:80px!important}.vue-devtools-frame.view-mode-fullscreen[data-v-57103419]{width:100vw!important;height:100vh!important;z-index:1!important;bottom:0!important;transform:none!important}.vue-devtools-frame.view-mode-fullscreen[data-v-57103419] iframe{border-radius:0!important}.vue-devtools-resize--horizontal[data-v-57103419]{position:absolute;left:6px;right:6px;height:10px;margin:-5px 0;cursor:ns-resize;border-radius:5px}.vue-devtools-resize--vertical[data-v-57103419]{position:absolute;top:6px;bottom:0;width:10px;margin:0 -5px;cursor:ew-resize;border-radius:5px}.vue-devtools-resize-corner[data-v-57103419]{position:absolute;width:14px;height:14px;margin:-6px;border-radius:6px}.vue-devtools-resize[data-v-57103419]:hover{background:#7d7d7d1a}.vue-devtools__anchor[data-v-f11919b5]{position:fixed;z-index:2147483645;transform-origin:center center;transform:translate(-50%,-50%) rotate(0)}.vue-devtools__anchor.fullscreen[data-v-f11919b5]{transform:none!important;left:0!important}.vue-devtools__anchor-btn[data-v-f11919b5]{border-radius:100%;border-width:0;width:30px;height:30px;display:flex;justify-content:center;align-items:center;opacity:.8;transition:opacity .2s ease-in-out}.vue-devtools__anchor-btn[data-v-f11919b5]:hover{opacity:1}.vue-devtools__anchor-btn svg[data-v-f11919b5]{width:14px;height:14px}.vue-devtools__anchor-btn.active[data-v-f11919b5]{cursor:pointer}.vue-devtools__anchor .panel-entry-btn[data-v-f11919b5]{cursor:pointer;flex:none}.vue-devtools__anchor--vertical .panel-entry-btn[data-v-f11919b5]{transform:rotate(-90deg)}.vue-devtools__anchor--vertical .vue-devtools__panel[data-v-f11919b5]{transform:translate(-50%,-50%) rotate(90deg);box-shadow:2px -2px 8px var(--vue-devtools-widget-shadow)}.vue-devtools__anchor--hide .vue-devtools__panel[data-v-f11919b5]{max-width:32px;padding:2px 0}.vue-devtools__anchor--hide .vue-devtools__panel-content[data-v-f11919b5]{opacity:0}.vue-devtools__anchor--glowing[data-v-f11919b5]{position:absolute;left:0;top:0;transform:translate(-50%,-50%);width:160px;height:160px;opacity:0;transition:all 1s ease;pointer-events:none;z-index:-1;border-radius:9999px;background-image:linear-gradient(45deg,#00dc82,#36e4da,#0047e1);filter:blur(60px)}.vue-devtools__anchor:hover .vue-devtools__anchor--glowing[data-v-f11919b5]{opacity:.6}.vue-devtools__panel[data-v-f11919b5]{position:absolute;left:0;top:0;transform:translate(-50%,-50%);display:flex;justify-content:flex-start;overflow:hidden;align-items:center;gap:2px;height:30px;padding:4px 4px 4px 5px;box-sizing:border-box;border:1px solid var(--vue-devtools-widget-border);border-radius:20px;background-color:var(--vue-devtools-widget-bg);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:var(--vue-devtools-widget-fg);box-shadow:2px 2px 8px var(--vue-devtools-widget-shadow);-webkit-user-select:none;user-select:none;max-width:150px;transition:max-width .4s ease,padding .5s ease,transform .3s ease,all .4s ease}.vue-devtools__panel-content[data-v-f11919b5]{transition:opacity .4s ease}.vue-devtools__panel-divider[data-v-f11919b5]{border-left:1px solid rgba(136,136,136,.2);width:1px;height:10px}@keyframes blink-f11919b5{0%{opacity:.2}50%{opacity:.6}to{opacity:.2}}@media print{#vue-devtools-anchor[data-v-f11919b5]{display:none}}
|