@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.cjs
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target10) => (target10 = mod != null ? __create(
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.4/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.4/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -1916,16 +1916,16 @@ function saveComponentGussedName(instance, name) {
|
|
|
1916
1916
|
return name;
|
|
1917
1917
|
}
|
|
1918
1918
|
function getAppRecord(instance) {
|
|
1919
|
-
if (instance.
|
|
1920
|
-
return instance.
|
|
1919
|
+
if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__)
|
|
1920
|
+
return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
|
|
1921
1921
|
else if (instance.root)
|
|
1922
|
-
return instance.appContext.app.
|
|
1922
|
+
return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
|
|
1923
1923
|
}
|
|
1924
1924
|
async function getComponentId(options) {
|
|
1925
1925
|
const { app, uid, instance } = options;
|
|
1926
1926
|
try {
|
|
1927
|
-
if (instance.
|
|
1928
|
-
return instance.
|
|
1927
|
+
if (instance.__VUE_DEVTOOLS_NEXT_UID__)
|
|
1928
|
+
return instance.__VUE_DEVTOOLS_NEXT_UID__;
|
|
1929
1929
|
const appRecord = await getAppRecord(app);
|
|
1930
1930
|
if (!appRecord)
|
|
1931
1931
|
return null;
|
|
@@ -1964,7 +1964,7 @@ function getInstanceName(instance) {
|
|
|
1964
1964
|
}
|
|
1965
1965
|
function getUniqueComponentId(instance) {
|
|
1966
1966
|
var _a10, _b10, _c;
|
|
1967
|
-
const appId = (_c = (_b10 = (_a10 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a10.app) == null ? void 0 : _b10.
|
|
1967
|
+
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;
|
|
1968
1968
|
const instanceId = instance === instance.root ? "root" : instance.uid;
|
|
1969
1969
|
return `${appId}:${instanceId}`;
|
|
1970
1970
|
}
|
|
@@ -2147,8 +2147,8 @@ var ComponentWalker = class {
|
|
|
2147
2147
|
captureId(instance) {
|
|
2148
2148
|
if (!instance)
|
|
2149
2149
|
return null;
|
|
2150
|
-
const id = instance.
|
|
2151
|
-
instance.
|
|
2150
|
+
const id = instance.__VUE_DEVTOOLS_NEXT_UID__ != null ? instance.__VUE_DEVTOOLS_NEXT_UID__ : getUniqueComponentId(instance);
|
|
2151
|
+
instance.__VUE_DEVTOOLS_NEXT_UID__ = id;
|
|
2152
2152
|
if (this.captureIds.has(id))
|
|
2153
2153
|
return null;
|
|
2154
2154
|
else
|
|
@@ -2194,9 +2194,9 @@ var ComponentWalker = class {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
if (this.isKeepAlive(instance)) {
|
|
2196
2196
|
const cachedComponents = this.getKeepAliveCachedInstances(instance);
|
|
2197
|
-
const childrenIds = children.map((child) => child.
|
|
2197
|
+
const childrenIds = children.map((child) => child.__VUE_DEVTOOLS_NEXT_UID__);
|
|
2198
2198
|
for (const cachedChild of cachedComponents) {
|
|
2199
|
-
if (!childrenIds.includes(cachedChild.
|
|
2199
|
+
if (!childrenIds.includes(cachedChild.__VUE_DEVTOOLS_NEXT_UID__)) {
|
|
2200
2200
|
const node = await this.capture({ ...cachedChild, isDeactivated: true }, depth + 1);
|
|
2201
2201
|
if (node)
|
|
2202
2202
|
treeNode.children.push(node);
|
|
@@ -2304,8 +2304,8 @@ var ComponentWalker = class {
|
|
|
2304
2304
|
*/
|
|
2305
2305
|
mark(instance, force = false) {
|
|
2306
2306
|
const instanceMap = getAppRecord(instance).instanceMap;
|
|
2307
|
-
if (force || !instanceMap.has(instance.
|
|
2308
|
-
instanceMap.set(instance.
|
|
2307
|
+
if (force || !instanceMap.has(instance.__VUE_DEVTOOLS_NEXT_UID__)) {
|
|
2308
|
+
instanceMap.set(instance.__VUE_DEVTOOLS_NEXT_UID__, instance);
|
|
2309
2309
|
devtoolsAppRecords.active.instanceMap = instanceMap;
|
|
2310
2310
|
}
|
|
2311
2311
|
}
|
|
@@ -2962,11 +2962,12 @@ function registerComponentDevToolsPlugin(app) {
|
|
|
2962
2962
|
});
|
|
2963
2963
|
const appRecord = await getAppRecord(app2);
|
|
2964
2964
|
if (component) {
|
|
2965
|
-
if (component.
|
|
2966
|
-
component.
|
|
2965
|
+
if (component.__VUE_DEVTOOLS_NEXT_UID__ == null)
|
|
2966
|
+
component.__VUE_DEVTOOLS_NEXT_UID__ = id;
|
|
2967
2967
|
if (!(appRecord == null ? void 0 : appRecord.instanceMap.has(id))) {
|
|
2968
2968
|
appRecord == null ? void 0 : appRecord.instanceMap.set(id, component);
|
|
2969
|
-
devtoolsAppRecords.active.
|
|
2969
|
+
if (devtoolsAppRecords.active.id === (appRecord == null ? void 0 : appRecord.id))
|
|
2970
|
+
devtoolsAppRecords.active.instanceMap = appRecord.instanceMap;
|
|
2970
2971
|
}
|
|
2971
2972
|
}
|
|
2972
2973
|
if (!appRecord)
|
|
@@ -2988,11 +2989,12 @@ function registerComponentDevToolsPlugin(app) {
|
|
|
2988
2989
|
});
|
|
2989
2990
|
const appRecord = await getAppRecord(app2);
|
|
2990
2991
|
if (component) {
|
|
2991
|
-
if (component.
|
|
2992
|
-
component.
|
|
2992
|
+
if (component.__VUE_DEVTOOLS_NEXT_UID__ == null)
|
|
2993
|
+
component.__VUE_DEVTOOLS_NEXT_UID__ = id;
|
|
2993
2994
|
if (!(appRecord == null ? void 0 : appRecord.instanceMap.has(id))) {
|
|
2994
2995
|
appRecord == null ? void 0 : appRecord.instanceMap.set(id, component);
|
|
2995
|
-
devtoolsAppRecords.active.
|
|
2996
|
+
if (devtoolsAppRecords.active.id === (appRecord == null ? void 0 : appRecord.id))
|
|
2997
|
+
devtoolsAppRecords.active.instanceMap = appRecord.instanceMap;
|
|
2996
2998
|
}
|
|
2997
2999
|
}
|
|
2998
3000
|
if (!appRecord)
|
|
@@ -3017,7 +3019,8 @@ function registerComponentDevToolsPlugin(app) {
|
|
|
3017
3019
|
instance: component
|
|
3018
3020
|
});
|
|
3019
3021
|
appRecord == null ? void 0 : appRecord.instanceMap.delete(id);
|
|
3020
|
-
devtoolsAppRecords.active.
|
|
3022
|
+
if (devtoolsAppRecords.active.id === (appRecord == null ? void 0 : appRecord.id))
|
|
3023
|
+
devtoolsAppRecords.active.instanceMap = appRecord.instanceMap;
|
|
3021
3024
|
debounceSendInspectorTree();
|
|
3022
3025
|
});
|
|
3023
3026
|
devtoolsContext.componentPluginHookBuffer = [
|
|
@@ -3041,8 +3044,8 @@ function getAppRootInstance(app) {
|
|
|
3041
3044
|
return (_d = (_c = app._container) == null ? void 0 : _c._vnode) == null ? void 0 : _d.component;
|
|
3042
3045
|
}
|
|
3043
3046
|
function getAppRecordId(app, defaultId) {
|
|
3044
|
-
if (app.
|
|
3045
|
-
return app.
|
|
3047
|
+
if (app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ != null)
|
|
3048
|
+
return app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__;
|
|
3046
3049
|
let id = defaultId != null ? defaultId : (appRecordInfo.id++).toString();
|
|
3047
3050
|
if (defaultId && appRecordInfo.appIds.has(id)) {
|
|
3048
3051
|
let count = 1;
|
|
@@ -3051,7 +3054,7 @@ function getAppRecordId(app, defaultId) {
|
|
|
3051
3054
|
id = `${defaultId}_${count}`;
|
|
3052
3055
|
}
|
|
3053
3056
|
appRecordInfo.appIds.add(id);
|
|
3054
|
-
app.
|
|
3057
|
+
app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ = id;
|
|
3055
3058
|
return id;
|
|
3056
3059
|
}
|
|
3057
3060
|
function createAppRecord(app) {
|
|
@@ -3066,10 +3069,10 @@ function createAppRecord(app) {
|
|
|
3066
3069
|
instanceMap: /* @__PURE__ */ new Map(),
|
|
3067
3070
|
rootInstance
|
|
3068
3071
|
};
|
|
3069
|
-
app.
|
|
3072
|
+
app.__VUE_DEVTOOLS_NEXT_APP_RECORD__ = record;
|
|
3070
3073
|
const rootId = `${record.id}:root`;
|
|
3071
3074
|
record.instanceMap.set(rootId, record.rootInstance);
|
|
3072
|
-
record.rootInstance.
|
|
3075
|
+
record.rootInstance.__VUE_DEVTOOLS_NEXT_UID__ = rootId;
|
|
3073
3076
|
return record;
|
|
3074
3077
|
} else {
|
|
3075
3078
|
return {};
|
|
@@ -3260,7 +3263,7 @@ function inspectComponentHighLighter() {
|
|
|
3260
3263
|
e.preventDefault();
|
|
3261
3264
|
e.stopPropagation();
|
|
3262
3265
|
selectComponentFn(e, (id) => {
|
|
3263
|
-
window.removeEventListener("click", onSelect);
|
|
3266
|
+
window.removeEventListener("click", onSelect, true);
|
|
3264
3267
|
window.removeEventListener("mouseover", inspectFn);
|
|
3265
3268
|
const el = getContainerElement();
|
|
3266
3269
|
if (el)
|
|
@@ -3268,7 +3271,7 @@ function inspectComponentHighLighter() {
|
|
|
3268
3271
|
resolve(JSON.stringify({ id }));
|
|
3269
3272
|
});
|
|
3270
3273
|
}
|
|
3271
|
-
window.addEventListener("click", onSelect);
|
|
3274
|
+
window.addEventListener("click", onSelect, true);
|
|
3272
3275
|
});
|
|
3273
3276
|
}
|
|
3274
3277
|
function scrollToComponent(options) {
|
|
@@ -3461,7 +3464,7 @@ function getInstanceDetails(instance) {
|
|
|
3461
3464
|
return {
|
|
3462
3465
|
_custom: {
|
|
3463
3466
|
type: "component",
|
|
3464
|
-
id: instance.
|
|
3467
|
+
id: instance.__VUE_DEVTOOLS_NEXT_UID__,
|
|
3465
3468
|
displayText: getInstanceName(instance),
|
|
3466
3469
|
tooltipText: "Component instance",
|
|
3467
3470
|
value: reduceStateList(state),
|
|
@@ -4128,7 +4131,7 @@ var DevToolsPluginApi = class {
|
|
|
4128
4131
|
}
|
|
4129
4132
|
}
|
|
4130
4133
|
async getComponentInstances(app) {
|
|
4131
|
-
const appRecord = app.
|
|
4134
|
+
const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
|
|
4132
4135
|
const appId = appRecord.id.toString();
|
|
4133
4136
|
const instances = [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
|
|
4134
4137
|
return instances;
|
|
@@ -4352,7 +4355,7 @@ var devtoolsAppRecords = new Proxy(devtoolsState.appRecords, {
|
|
|
4352
4355
|
}
|
|
4353
4356
|
});
|
|
4354
4357
|
var _a8, _b8;
|
|
4355
|
-
var appRecordInfo = (_b8 = (_a8 = import_devtools_shared13.target).
|
|
4358
|
+
var appRecordInfo = (_b8 = (_a8 = import_devtools_shared13.target).__VUE_DEVTOOLS_NEXT_APP_RECROD_INFO__) != null ? _b8 : _a8.__VUE_DEVTOOLS_NEXT_APP_RECROD_INFO__ = {
|
|
4356
4359
|
id: 0,
|
|
4357
4360
|
appIds: /* @__PURE__ */ new Set()
|
|
4358
4361
|
};
|