@vue/devtools-kit 7.0.21 → 7.0.22
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 +56 -30
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +53 -27
- 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 = (target10, all) => {
|
|
15
15
|
for (var name in all)
|
|
16
|
-
__defProp(
|
|
16
|
+
__defProp(target10, 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,12 +23,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
23
|
}
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
|
-
var __toESM = (mod, isNodeMode,
|
|
26
|
+
var __toESM = (mod, isNodeMode, target10) => (target10 = 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(target10, "default", { value: mod, enumerable: true }) : target10,
|
|
32
32
|
mod
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
@@ -1605,7 +1605,7 @@ init_cjs_shims();
|
|
|
1605
1605
|
|
|
1606
1606
|
// src/core/index.ts
|
|
1607
1607
|
init_cjs_shims();
|
|
1608
|
-
var
|
|
1608
|
+
var import_devtools_shared16 = require("@vue/devtools-shared");
|
|
1609
1609
|
|
|
1610
1610
|
// src/hook/index.ts
|
|
1611
1611
|
init_cjs_shims();
|
|
@@ -1659,6 +1659,7 @@ var on = {
|
|
|
1659
1659
|
function createDevToolsHook() {
|
|
1660
1660
|
return {
|
|
1661
1661
|
id: "vue-devtools-next",
|
|
1662
|
+
devtoolsVersion: "7.0",
|
|
1662
1663
|
enabled: false,
|
|
1663
1664
|
appRecords: [],
|
|
1664
1665
|
apps: [],
|
|
@@ -1718,7 +1719,9 @@ function subscribeDevToolsHook() {
|
|
|
1718
1719
|
return;
|
|
1719
1720
|
devtoolsHooks.callHook("component:removed" /* COMPONENT_REMOVED */, app, uid, parentUid, component);
|
|
1720
1721
|
});
|
|
1721
|
-
hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn) => {
|
|
1722
|
+
hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn, options) => {
|
|
1723
|
+
if ((options == null ? void 0 : options.target) === "legacy")
|
|
1724
|
+
return;
|
|
1722
1725
|
devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
|
|
1723
1726
|
});
|
|
1724
1727
|
}
|
|
@@ -2388,9 +2391,9 @@ var StateEditor = class {
|
|
|
2388
2391
|
Reflect.deleteProperty(object, field);
|
|
2389
2392
|
}
|
|
2390
2393
|
if (!state.remove) {
|
|
2391
|
-
const
|
|
2392
|
-
if (this.refEditor.isRef(
|
|
2393
|
-
this.refEditor.set(
|
|
2394
|
+
const target10 = object[state.newKey || field];
|
|
2395
|
+
if (this.refEditor.isRef(target10))
|
|
2396
|
+
this.refEditor.set(target10, value);
|
|
2394
2397
|
else if ((0, import_vue2.toRaw)(object) instanceof Map)
|
|
2395
2398
|
object.set(state.newKey || field, value);
|
|
2396
2399
|
else if ((0, import_vue2.toRaw)(object) instanceof Set)
|
|
@@ -2442,14 +2445,14 @@ async function editComponentState(payload, stateEditor2) {
|
|
|
2442
2445
|
if (!instance)
|
|
2443
2446
|
return;
|
|
2444
2447
|
const targetPath = path.slice();
|
|
2445
|
-
let
|
|
2448
|
+
let target10;
|
|
2446
2449
|
if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0])) {
|
|
2447
|
-
|
|
2450
|
+
target10 = instance.devtoolsRawSetupState;
|
|
2448
2451
|
}
|
|
2449
|
-
if (
|
|
2452
|
+
if (target10 && targetPath) {
|
|
2450
2453
|
if (state.type === "object" && type === "reactive") {
|
|
2451
2454
|
}
|
|
2452
|
-
stateEditor2.set(
|
|
2455
|
+
stateEditor2.set(target10, targetPath, state.value, stateEditor2.createDefaultSetCallback(state));
|
|
2453
2456
|
}
|
|
2454
2457
|
}
|
|
2455
2458
|
var stateEditor = new StateEditor();
|
|
@@ -3220,9 +3223,9 @@ function unhighlight() {
|
|
|
3220
3223
|
}
|
|
3221
3224
|
var inspectInstance = null;
|
|
3222
3225
|
function inspectFn(e) {
|
|
3223
|
-
const
|
|
3224
|
-
if (
|
|
3225
|
-
const instance =
|
|
3226
|
+
const target10 = e.target;
|
|
3227
|
+
if (target10) {
|
|
3228
|
+
const instance = target10.__vueParentComponent;
|
|
3226
3229
|
if (instance) {
|
|
3227
3230
|
inspectInstance = instance;
|
|
3228
3231
|
const el = instance.vnode.el;
|
|
@@ -4221,16 +4224,16 @@ var callConnectedUpdatedHook = (0, import_perfect_debounce3.debounce)((state, ol
|
|
|
4221
4224
|
apiHooks.callHook("devtools:connected-updated" /* DEVTOOLS_CONNECTED_UPDATED */, state, oldState);
|
|
4222
4225
|
}, 80);
|
|
4223
4226
|
var devtoolsState = new Proxy(import_devtools_shared10.target[STATE_KEY], {
|
|
4224
|
-
get(
|
|
4227
|
+
get(target10, property) {
|
|
4225
4228
|
return import_devtools_shared10.target[STATE_KEY][property];
|
|
4226
4229
|
},
|
|
4227
|
-
deleteProperty(
|
|
4228
|
-
delete
|
|
4230
|
+
deleteProperty(target10, property) {
|
|
4231
|
+
delete target10[property];
|
|
4229
4232
|
return true;
|
|
4230
4233
|
},
|
|
4231
|
-
set(
|
|
4234
|
+
set(target10, property, value) {
|
|
4232
4235
|
const oldState = { ...import_devtools_shared10.target[STATE_KEY] };
|
|
4233
|
-
|
|
4236
|
+
target10[property] = value;
|
|
4234
4237
|
import_devtools_shared10.target[STATE_KEY][property] = value;
|
|
4235
4238
|
callStateUpdatedHook(import_devtools_shared10.target[STATE_KEY], oldState);
|
|
4236
4239
|
if (["connected", "clientConnected"].includes(property.toString()) && oldState[property] !== value)
|
|
@@ -4276,7 +4279,7 @@ var _a5, _b5;
|
|
|
4276
4279
|
var _a6, _b6;
|
|
4277
4280
|
(_b6 = (_a6 = import_devtools_shared11.target)[ROUTER_KEY]) != null ? _b6 : _a6[ROUTER_KEY] = null;
|
|
4278
4281
|
var devtoolsRouterInfo = new Proxy(import_devtools_shared11.target[ROUTER_INFO_KEY], {
|
|
4279
|
-
get(
|
|
4282
|
+
get(target10, property) {
|
|
4280
4283
|
return import_devtools_shared11.target[ROUTER_INFO_KEY][property];
|
|
4281
4284
|
}
|
|
4282
4285
|
});
|
|
@@ -4303,14 +4306,14 @@ function resetDevToolsContext() {
|
|
|
4303
4306
|
import_devtools_shared12.target[CONTEXT_KEY] = initContextFactory();
|
|
4304
4307
|
}
|
|
4305
4308
|
var devtoolsContext = new Proxy(import_devtools_shared12.target[CONTEXT_KEY], {
|
|
4306
|
-
get(
|
|
4309
|
+
get(target10, property) {
|
|
4307
4310
|
if (property === "router")
|
|
4308
4311
|
return import_devtools_shared12.target[ROUTER_KEY];
|
|
4309
4312
|
else if (property === "clear")
|
|
4310
4313
|
return resetDevToolsContext;
|
|
4311
4314
|
return import_devtools_shared12.target[CONTEXT_KEY][property];
|
|
4312
4315
|
},
|
|
4313
|
-
set(
|
|
4316
|
+
set(target10, property, value) {
|
|
4314
4317
|
import_devtools_shared12.target[CONTEXT_KEY][property] = value;
|
|
4315
4318
|
return true;
|
|
4316
4319
|
}
|
|
@@ -4326,7 +4329,7 @@ var devtoolsAppRecords = new Proxy(devtoolsState.appRecords, {
|
|
|
4326
4329
|
else if (property === "activeId")
|
|
4327
4330
|
return devtoolsState.activeAppRecordId;
|
|
4328
4331
|
},
|
|
4329
|
-
set(
|
|
4332
|
+
set(target10, property, value) {
|
|
4330
4333
|
var _a10;
|
|
4331
4334
|
const oldState = { ...devtoolsState };
|
|
4332
4335
|
if (property === "value") {
|
|
@@ -4371,17 +4374,34 @@ function setDevToolsEnv(env) {
|
|
|
4371
4374
|
};
|
|
4372
4375
|
}
|
|
4373
4376
|
|
|
4377
|
+
// src/compat/index.ts
|
|
4378
|
+
init_cjs_shims();
|
|
4379
|
+
var import_devtools_shared15 = require("@vue/devtools-shared");
|
|
4380
|
+
function onLegacyDevToolsPluginApiAvailabled(cb) {
|
|
4381
|
+
if (import_devtools_shared15.target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__) {
|
|
4382
|
+
cb();
|
|
4383
|
+
return;
|
|
4384
|
+
}
|
|
4385
|
+
Object.defineProperty(import_devtools_shared15.target, "__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__", {
|
|
4386
|
+
set(value) {
|
|
4387
|
+
if (value)
|
|
4388
|
+
cb();
|
|
4389
|
+
},
|
|
4390
|
+
configurable: true
|
|
4391
|
+
});
|
|
4392
|
+
}
|
|
4393
|
+
|
|
4374
4394
|
// src/core/index.ts
|
|
4375
4395
|
function initDevTools() {
|
|
4376
4396
|
var _a10;
|
|
4377
4397
|
devtoolsState.vitePluginDetected = getDevToolsEnv().vitePluginDetected;
|
|
4378
|
-
const isDevToolsNext = ((_a10 =
|
|
4379
|
-
if (
|
|
4398
|
+
const isDevToolsNext = ((_a10 = import_devtools_shared16.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a10.id) === "vue-devtools-next";
|
|
4399
|
+
if (import_devtools_shared16.target.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
|
|
4380
4400
|
return;
|
|
4381
|
-
if (!
|
|
4382
|
-
|
|
4401
|
+
if (!import_devtools_shared16.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
|
|
4402
|
+
import_devtools_shared16.target.__VUE_DEVTOOLS_GLOBAL_HOOK__ = createDevToolsHook();
|
|
4383
4403
|
} else {
|
|
4384
|
-
if (!
|
|
4404
|
+
if (!import_devtools_shared16.isNuxtApp) {
|
|
4385
4405
|
Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, createDevToolsHook());
|
|
4386
4406
|
}
|
|
4387
4407
|
}
|
|
@@ -4392,6 +4412,12 @@ function initDevTools() {
|
|
|
4392
4412
|
return;
|
|
4393
4413
|
setupExternalPlugin([pluginDescriptor, setupFn], app, api);
|
|
4394
4414
|
});
|
|
4415
|
+
onLegacyDevToolsPluginApiAvailabled(() => {
|
|
4416
|
+
const normalizedPluginBuffer = devtoolsState.pluginBuffer.filter(([item]) => item.id !== "components");
|
|
4417
|
+
normalizedPluginBuffer.forEach(([pluginDescriptor, setupFn]) => {
|
|
4418
|
+
import_devtools_shared16.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
|
|
4419
|
+
});
|
|
4420
|
+
});
|
|
4395
4421
|
hook.on.vueAppInit(async (app, version) => {
|
|
4396
4422
|
const record = createAppRecord(app);
|
|
4397
4423
|
const api = new DevToolsPluginApi();
|
package/dist/index.d.cts
CHANGED
|
@@ -452,11 +452,14 @@ interface DevToolsEvent {
|
|
|
452
452
|
[DevToolsHooks.COMPONENT_ADDED]: (app: HookAppInstance, uid: number, parentUid: number, component: VueAppInstance) => void;
|
|
453
453
|
[DevToolsHooks.COMPONENT_UPDATED]: DevToolsEvent['component:added'];
|
|
454
454
|
[DevToolsHooks.COMPONENT_REMOVED]: DevToolsEvent['component:added'];
|
|
455
|
-
[DevToolsHooks.SETUP_DEVTOOLS_PLUGIN]: (pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction
|
|
455
|
+
[DevToolsHooks.SETUP_DEVTOOLS_PLUGIN]: (pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction, options?: {
|
|
456
|
+
target?: string;
|
|
457
|
+
}) => void;
|
|
456
458
|
}
|
|
457
459
|
interface DevToolsHook {
|
|
458
460
|
id: string;
|
|
459
461
|
enabled?: boolean;
|
|
462
|
+
devtoolsVersion: string;
|
|
460
463
|
events: Map<DevToolsHooks, Function[]>;
|
|
461
464
|
emit: (event: DevToolsHooks, ...payload: any[]) => void;
|
|
462
465
|
on: <T extends Function>(event: DevToolsHooks, handler: T) => () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -452,11 +452,14 @@ interface DevToolsEvent {
|
|
|
452
452
|
[DevToolsHooks.COMPONENT_ADDED]: (app: HookAppInstance, uid: number, parentUid: number, component: VueAppInstance) => void;
|
|
453
453
|
[DevToolsHooks.COMPONENT_UPDATED]: DevToolsEvent['component:added'];
|
|
454
454
|
[DevToolsHooks.COMPONENT_REMOVED]: DevToolsEvent['component:added'];
|
|
455
|
-
[DevToolsHooks.SETUP_DEVTOOLS_PLUGIN]: (pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction
|
|
455
|
+
[DevToolsHooks.SETUP_DEVTOOLS_PLUGIN]: (pluginDescriptor: PluginDescriptor, setupFn: PluginSetupFunction, options?: {
|
|
456
|
+
target?: string;
|
|
457
|
+
}) => void;
|
|
456
458
|
}
|
|
457
459
|
interface DevToolsHook {
|
|
458
460
|
id: string;
|
|
459
461
|
enabled?: boolean;
|
|
462
|
+
devtoolsVersion: string;
|
|
460
463
|
events: Map<DevToolsHooks, Function[]>;
|
|
461
464
|
emit: (event: DevToolsHooks, ...payload: any[]) => void;
|
|
462
465
|
on: <T extends Function>(event: DevToolsHooks, handler: T) => () => void;
|
package/dist/index.js
CHANGED
|
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
}
|
|
19
19
|
return to;
|
|
20
20
|
};
|
|
21
|
-
var __toESM = (mod, isNodeMode,
|
|
21
|
+
var __toESM = (mod, isNodeMode, target10) => (target10 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
22
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
23
|
// file that has been converted to a CommonJS file using a Babel-
|
|
24
24
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
25
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target10, "default", { value: mod, enumerable: true }) : target10,
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
@@ -1577,7 +1577,7 @@ init_esm_shims();
|
|
|
1577
1577
|
|
|
1578
1578
|
// src/core/index.ts
|
|
1579
1579
|
init_esm_shims();
|
|
1580
|
-
import { isNuxtApp, target as
|
|
1580
|
+
import { isNuxtApp, target as target9 } from "@vue/devtools-shared";
|
|
1581
1581
|
|
|
1582
1582
|
// src/hook/index.ts
|
|
1583
1583
|
init_esm_shims();
|
|
@@ -1631,6 +1631,7 @@ var on = {
|
|
|
1631
1631
|
function createDevToolsHook() {
|
|
1632
1632
|
return {
|
|
1633
1633
|
id: "vue-devtools-next",
|
|
1634
|
+
devtoolsVersion: "7.0",
|
|
1634
1635
|
enabled: false,
|
|
1635
1636
|
appRecords: [],
|
|
1636
1637
|
apps: [],
|
|
@@ -1690,7 +1691,9 @@ function subscribeDevToolsHook() {
|
|
|
1690
1691
|
return;
|
|
1691
1692
|
devtoolsHooks.callHook("component:removed" /* COMPONENT_REMOVED */, app, uid, parentUid, component);
|
|
1692
1693
|
});
|
|
1693
|
-
hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn) => {
|
|
1694
|
+
hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn, options) => {
|
|
1695
|
+
if ((options == null ? void 0 : options.target) === "legacy")
|
|
1696
|
+
return;
|
|
1694
1697
|
devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
|
|
1695
1698
|
});
|
|
1696
1699
|
}
|
|
@@ -2360,9 +2363,9 @@ var StateEditor = class {
|
|
|
2360
2363
|
Reflect.deleteProperty(object, field);
|
|
2361
2364
|
}
|
|
2362
2365
|
if (!state.remove) {
|
|
2363
|
-
const
|
|
2364
|
-
if (this.refEditor.isRef(
|
|
2365
|
-
this.refEditor.set(
|
|
2366
|
+
const target10 = object[state.newKey || field];
|
|
2367
|
+
if (this.refEditor.isRef(target10))
|
|
2368
|
+
this.refEditor.set(target10, value);
|
|
2366
2369
|
else if (toRaw(object) instanceof Map)
|
|
2367
2370
|
object.set(state.newKey || field, value);
|
|
2368
2371
|
else if (toRaw(object) instanceof Set)
|
|
@@ -2414,14 +2417,14 @@ async function editComponentState(payload, stateEditor2) {
|
|
|
2414
2417
|
if (!instance)
|
|
2415
2418
|
return;
|
|
2416
2419
|
const targetPath = path.slice();
|
|
2417
|
-
let
|
|
2420
|
+
let target10;
|
|
2418
2421
|
if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0])) {
|
|
2419
|
-
|
|
2422
|
+
target10 = instance.devtoolsRawSetupState;
|
|
2420
2423
|
}
|
|
2421
|
-
if (
|
|
2424
|
+
if (target10 && targetPath) {
|
|
2422
2425
|
if (state.type === "object" && type === "reactive") {
|
|
2423
2426
|
}
|
|
2424
|
-
stateEditor2.set(
|
|
2427
|
+
stateEditor2.set(target10, targetPath, state.value, stateEditor2.createDefaultSetCallback(state));
|
|
2425
2428
|
}
|
|
2426
2429
|
}
|
|
2427
2430
|
var stateEditor = new StateEditor();
|
|
@@ -3192,9 +3195,9 @@ function unhighlight() {
|
|
|
3192
3195
|
}
|
|
3193
3196
|
var inspectInstance = null;
|
|
3194
3197
|
function inspectFn(e) {
|
|
3195
|
-
const
|
|
3196
|
-
if (
|
|
3197
|
-
const instance =
|
|
3198
|
+
const target10 = e.target;
|
|
3199
|
+
if (target10) {
|
|
3200
|
+
const instance = target10.__vueParentComponent;
|
|
3198
3201
|
if (instance) {
|
|
3199
3202
|
inspectInstance = instance;
|
|
3200
3203
|
const el = instance.vnode.el;
|
|
@@ -4193,16 +4196,16 @@ var callConnectedUpdatedHook = debounce3((state, oldState) => {
|
|
|
4193
4196
|
apiHooks.callHook("devtools:connected-updated" /* DEVTOOLS_CONNECTED_UPDATED */, state, oldState);
|
|
4194
4197
|
}, 80);
|
|
4195
4198
|
var devtoolsState = new Proxy(global2[STATE_KEY], {
|
|
4196
|
-
get(
|
|
4199
|
+
get(target10, property) {
|
|
4197
4200
|
return global2[STATE_KEY][property];
|
|
4198
4201
|
},
|
|
4199
|
-
deleteProperty(
|
|
4200
|
-
delete
|
|
4202
|
+
deleteProperty(target10, property) {
|
|
4203
|
+
delete target10[property];
|
|
4201
4204
|
return true;
|
|
4202
4205
|
},
|
|
4203
|
-
set(
|
|
4206
|
+
set(target10, property, value) {
|
|
4204
4207
|
const oldState = { ...global2[STATE_KEY] };
|
|
4205
|
-
|
|
4208
|
+
target10[property] = value;
|
|
4206
4209
|
global2[STATE_KEY][property] = value;
|
|
4207
4210
|
callStateUpdatedHook(global2[STATE_KEY], oldState);
|
|
4208
4211
|
if (["connected", "clientConnected"].includes(property.toString()) && oldState[property] !== value)
|
|
@@ -4248,7 +4251,7 @@ var _a5, _b5;
|
|
|
4248
4251
|
var _a6, _b6;
|
|
4249
4252
|
(_b6 = (_a6 = global3)[ROUTER_KEY]) != null ? _b6 : _a6[ROUTER_KEY] = null;
|
|
4250
4253
|
var devtoolsRouterInfo = new Proxy(global3[ROUTER_INFO_KEY], {
|
|
4251
|
-
get(
|
|
4254
|
+
get(target10, property) {
|
|
4252
4255
|
return global3[ROUTER_INFO_KEY][property];
|
|
4253
4256
|
}
|
|
4254
4257
|
});
|
|
@@ -4275,14 +4278,14 @@ function resetDevToolsContext() {
|
|
|
4275
4278
|
global4[CONTEXT_KEY] = initContextFactory();
|
|
4276
4279
|
}
|
|
4277
4280
|
var devtoolsContext = new Proxy(global4[CONTEXT_KEY], {
|
|
4278
|
-
get(
|
|
4281
|
+
get(target10, property) {
|
|
4279
4282
|
if (property === "router")
|
|
4280
4283
|
return global4[ROUTER_KEY];
|
|
4281
4284
|
else if (property === "clear")
|
|
4282
4285
|
return resetDevToolsContext;
|
|
4283
4286
|
return global4[CONTEXT_KEY][property];
|
|
4284
4287
|
},
|
|
4285
|
-
set(
|
|
4288
|
+
set(target10, property, value) {
|
|
4286
4289
|
global4[CONTEXT_KEY][property] = value;
|
|
4287
4290
|
return true;
|
|
4288
4291
|
}
|
|
@@ -4298,7 +4301,7 @@ var devtoolsAppRecords = new Proxy(devtoolsState.appRecords, {
|
|
|
4298
4301
|
else if (property === "activeId")
|
|
4299
4302
|
return devtoolsState.activeAppRecordId;
|
|
4300
4303
|
},
|
|
4301
|
-
set(
|
|
4304
|
+
set(target10, property, value) {
|
|
4302
4305
|
var _a10;
|
|
4303
4306
|
const oldState = { ...devtoolsState };
|
|
4304
4307
|
if (property === "value") {
|
|
@@ -4343,15 +4346,32 @@ function setDevToolsEnv(env) {
|
|
|
4343
4346
|
};
|
|
4344
4347
|
}
|
|
4345
4348
|
|
|
4349
|
+
// src/compat/index.ts
|
|
4350
|
+
init_esm_shims();
|
|
4351
|
+
import { target as target8 } from "@vue/devtools-shared";
|
|
4352
|
+
function onLegacyDevToolsPluginApiAvailabled(cb) {
|
|
4353
|
+
if (target8.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__) {
|
|
4354
|
+
cb();
|
|
4355
|
+
return;
|
|
4356
|
+
}
|
|
4357
|
+
Object.defineProperty(target8, "__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__", {
|
|
4358
|
+
set(value) {
|
|
4359
|
+
if (value)
|
|
4360
|
+
cb();
|
|
4361
|
+
},
|
|
4362
|
+
configurable: true
|
|
4363
|
+
});
|
|
4364
|
+
}
|
|
4365
|
+
|
|
4346
4366
|
// src/core/index.ts
|
|
4347
4367
|
function initDevTools() {
|
|
4348
4368
|
var _a10;
|
|
4349
4369
|
devtoolsState.vitePluginDetected = getDevToolsEnv().vitePluginDetected;
|
|
4350
|
-
const isDevToolsNext = ((_a10 =
|
|
4351
|
-
if (
|
|
4370
|
+
const isDevToolsNext = ((_a10 = target9.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a10.id) === "vue-devtools-next";
|
|
4371
|
+
if (target9.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
|
|
4352
4372
|
return;
|
|
4353
|
-
if (!
|
|
4354
|
-
|
|
4373
|
+
if (!target9.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
|
|
4374
|
+
target9.__VUE_DEVTOOLS_GLOBAL_HOOK__ = createDevToolsHook();
|
|
4355
4375
|
} else {
|
|
4356
4376
|
if (!isNuxtApp) {
|
|
4357
4377
|
Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, createDevToolsHook());
|
|
@@ -4364,6 +4384,12 @@ function initDevTools() {
|
|
|
4364
4384
|
return;
|
|
4365
4385
|
setupExternalPlugin([pluginDescriptor, setupFn], app, api);
|
|
4366
4386
|
});
|
|
4387
|
+
onLegacyDevToolsPluginApiAvailabled(() => {
|
|
4388
|
+
const normalizedPluginBuffer = devtoolsState.pluginBuffer.filter(([item]) => item.id !== "components");
|
|
4389
|
+
normalizedPluginBuffer.forEach(([pluginDescriptor, setupFn]) => {
|
|
4390
|
+
target9.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
|
|
4391
|
+
});
|
|
4392
|
+
});
|
|
4367
4393
|
hook.on.vueAppInit(async (app, version) => {
|
|
4368
4394
|
const record = createAppRecord(app);
|
|
4369
4395
|
const api = new DevToolsPluginApi();
|
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.22",
|
|
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.22"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/speakingurl": "^13.0.6",
|