@vue/devtools-kit 7.5.4 → 7.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +23 -14
- package/dist/index.js +23 -14
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2331,7 +2331,7 @@ var import_devtools_shared8 = require("@vue/devtools-shared");
|
|
|
2331
2331
|
// src/ctx/state.ts
|
|
2332
2332
|
init_cjs_shims();
|
|
2333
2333
|
var import_devtools_shared7 = require("@vue/devtools-shared");
|
|
2334
|
-
var
|
|
2334
|
+
var import_perfect_debounce3 = require("perfect-debounce");
|
|
2335
2335
|
|
|
2336
2336
|
// src/core/timeline/storage.ts
|
|
2337
2337
|
init_cjs_shims();
|
|
@@ -2368,6 +2368,7 @@ function getTimelineLayersStateFromStorage() {
|
|
|
2368
2368
|
// src/ctx/hook.ts
|
|
2369
2369
|
init_cjs_shims();
|
|
2370
2370
|
var import_hookable = require("hookable");
|
|
2371
|
+
var import_perfect_debounce2 = require("perfect-debounce");
|
|
2371
2372
|
|
|
2372
2373
|
// src/ctx/inspector.ts
|
|
2373
2374
|
init_cjs_shims();
|
|
@@ -2385,6 +2386,7 @@ var devtoolsTimelineLayers = new Proxy(import_devtools_shared5.target.__VUE_DEVT
|
|
|
2385
2386
|
}
|
|
2386
2387
|
});
|
|
2387
2388
|
function addTimelineLayer(options, descriptor) {
|
|
2389
|
+
devtoolsState.timelineLayersState[descriptor.id] = false;
|
|
2388
2390
|
devtoolsTimelineLayers.push({
|
|
2389
2391
|
...options,
|
|
2390
2392
|
descriptorId: descriptor.id,
|
|
@@ -2514,9 +2516,9 @@ function createDevToolsCtxHooks() {
|
|
|
2514
2516
|
hooks2.hook("addInspector" /* ADD_INSPECTOR */, ({ inspector, plugin }) => {
|
|
2515
2517
|
addInspector(inspector, plugin.descriptor);
|
|
2516
2518
|
});
|
|
2517
|
-
|
|
2519
|
+
const debounceSendInspectorTree = (0, import_perfect_debounce2.debounce)(async ({ inspectorId, plugin }) => {
|
|
2518
2520
|
var _a25;
|
|
2519
|
-
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app))
|
|
2521
|
+
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
|
|
2520
2522
|
return;
|
|
2521
2523
|
const inspector = getInspector(inspectorId, plugin.descriptor.app);
|
|
2522
2524
|
const _payload = {
|
|
@@ -2537,10 +2539,11 @@ function createDevToolsCtxHooks() {
|
|
|
2537
2539
|
rootNodes: _payload.rootNodes
|
|
2538
2540
|
})));
|
|
2539
2541
|
}, "sendInspectorTreeToClient" /* SEND_INSPECTOR_TREE_TO_CLIENT */);
|
|
2540
|
-
});
|
|
2541
|
-
hooks2.hook("
|
|
2542
|
+
}, 120);
|
|
2543
|
+
hooks2.hook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, debounceSendInspectorTree);
|
|
2544
|
+
const debounceSendInspectorState = (0, import_perfect_debounce2.debounce)(async ({ inspectorId, plugin }) => {
|
|
2542
2545
|
var _a25;
|
|
2543
|
-
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app))
|
|
2546
|
+
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
|
|
2544
2547
|
return;
|
|
2545
2548
|
const inspector = getInspector(inspectorId, plugin.descriptor.app);
|
|
2546
2549
|
const _payload = {
|
|
@@ -2567,7 +2570,8 @@ function createDevToolsCtxHooks() {
|
|
|
2567
2570
|
state: _payload.state
|
|
2568
2571
|
})));
|
|
2569
2572
|
}, "sendInspectorStateToClient" /* SEND_INSPECTOR_STATE_TO_CLIENT */);
|
|
2570
|
-
});
|
|
2573
|
+
}, 120);
|
|
2574
|
+
hooks2.hook("sendInspectorState" /* SEND_INSPECTOR_STATE */, debounceSendInspectorState);
|
|
2571
2575
|
hooks2.hook("customInspectorSelectNode" /* CUSTOM_INSPECTOR_SELECT_NODE */, ({ inspectorId, nodeId, plugin }) => {
|
|
2572
2576
|
const inspector = getInspector(inspectorId, plugin.descriptor.app);
|
|
2573
2577
|
if (!inspector)
|
|
@@ -2578,6 +2582,9 @@ function createDevToolsCtxHooks() {
|
|
|
2578
2582
|
addTimelineLayer(options, plugin.descriptor);
|
|
2579
2583
|
});
|
|
2580
2584
|
hooks2.hook("timelineEventAdded" /* TIMELINE_EVENT_ADDED */, ({ options, plugin }) => {
|
|
2585
|
+
var _a25;
|
|
2586
|
+
if (devtoolsState.highPerfModeEnabled || !((_a25 = devtoolsState.timelineLayersState) == null ? void 0 : _a25[plugin.descriptor.id]))
|
|
2587
|
+
return;
|
|
2581
2588
|
hooks2.callHookWith(async (callbacks) => {
|
|
2582
2589
|
await Promise.all(callbacks.map((cb) => cb(options)));
|
|
2583
2590
|
}, "sendTimelineEventToClient" /* SEND_TIMELINE_EVENT_TO_CLIENT */);
|
|
@@ -2639,10 +2646,10 @@ function initStateFactory() {
|
|
|
2639
2646
|
}
|
|
2640
2647
|
var _a9, _b9;
|
|
2641
2648
|
(_b9 = (_a9 = import_devtools_shared7.target)[STATE_KEY]) != null ? _b9 : _a9[STATE_KEY] = initStateFactory();
|
|
2642
|
-
var callStateUpdatedHook = (0,
|
|
2649
|
+
var callStateUpdatedHook = (0, import_perfect_debounce3.debounce)((state) => {
|
|
2643
2650
|
devtoolsContext.hooks.callHook("devtoolsStateUpdated" /* DEVTOOLS_STATE_UPDATED */, { state });
|
|
2644
2651
|
});
|
|
2645
|
-
var callConnectedUpdatedHook = (0,
|
|
2652
|
+
var callConnectedUpdatedHook = (0, import_perfect_debounce3.debounce)((state, oldState) => {
|
|
2646
2653
|
devtoolsContext.hooks.callHook("devtoolsConnectedUpdated" /* DEVTOOLS_CONNECTED_UPDATED */, { state, oldState });
|
|
2647
2654
|
});
|
|
2648
2655
|
var devtoolsAppRecords = new Proxy(import_devtools_shared7.target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
|
|
@@ -3176,7 +3183,7 @@ var DevToolsPluginAPI = DevToolsV6PluginAPI;
|
|
|
3176
3183
|
|
|
3177
3184
|
// src/core/plugin/components.ts
|
|
3178
3185
|
init_cjs_shims();
|
|
3179
|
-
var
|
|
3186
|
+
var import_perfect_debounce4 = require("perfect-debounce");
|
|
3180
3187
|
|
|
3181
3188
|
// src/core/component/state/index.ts
|
|
3182
3189
|
init_cjs_shims();
|
|
@@ -4088,10 +4095,10 @@ function createComponentsDevToolsPlugin(app) {
|
|
|
4088
4095
|
await api.sendInspectorState("components");
|
|
4089
4096
|
}
|
|
4090
4097
|
});
|
|
4091
|
-
const debounceSendInspectorTree = (0,
|
|
4098
|
+
const debounceSendInspectorTree = (0, import_perfect_debounce4.debounce)(() => {
|
|
4092
4099
|
api.sendInspectorTree(INSPECTOR_ID);
|
|
4093
4100
|
}, 120);
|
|
4094
|
-
const debounceSendInspectorState = (0,
|
|
4101
|
+
const debounceSendInspectorState = (0, import_perfect_debounce4.debounce)(() => {
|
|
4095
4102
|
api.sendInspectorState(INSPECTOR_ID);
|
|
4096
4103
|
}, 120);
|
|
4097
4104
|
const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
|
|
@@ -4213,7 +4220,7 @@ function registerDevToolsPlugin(app) {
|
|
|
4213
4220
|
// src/core/router/index.ts
|
|
4214
4221
|
init_cjs_shims();
|
|
4215
4222
|
var import_devtools_shared16 = require("@vue/devtools-shared");
|
|
4216
|
-
var
|
|
4223
|
+
var import_perfect_debounce5 = require("perfect-debounce");
|
|
4217
4224
|
|
|
4218
4225
|
// src/ctx/router.ts
|
|
4219
4226
|
init_cjs_shims();
|
|
@@ -4291,11 +4298,13 @@ function normalizeRouterInfo(appRecord, activeAppRecord2) {
|
|
|
4291
4298
|
console.warn = c;
|
|
4292
4299
|
}
|
|
4293
4300
|
init();
|
|
4294
|
-
hook.on.componentUpdated((0,
|
|
4301
|
+
hook.on.componentUpdated((0, import_perfect_debounce5.debounce)(() => {
|
|
4295
4302
|
var _a25;
|
|
4296
4303
|
if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
|
|
4297
4304
|
return;
|
|
4298
4305
|
init();
|
|
4306
|
+
if (devtoolsState.highPerfModeEnabled)
|
|
4307
|
+
return;
|
|
4299
4308
|
devtoolsContext.hooks.callHook("routerInfoUpdated" /* ROUTER_INFO_UPDATED */, { state: import_devtools_shared16.target[ROUTER_INFO_KEY] });
|
|
4300
4309
|
}, 200));
|
|
4301
4310
|
}
|
package/dist/index.js
CHANGED
|
@@ -2240,7 +2240,7 @@ import { target as target5 } from "@vue/devtools-shared";
|
|
|
2240
2240
|
// src/ctx/state.ts
|
|
2241
2241
|
init_esm_shims();
|
|
2242
2242
|
import { target as global, isUrlString } from "@vue/devtools-shared";
|
|
2243
|
-
import { debounce as
|
|
2243
|
+
import { debounce as debounce3 } from "perfect-debounce";
|
|
2244
2244
|
|
|
2245
2245
|
// src/core/timeline/storage.ts
|
|
2246
2246
|
init_esm_shims();
|
|
@@ -2277,6 +2277,7 @@ function getTimelineLayersStateFromStorage() {
|
|
|
2277
2277
|
// src/ctx/hook.ts
|
|
2278
2278
|
init_esm_shims();
|
|
2279
2279
|
import { createHooks } from "hookable";
|
|
2280
|
+
import { debounce as debounce2 } from "perfect-debounce";
|
|
2280
2281
|
|
|
2281
2282
|
// src/ctx/inspector.ts
|
|
2282
2283
|
init_esm_shims();
|
|
@@ -2294,6 +2295,7 @@ var devtoolsTimelineLayers = new Proxy(target3.__VUE_DEVTOOLS_KIT_TIMELINE_LAYER
|
|
|
2294
2295
|
}
|
|
2295
2296
|
});
|
|
2296
2297
|
function addTimelineLayer(options, descriptor) {
|
|
2298
|
+
devtoolsState.timelineLayersState[descriptor.id] = false;
|
|
2297
2299
|
devtoolsTimelineLayers.push({
|
|
2298
2300
|
...options,
|
|
2299
2301
|
descriptorId: descriptor.id,
|
|
@@ -2423,9 +2425,9 @@ function createDevToolsCtxHooks() {
|
|
|
2423
2425
|
hooks2.hook("addInspector" /* ADD_INSPECTOR */, ({ inspector, plugin }) => {
|
|
2424
2426
|
addInspector(inspector, plugin.descriptor);
|
|
2425
2427
|
});
|
|
2426
|
-
|
|
2428
|
+
const debounceSendInspectorTree = debounce2(async ({ inspectorId, plugin }) => {
|
|
2427
2429
|
var _a25;
|
|
2428
|
-
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app))
|
|
2430
|
+
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
|
|
2429
2431
|
return;
|
|
2430
2432
|
const inspector = getInspector(inspectorId, plugin.descriptor.app);
|
|
2431
2433
|
const _payload = {
|
|
@@ -2446,10 +2448,11 @@ function createDevToolsCtxHooks() {
|
|
|
2446
2448
|
rootNodes: _payload.rootNodes
|
|
2447
2449
|
})));
|
|
2448
2450
|
}, "sendInspectorTreeToClient" /* SEND_INSPECTOR_TREE_TO_CLIENT */);
|
|
2449
|
-
});
|
|
2450
|
-
hooks2.hook("
|
|
2451
|
+
}, 120);
|
|
2452
|
+
hooks2.hook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, debounceSendInspectorTree);
|
|
2453
|
+
const debounceSendInspectorState = debounce2(async ({ inspectorId, plugin }) => {
|
|
2451
2454
|
var _a25;
|
|
2452
|
-
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app))
|
|
2455
|
+
if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
|
|
2453
2456
|
return;
|
|
2454
2457
|
const inspector = getInspector(inspectorId, plugin.descriptor.app);
|
|
2455
2458
|
const _payload = {
|
|
@@ -2476,7 +2479,8 @@ function createDevToolsCtxHooks() {
|
|
|
2476
2479
|
state: _payload.state
|
|
2477
2480
|
})));
|
|
2478
2481
|
}, "sendInspectorStateToClient" /* SEND_INSPECTOR_STATE_TO_CLIENT */);
|
|
2479
|
-
});
|
|
2482
|
+
}, 120);
|
|
2483
|
+
hooks2.hook("sendInspectorState" /* SEND_INSPECTOR_STATE */, debounceSendInspectorState);
|
|
2480
2484
|
hooks2.hook("customInspectorSelectNode" /* CUSTOM_INSPECTOR_SELECT_NODE */, ({ inspectorId, nodeId, plugin }) => {
|
|
2481
2485
|
const inspector = getInspector(inspectorId, plugin.descriptor.app);
|
|
2482
2486
|
if (!inspector)
|
|
@@ -2487,6 +2491,9 @@ function createDevToolsCtxHooks() {
|
|
|
2487
2491
|
addTimelineLayer(options, plugin.descriptor);
|
|
2488
2492
|
});
|
|
2489
2493
|
hooks2.hook("timelineEventAdded" /* TIMELINE_EVENT_ADDED */, ({ options, plugin }) => {
|
|
2494
|
+
var _a25;
|
|
2495
|
+
if (devtoolsState.highPerfModeEnabled || !((_a25 = devtoolsState.timelineLayersState) == null ? void 0 : _a25[plugin.descriptor.id]))
|
|
2496
|
+
return;
|
|
2490
2497
|
hooks2.callHookWith(async (callbacks) => {
|
|
2491
2498
|
await Promise.all(callbacks.map((cb) => cb(options)));
|
|
2492
2499
|
}, "sendTimelineEventToClient" /* SEND_TIMELINE_EVENT_TO_CLIENT */);
|
|
@@ -2548,10 +2555,10 @@ function initStateFactory() {
|
|
|
2548
2555
|
}
|
|
2549
2556
|
var _a9, _b9;
|
|
2550
2557
|
(_b9 = (_a9 = global)[STATE_KEY]) != null ? _b9 : _a9[STATE_KEY] = initStateFactory();
|
|
2551
|
-
var callStateUpdatedHook =
|
|
2558
|
+
var callStateUpdatedHook = debounce3((state) => {
|
|
2552
2559
|
devtoolsContext.hooks.callHook("devtoolsStateUpdated" /* DEVTOOLS_STATE_UPDATED */, { state });
|
|
2553
2560
|
});
|
|
2554
|
-
var callConnectedUpdatedHook =
|
|
2561
|
+
var callConnectedUpdatedHook = debounce3((state, oldState) => {
|
|
2555
2562
|
devtoolsContext.hooks.callHook("devtoolsConnectedUpdated" /* DEVTOOLS_CONNECTED_UPDATED */, { state, oldState });
|
|
2556
2563
|
});
|
|
2557
2564
|
var devtoolsAppRecords = new Proxy(global.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
|
|
@@ -3085,7 +3092,7 @@ var DevToolsPluginAPI = DevToolsV6PluginAPI;
|
|
|
3085
3092
|
|
|
3086
3093
|
// src/core/plugin/components.ts
|
|
3087
3094
|
init_esm_shims();
|
|
3088
|
-
import { debounce as
|
|
3095
|
+
import { debounce as debounce4 } from "perfect-debounce";
|
|
3089
3096
|
|
|
3090
3097
|
// src/core/component/state/index.ts
|
|
3091
3098
|
init_esm_shims();
|
|
@@ -3997,10 +4004,10 @@ function createComponentsDevToolsPlugin(app) {
|
|
|
3997
4004
|
await api.sendInspectorState("components");
|
|
3998
4005
|
}
|
|
3999
4006
|
});
|
|
4000
|
-
const debounceSendInspectorTree =
|
|
4007
|
+
const debounceSendInspectorTree = debounce4(() => {
|
|
4001
4008
|
api.sendInspectorTree(INSPECTOR_ID);
|
|
4002
4009
|
}, 120);
|
|
4003
|
-
const debounceSendInspectorState =
|
|
4010
|
+
const debounceSendInspectorState = debounce4(() => {
|
|
4004
4011
|
api.sendInspectorState(INSPECTOR_ID);
|
|
4005
4012
|
}, 120);
|
|
4006
4013
|
const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
|
|
@@ -4122,7 +4129,7 @@ function registerDevToolsPlugin(app) {
|
|
|
4122
4129
|
// src/core/router/index.ts
|
|
4123
4130
|
init_esm_shims();
|
|
4124
4131
|
import { deepClone, target as global3 } from "@vue/devtools-shared";
|
|
4125
|
-
import { debounce as
|
|
4132
|
+
import { debounce as debounce5 } from "perfect-debounce";
|
|
4126
4133
|
|
|
4127
4134
|
// src/ctx/router.ts
|
|
4128
4135
|
init_esm_shims();
|
|
@@ -4200,11 +4207,13 @@ function normalizeRouterInfo(appRecord, activeAppRecord2) {
|
|
|
4200
4207
|
console.warn = c;
|
|
4201
4208
|
}
|
|
4202
4209
|
init();
|
|
4203
|
-
hook.on.componentUpdated(
|
|
4210
|
+
hook.on.componentUpdated(debounce5(() => {
|
|
4204
4211
|
var _a25;
|
|
4205
4212
|
if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
|
|
4206
4213
|
return;
|
|
4207
4214
|
init();
|
|
4215
|
+
if (devtoolsState.highPerfModeEnabled)
|
|
4216
|
+
return;
|
|
4208
4217
|
devtoolsContext.hooks.callHook("routerInfoUpdated" /* ROUTER_INFO_UPDATED */, { state: global3[ROUTER_INFO_KEY] });
|
|
4209
4218
|
}, 200));
|
|
4210
4219
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/devtools-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.5.
|
|
4
|
+
"version": "7.5.5",
|
|
5
5
|
"author": "webfansplz",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"directory": "packages/devtools-kit",
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/vuejs/devtools
|
|
10
|
+
"url": "git+https://github.com/vuejs/devtools.git"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"perfect-debounce": "^1.0.0",
|
|
30
30
|
"speakingurl": "^14.0.1",
|
|
31
31
|
"superjson": "^2.2.1",
|
|
32
|
-
"@vue/devtools-shared": "^7.5.
|
|
32
|
+
"@vue/devtools-shared": "^7.5.5"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/speakingurl": "^13.0.6",
|