@vue/devtools-kit 7.3.9 → 7.4.0
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/index.cjs +429 -342
- package/dist/index.d.cts +51 -2
- package/dist/index.d.ts +51 -2
- package/dist/index.js +379 -293
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -11,9 +11,9 @@ var __esm = (fn, res) => function __init() {
|
|
|
11
11
|
var __commonJS = (cb, mod) => function __require() {
|
|
12
12
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
13
|
};
|
|
14
|
-
var __export = (
|
|
14
|
+
var __export = (target22, all) => {
|
|
15
15
|
for (var name in all)
|
|
16
|
-
__defProp(
|
|
16
|
+
__defProp(target22, name, { get: all[name], enumerable: true });
|
|
17
17
|
};
|
|
18
18
|
var __copyProps = (to, from, except, desc) => {
|
|
19
19
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -23,19 +23,19 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
23
|
}
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
|
-
var __toESM = (mod, isNodeMode,
|
|
26
|
+
var __toESM = (mod, isNodeMode, target22) => (target22 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
27
27
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
28
28
|
// file that has been converted to a CommonJS file using a Babel-
|
|
29
29
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30
30
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(
|
|
31
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target22, "default", { value: mod, enumerable: true }) : target22,
|
|
32
32
|
mod
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.3__@swc+core@1.5.29_jiti@1.21.6__poim247rgdwcqyeqwscqjhxddq/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.3__@swc+core@1.5.29_jiti@1.21.6__poim247rgdwcqyeqwscqjhxddq/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -1659,6 +1659,7 @@ __export(src_exports, {
|
|
|
1659
1659
|
toggleClientConnected: () => toggleClientConnected,
|
|
1660
1660
|
toggleComponentInspectorEnabled: () => toggleComponentInspectorEnabled,
|
|
1661
1661
|
toggleHighPerfMode: () => toggleHighPerfMode,
|
|
1662
|
+
updateDevToolsClientDetected: () => updateDevToolsClientDetected,
|
|
1662
1663
|
updateDevToolsState: () => updateDevToolsState
|
|
1663
1664
|
});
|
|
1664
1665
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -1670,8 +1671,8 @@ var import_devtools_shared19 = require("@vue/devtools-shared");
|
|
|
1670
1671
|
|
|
1671
1672
|
// src/hook/index.ts
|
|
1672
1673
|
init_cjs_shims();
|
|
1673
|
-
var
|
|
1674
|
-
var
|
|
1674
|
+
var import_devtools_shared16 = require("@vue/devtools-shared");
|
|
1675
|
+
var import_hookable2 = require("hookable");
|
|
1675
1676
|
|
|
1676
1677
|
// src/types/index.ts
|
|
1677
1678
|
init_cjs_shims();
|
|
@@ -1703,125 +1704,20 @@ init_cjs_shims();
|
|
|
1703
1704
|
// src/types/router.ts
|
|
1704
1705
|
init_cjs_shims();
|
|
1705
1706
|
|
|
1706
|
-
// src/hook/index.ts
|
|
1707
|
-
var _a, _b;
|
|
1708
|
-
var devtoolsHooks = (_b = (_a = import_devtools_shared.target).__VUE_DEVTOOLS_HOOK) != null ? _b : _a.__VUE_DEVTOOLS_HOOK = (0, import_hookable.createHooks)();
|
|
1709
|
-
var on = {
|
|
1710
|
-
vueAppInit(fn) {
|
|
1711
|
-
devtoolsHooks.hook("app:init" /* APP_INIT */, fn);
|
|
1712
|
-
},
|
|
1713
|
-
vueAppUnmount(fn) {
|
|
1714
|
-
devtoolsHooks.hook("app:unmount" /* APP_UNMOUNT */, fn);
|
|
1715
|
-
},
|
|
1716
|
-
vueAppConnected(fn) {
|
|
1717
|
-
devtoolsHooks.hook("app:connected" /* APP_CONNECTED */, fn);
|
|
1718
|
-
},
|
|
1719
|
-
componentAdded(fn) {
|
|
1720
|
-
return devtoolsHooks.hook("component:added" /* COMPONENT_ADDED */, fn);
|
|
1721
|
-
},
|
|
1722
|
-
componentUpdated(fn) {
|
|
1723
|
-
return devtoolsHooks.hook("component:updated" /* COMPONENT_UPDATED */, fn);
|
|
1724
|
-
},
|
|
1725
|
-
componentRemoved(fn) {
|
|
1726
|
-
return devtoolsHooks.hook("component:removed" /* COMPONENT_REMOVED */, fn);
|
|
1727
|
-
},
|
|
1728
|
-
setupDevtoolsPlugin(fn) {
|
|
1729
|
-
devtoolsHooks.hook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, fn);
|
|
1730
|
-
}
|
|
1731
|
-
};
|
|
1732
|
-
function createDevToolsHook() {
|
|
1733
|
-
return {
|
|
1734
|
-
id: "vue-devtools-next",
|
|
1735
|
-
devtoolsVersion: "7.0",
|
|
1736
|
-
enabled: false,
|
|
1737
|
-
appRecords: [],
|
|
1738
|
-
apps: [],
|
|
1739
|
-
events: /* @__PURE__ */ new Map(),
|
|
1740
|
-
on(event, fn) {
|
|
1741
|
-
var _a24;
|
|
1742
|
-
if (!this.events.has(event))
|
|
1743
|
-
this.events.set(event, []);
|
|
1744
|
-
(_a24 = this.events.get(event)) == null ? void 0 : _a24.push(fn);
|
|
1745
|
-
return () => this.off(event, fn);
|
|
1746
|
-
},
|
|
1747
|
-
once(event, fn) {
|
|
1748
|
-
const onceFn = (...args) => {
|
|
1749
|
-
this.off(event, onceFn);
|
|
1750
|
-
fn(...args);
|
|
1751
|
-
};
|
|
1752
|
-
this.on(event, onceFn);
|
|
1753
|
-
return [event, onceFn];
|
|
1754
|
-
},
|
|
1755
|
-
off(event, fn) {
|
|
1756
|
-
if (this.events.has(event)) {
|
|
1757
|
-
const eventCallbacks = this.events.get(event);
|
|
1758
|
-
const index = eventCallbacks.indexOf(fn);
|
|
1759
|
-
if (index !== -1)
|
|
1760
|
-
eventCallbacks.splice(index, 1);
|
|
1761
|
-
}
|
|
1762
|
-
},
|
|
1763
|
-
emit(event, ...payload) {
|
|
1764
|
-
if (this.events.has(event))
|
|
1765
|
-
this.events.get(event).forEach((fn) => fn(...payload));
|
|
1766
|
-
}
|
|
1767
|
-
};
|
|
1768
|
-
}
|
|
1769
|
-
function subscribeDevToolsHook() {
|
|
1770
|
-
const hook2 = import_devtools_shared.target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1771
|
-
hook2.on("app:init" /* APP_INIT */, (app, version) => {
|
|
1772
|
-
var _a24, _b24, _c;
|
|
1773
|
-
if ((_c = (_b24 = (_a24 = app == null ? void 0 : app._instance) == null ? void 0 : _a24.type) == null ? void 0 : _b24.devtools) == null ? void 0 : _c.hide)
|
|
1774
|
-
return;
|
|
1775
|
-
devtoolsHooks.callHook("app:init" /* APP_INIT */, app, version);
|
|
1776
|
-
});
|
|
1777
|
-
hook2.on("app:unmount" /* APP_UNMOUNT */, (app) => {
|
|
1778
|
-
devtoolsHooks.callHook("app:unmount" /* APP_UNMOUNT */, app);
|
|
1779
|
-
});
|
|
1780
|
-
hook2.on("component:added" /* COMPONENT_ADDED */, async (app, uid, parentUid, component) => {
|
|
1781
|
-
var _a24, _b24, _c;
|
|
1782
|
-
if ((_c = (_b24 = (_a24 = app == null ? void 0 : app._instance) == null ? void 0 : _a24.type) == null ? void 0 : _b24.devtools) == null ? void 0 : _c.hide)
|
|
1783
|
-
return;
|
|
1784
|
-
if (!app || typeof uid !== "number" && !uid || !component)
|
|
1785
|
-
return;
|
|
1786
|
-
devtoolsHooks.callHook("component:added" /* COMPONENT_ADDED */, app, uid, parentUid, component);
|
|
1787
|
-
});
|
|
1788
|
-
hook2.on("component:updated" /* COMPONENT_UPDATED */, (app, uid, parentUid, component) => {
|
|
1789
|
-
if (!app || typeof uid !== "number" && !uid || !component)
|
|
1790
|
-
return;
|
|
1791
|
-
devtoolsHooks.callHook("component:updated" /* COMPONENT_UPDATED */, app, uid, parentUid, component);
|
|
1792
|
-
});
|
|
1793
|
-
hook2.on("component:removed" /* COMPONENT_REMOVED */, async (app, uid, parentUid, component) => {
|
|
1794
|
-
if (!app || typeof uid !== "number" && !uid || !component)
|
|
1795
|
-
return;
|
|
1796
|
-
devtoolsHooks.callHook("component:removed" /* COMPONENT_REMOVED */, app, uid, parentUid, component);
|
|
1797
|
-
});
|
|
1798
|
-
hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn, options) => {
|
|
1799
|
-
if ((options == null ? void 0 : options.target) === "legacy")
|
|
1800
|
-
return;
|
|
1801
|
-
devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
|
|
1802
|
-
});
|
|
1803
|
-
}
|
|
1804
|
-
var hook = {
|
|
1805
|
-
on,
|
|
1806
|
-
setupDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
1807
|
-
return devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
|
|
1808
|
-
}
|
|
1809
|
-
};
|
|
1810
|
-
|
|
1811
1707
|
// src/ctx/index.ts
|
|
1812
1708
|
init_cjs_shims();
|
|
1813
|
-
var
|
|
1709
|
+
var import_devtools_shared15 = require("@vue/devtools-shared");
|
|
1814
1710
|
|
|
1815
1711
|
// src/ctx/hook.ts
|
|
1816
1712
|
init_cjs_shims();
|
|
1817
|
-
var
|
|
1713
|
+
var import_hookable = require("hookable");
|
|
1818
1714
|
|
|
1819
1715
|
// src/core/component-highlighter/index.ts
|
|
1820
1716
|
init_cjs_shims();
|
|
1821
1717
|
|
|
1822
1718
|
// src/core/component/utils/index.ts
|
|
1823
1719
|
init_cjs_shims();
|
|
1824
|
-
var
|
|
1720
|
+
var import_devtools_shared = require("@vue/devtools-shared");
|
|
1825
1721
|
|
|
1826
1722
|
// src/shared/stub-vue.ts
|
|
1827
1723
|
init_cjs_shims();
|
|
@@ -1850,7 +1746,7 @@ function getComponentTypeName(options) {
|
|
|
1850
1746
|
function getComponentFileName(options) {
|
|
1851
1747
|
const file = options.__file;
|
|
1852
1748
|
if (file)
|
|
1853
|
-
return (0,
|
|
1749
|
+
return (0, import_devtools_shared.classify)((0, import_devtools_shared.basename)(file, ".vue"));
|
|
1854
1750
|
}
|
|
1855
1751
|
function getComponentName(options) {
|
|
1856
1752
|
const name = options.displayName || options.name || options._componentTag;
|
|
@@ -1882,21 +1778,21 @@ async function getComponentId(options) {
|
|
|
1882
1778
|
}
|
|
1883
1779
|
}
|
|
1884
1780
|
function isFragment(instance) {
|
|
1885
|
-
var
|
|
1886
|
-
const subTreeType = (
|
|
1781
|
+
var _a25;
|
|
1782
|
+
const subTreeType = (_a25 = instance.subTree) == null ? void 0 : _a25.type;
|
|
1887
1783
|
return subTreeType === Fragment;
|
|
1888
1784
|
}
|
|
1889
1785
|
function isBeingDestroyed(instance) {
|
|
1890
1786
|
return instance._isBeingDestroyed || instance.isUnmounted;
|
|
1891
1787
|
}
|
|
1892
1788
|
function getInstanceName(instance) {
|
|
1893
|
-
var
|
|
1789
|
+
var _a25, _b25, _c;
|
|
1894
1790
|
const name = getComponentTypeName((instance == null ? void 0 : instance.type) || {});
|
|
1895
1791
|
if (name)
|
|
1896
1792
|
return name;
|
|
1897
1793
|
if ((instance == null ? void 0 : instance.root) === instance)
|
|
1898
1794
|
return "Root";
|
|
1899
|
-
for (const key in (
|
|
1795
|
+
for (const key in (_b25 = (_a25 = instance.parent) == null ? void 0 : _a25.type) == null ? void 0 : _b25.components) {
|
|
1900
1796
|
if (instance.parent.type.components[key] === (instance == null ? void 0 : instance.type))
|
|
1901
1797
|
return saveComponentGussedName(instance, key);
|
|
1902
1798
|
}
|
|
@@ -1910,8 +1806,8 @@ function getInstanceName(instance) {
|
|
|
1910
1806
|
return "Anonymous Component";
|
|
1911
1807
|
}
|
|
1912
1808
|
function getUniqueComponentId(instance) {
|
|
1913
|
-
var
|
|
1914
|
-
const appId = (_c = (
|
|
1809
|
+
var _a25, _b25, _c;
|
|
1810
|
+
const appId = (_c = (_b25 = (_a25 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a25.app) == null ? void 0 : _b25.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__) != null ? _c : 0;
|
|
1915
1811
|
const instanceId = instance === (instance == null ? void 0 : instance.root) ? "root" : instance.uid;
|
|
1916
1812
|
return `${appId}:${instanceId}`;
|
|
1917
1813
|
}
|
|
@@ -2101,9 +1997,9 @@ function getStyles(bounds) {
|
|
|
2101
1997
|
};
|
|
2102
1998
|
}
|
|
2103
1999
|
function create(options) {
|
|
2104
|
-
var
|
|
2000
|
+
var _a25;
|
|
2105
2001
|
const containerEl = document.createElement("div");
|
|
2106
|
-
containerEl.id = (
|
|
2002
|
+
containerEl.id = (_a25 = options.elementId) != null ? _a25 : CONTAINER_ELEMENT_ID;
|
|
2107
2003
|
Object.assign(containerEl.style, {
|
|
2108
2004
|
...containerStyles,
|
|
2109
2005
|
...getStyles(options.bounds),
|
|
@@ -2158,9 +2054,9 @@ function unhighlight() {
|
|
|
2158
2054
|
}
|
|
2159
2055
|
var inspectInstance = null;
|
|
2160
2056
|
function inspectFn(e) {
|
|
2161
|
-
const
|
|
2162
|
-
if (
|
|
2163
|
-
const instance =
|
|
2057
|
+
const target22 = e.target;
|
|
2058
|
+
if (target22) {
|
|
2059
|
+
const instance = target22.__vueParentComponent;
|
|
2164
2060
|
if (instance) {
|
|
2165
2061
|
inspectInstance = instance;
|
|
2166
2062
|
const el = instance.vnode.el;
|
|
@@ -2174,11 +2070,11 @@ function inspectFn(e) {
|
|
|
2174
2070
|
}
|
|
2175
2071
|
}
|
|
2176
2072
|
function selectComponentFn(e, cb) {
|
|
2177
|
-
var
|
|
2073
|
+
var _a25;
|
|
2178
2074
|
e.preventDefault();
|
|
2179
2075
|
e.stopPropagation();
|
|
2180
2076
|
if (inspectInstance) {
|
|
2181
|
-
const app = (
|
|
2077
|
+
const app = (_a25 = activeAppRecord.value) == null ? void 0 : _a25.app;
|
|
2182
2078
|
getComponentId({
|
|
2183
2079
|
app,
|
|
2184
2080
|
uid: app.uid,
|
|
@@ -2256,23 +2152,23 @@ function scrollToComponent(options) {
|
|
|
2256
2152
|
|
|
2257
2153
|
// src/ctx/inspector.ts
|
|
2258
2154
|
init_cjs_shims();
|
|
2259
|
-
var
|
|
2155
|
+
var import_devtools_shared4 = require("@vue/devtools-shared");
|
|
2260
2156
|
var import_perfect_debounce2 = require("perfect-debounce");
|
|
2261
2157
|
|
|
2262
2158
|
// src/ctx/state.ts
|
|
2263
2159
|
init_cjs_shims();
|
|
2264
|
-
var
|
|
2160
|
+
var import_devtools_shared2 = require("@vue/devtools-shared");
|
|
2265
2161
|
var import_perfect_debounce = require("perfect-debounce");
|
|
2162
|
+
var _a, _b;
|
|
2163
|
+
(_b = (_a = import_devtools_shared2.target).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null ? _b : _a.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [];
|
|
2266
2164
|
var _a2, _b2;
|
|
2267
|
-
(_b2 = (_a2 =
|
|
2165
|
+
(_b2 = (_a2 = import_devtools_shared2.target).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null ? _b2 : _a2.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {};
|
|
2268
2166
|
var _a3, _b3;
|
|
2269
|
-
(_b3 = (_a3 =
|
|
2167
|
+
(_b3 = (_a3 = import_devtools_shared2.target).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null ? _b3 : _a3.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "";
|
|
2270
2168
|
var _a4, _b4;
|
|
2271
|
-
(_b4 = (_a4 =
|
|
2169
|
+
(_b4 = (_a4 = import_devtools_shared2.target).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null ? _b4 : _a4.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = [];
|
|
2272
2170
|
var _a5, _b5;
|
|
2273
|
-
(_b5 = (_a5 =
|
|
2274
|
-
var _a6, _b6;
|
|
2275
|
-
(_b6 = (_a6 = import_devtools_shared3.target).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null ? _b6 : _a6.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = [];
|
|
2171
|
+
(_b5 = (_a5 = import_devtools_shared2.target).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null ? _b5 : _a5.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = [];
|
|
2276
2172
|
var STATE_KEY = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
|
|
2277
2173
|
function initStateFactory() {
|
|
2278
2174
|
return {
|
|
@@ -2283,96 +2179,97 @@ function initStateFactory() {
|
|
|
2283
2179
|
activeAppRecordId: "",
|
|
2284
2180
|
tabs: [],
|
|
2285
2181
|
commands: [],
|
|
2286
|
-
highPerfModeEnabled:
|
|
2182
|
+
highPerfModeEnabled: true,
|
|
2183
|
+
devtoolsClientDetected: {}
|
|
2287
2184
|
};
|
|
2288
2185
|
}
|
|
2289
|
-
var
|
|
2290
|
-
(
|
|
2186
|
+
var _a6, _b6;
|
|
2187
|
+
(_b6 = (_a6 = import_devtools_shared2.target)[STATE_KEY]) != null ? _b6 : _a6[STATE_KEY] = initStateFactory();
|
|
2291
2188
|
var callStateUpdatedHook = (0, import_perfect_debounce.debounce)((state) => {
|
|
2292
2189
|
devtoolsContext.hooks.callHook("devtoolsStateUpdated" /* DEVTOOLS_STATE_UPDATED */, { state });
|
|
2293
2190
|
});
|
|
2294
2191
|
var callConnectedUpdatedHook = (0, import_perfect_debounce.debounce)((state, oldState) => {
|
|
2295
2192
|
devtoolsContext.hooks.callHook("devtoolsConnectedUpdated" /* DEVTOOLS_CONNECTED_UPDATED */, { state, oldState });
|
|
2296
2193
|
});
|
|
2297
|
-
var devtoolsAppRecords = new Proxy(
|
|
2194
|
+
var devtoolsAppRecords = new Proxy(import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
|
|
2298
2195
|
get(_target, prop, receiver) {
|
|
2299
2196
|
if (prop === "value")
|
|
2300
|
-
return
|
|
2301
|
-
return
|
|
2197
|
+
return import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_APP_RECORDS__;
|
|
2198
|
+
return import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_APP_RECORDS__[prop];
|
|
2302
2199
|
}
|
|
2303
2200
|
});
|
|
2304
2201
|
var addDevToolsAppRecord = (app) => {
|
|
2305
|
-
|
|
2306
|
-
...
|
|
2202
|
+
import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [
|
|
2203
|
+
...import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_APP_RECORDS__,
|
|
2307
2204
|
app
|
|
2308
2205
|
];
|
|
2309
2206
|
};
|
|
2310
2207
|
var removeDevToolsAppRecord = (app) => {
|
|
2311
|
-
|
|
2208
|
+
import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = devtoolsAppRecords.value.filter((record) => record.app !== app);
|
|
2312
2209
|
};
|
|
2313
|
-
var activeAppRecord = new Proxy(
|
|
2210
|
+
var activeAppRecord = new Proxy(import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, {
|
|
2314
2211
|
get(_target, prop, receiver) {
|
|
2315
2212
|
if (prop === "value")
|
|
2316
|
-
return
|
|
2213
|
+
return import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__;
|
|
2317
2214
|
else if (prop === "id")
|
|
2318
|
-
return
|
|
2319
|
-
return
|
|
2215
|
+
return import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__;
|
|
2216
|
+
return import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[prop];
|
|
2320
2217
|
}
|
|
2321
2218
|
});
|
|
2322
2219
|
function updateAllStates() {
|
|
2323
2220
|
callStateUpdatedHook({
|
|
2324
|
-
...
|
|
2221
|
+
...import_devtools_shared2.target[STATE_KEY],
|
|
2325
2222
|
appRecords: devtoolsAppRecords.value,
|
|
2326
2223
|
activeAppRecordId: activeAppRecord.id,
|
|
2327
|
-
tabs:
|
|
2328
|
-
commands:
|
|
2224
|
+
tabs: import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
|
|
2225
|
+
commands: import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
|
|
2329
2226
|
});
|
|
2330
2227
|
}
|
|
2331
2228
|
function setActiveAppRecord(app) {
|
|
2332
|
-
|
|
2229
|
+
import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = app;
|
|
2333
2230
|
updateAllStates();
|
|
2334
2231
|
}
|
|
2335
2232
|
function setActiveAppRecordId(id) {
|
|
2336
|
-
|
|
2233
|
+
import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = id;
|
|
2337
2234
|
updateAllStates();
|
|
2338
2235
|
}
|
|
2339
|
-
var devtoolsState = new Proxy(
|
|
2340
|
-
get(
|
|
2236
|
+
var devtoolsState = new Proxy(import_devtools_shared2.target[STATE_KEY], {
|
|
2237
|
+
get(target22, property) {
|
|
2341
2238
|
if (property === "appRecords") {
|
|
2342
2239
|
return devtoolsAppRecords;
|
|
2343
2240
|
} else if (property === "activeAppRecordId") {
|
|
2344
2241
|
return activeAppRecord.id;
|
|
2345
2242
|
} else if (property === "tabs") {
|
|
2346
|
-
return
|
|
2243
|
+
return import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
|
|
2347
2244
|
} else if (property === "commands") {
|
|
2348
|
-
return
|
|
2245
|
+
return import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
|
|
2349
2246
|
}
|
|
2350
|
-
return
|
|
2247
|
+
return import_devtools_shared2.target[STATE_KEY][property];
|
|
2351
2248
|
},
|
|
2352
|
-
deleteProperty(
|
|
2353
|
-
delete
|
|
2249
|
+
deleteProperty(target22, property) {
|
|
2250
|
+
delete target22[property];
|
|
2354
2251
|
return true;
|
|
2355
2252
|
},
|
|
2356
|
-
set(
|
|
2357
|
-
const oldState = { ...
|
|
2358
|
-
|
|
2359
|
-
|
|
2253
|
+
set(target22, property, value) {
|
|
2254
|
+
const oldState = { ...import_devtools_shared2.target[STATE_KEY] };
|
|
2255
|
+
target22[property] = value;
|
|
2256
|
+
import_devtools_shared2.target[STATE_KEY][property] = value;
|
|
2360
2257
|
return true;
|
|
2361
2258
|
}
|
|
2362
2259
|
});
|
|
2363
2260
|
function resetDevToolsState() {
|
|
2364
|
-
Object.assign(
|
|
2261
|
+
Object.assign(import_devtools_shared2.target[STATE_KEY], initStateFactory());
|
|
2365
2262
|
}
|
|
2366
2263
|
function updateDevToolsState(state) {
|
|
2367
2264
|
const oldState = {
|
|
2368
|
-
...
|
|
2265
|
+
...import_devtools_shared2.target[STATE_KEY],
|
|
2369
2266
|
appRecords: devtoolsAppRecords.value,
|
|
2370
2267
|
activeAppRecordId: activeAppRecord.id
|
|
2371
2268
|
};
|
|
2372
2269
|
if (oldState.connected !== state.connected && state.connected || oldState.clientConnected !== state.clientConnected && state.clientConnected) {
|
|
2373
|
-
callConnectedUpdatedHook(
|
|
2270
|
+
callConnectedUpdatedHook(import_devtools_shared2.target[STATE_KEY], oldState);
|
|
2374
2271
|
}
|
|
2375
|
-
Object.assign(
|
|
2272
|
+
Object.assign(import_devtools_shared2.target[STATE_KEY], state);
|
|
2376
2273
|
updateAllStates();
|
|
2377
2274
|
}
|
|
2378
2275
|
function onDevToolsConnected(fn) {
|
|
@@ -2395,12 +2292,12 @@ var resolveIcon = (icon) => {
|
|
|
2395
2292
|
if (icon.startsWith("baseline-")) {
|
|
2396
2293
|
return `custom-ic-${icon}`;
|
|
2397
2294
|
}
|
|
2398
|
-
if (icon.startsWith("i-") || (0,
|
|
2295
|
+
if (icon.startsWith("i-") || (0, import_devtools_shared2.isUrlString)(icon))
|
|
2399
2296
|
return icon;
|
|
2400
2297
|
return `custom-ic-baseline-${icon}`;
|
|
2401
2298
|
};
|
|
2402
2299
|
function addCustomTab(tab) {
|
|
2403
|
-
const tabs =
|
|
2300
|
+
const tabs = import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
|
|
2404
2301
|
if (tabs.some((t) => t.name === tab.name))
|
|
2405
2302
|
return;
|
|
2406
2303
|
tabs.push({
|
|
@@ -2410,7 +2307,7 @@ function addCustomTab(tab) {
|
|
|
2410
2307
|
updateAllStates();
|
|
2411
2308
|
}
|
|
2412
2309
|
function addCustomCommand(action) {
|
|
2413
|
-
const commands =
|
|
2310
|
+
const commands = import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
|
|
2414
2311
|
if (commands.some((t) => t.id === action.id))
|
|
2415
2312
|
return;
|
|
2416
2313
|
commands.push({
|
|
@@ -2424,7 +2321,7 @@ function addCustomCommand(action) {
|
|
|
2424
2321
|
updateAllStates();
|
|
2425
2322
|
}
|
|
2426
2323
|
function removeCustomCommand(actionId) {
|
|
2427
|
-
const commands =
|
|
2324
|
+
const commands = import_devtools_shared2.target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
|
|
2428
2325
|
const index = commands.findIndex((t) => t.id === actionId);
|
|
2429
2326
|
if (index === -1)
|
|
2430
2327
|
return;
|
|
@@ -2437,12 +2334,12 @@ function toggleClientConnected(state) {
|
|
|
2437
2334
|
|
|
2438
2335
|
// src/ctx/timeline.ts
|
|
2439
2336
|
init_cjs_shims();
|
|
2440
|
-
var
|
|
2441
|
-
var
|
|
2442
|
-
(
|
|
2443
|
-
var devtoolsTimelineLayers = new Proxy(
|
|
2444
|
-
get(
|
|
2445
|
-
return Reflect.get(
|
|
2337
|
+
var import_devtools_shared3 = require("@vue/devtools-shared");
|
|
2338
|
+
var _a7, _b7;
|
|
2339
|
+
(_b7 = (_a7 = import_devtools_shared3.target).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null ? _b7 : _a7.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = [];
|
|
2340
|
+
var devtoolsTimelineLayers = new Proxy(import_devtools_shared3.target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
|
|
2341
|
+
get(target22, prop, receiver) {
|
|
2342
|
+
return Reflect.get(target22, prop, receiver);
|
|
2446
2343
|
}
|
|
2447
2344
|
});
|
|
2448
2345
|
function addTimelineLayer(options, descriptor) {
|
|
@@ -2454,11 +2351,11 @@ function addTimelineLayer(options, descriptor) {
|
|
|
2454
2351
|
}
|
|
2455
2352
|
|
|
2456
2353
|
// src/ctx/inspector.ts
|
|
2457
|
-
var
|
|
2458
|
-
(
|
|
2459
|
-
var devtoolsInspector = new Proxy(
|
|
2460
|
-
get(
|
|
2461
|
-
return Reflect.get(
|
|
2354
|
+
var _a8, _b8;
|
|
2355
|
+
(_b8 = (_a8 = import_devtools_shared4.target).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null ? _b8 : _a8.__VUE_DEVTOOLS_KIT_INSPECTOR__ = [];
|
|
2356
|
+
var devtoolsInspector = new Proxy(import_devtools_shared4.target.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
|
|
2357
|
+
get(target22, prop, receiver) {
|
|
2358
|
+
return Reflect.get(target22, prop, receiver);
|
|
2462
2359
|
}
|
|
2463
2360
|
});
|
|
2464
2361
|
var callInspectorUpdatedHook = (0, import_perfect_debounce2.debounce)(() => {
|
|
@@ -2476,14 +2373,14 @@ function addInspector(inspector, descriptor) {
|
|
|
2476
2373
|
}
|
|
2477
2374
|
function getActiveInspectors() {
|
|
2478
2375
|
return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== "components").map((inspector) => {
|
|
2479
|
-
var
|
|
2376
|
+
var _a25;
|
|
2480
2377
|
const descriptor = inspector.descriptor;
|
|
2481
2378
|
const options = inspector.options;
|
|
2482
2379
|
return {
|
|
2483
2380
|
id: options.id,
|
|
2484
2381
|
label: options.label,
|
|
2485
2382
|
logo: descriptor.logo,
|
|
2486
|
-
icon: `custom-ic-baseline-${(
|
|
2383
|
+
icon: `custom-ic-baseline-${(_a25 = options == null ? void 0 : options.icon) == null ? void 0 : _a25.replace(/_/g, "-")}`,
|
|
2487
2384
|
packageName: descriptor.packageName,
|
|
2488
2385
|
homepage: descriptor.homepage
|
|
2489
2386
|
};
|
|
@@ -2560,13 +2457,13 @@ var DevToolsMessagingHookKeys = /* @__PURE__ */ ((DevToolsMessagingHookKeys2) =>
|
|
|
2560
2457
|
return DevToolsMessagingHookKeys2;
|
|
2561
2458
|
})(DevToolsMessagingHookKeys || {});
|
|
2562
2459
|
function createDevToolsCtxHooks() {
|
|
2563
|
-
const hooks2 = (0,
|
|
2460
|
+
const hooks2 = (0, import_hookable.createHooks)();
|
|
2564
2461
|
hooks2.hook("addInspector" /* ADD_INSPECTOR */, ({ inspector, plugin }) => {
|
|
2565
2462
|
addInspector(inspector, plugin.descriptor);
|
|
2566
2463
|
});
|
|
2567
2464
|
hooks2.hook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, async ({ inspectorId, plugin }) => {
|
|
2568
|
-
var
|
|
2569
|
-
if (!inspectorId || !((
|
|
2465
|
+
var _a25;
|
|
2466
|
+
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app))
|
|
2570
2467
|
return;
|
|
2571
2468
|
const inspector = getInspector(inspectorId, plugin.descriptor.app);
|
|
2572
2469
|
const _payload = {
|
|
@@ -2589,8 +2486,8 @@ function createDevToolsCtxHooks() {
|
|
|
2589
2486
|
}, "sendInspectorTreeToClient" /* SEND_INSPECTOR_TREE_TO_CLIENT */);
|
|
2590
2487
|
});
|
|
2591
2488
|
hooks2.hook("sendInspectorState" /* SEND_INSPECTOR_STATE */, async ({ inspectorId, plugin }) => {
|
|
2592
|
-
var
|
|
2593
|
-
if (!inspectorId || !((
|
|
2489
|
+
var _a25;
|
|
2490
|
+
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app))
|
|
2594
2491
|
return;
|
|
2595
2492
|
const inspector = getInspector(inspectorId, plugin.descriptor.app);
|
|
2596
2493
|
const _payload = {
|
|
@@ -2662,7 +2559,7 @@ function createDevToolsCtxHooks() {
|
|
|
2662
2559
|
|
|
2663
2560
|
// src/ctx/api.ts
|
|
2664
2561
|
init_cjs_shims();
|
|
2665
|
-
var
|
|
2562
|
+
var import_devtools_shared13 = require("@vue/devtools-shared");
|
|
2666
2563
|
|
|
2667
2564
|
// src/core/component/state/editor.ts
|
|
2668
2565
|
init_cjs_shims();
|
|
@@ -2735,9 +2632,9 @@ var StateEditor = class {
|
|
|
2735
2632
|
else Reflect.deleteProperty(object, field);
|
|
2736
2633
|
}
|
|
2737
2634
|
if (!state.remove) {
|
|
2738
|
-
const
|
|
2739
|
-
if (this.refEditor.isRef(
|
|
2740
|
-
this.refEditor.set(
|
|
2635
|
+
const target22 = object[state.newKey || field];
|
|
2636
|
+
if (this.refEditor.isRef(target22))
|
|
2637
|
+
this.refEditor.set(target22, value);
|
|
2741
2638
|
else if (toRaw(object) instanceof Map)
|
|
2742
2639
|
object.set(state.newKey || field, value);
|
|
2743
2640
|
else if (toRaw(object) instanceof Set)
|
|
@@ -2789,15 +2686,15 @@ async function editComponentState(payload, stateEditor2) {
|
|
|
2789
2686
|
if (!instance)
|
|
2790
2687
|
return;
|
|
2791
2688
|
const targetPath = path.slice();
|
|
2792
|
-
let
|
|
2689
|
+
let target22;
|
|
2793
2690
|
if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0]))
|
|
2794
|
-
|
|
2691
|
+
target22 = instance.devtoolsRawSetupState;
|
|
2795
2692
|
if (instance.data && Object.keys(instance.data).includes(path[0]))
|
|
2796
|
-
|
|
2797
|
-
if (
|
|
2693
|
+
target22 = instance.data;
|
|
2694
|
+
if (target22 && targetPath) {
|
|
2798
2695
|
if (state.type === "object" && type === "reactive") {
|
|
2799
2696
|
}
|
|
2800
|
-
stateEditor2.set(
|
|
2697
|
+
stateEditor2.set(target22, targetPath, state.value, stateEditor2.createDefaultSetCallback(state));
|
|
2801
2698
|
}
|
|
2802
2699
|
}
|
|
2803
2700
|
var stateEditor = new StateEditor();
|
|
@@ -2807,17 +2704,17 @@ async function editState(payload) {
|
|
|
2807
2704
|
|
|
2808
2705
|
// src/core/open-in-editor/index.ts
|
|
2809
2706
|
init_cjs_shims();
|
|
2810
|
-
var
|
|
2707
|
+
var import_devtools_shared5 = require("@vue/devtools-shared");
|
|
2811
2708
|
function setOpenInEditorBaseUrl(url) {
|
|
2812
|
-
|
|
2709
|
+
import_devtools_shared5.target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ = url;
|
|
2813
2710
|
}
|
|
2814
2711
|
function openInEditor(options = {}) {
|
|
2815
|
-
var
|
|
2712
|
+
var _a25, _b25, _c;
|
|
2816
2713
|
const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
|
|
2817
2714
|
if (file) {
|
|
2818
2715
|
if (host === "chrome-extension") {
|
|
2819
2716
|
const fileName = file.replace(/\\/g, "\\\\");
|
|
2820
|
-
const _baseUrl = (
|
|
2717
|
+
const _baseUrl = (_b25 = (_a25 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a25.openInEditorHost) != null ? _b25 : "/";
|
|
2821
2718
|
fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
|
|
2822
2719
|
if (!response.ok) {
|
|
2823
2720
|
const msg = `Opening component ${fileName} failed`;
|
|
@@ -2825,38 +2722,38 @@ function openInEditor(options = {}) {
|
|
|
2825
2722
|
}
|
|
2826
2723
|
});
|
|
2827
2724
|
} else if (devtoolsState.vitePluginDetected) {
|
|
2828
|
-
const _baseUrl = (_c =
|
|
2829
|
-
|
|
2725
|
+
const _baseUrl = (_c = import_devtools_shared5.target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;
|
|
2726
|
+
import_devtools_shared5.target.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
|
|
2830
2727
|
}
|
|
2831
2728
|
}
|
|
2832
2729
|
}
|
|
2833
2730
|
|
|
2834
2731
|
// src/core/router/index.ts
|
|
2835
2732
|
init_cjs_shims();
|
|
2836
|
-
var
|
|
2733
|
+
var import_devtools_shared7 = require("@vue/devtools-shared");
|
|
2837
2734
|
var import_perfect_debounce3 = require("perfect-debounce");
|
|
2838
2735
|
|
|
2839
2736
|
// src/ctx/router.ts
|
|
2840
2737
|
init_cjs_shims();
|
|
2841
|
-
var
|
|
2738
|
+
var import_devtools_shared6 = require("@vue/devtools-shared");
|
|
2842
2739
|
var ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
|
|
2843
2740
|
var ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
|
|
2844
|
-
var
|
|
2845
|
-
(
|
|
2741
|
+
var _a9, _b9;
|
|
2742
|
+
(_b9 = (_a9 = import_devtools_shared6.target)[ROUTER_INFO_KEY]) != null ? _b9 : _a9[ROUTER_INFO_KEY] = {
|
|
2846
2743
|
currentRoute: null,
|
|
2847
2744
|
routes: []
|
|
2848
2745
|
};
|
|
2849
|
-
var
|
|
2850
|
-
(
|
|
2851
|
-
var devtoolsRouterInfo = new Proxy(
|
|
2852
|
-
get(
|
|
2853
|
-
return
|
|
2746
|
+
var _a10, _b10;
|
|
2747
|
+
(_b10 = (_a10 = import_devtools_shared6.target)[ROUTER_KEY]) != null ? _b10 : _a10[ROUTER_KEY] = {};
|
|
2748
|
+
var devtoolsRouterInfo = new Proxy(import_devtools_shared6.target[ROUTER_INFO_KEY], {
|
|
2749
|
+
get(target22, property) {
|
|
2750
|
+
return import_devtools_shared6.target[ROUTER_INFO_KEY][property];
|
|
2854
2751
|
}
|
|
2855
2752
|
});
|
|
2856
|
-
var devtoolsRouter = new Proxy(
|
|
2857
|
-
get(
|
|
2753
|
+
var devtoolsRouter = new Proxy(import_devtools_shared6.target[ROUTER_KEY], {
|
|
2754
|
+
get(target22, property) {
|
|
2858
2755
|
if (property === "value") {
|
|
2859
|
-
return
|
|
2756
|
+
return import_devtools_shared6.target[ROUTER_KEY];
|
|
2860
2757
|
}
|
|
2861
2758
|
}
|
|
2862
2759
|
});
|
|
@@ -2868,13 +2765,14 @@ function getRoutes(router) {
|
|
|
2868
2765
|
}
|
|
2869
2766
|
function filterRoutes(routes) {
|
|
2870
2767
|
return routes.map((item) => {
|
|
2871
|
-
let { path, name, children } = item;
|
|
2768
|
+
let { path, name, children, meta } = item;
|
|
2872
2769
|
if (children == null ? void 0 : children.length)
|
|
2873
2770
|
children = filterRoutes(children);
|
|
2874
2771
|
return {
|
|
2875
2772
|
path,
|
|
2876
2773
|
name,
|
|
2877
|
-
children
|
|
2774
|
+
children,
|
|
2775
|
+
meta
|
|
2878
2776
|
};
|
|
2879
2777
|
});
|
|
2880
2778
|
}
|
|
@@ -2896,42 +2794,42 @@ function filterCurrentRoute(route) {
|
|
|
2896
2794
|
}
|
|
2897
2795
|
function normalizeRouterInfo(appRecord, activeAppRecord2) {
|
|
2898
2796
|
function init() {
|
|
2899
|
-
var
|
|
2900
|
-
const router = (
|
|
2797
|
+
var _a25;
|
|
2798
|
+
const router = (_a25 = appRecord.app) == null ? void 0 : _a25.config.globalProperties.$router;
|
|
2901
2799
|
const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);
|
|
2902
2800
|
const routes = filterRoutes(getRoutes(router));
|
|
2903
2801
|
const c = console.warn;
|
|
2904
2802
|
console.warn = () => {
|
|
2905
2803
|
};
|
|
2906
|
-
|
|
2907
|
-
currentRoute: currentRoute ? (0,
|
|
2908
|
-
routes: (0,
|
|
2804
|
+
import_devtools_shared7.target[ROUTER_INFO_KEY] = {
|
|
2805
|
+
currentRoute: currentRoute ? (0, import_devtools_shared7.deepClone)(currentRoute) : {},
|
|
2806
|
+
routes: (0, import_devtools_shared7.deepClone)(routes)
|
|
2909
2807
|
};
|
|
2910
|
-
|
|
2808
|
+
import_devtools_shared7.target[ROUTER_KEY] = router;
|
|
2911
2809
|
console.warn = c;
|
|
2912
2810
|
}
|
|
2913
2811
|
init();
|
|
2914
2812
|
hook.on.componentUpdated((0, import_perfect_debounce3.debounce)(() => {
|
|
2915
|
-
var
|
|
2916
|
-
if (((
|
|
2813
|
+
var _a25;
|
|
2814
|
+
if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
|
|
2917
2815
|
return;
|
|
2918
2816
|
init();
|
|
2919
|
-
devtoolsContext.hooks.callHook("routerInfoUpdated" /* ROUTER_INFO_UPDATED */, { state:
|
|
2817
|
+
devtoolsContext.hooks.callHook("routerInfoUpdated" /* ROUTER_INFO_UPDATED */, { state: import_devtools_shared7.target[ROUTER_INFO_KEY] });
|
|
2920
2818
|
}, 200));
|
|
2921
2819
|
}
|
|
2922
2820
|
|
|
2923
2821
|
// src/core/component-inspector/index.ts
|
|
2924
2822
|
init_cjs_shims();
|
|
2925
|
-
var
|
|
2926
|
-
var
|
|
2927
|
-
(
|
|
2823
|
+
var import_devtools_shared8 = require("@vue/devtools-shared");
|
|
2824
|
+
var _a11, _b11;
|
|
2825
|
+
(_b11 = (_a11 = import_devtools_shared8.target).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null ? _b11 : _a11.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true;
|
|
2928
2826
|
function toggleComponentInspectorEnabled(enabled) {
|
|
2929
|
-
|
|
2827
|
+
import_devtools_shared8.target.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = enabled;
|
|
2930
2828
|
}
|
|
2931
2829
|
function waitForInspectorInit(cb) {
|
|
2932
2830
|
let total = 0;
|
|
2933
2831
|
const timer = setInterval(() => {
|
|
2934
|
-
if (
|
|
2832
|
+
if (import_devtools_shared8.target.__VUE_INSPECTOR__) {
|
|
2935
2833
|
clearInterval(timer);
|
|
2936
2834
|
total += 30;
|
|
2937
2835
|
cb();
|
|
@@ -2942,7 +2840,7 @@ function waitForInspectorInit(cb) {
|
|
|
2942
2840
|
}, 30);
|
|
2943
2841
|
}
|
|
2944
2842
|
function setupInspector() {
|
|
2945
|
-
const inspector =
|
|
2843
|
+
const inspector = import_devtools_shared8.target.__VUE_INSPECTOR__;
|
|
2946
2844
|
const _openInEditor = inspector.openInEditor;
|
|
2947
2845
|
inspector.openInEditor = async (...params) => {
|
|
2948
2846
|
inspector.disable();
|
|
@@ -2953,9 +2851,9 @@ function getComponentInspector() {
|
|
|
2953
2851
|
return new Promise((resolve) => {
|
|
2954
2852
|
function setup() {
|
|
2955
2853
|
setupInspector();
|
|
2956
|
-
resolve(
|
|
2854
|
+
resolve(import_devtools_shared8.target.__VUE_INSPECTOR__);
|
|
2957
2855
|
}
|
|
2958
|
-
if (!
|
|
2856
|
+
if (!import_devtools_shared8.target.__VUE_INSPECTOR__) {
|
|
2959
2857
|
waitForInspectorInit(() => {
|
|
2960
2858
|
setup();
|
|
2961
2859
|
});
|
|
@@ -2967,7 +2865,7 @@ function getComponentInspector() {
|
|
|
2967
2865
|
|
|
2968
2866
|
// src/core/plugin/index.ts
|
|
2969
2867
|
init_cjs_shims();
|
|
2970
|
-
var
|
|
2868
|
+
var import_devtools_shared12 = require("@vue/devtools-shared");
|
|
2971
2869
|
|
|
2972
2870
|
// src/api/index.ts
|
|
2973
2871
|
init_cjs_shims();
|
|
@@ -2975,20 +2873,82 @@ init_cjs_shims();
|
|
|
2975
2873
|
// src/api/v6/index.ts
|
|
2976
2874
|
init_cjs_shims();
|
|
2977
2875
|
|
|
2876
|
+
// src/core/plugin/plugin-settings.ts
|
|
2877
|
+
init_cjs_shims();
|
|
2878
|
+
|
|
2978
2879
|
// src/ctx/plugin.ts
|
|
2979
2880
|
init_cjs_shims();
|
|
2980
|
-
var
|
|
2981
|
-
var
|
|
2982
|
-
(
|
|
2983
|
-
var devtoolsPluginBuffer = new Proxy(
|
|
2984
|
-
get(
|
|
2985
|
-
return Reflect.get(
|
|
2881
|
+
var import_devtools_shared9 = require("@vue/devtools-shared");
|
|
2882
|
+
var _a12, _b12;
|
|
2883
|
+
(_b12 = (_a12 = import_devtools_shared9.target).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null ? _b12 : _a12.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = [];
|
|
2884
|
+
var devtoolsPluginBuffer = new Proxy(import_devtools_shared9.target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
|
|
2885
|
+
get(target22, prop, receiver) {
|
|
2886
|
+
return Reflect.get(target22, prop, receiver);
|
|
2986
2887
|
}
|
|
2987
2888
|
});
|
|
2988
2889
|
function addDevToolsPluginToBuffer(pluginDescriptor, setupFn) {
|
|
2989
2890
|
devtoolsPluginBuffer.push([pluginDescriptor, setupFn]);
|
|
2990
2891
|
}
|
|
2991
2892
|
|
|
2893
|
+
// src/core/plugin/plugin-settings.ts
|
|
2894
|
+
function _getSettings(settings) {
|
|
2895
|
+
const _settings = {};
|
|
2896
|
+
Object.keys(settings).forEach((key) => {
|
|
2897
|
+
_settings[key] = settings[key].defaultValue;
|
|
2898
|
+
});
|
|
2899
|
+
return _settings;
|
|
2900
|
+
}
|
|
2901
|
+
function getPluginLocalKey(pluginId) {
|
|
2902
|
+
return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
|
|
2903
|
+
}
|
|
2904
|
+
function getPluginSettingsOptions(pluginId) {
|
|
2905
|
+
var _a25, _b25, _c, _d;
|
|
2906
|
+
const descriptor = (_a25 = getInspector(pluginId)) == null ? void 0 : _a25.descriptor;
|
|
2907
|
+
const item = (_c = (_b25 = devtoolsPluginBuffer.find((item2) => item2[0].id === (descriptor == null ? void 0 : descriptor.id))) == null ? void 0 : _b25[0]) != null ? _c : null;
|
|
2908
|
+
return (_d = item == null ? void 0 : item.settings) != null ? _d : null;
|
|
2909
|
+
}
|
|
2910
|
+
function getPluginSettings(pluginId, fallbackValue) {
|
|
2911
|
+
var _a25, _b25, _c;
|
|
2912
|
+
const localKey = getPluginLocalKey(pluginId);
|
|
2913
|
+
if (localKey) {
|
|
2914
|
+
const localSettings = localStorage.getItem(localKey);
|
|
2915
|
+
if (localSettings) {
|
|
2916
|
+
return JSON.parse(localSettings);
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
if (pluginId) {
|
|
2920
|
+
const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => item2[0].id === pluginId)) == null ? void 0 : _a25[0]) != null ? _b25 : null;
|
|
2921
|
+
return _getSettings((_c = item == null ? void 0 : item.settings) != null ? _c : {});
|
|
2922
|
+
}
|
|
2923
|
+
return _getSettings(fallbackValue);
|
|
2924
|
+
}
|
|
2925
|
+
function initPluginSettings(pluginId, settings) {
|
|
2926
|
+
const localKey = getPluginLocalKey(pluginId);
|
|
2927
|
+
const localSettings = localStorage.getItem(localKey);
|
|
2928
|
+
if (!localSettings) {
|
|
2929
|
+
localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
function setPluginSettings(pluginId, key, value) {
|
|
2933
|
+
const localKey = getPluginLocalKey(pluginId);
|
|
2934
|
+
const localSettings = localStorage.getItem(localKey);
|
|
2935
|
+
const parsedLocalSettings = JSON.parse(localSettings || "{}");
|
|
2936
|
+
const updated = {
|
|
2937
|
+
...parsedLocalSettings,
|
|
2938
|
+
[key]: value
|
|
2939
|
+
};
|
|
2940
|
+
localStorage.setItem(localKey, JSON.stringify(updated));
|
|
2941
|
+
devtoolsContext.hooks.callHookWith((callbacks) => {
|
|
2942
|
+
callbacks.forEach((cb) => cb({
|
|
2943
|
+
pluginId,
|
|
2944
|
+
key,
|
|
2945
|
+
oldValue: parsedLocalSettings[key],
|
|
2946
|
+
newValue: value,
|
|
2947
|
+
settings: updated
|
|
2948
|
+
}));
|
|
2949
|
+
}, "setPluginSettings" /* SET_PLUGIN_SETTINGS */);
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2992
2952
|
// src/api/v6/index.ts
|
|
2993
2953
|
var DevToolsV6PluginAPI = class {
|
|
2994
2954
|
constructor({ plugin, ctx }) {
|
|
@@ -3032,14 +2992,14 @@ var DevToolsV6PluginAPI = class {
|
|
|
3032
2992
|
}
|
|
3033
2993
|
// component inspector
|
|
3034
2994
|
notifyComponentUpdate(instance) {
|
|
3035
|
-
var
|
|
2995
|
+
var _a25;
|
|
3036
2996
|
const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
|
|
3037
2997
|
if (inspector == null ? void 0 : inspector.id) {
|
|
3038
2998
|
if (instance) {
|
|
3039
2999
|
const args = [
|
|
3040
3000
|
instance.appContext.app,
|
|
3041
3001
|
instance.uid,
|
|
3042
|
-
(
|
|
3002
|
+
(_a25 = instance.parent) == null ? void 0 : _a25.uid,
|
|
3043
3003
|
instance
|
|
3044
3004
|
];
|
|
3045
3005
|
devtoolsHooks.callHook("component:updated" /* COMPONENT_UPDATED */, ...args);
|
|
@@ -3052,6 +3012,9 @@ var DevToolsV6PluginAPI = class {
|
|
|
3052
3012
|
// custom inspector
|
|
3053
3013
|
addInspector(options) {
|
|
3054
3014
|
this.hooks.callHook("addInspector" /* ADD_INSPECTOR */, { inspector: options, plugin: this.plugin });
|
|
3015
|
+
if (this.plugin.descriptor.settings) {
|
|
3016
|
+
initPluginSettings(options.id, this.plugin.descriptor.settings);
|
|
3017
|
+
}
|
|
3055
3018
|
}
|
|
3056
3019
|
sendInspectorTree(inspectorId) {
|
|
3057
3020
|
this.hooks.callHook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, { inspectorId, plugin: this.plugin });
|
|
@@ -3074,20 +3037,8 @@ var DevToolsV6PluginAPI = class {
|
|
|
3074
3037
|
}
|
|
3075
3038
|
// settings
|
|
3076
3039
|
getSettings(pluginId) {
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
const _settings = {};
|
|
3080
|
-
Object.keys(settings).forEach((key) => {
|
|
3081
|
-
_settings[key] = settings[key].defaultValue;
|
|
3082
|
-
});
|
|
3083
|
-
return _settings;
|
|
3084
|
-
}
|
|
3085
|
-
if (pluginId) {
|
|
3086
|
-
const item = (_b24 = (_a24 = devtoolsPluginBuffer.find((item2) => item2[0].id === pluginId)) == null ? void 0 : _a24[0]) != null ? _b24 : null;
|
|
3087
|
-
return (_c = _getSettings(item == null ? void 0 : item.settings)) != null ? _c : _getSettings(this.plugin.descriptor.settings);
|
|
3088
|
-
} else {
|
|
3089
|
-
return _getSettings(this.plugin.descriptor.settings);
|
|
3090
|
-
}
|
|
3040
|
+
const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
|
|
3041
|
+
return getPluginSettings(pluginId != null ? pluginId : inspector == null ? void 0 : inspector.id, this.plugin.descriptor.settings);
|
|
3091
3042
|
}
|
|
3092
3043
|
// utilities
|
|
3093
3044
|
getComponentInstances(app) {
|
|
@@ -3120,7 +3071,7 @@ init_cjs_shims();
|
|
|
3120
3071
|
|
|
3121
3072
|
// src/core/component/tree/filter.ts
|
|
3122
3073
|
init_cjs_shims();
|
|
3123
|
-
var
|
|
3074
|
+
var import_devtools_shared10 = require("@vue/devtools-shared");
|
|
3124
3075
|
var ComponentFilter = class {
|
|
3125
3076
|
constructor(filter) {
|
|
3126
3077
|
this.filter = filter || "";
|
|
@@ -3133,7 +3084,7 @@ var ComponentFilter = class {
|
|
|
3133
3084
|
*/
|
|
3134
3085
|
isQualified(instance) {
|
|
3135
3086
|
const name = getInstanceName(instance);
|
|
3136
|
-
return (0,
|
|
3087
|
+
return (0, import_devtools_shared10.classify)(name).toLowerCase().includes(this.filter) || (0, import_devtools_shared10.kebabize)(name).toLowerCase().includes(this.filter);
|
|
3137
3088
|
}
|
|
3138
3089
|
};
|
|
3139
3090
|
function createComponentFilter(filterText) {
|
|
@@ -3184,7 +3135,7 @@ var ComponentWalker = class {
|
|
|
3184
3135
|
* @return {object}
|
|
3185
3136
|
*/
|
|
3186
3137
|
async capture(instance, depth) {
|
|
3187
|
-
var
|
|
3138
|
+
var _a25;
|
|
3188
3139
|
if (!instance)
|
|
3189
3140
|
return null;
|
|
3190
3141
|
const id = this.captureId(instance);
|
|
@@ -3239,7 +3190,7 @@ var ComponentWalker = class {
|
|
|
3239
3190
|
} else {
|
|
3240
3191
|
treeNode.domOrder = [-1];
|
|
3241
3192
|
}
|
|
3242
|
-
if ((
|
|
3193
|
+
if ((_a25 = instance.suspense) == null ? void 0 : _a25.suspenseKey) {
|
|
3243
3194
|
treeNode.tags.push({
|
|
3244
3195
|
label: instance.suspense.suspenseKey,
|
|
3245
3196
|
backgroundColor: 14979812,
|
|
@@ -3258,8 +3209,8 @@ var ComponentWalker = class {
|
|
|
3258
3209
|
* @return {Vue|Array}
|
|
3259
3210
|
*/
|
|
3260
3211
|
async findQualifiedChildren(instance, depth) {
|
|
3261
|
-
var
|
|
3262
|
-
if (this.componentFilter.isQualified(instance) && !((
|
|
3212
|
+
var _a25;
|
|
3213
|
+
if (this.componentFilter.isQualified(instance) && !((_a25 = instance.type.devtools) == null ? void 0 : _a25.hide)) {
|
|
3263
3214
|
return [await this.capture(instance, depth)];
|
|
3264
3215
|
} else if (instance.subTree) {
|
|
3265
3216
|
const list = this.isKeepAlive(instance) ? this.getKeepAliveCachedInstances(instance) : this.getInternalInstanceChildren(instance.subTree);
|
|
@@ -3279,8 +3230,8 @@ var ComponentWalker = class {
|
|
|
3279
3230
|
*/
|
|
3280
3231
|
async findQualifiedChildrenFromList(instances, depth) {
|
|
3281
3232
|
instances = instances.filter((child) => {
|
|
3282
|
-
var
|
|
3283
|
-
return !isBeingDestroyed(child) && !((
|
|
3233
|
+
var _a25;
|
|
3234
|
+
return !isBeingDestroyed(child) && !((_a25 = child.type.devtools) == null ? void 0 : _a25.hide);
|
|
3284
3235
|
});
|
|
3285
3236
|
if (!this.componentFilter.filter)
|
|
3286
3237
|
return Promise.all(instances.map((child) => this.capture(child, depth)));
|
|
@@ -3308,8 +3259,8 @@ var ComponentWalker = class {
|
|
|
3308
3259
|
}
|
|
3309
3260
|
}
|
|
3310
3261
|
return list.filter((child) => {
|
|
3311
|
-
var
|
|
3312
|
-
return !isBeingDestroyed(child) && !((
|
|
3262
|
+
var _a25;
|
|
3263
|
+
return !isBeingDestroyed(child) && !((_a25 = child.type.devtools) == null ? void 0 : _a25.hide);
|
|
3313
3264
|
});
|
|
3314
3265
|
}
|
|
3315
3266
|
/**
|
|
@@ -3337,7 +3288,7 @@ init_cjs_shims();
|
|
|
3337
3288
|
|
|
3338
3289
|
// src/core/component/state/process.ts
|
|
3339
3290
|
init_cjs_shims();
|
|
3340
|
-
var
|
|
3291
|
+
var import_devtools_shared11 = require("@vue/devtools-shared");
|
|
3341
3292
|
|
|
3342
3293
|
// src/core/component/state/constants.ts
|
|
3343
3294
|
init_cjs_shims();
|
|
@@ -3547,7 +3498,7 @@ function processProps(instance) {
|
|
|
3547
3498
|
const propDefinitions = instance.type.props;
|
|
3548
3499
|
for (const key in instance.props) {
|
|
3549
3500
|
const propDefinition = propDefinitions ? propDefinitions[key] : null;
|
|
3550
|
-
const camelizeKey = (0,
|
|
3501
|
+
const camelizeKey = (0, import_devtools_shared11.camelize)(key);
|
|
3551
3502
|
props.push({
|
|
3552
3503
|
type: "props",
|
|
3553
3504
|
key: camelizeKey,
|
|
@@ -3590,7 +3541,7 @@ function getStateTypeAndName(info) {
|
|
|
3590
3541
|
function processSetupState(instance) {
|
|
3591
3542
|
const raw = instance.devtoolsRawSetupState || {};
|
|
3592
3543
|
return Object.keys(instance.setupState).filter((key) => !vueBuiltins.has(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
|
|
3593
|
-
var
|
|
3544
|
+
var _a25, _b25, _c, _d;
|
|
3594
3545
|
const value = returnError(() => toRaw2(instance.setupState[key]));
|
|
3595
3546
|
const rawData = raw[key];
|
|
3596
3547
|
let result;
|
|
@@ -3599,7 +3550,7 @@ function processSetupState(instance) {
|
|
|
3599
3550
|
const info = getSetupStateType(rawData);
|
|
3600
3551
|
const { stateType, stateTypeName } = getStateTypeAndName(info);
|
|
3601
3552
|
const isState = info.ref || info.computed || info.reactive;
|
|
3602
|
-
const raw2 = ensurePropertyExists(rawData, "effect") ? ((
|
|
3553
|
+
const raw2 = ensurePropertyExists(rawData, "effect") ? ((_b25 = (_a25 = rawData.effect) == null ? void 0 : _a25.raw) == null ? void 0 : _b25.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
|
|
3603
3554
|
if (stateType)
|
|
3604
3555
|
isOtherType = false;
|
|
3605
3556
|
result = {
|
|
@@ -3629,8 +3580,8 @@ function processComputed(instance, mergedType) {
|
|
|
3629
3580
|
type: type2,
|
|
3630
3581
|
key,
|
|
3631
3582
|
value: returnError(() => {
|
|
3632
|
-
var
|
|
3633
|
-
return (
|
|
3583
|
+
var _a25;
|
|
3584
|
+
return (_a25 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a25[key];
|
|
3634
3585
|
}),
|
|
3635
3586
|
editable: typeof def.set === "function"
|
|
3636
3587
|
});
|
|
@@ -3692,10 +3643,10 @@ function processRefs(instance) {
|
|
|
3692
3643
|
}));
|
|
3693
3644
|
}
|
|
3694
3645
|
function processEventListeners(instance) {
|
|
3695
|
-
var
|
|
3646
|
+
var _a25, _b25;
|
|
3696
3647
|
const emitsDefinition = instance.type.emits;
|
|
3697
3648
|
const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition != null ? emitsDefinition : {});
|
|
3698
|
-
const keys = Object.keys((
|
|
3649
|
+
const keys = Object.keys((_b25 = (_a25 = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a25.props) != null ? _b25 : {});
|
|
3699
3650
|
const result = [];
|
|
3700
3651
|
for (const key of keys) {
|
|
3701
3652
|
const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);
|
|
@@ -3734,11 +3685,11 @@ function processInstanceState(instance) {
|
|
|
3734
3685
|
|
|
3735
3686
|
// src/core/component/state/index.ts
|
|
3736
3687
|
function getInstanceState(params) {
|
|
3737
|
-
var
|
|
3688
|
+
var _a25;
|
|
3738
3689
|
const instance = getComponentInstance(activeAppRecord.value, params.instanceId);
|
|
3739
3690
|
const id = getUniqueComponentId(instance);
|
|
3740
3691
|
const name = getInstanceName(instance);
|
|
3741
|
-
const file = (
|
|
3692
|
+
const file = (_a25 = instance == null ? void 0 : instance.type) == null ? void 0 : _a25.__file;
|
|
3742
3693
|
const state = processInstanceState(instance);
|
|
3743
3694
|
return {
|
|
3744
3695
|
id,
|
|
@@ -3800,13 +3751,13 @@ function createComponentsDevToolsPlugin(app) {
|
|
|
3800
3751
|
}
|
|
3801
3752
|
});
|
|
3802
3753
|
api.on.getInspectorState(async (payload) => {
|
|
3803
|
-
var
|
|
3754
|
+
var _a25;
|
|
3804
3755
|
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
3805
3756
|
const result = getInstanceState({
|
|
3806
3757
|
instanceId: payload.nodeId
|
|
3807
3758
|
});
|
|
3808
3759
|
const componentInstance = result.instance;
|
|
3809
|
-
const app2 = (
|
|
3760
|
+
const app2 = (_a25 = result.instance) == null ? void 0 : _a25.appContext.app;
|
|
3810
3761
|
const _payload = {
|
|
3811
3762
|
componentInstance,
|
|
3812
3763
|
app: app2,
|
|
@@ -3832,10 +3783,10 @@ function createComponentsDevToolsPlugin(app) {
|
|
|
3832
3783
|
api.sendInspectorState(INSPECTOR_ID);
|
|
3833
3784
|
}, 120);
|
|
3834
3785
|
const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
|
|
3835
|
-
var
|
|
3786
|
+
var _a25, _b25, _c;
|
|
3836
3787
|
if (devtoolsState.highPerfModeEnabled)
|
|
3837
3788
|
return;
|
|
3838
|
-
if ((_c = (
|
|
3789
|
+
if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
|
|
3839
3790
|
return;
|
|
3840
3791
|
if (!app2 || typeof uid !== "number" && !uid || !component)
|
|
3841
3792
|
return;
|
|
@@ -3859,10 +3810,10 @@ function createComponentsDevToolsPlugin(app) {
|
|
|
3859
3810
|
debounceSendInspectorTree();
|
|
3860
3811
|
});
|
|
3861
3812
|
const componentUpdatedCleanup = hook.on.componentUpdated(async (app2, uid, parentUid, component) => {
|
|
3862
|
-
var
|
|
3813
|
+
var _a25, _b25, _c;
|
|
3863
3814
|
if (devtoolsState.highPerfModeEnabled)
|
|
3864
3815
|
return;
|
|
3865
|
-
if ((_c = (
|
|
3816
|
+
if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
|
|
3866
3817
|
return;
|
|
3867
3818
|
if (!app2 || typeof uid !== "number" && !uid || !component)
|
|
3868
3819
|
return;
|
|
@@ -3887,10 +3838,10 @@ function createComponentsDevToolsPlugin(app) {
|
|
|
3887
3838
|
debounceSendInspectorState();
|
|
3888
3839
|
});
|
|
3889
3840
|
const componentRemovedCleanup = hook.on.componentRemoved(async (app2, uid, parentUid, component) => {
|
|
3890
|
-
var
|
|
3841
|
+
var _a25, _b25, _c;
|
|
3891
3842
|
if (devtoolsState.highPerfModeEnabled)
|
|
3892
3843
|
return;
|
|
3893
|
-
if ((_c = (
|
|
3844
|
+
if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
|
|
3894
3845
|
return;
|
|
3895
3846
|
if (!app2 || typeof uid !== "number" && !uid || !component)
|
|
3896
3847
|
return;
|
|
@@ -3912,8 +3863,8 @@ function createComponentsDevToolsPlugin(app) {
|
|
|
3912
3863
|
}
|
|
3913
3864
|
|
|
3914
3865
|
// src/core/plugin/index.ts
|
|
3915
|
-
var
|
|
3916
|
-
(
|
|
3866
|
+
var _a13, _b13;
|
|
3867
|
+
(_b13 = (_a13 = import_devtools_shared12.target).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null ? _b13 : _a13.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set();
|
|
3917
3868
|
function setupDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
3918
3869
|
return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
|
|
3919
3870
|
}
|
|
@@ -3934,14 +3885,21 @@ function callDevToolsPluginSetupFn(plugin, app) {
|
|
|
3934
3885
|
});
|
|
3935
3886
|
}
|
|
3936
3887
|
setupFn(api);
|
|
3888
|
+
if (pluginDescriptor.settings) {
|
|
3889
|
+
const inspector = devtoolsInspector.find((inspector2) => inspector2.descriptor.id === pluginDescriptor.id);
|
|
3890
|
+
if (inspector) {
|
|
3891
|
+
inspector.descriptor.settings = pluginDescriptor.settings;
|
|
3892
|
+
initPluginSettings(inspector.options.id, pluginDescriptor.settings);
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3937
3895
|
}
|
|
3938
3896
|
function removeRegisteredPluginApp(app) {
|
|
3939
|
-
|
|
3897
|
+
import_devtools_shared12.target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.delete(app);
|
|
3940
3898
|
}
|
|
3941
3899
|
function registerDevToolsPlugin(app) {
|
|
3942
|
-
if (
|
|
3900
|
+
if (import_devtools_shared12.target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app))
|
|
3943
3901
|
return;
|
|
3944
|
-
|
|
3902
|
+
import_devtools_shared12.target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
|
|
3945
3903
|
devtoolsPluginBuffer.forEach((plugin) => {
|
|
3946
3904
|
callDevToolsPluginSetupFn(plugin, app);
|
|
3947
3905
|
});
|
|
@@ -4044,34 +4002,43 @@ function createDevToolsApi(hooks2) {
|
|
|
4044
4002
|
if (instance) {
|
|
4045
4003
|
const [el] = getRootElementsFromComponentInstance(instance);
|
|
4046
4004
|
if (el) {
|
|
4047
|
-
|
|
4005
|
+
import_devtools_shared13.target.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
|
|
4048
4006
|
}
|
|
4049
4007
|
}
|
|
4008
|
+
},
|
|
4009
|
+
updatePluginSettings(pluginId, key, value) {
|
|
4010
|
+
setPluginSettings(pluginId, key, value);
|
|
4011
|
+
},
|
|
4012
|
+
getPluginSettings(pluginId) {
|
|
4013
|
+
return {
|
|
4014
|
+
options: getPluginSettingsOptions(pluginId),
|
|
4015
|
+
values: getPluginSettings(pluginId)
|
|
4016
|
+
};
|
|
4050
4017
|
}
|
|
4051
4018
|
};
|
|
4052
4019
|
}
|
|
4053
4020
|
|
|
4054
4021
|
// src/ctx/env.ts
|
|
4055
4022
|
init_cjs_shims();
|
|
4056
|
-
var
|
|
4057
|
-
var
|
|
4058
|
-
(
|
|
4023
|
+
var import_devtools_shared14 = require("@vue/devtools-shared");
|
|
4024
|
+
var _a14, _b14;
|
|
4025
|
+
(_b14 = (_a14 = import_devtools_shared14.target).__VUE_DEVTOOLS_ENV__) != null ? _b14 : _a14.__VUE_DEVTOOLS_ENV__ = {
|
|
4059
4026
|
vitePluginDetected: false
|
|
4060
4027
|
};
|
|
4061
4028
|
function getDevToolsEnv() {
|
|
4062
|
-
return
|
|
4029
|
+
return import_devtools_shared14.target.__VUE_DEVTOOLS_ENV__;
|
|
4063
4030
|
}
|
|
4064
4031
|
function setDevToolsEnv(env) {
|
|
4065
|
-
|
|
4066
|
-
...
|
|
4032
|
+
import_devtools_shared14.target.__VUE_DEVTOOLS_ENV__ = {
|
|
4033
|
+
...import_devtools_shared14.target.__VUE_DEVTOOLS_ENV__,
|
|
4067
4034
|
...env
|
|
4068
4035
|
};
|
|
4069
4036
|
}
|
|
4070
4037
|
|
|
4071
4038
|
// src/ctx/index.ts
|
|
4072
4039
|
var hooks = createDevToolsCtxHooks();
|
|
4073
|
-
var
|
|
4074
|
-
(
|
|
4040
|
+
var _a15, _b15;
|
|
4041
|
+
(_b15 = (_a15 = import_devtools_shared15.target).__VUE_DEVTOOLS_KIT_CONTEXT__) != null ? _b15 : _a15.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
|
|
4075
4042
|
hooks,
|
|
4076
4043
|
get state() {
|
|
4077
4044
|
return {
|
|
@@ -4083,7 +4050,112 @@ var _a16, _b16;
|
|
|
4083
4050
|
},
|
|
4084
4051
|
api: createDevToolsApi(hooks)
|
|
4085
4052
|
};
|
|
4086
|
-
var devtoolsContext =
|
|
4053
|
+
var devtoolsContext = import_devtools_shared15.target.__VUE_DEVTOOLS_KIT_CONTEXT__;
|
|
4054
|
+
|
|
4055
|
+
// src/hook/index.ts
|
|
4056
|
+
var _a16, _b16;
|
|
4057
|
+
var devtoolsHooks = (_b16 = (_a16 = import_devtools_shared16.target).__VUE_DEVTOOLS_HOOK) != null ? _b16 : _a16.__VUE_DEVTOOLS_HOOK = (0, import_hookable2.createHooks)();
|
|
4058
|
+
var on = {
|
|
4059
|
+
vueAppInit(fn) {
|
|
4060
|
+
devtoolsHooks.hook("app:init" /* APP_INIT */, fn);
|
|
4061
|
+
},
|
|
4062
|
+
vueAppUnmount(fn) {
|
|
4063
|
+
devtoolsHooks.hook("app:unmount" /* APP_UNMOUNT */, fn);
|
|
4064
|
+
},
|
|
4065
|
+
vueAppConnected(fn) {
|
|
4066
|
+
devtoolsHooks.hook("app:connected" /* APP_CONNECTED */, fn);
|
|
4067
|
+
},
|
|
4068
|
+
componentAdded(fn) {
|
|
4069
|
+
return devtoolsHooks.hook("component:added" /* COMPONENT_ADDED */, fn);
|
|
4070
|
+
},
|
|
4071
|
+
componentUpdated(fn) {
|
|
4072
|
+
return devtoolsHooks.hook("component:updated" /* COMPONENT_UPDATED */, fn);
|
|
4073
|
+
},
|
|
4074
|
+
componentRemoved(fn) {
|
|
4075
|
+
return devtoolsHooks.hook("component:removed" /* COMPONENT_REMOVED */, fn);
|
|
4076
|
+
},
|
|
4077
|
+
setupDevtoolsPlugin(fn) {
|
|
4078
|
+
devtoolsHooks.hook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, fn);
|
|
4079
|
+
}
|
|
4080
|
+
};
|
|
4081
|
+
function createDevToolsHook() {
|
|
4082
|
+
return {
|
|
4083
|
+
id: "vue-devtools-next",
|
|
4084
|
+
devtoolsVersion: "7.0",
|
|
4085
|
+
enabled: false,
|
|
4086
|
+
appRecords: [],
|
|
4087
|
+
apps: [],
|
|
4088
|
+
events: /* @__PURE__ */ new Map(),
|
|
4089
|
+
on(event, fn) {
|
|
4090
|
+
var _a25;
|
|
4091
|
+
if (!this.events.has(event))
|
|
4092
|
+
this.events.set(event, []);
|
|
4093
|
+
(_a25 = this.events.get(event)) == null ? void 0 : _a25.push(fn);
|
|
4094
|
+
return () => this.off(event, fn);
|
|
4095
|
+
},
|
|
4096
|
+
once(event, fn) {
|
|
4097
|
+
const onceFn = (...args) => {
|
|
4098
|
+
this.off(event, onceFn);
|
|
4099
|
+
fn(...args);
|
|
4100
|
+
};
|
|
4101
|
+
this.on(event, onceFn);
|
|
4102
|
+
return [event, onceFn];
|
|
4103
|
+
},
|
|
4104
|
+
off(event, fn) {
|
|
4105
|
+
if (this.events.has(event)) {
|
|
4106
|
+
const eventCallbacks = this.events.get(event);
|
|
4107
|
+
const index = eventCallbacks.indexOf(fn);
|
|
4108
|
+
if (index !== -1)
|
|
4109
|
+
eventCallbacks.splice(index, 1);
|
|
4110
|
+
}
|
|
4111
|
+
},
|
|
4112
|
+
emit(event, ...payload) {
|
|
4113
|
+
if (this.events.has(event))
|
|
4114
|
+
this.events.get(event).forEach((fn) => fn(...payload));
|
|
4115
|
+
}
|
|
4116
|
+
};
|
|
4117
|
+
}
|
|
4118
|
+
function subscribeDevToolsHook() {
|
|
4119
|
+
const hook2 = import_devtools_shared16.target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
4120
|
+
hook2.on("app:init" /* APP_INIT */, (app, version) => {
|
|
4121
|
+
var _a25, _b25, _c;
|
|
4122
|
+
if ((_c = (_b25 = (_a25 = app == null ? void 0 : app._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
|
|
4123
|
+
return;
|
|
4124
|
+
devtoolsHooks.callHook("app:init" /* APP_INIT */, app, version);
|
|
4125
|
+
});
|
|
4126
|
+
hook2.on("app:unmount" /* APP_UNMOUNT */, (app) => {
|
|
4127
|
+
devtoolsHooks.callHook("app:unmount" /* APP_UNMOUNT */, app);
|
|
4128
|
+
});
|
|
4129
|
+
hook2.on("component:added" /* COMPONENT_ADDED */, async (app, uid, parentUid, component) => {
|
|
4130
|
+
var _a25, _b25, _c;
|
|
4131
|
+
if (((_c = (_b25 = (_a25 = app == null ? void 0 : app._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide) || devtoolsState.highPerfModeEnabled)
|
|
4132
|
+
return;
|
|
4133
|
+
if (!app || typeof uid !== "number" && !uid || !component)
|
|
4134
|
+
return;
|
|
4135
|
+
devtoolsHooks.callHook("component:added" /* COMPONENT_ADDED */, app, uid, parentUid, component);
|
|
4136
|
+
});
|
|
4137
|
+
hook2.on("component:updated" /* COMPONENT_UPDATED */, (app, uid, parentUid, component) => {
|
|
4138
|
+
if (!app || typeof uid !== "number" && !uid || !component || devtoolsState.highPerfModeEnabled)
|
|
4139
|
+
return;
|
|
4140
|
+
devtoolsHooks.callHook("component:updated" /* COMPONENT_UPDATED */, app, uid, parentUid, component);
|
|
4141
|
+
});
|
|
4142
|
+
hook2.on("component:removed" /* COMPONENT_REMOVED */, async (app, uid, parentUid, component) => {
|
|
4143
|
+
if (!app || typeof uid !== "number" && !uid || !component || devtoolsState.highPerfModeEnabled)
|
|
4144
|
+
return;
|
|
4145
|
+
devtoolsHooks.callHook("component:removed" /* COMPONENT_REMOVED */, app, uid, parentUid, component);
|
|
4146
|
+
});
|
|
4147
|
+
hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn, options) => {
|
|
4148
|
+
if ((options == null ? void 0 : options.target) === "legacy")
|
|
4149
|
+
return;
|
|
4150
|
+
devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
|
|
4151
|
+
});
|
|
4152
|
+
}
|
|
4153
|
+
var hook = {
|
|
4154
|
+
on,
|
|
4155
|
+
setupDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
4156
|
+
return devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
|
|
4157
|
+
}
|
|
4158
|
+
};
|
|
4087
4159
|
|
|
4088
4160
|
// src/compat/index.ts
|
|
4089
4161
|
init_cjs_shims();
|
|
@@ -4112,14 +4184,14 @@ var appRecordInfo = (_b17 = (_a17 = import_devtools_shared18.target).__VUE_DEVTO
|
|
|
4112
4184
|
appIds: /* @__PURE__ */ new Set()
|
|
4113
4185
|
};
|
|
4114
4186
|
function getAppRecordName(app, fallbackName) {
|
|
4115
|
-
var
|
|
4116
|
-
return ((
|
|
4187
|
+
var _a25;
|
|
4188
|
+
return ((_a25 = app == null ? void 0 : app._component) == null ? void 0 : _a25.name) || `App ${fallbackName}`;
|
|
4117
4189
|
}
|
|
4118
4190
|
function getAppRootInstance(app) {
|
|
4119
|
-
var
|
|
4191
|
+
var _a25, _b25, _c, _d;
|
|
4120
4192
|
if (app._instance)
|
|
4121
4193
|
return app._instance;
|
|
4122
|
-
else if ((
|
|
4194
|
+
else if ((_b25 = (_a25 = app._container) == null ? void 0 : _a25._vnode) == null ? void 0 : _b25.component)
|
|
4123
4195
|
return (_d = (_c = app._container) == null ? void 0 : _c._vnode) == null ? void 0 : _d.component;
|
|
4124
4196
|
}
|
|
4125
4197
|
function removeAppRecordId(app) {
|
|
@@ -4167,11 +4239,11 @@ function createAppRecord(app) {
|
|
|
4167
4239
|
|
|
4168
4240
|
// src/core/index.ts
|
|
4169
4241
|
function initDevTools() {
|
|
4170
|
-
var
|
|
4242
|
+
var _a25;
|
|
4171
4243
|
updateDevToolsState({
|
|
4172
4244
|
vitePluginDetected: getDevToolsEnv().vitePluginDetected
|
|
4173
4245
|
});
|
|
4174
|
-
const isDevToolsNext = ((
|
|
4246
|
+
const isDevToolsNext = ((_a25 = import_devtools_shared19.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a25.id) === "vue-devtools-next";
|
|
4175
4247
|
if (import_devtools_shared19.target.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
|
|
4176
4248
|
return;
|
|
4177
4249
|
if (!import_devtools_shared19.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
|
|
@@ -4182,9 +4254,9 @@ function initDevTools() {
|
|
|
4182
4254
|
}
|
|
4183
4255
|
}
|
|
4184
4256
|
hook.on.setupDevtoolsPlugin((pluginDescriptor, setupFn) => {
|
|
4185
|
-
var
|
|
4257
|
+
var _a26;
|
|
4186
4258
|
addDevToolsPluginToBuffer(pluginDescriptor, setupFn);
|
|
4187
|
-
const { app } = (
|
|
4259
|
+
const { app } = (_a26 = activeAppRecord) != null ? _a26 : {};
|
|
4188
4260
|
if (!app)
|
|
4189
4261
|
return;
|
|
4190
4262
|
callDevToolsPluginSetupFn([pluginDescriptor, setupFn], app);
|
|
@@ -4869,7 +4941,7 @@ function generateReferentialEqualityAnnotations(identitites, dedupe) {
|
|
|
4869
4941
|
}
|
|
4870
4942
|
}
|
|
4871
4943
|
var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
|
|
4872
|
-
var
|
|
4944
|
+
var _a25;
|
|
4873
4945
|
const primitive = isPrimitive2(object);
|
|
4874
4946
|
if (!primitive) {
|
|
4875
4947
|
addIdentity(object, path, identities);
|
|
@@ -4899,7 +4971,7 @@ var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPat
|
|
|
4899
4971
|
};
|
|
4900
4972
|
}
|
|
4901
4973
|
const transformationResult = transformValue(object, superJson);
|
|
4902
|
-
const transformed = (
|
|
4974
|
+
const transformed = (_a25 = transformationResult == null ? void 0 : transformationResult.value) != null ? _a25 : object;
|
|
4903
4975
|
const transformedValue = isArray(transformed) ? [] : {};
|
|
4904
4976
|
const innerAnnotations = {};
|
|
4905
4977
|
forEach(transformed, (value, index) => {
|
|
@@ -4971,22 +5043,22 @@ function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
|
|
|
4971
5043
|
});
|
|
4972
5044
|
}
|
|
4973
5045
|
}
|
|
4974
|
-
function copy(
|
|
4975
|
-
if (isArray2(
|
|
4976
|
-
return
|
|
5046
|
+
function copy(target22, options = {}) {
|
|
5047
|
+
if (isArray2(target22)) {
|
|
5048
|
+
return target22.map((item) => copy(item, options));
|
|
4977
5049
|
}
|
|
4978
|
-
if (!isPlainObject3(
|
|
4979
|
-
return
|
|
5050
|
+
if (!isPlainObject3(target22)) {
|
|
5051
|
+
return target22;
|
|
4980
5052
|
}
|
|
4981
|
-
const props = Object.getOwnPropertyNames(
|
|
4982
|
-
const symbols = Object.getOwnPropertySymbols(
|
|
5053
|
+
const props = Object.getOwnPropertyNames(target22);
|
|
5054
|
+
const symbols = Object.getOwnPropertySymbols(target22);
|
|
4983
5055
|
return [...props, ...symbols].reduce((carry, key) => {
|
|
4984
5056
|
if (isArray2(options.props) && !options.props.includes(key)) {
|
|
4985
5057
|
return carry;
|
|
4986
5058
|
}
|
|
4987
|
-
const val =
|
|
5059
|
+
const val = target22[key];
|
|
4988
5060
|
const newVal = copy(val, options);
|
|
4989
|
-
assignProp(carry, key, newVal,
|
|
5061
|
+
assignProp(carry, key, newVal, target22, options.nonenumerable);
|
|
4990
5062
|
return carry;
|
|
4991
5063
|
}, {});
|
|
4992
5064
|
}
|
|
@@ -4999,8 +5071,8 @@ var SuperJSON = class {
|
|
|
4999
5071
|
constructor({ dedupe = false } = {}) {
|
|
5000
5072
|
this.classRegistry = new ClassRegistry();
|
|
5001
5073
|
this.symbolRegistry = new Registry((s) => {
|
|
5002
|
-
var
|
|
5003
|
-
return (
|
|
5074
|
+
var _a25;
|
|
5075
|
+
return (_a25 = s.description) != null ? _a25 : "";
|
|
5004
5076
|
});
|
|
5005
5077
|
this.customTransformerRegistry = new CustomTransformerRegistry();
|
|
5006
5078
|
this.allowedErrorProps = [];
|
|
@@ -5131,9 +5203,9 @@ function createIframeServerChannel() {
|
|
|
5131
5203
|
}
|
|
5132
5204
|
return {
|
|
5133
5205
|
post: (data) => {
|
|
5134
|
-
var
|
|
5206
|
+
var _a25;
|
|
5135
5207
|
const iframe = getIframeServerContext();
|
|
5136
|
-
(
|
|
5208
|
+
(_a25 = iframe == null ? void 0 : iframe.contentWindow) == null ? void 0 : _a25.postMessage(SuperJSON.stringify({
|
|
5137
5209
|
event: __DEVTOOLS_KIT_IFRAME_MESSAGING_EVENT_KEY,
|
|
5138
5210
|
data
|
|
5139
5211
|
}), "*");
|
|
@@ -5225,9 +5297,9 @@ function createViteClientChannel() {
|
|
|
5225
5297
|
// src/messaging/presets/vite/server.ts
|
|
5226
5298
|
init_cjs_shims();
|
|
5227
5299
|
function createViteServerChannel() {
|
|
5228
|
-
var
|
|
5300
|
+
var _a25;
|
|
5229
5301
|
const viteServer = getViteServerContext();
|
|
5230
|
-
const ws = (
|
|
5302
|
+
const ws = (_a25 = viteServer.hot) != null ? _a25 : viteServer.ws;
|
|
5231
5303
|
return {
|
|
5232
5304
|
post: (data) => ws == null ? void 0 : ws.send(__DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY, SuperJSON.stringify(data)),
|
|
5233
5305
|
on: (handler) => ws == null ? void 0 : ws.on(__DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY, (event) => {
|
|
@@ -5791,13 +5863,13 @@ function tryGetRefValue(ref) {
|
|
|
5791
5863
|
}
|
|
5792
5864
|
}
|
|
5793
5865
|
function getObjectDetails(object) {
|
|
5794
|
-
var
|
|
5866
|
+
var _a25, _b25, _c, _d;
|
|
5795
5867
|
const info = getSetupStateType(object);
|
|
5796
5868
|
const isState = info.ref || info.computed || info.reactive;
|
|
5797
5869
|
if (isState) {
|
|
5798
5870
|
const stateTypeName = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
|
|
5799
5871
|
const value = toRaw2(info.reactive ? object : tryGetRefValue(object));
|
|
5800
|
-
const raw = ensurePropertyExists(object, "effect") ? ((
|
|
5872
|
+
const raw = ensurePropertyExists(object, "effect") ? ((_b25 = (_a25 = object.effect) == null ? void 0 : _a25.raw) == null ? void 0 : _b25.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
|
|
5801
5873
|
return {
|
|
5802
5874
|
_custom: {
|
|
5803
5875
|
type: stateTypeName == null ? void 0 : stateTypeName.toLowerCase(),
|
|
@@ -5819,7 +5891,7 @@ function getObjectDetails(object) {
|
|
|
5819
5891
|
|
|
5820
5892
|
// src/core/component/state/replacer.ts
|
|
5821
5893
|
function stringifyReplacer(key, _value, depth, seenInstance) {
|
|
5822
|
-
var
|
|
5894
|
+
var _a25;
|
|
5823
5895
|
if (key === "compilerOptions")
|
|
5824
5896
|
return;
|
|
5825
5897
|
const val = this[key];
|
|
@@ -5881,7 +5953,7 @@ function stringifyReplacer(key, _value, depth, seenInstance) {
|
|
|
5881
5953
|
return `[native VNode <${val.tag}>]`;
|
|
5882
5954
|
} else if (typeof HTMLElement !== "undefined" && val instanceof HTMLElement) {
|
|
5883
5955
|
return getHTMLElementDetails(val);
|
|
5884
|
-
} else if (((
|
|
5956
|
+
} else if (((_a25 = val.constructor) == null ? void 0 : _a25.name) === "Store" && "_wrappedGetters" in val) {
|
|
5885
5957
|
return "[object Store]";
|
|
5886
5958
|
} else if (ensurePropertyExists(val, "currentRoute", true)) {
|
|
5887
5959
|
return "[object Router]";
|
|
@@ -6045,8 +6117,8 @@ function stringifyCircularAutoChunks(data, replacer = null, space = null) {
|
|
|
6045
6117
|
let result;
|
|
6046
6118
|
try {
|
|
6047
6119
|
result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, (k, v) => {
|
|
6048
|
-
var
|
|
6049
|
-
return (
|
|
6120
|
+
var _a25;
|
|
6121
|
+
return (_a25 = replacer == null ? void 0 : replacer(k, v)) == null ? void 0 : _a25.call(this);
|
|
6050
6122
|
}, space);
|
|
6051
6123
|
} catch (e) {
|
|
6052
6124
|
result = stringifyStrictCircularAutoChunks(data, replacer, space);
|
|
@@ -6108,7 +6180,7 @@ function getInspectorStateValueType(value, raw = true) {
|
|
|
6108
6180
|
}
|
|
6109
6181
|
}
|
|
6110
6182
|
function formatInspectorStateValue(value, quotes = false, options) {
|
|
6111
|
-
var
|
|
6183
|
+
var _a25, _b25, _c;
|
|
6112
6184
|
const { customClass } = options != null ? options : {};
|
|
6113
6185
|
let result;
|
|
6114
6186
|
const type = getInspectorStateValueType(value, false);
|
|
@@ -6117,14 +6189,14 @@ function formatInspectorStateValue(value, quotes = false, options) {
|
|
|
6117
6189
|
if (result = internalStateTokenToString(value)) {
|
|
6118
6190
|
return result;
|
|
6119
6191
|
} else if (type === "custom") {
|
|
6120
|
-
const nestedName = ((
|
|
6192
|
+
const nestedName = ((_a25 = value._custom.value) == null ? void 0 : _a25._custom) && formatInspectorStateValue(value._custom.value, quotes, options);
|
|
6121
6193
|
return nestedName || value._custom.displayText || value._custom.display;
|
|
6122
6194
|
} else if (type === "array") {
|
|
6123
6195
|
return `Array[${value.length}]`;
|
|
6124
6196
|
} else if (type === "plain-object") {
|
|
6125
6197
|
return `Object${Object.keys(value).length ? "" : " (empty)"}`;
|
|
6126
6198
|
} else if (type == null ? void 0 : type.includes("native")) {
|
|
6127
|
-
return escape((
|
|
6199
|
+
return escape((_b25 = specialTypeRE.exec(value)) == null ? void 0 : _b25[2]);
|
|
6128
6200
|
} else if (typeof value === "string") {
|
|
6129
6201
|
const typeMatch = value.match(rawTypeRE);
|
|
6130
6202
|
if (typeMatch) {
|
|
@@ -6141,14 +6213,14 @@ function escapeString(value) {
|
|
|
6141
6213
|
return escape(value).replace(/ /g, " ").replace(/\n/g, "<span>\\n</span>");
|
|
6142
6214
|
}
|
|
6143
6215
|
function getRaw(value) {
|
|
6144
|
-
var
|
|
6216
|
+
var _a25, _b25, _c;
|
|
6145
6217
|
let customType;
|
|
6146
6218
|
const isCustom = getInspectorStateValueType(value) === "custom";
|
|
6147
6219
|
let inherit = {};
|
|
6148
6220
|
if (isCustom) {
|
|
6149
6221
|
const data = value;
|
|
6150
|
-
const customValue = (
|
|
6151
|
-
const currentCustomType = (
|
|
6222
|
+
const customValue = (_a25 = data._custom) == null ? void 0 : _a25.value;
|
|
6223
|
+
const currentCustomType = (_b25 = data._custom) == null ? void 0 : _b25.type;
|
|
6152
6224
|
const nestedCustom = typeof customValue === "object" && customValue !== null && "_custom" in customValue ? getRaw(customValue) : { inherit: void 0, value: void 0, customType: void 0 };
|
|
6153
6225
|
inherit = nestedCustom.inherit || ((_c = data._custom) == null ? void 0 : _c.fields) || {};
|
|
6154
6226
|
value = nestedCustom.value || customValue;
|
|
@@ -6189,6 +6261,20 @@ init_cjs_shims();
|
|
|
6189
6261
|
// src/shared/env.ts
|
|
6190
6262
|
init_cjs_shims();
|
|
6191
6263
|
|
|
6264
|
+
// src/core/devtools-client/detected.ts
|
|
6265
|
+
init_cjs_shims();
|
|
6266
|
+
var import_devtools_shared29 = require("@vue/devtools-shared");
|
|
6267
|
+
function updateDevToolsClientDetected(params) {
|
|
6268
|
+
devtoolsState.devtoolsClientDetected = {
|
|
6269
|
+
...devtoolsState.devtoolsClientDetected,
|
|
6270
|
+
...params
|
|
6271
|
+
};
|
|
6272
|
+
const devtoolsClientVisible = Object.values(devtoolsState.devtoolsClientDetected).some(Boolean);
|
|
6273
|
+
toggleHighPerfMode(!devtoolsClientVisible);
|
|
6274
|
+
}
|
|
6275
|
+
var _a24, _b24;
|
|
6276
|
+
(_b24 = (_a24 = import_devtools_shared29.target).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null ? _b24 : _a24.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = updateDevToolsClientDetected;
|
|
6277
|
+
|
|
6192
6278
|
// src/index.ts
|
|
6193
6279
|
var devtools = {
|
|
6194
6280
|
hook,
|
|
@@ -6282,5 +6368,6 @@ var devtools = {
|
|
|
6282
6368
|
toggleClientConnected,
|
|
6283
6369
|
toggleComponentInspectorEnabled,
|
|
6284
6370
|
toggleHighPerfMode,
|
|
6371
|
+
updateDevToolsClientDetected,
|
|
6285
6372
|
updateDevToolsState
|
|
6286
6373
|
});
|