@vue/devtools-kit 7.0.24 → 7.0.26
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 +34 -31
- package/dist/index.d.cts +326 -326
- package/dist/index.d.ts +326 -326
- package/dist/index.js +34 -31
- package/global.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target10) => (target10 = mod != null ? __create(
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
30
|
-
// ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.
|
|
30
|
+
// ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.4/node_modules/tsup/assets/esm_shims.js
|
|
31
31
|
var init_esm_shims = __esm({
|
|
32
|
-
"../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.
|
|
32
|
+
"../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.4/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -1888,16 +1888,16 @@ function saveComponentGussedName(instance, name) {
|
|
|
1888
1888
|
return name;
|
|
1889
1889
|
}
|
|
1890
1890
|
function getAppRecord(instance) {
|
|
1891
|
-
if (instance.
|
|
1892
|
-
return instance.
|
|
1891
|
+
if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__)
|
|
1892
|
+
return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
|
|
1893
1893
|
else if (instance.root)
|
|
1894
|
-
return instance.appContext.app.
|
|
1894
|
+
return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
|
|
1895
1895
|
}
|
|
1896
1896
|
async function getComponentId(options) {
|
|
1897
1897
|
const { app, uid, instance } = options;
|
|
1898
1898
|
try {
|
|
1899
|
-
if (instance.
|
|
1900
|
-
return instance.
|
|
1899
|
+
if (instance.__VUE_DEVTOOLS_NEXT_UID__)
|
|
1900
|
+
return instance.__VUE_DEVTOOLS_NEXT_UID__;
|
|
1901
1901
|
const appRecord = await getAppRecord(app);
|
|
1902
1902
|
if (!appRecord)
|
|
1903
1903
|
return null;
|
|
@@ -1936,7 +1936,7 @@ function getInstanceName(instance) {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
function getUniqueComponentId(instance) {
|
|
1938
1938
|
var _a10, _b10, _c;
|
|
1939
|
-
const appId = (_c = (_b10 = (_a10 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a10.app) == null ? void 0 : _b10.
|
|
1939
|
+
const appId = (_c = (_b10 = (_a10 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a10.app) == null ? void 0 : _b10.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__) != null ? _c : 0;
|
|
1940
1940
|
const instanceId = instance === instance.root ? "root" : instance.uid;
|
|
1941
1941
|
return `${appId}:${instanceId}`;
|
|
1942
1942
|
}
|
|
@@ -2119,8 +2119,8 @@ var ComponentWalker = class {
|
|
|
2119
2119
|
captureId(instance) {
|
|
2120
2120
|
if (!instance)
|
|
2121
2121
|
return null;
|
|
2122
|
-
const id = instance.
|
|
2123
|
-
instance.
|
|
2122
|
+
const id = instance.__VUE_DEVTOOLS_NEXT_UID__ != null ? instance.__VUE_DEVTOOLS_NEXT_UID__ : getUniqueComponentId(instance);
|
|
2123
|
+
instance.__VUE_DEVTOOLS_NEXT_UID__ = id;
|
|
2124
2124
|
if (this.captureIds.has(id))
|
|
2125
2125
|
return null;
|
|
2126
2126
|
else
|
|
@@ -2166,9 +2166,9 @@ var ComponentWalker = class {
|
|
|
2166
2166
|
}
|
|
2167
2167
|
if (this.isKeepAlive(instance)) {
|
|
2168
2168
|
const cachedComponents = this.getKeepAliveCachedInstances(instance);
|
|
2169
|
-
const childrenIds = children.map((child) => child.
|
|
2169
|
+
const childrenIds = children.map((child) => child.__VUE_DEVTOOLS_NEXT_UID__);
|
|
2170
2170
|
for (const cachedChild of cachedComponents) {
|
|
2171
|
-
if (!childrenIds.includes(cachedChild.
|
|
2171
|
+
if (!childrenIds.includes(cachedChild.__VUE_DEVTOOLS_NEXT_UID__)) {
|
|
2172
2172
|
const node = await this.capture({ ...cachedChild, isDeactivated: true }, depth + 1);
|
|
2173
2173
|
if (node)
|
|
2174
2174
|
treeNode.children.push(node);
|
|
@@ -2276,8 +2276,8 @@ var ComponentWalker = class {
|
|
|
2276
2276
|
*/
|
|
2277
2277
|
mark(instance, force = false) {
|
|
2278
2278
|
const instanceMap = getAppRecord(instance).instanceMap;
|
|
2279
|
-
if (force || !instanceMap.has(instance.
|
|
2280
|
-
instanceMap.set(instance.
|
|
2279
|
+
if (force || !instanceMap.has(instance.__VUE_DEVTOOLS_NEXT_UID__)) {
|
|
2280
|
+
instanceMap.set(instance.__VUE_DEVTOOLS_NEXT_UID__, instance);
|
|
2281
2281
|
devtoolsAppRecords.active.instanceMap = instanceMap;
|
|
2282
2282
|
}
|
|
2283
2283
|
}
|
|
@@ -2934,11 +2934,12 @@ function registerComponentDevToolsPlugin(app) {
|
|
|
2934
2934
|
});
|
|
2935
2935
|
const appRecord = await getAppRecord(app2);
|
|
2936
2936
|
if (component) {
|
|
2937
|
-
if (component.
|
|
2938
|
-
component.
|
|
2937
|
+
if (component.__VUE_DEVTOOLS_NEXT_UID__ == null)
|
|
2938
|
+
component.__VUE_DEVTOOLS_NEXT_UID__ = id;
|
|
2939
2939
|
if (!(appRecord == null ? void 0 : appRecord.instanceMap.has(id))) {
|
|
2940
2940
|
appRecord == null ? void 0 : appRecord.instanceMap.set(id, component);
|
|
2941
|
-
devtoolsAppRecords.active.
|
|
2941
|
+
if (devtoolsAppRecords.active.id === (appRecord == null ? void 0 : appRecord.id))
|
|
2942
|
+
devtoolsAppRecords.active.instanceMap = appRecord.instanceMap;
|
|
2942
2943
|
}
|
|
2943
2944
|
}
|
|
2944
2945
|
if (!appRecord)
|
|
@@ -2960,11 +2961,12 @@ function registerComponentDevToolsPlugin(app) {
|
|
|
2960
2961
|
});
|
|
2961
2962
|
const appRecord = await getAppRecord(app2);
|
|
2962
2963
|
if (component) {
|
|
2963
|
-
if (component.
|
|
2964
|
-
component.
|
|
2964
|
+
if (component.__VUE_DEVTOOLS_NEXT_UID__ == null)
|
|
2965
|
+
component.__VUE_DEVTOOLS_NEXT_UID__ = id;
|
|
2965
2966
|
if (!(appRecord == null ? void 0 : appRecord.instanceMap.has(id))) {
|
|
2966
2967
|
appRecord == null ? void 0 : appRecord.instanceMap.set(id, component);
|
|
2967
|
-
devtoolsAppRecords.active.
|
|
2968
|
+
if (devtoolsAppRecords.active.id === (appRecord == null ? void 0 : appRecord.id))
|
|
2969
|
+
devtoolsAppRecords.active.instanceMap = appRecord.instanceMap;
|
|
2968
2970
|
}
|
|
2969
2971
|
}
|
|
2970
2972
|
if (!appRecord)
|
|
@@ -2989,7 +2991,8 @@ function registerComponentDevToolsPlugin(app) {
|
|
|
2989
2991
|
instance: component
|
|
2990
2992
|
});
|
|
2991
2993
|
appRecord == null ? void 0 : appRecord.instanceMap.delete(id);
|
|
2992
|
-
devtoolsAppRecords.active.
|
|
2994
|
+
if (devtoolsAppRecords.active.id === (appRecord == null ? void 0 : appRecord.id))
|
|
2995
|
+
devtoolsAppRecords.active.instanceMap = appRecord.instanceMap;
|
|
2993
2996
|
debounceSendInspectorTree();
|
|
2994
2997
|
});
|
|
2995
2998
|
devtoolsContext.componentPluginHookBuffer = [
|
|
@@ -3013,8 +3016,8 @@ function getAppRootInstance(app) {
|
|
|
3013
3016
|
return (_d = (_c = app._container) == null ? void 0 : _c._vnode) == null ? void 0 : _d.component;
|
|
3014
3017
|
}
|
|
3015
3018
|
function getAppRecordId(app, defaultId) {
|
|
3016
|
-
if (app.
|
|
3017
|
-
return app.
|
|
3019
|
+
if (app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ != null)
|
|
3020
|
+
return app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__;
|
|
3018
3021
|
let id = defaultId != null ? defaultId : (appRecordInfo.id++).toString();
|
|
3019
3022
|
if (defaultId && appRecordInfo.appIds.has(id)) {
|
|
3020
3023
|
let count = 1;
|
|
@@ -3023,7 +3026,7 @@ function getAppRecordId(app, defaultId) {
|
|
|
3023
3026
|
id = `${defaultId}_${count}`;
|
|
3024
3027
|
}
|
|
3025
3028
|
appRecordInfo.appIds.add(id);
|
|
3026
|
-
app.
|
|
3029
|
+
app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ = id;
|
|
3027
3030
|
return id;
|
|
3028
3031
|
}
|
|
3029
3032
|
function createAppRecord(app) {
|
|
@@ -3038,10 +3041,10 @@ function createAppRecord(app) {
|
|
|
3038
3041
|
instanceMap: /* @__PURE__ */ new Map(),
|
|
3039
3042
|
rootInstance
|
|
3040
3043
|
};
|
|
3041
|
-
app.
|
|
3044
|
+
app.__VUE_DEVTOOLS_NEXT_APP_RECORD__ = record;
|
|
3042
3045
|
const rootId = `${record.id}:root`;
|
|
3043
3046
|
record.instanceMap.set(rootId, record.rootInstance);
|
|
3044
|
-
record.rootInstance.
|
|
3047
|
+
record.rootInstance.__VUE_DEVTOOLS_NEXT_UID__ = rootId;
|
|
3045
3048
|
return record;
|
|
3046
3049
|
} else {
|
|
3047
3050
|
return {};
|
|
@@ -3232,7 +3235,7 @@ function inspectComponentHighLighter() {
|
|
|
3232
3235
|
e.preventDefault();
|
|
3233
3236
|
e.stopPropagation();
|
|
3234
3237
|
selectComponentFn(e, (id) => {
|
|
3235
|
-
window.removeEventListener("click", onSelect);
|
|
3238
|
+
window.removeEventListener("click", onSelect, true);
|
|
3236
3239
|
window.removeEventListener("mouseover", inspectFn);
|
|
3237
3240
|
const el = getContainerElement();
|
|
3238
3241
|
if (el)
|
|
@@ -3240,7 +3243,7 @@ function inspectComponentHighLighter() {
|
|
|
3240
3243
|
resolve(JSON.stringify({ id }));
|
|
3241
3244
|
});
|
|
3242
3245
|
}
|
|
3243
|
-
window.addEventListener("click", onSelect);
|
|
3246
|
+
window.addEventListener("click", onSelect, true);
|
|
3244
3247
|
});
|
|
3245
3248
|
}
|
|
3246
3249
|
function scrollToComponent(options) {
|
|
@@ -3433,7 +3436,7 @@ function getInstanceDetails(instance) {
|
|
|
3433
3436
|
return {
|
|
3434
3437
|
_custom: {
|
|
3435
3438
|
type: "component",
|
|
3436
|
-
id: instance.
|
|
3439
|
+
id: instance.__VUE_DEVTOOLS_NEXT_UID__,
|
|
3437
3440
|
displayText: getInstanceName(instance),
|
|
3438
3441
|
tooltipText: "Component instance",
|
|
3439
3442
|
value: reduceStateList(state),
|
|
@@ -4100,7 +4103,7 @@ var DevToolsPluginApi = class {
|
|
|
4100
4103
|
}
|
|
4101
4104
|
}
|
|
4102
4105
|
async getComponentInstances(app) {
|
|
4103
|
-
const appRecord = app.
|
|
4106
|
+
const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
|
|
4104
4107
|
const appId = appRecord.id.toString();
|
|
4105
4108
|
const instances = [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
|
|
4106
4109
|
return instances;
|
|
@@ -4324,7 +4327,7 @@ var devtoolsAppRecords = new Proxy(devtoolsState.appRecords, {
|
|
|
4324
4327
|
}
|
|
4325
4328
|
});
|
|
4326
4329
|
var _a8, _b8;
|
|
4327
|
-
var appRecordInfo = (_b8 = (_a8 = target6).
|
|
4330
|
+
var appRecordInfo = (_b8 = (_a8 = target6).__VUE_DEVTOOLS_NEXT_APP_RECROD_INFO__) != null ? _b8 : _a8.__VUE_DEVTOOLS_NEXT_APP_RECROD_INFO__ = {
|
|
4328
4331
|
id: 0,
|
|
4329
4332
|
appIds: /* @__PURE__ */ new Set()
|
|
4330
4333
|
};
|
package/global.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare global {
|
|
|
5
5
|
var __VUE_DEVTOOLS_GLOBAL_HOOK__: DevToolsHook
|
|
6
6
|
var __VUE_DEVTOOLS_GLOBAL_STATE__: DevToolsState
|
|
7
7
|
var __VUE_DEVTOOLS_CONTEXT__: DevToolsContext
|
|
8
|
-
var
|
|
8
|
+
var __VUE_DEVTOOLS_NEXT_APP_RECROD_INFO__: {
|
|
9
9
|
id: number
|
|
10
10
|
appIds: Set<string>
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/devtools-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.26",
|
|
5
5
|
"author": "webfansplz",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"mitt": "^3.0.1",
|
|
26
26
|
"perfect-debounce": "^1.0.0",
|
|
27
27
|
"speakingurl": "^14.0.1",
|
|
28
|
-
"@vue/devtools-shared": "^7.0.
|
|
28
|
+
"@vue/devtools-shared": "^7.0.26"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/speakingurl": "^13.0.6",
|