@vue/devtools-kit 7.5.4 → 7.5.6

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 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 import_perfect_debounce2 = require("perfect-debounce");
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
- hooks2.hook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, async ({ inspectorId, plugin }) => {
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("sendInspectorState" /* SEND_INSPECTOR_STATE */, async ({ inspectorId, plugin }) => {
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,10 @@ function createDevToolsCtxHooks() {
2578
2582
  addTimelineLayer(options, plugin.descriptor);
2579
2583
  });
2580
2584
  hooks2.hook("timelineEventAdded" /* TIMELINE_EVENT_ADDED */, ({ options, plugin }) => {
2585
+ var _a25;
2586
+ const internalLayerIds = ["performance", "component-event", "keyboard", "mouse"];
2587
+ if (devtoolsState.highPerfModeEnabled || !((_a25 = devtoolsState.timelineLayersState) == null ? void 0 : _a25[plugin.descriptor.id]) && !internalLayerIds.includes(options.layerId))
2588
+ return;
2581
2589
  hooks2.callHookWith(async (callbacks) => {
2582
2590
  await Promise.all(callbacks.map((cb) => cb(options)));
2583
2591
  }, "sendTimelineEventToClient" /* SEND_TIMELINE_EVENT_TO_CLIENT */);
@@ -2639,10 +2647,10 @@ function initStateFactory() {
2639
2647
  }
2640
2648
  var _a9, _b9;
2641
2649
  (_b9 = (_a9 = import_devtools_shared7.target)[STATE_KEY]) != null ? _b9 : _a9[STATE_KEY] = initStateFactory();
2642
- var callStateUpdatedHook = (0, import_perfect_debounce2.debounce)((state) => {
2650
+ var callStateUpdatedHook = (0, import_perfect_debounce3.debounce)((state) => {
2643
2651
  devtoolsContext.hooks.callHook("devtoolsStateUpdated" /* DEVTOOLS_STATE_UPDATED */, { state });
2644
2652
  });
2645
- var callConnectedUpdatedHook = (0, import_perfect_debounce2.debounce)((state, oldState) => {
2653
+ var callConnectedUpdatedHook = (0, import_perfect_debounce3.debounce)((state, oldState) => {
2646
2654
  devtoolsContext.hooks.callHook("devtoolsConnectedUpdated" /* DEVTOOLS_CONNECTED_UPDATED */, { state, oldState });
2647
2655
  });
2648
2656
  var devtoolsAppRecords = new Proxy(import_devtools_shared7.target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
@@ -3176,7 +3184,7 @@ var DevToolsPluginAPI = DevToolsV6PluginAPI;
3176
3184
 
3177
3185
  // src/core/plugin/components.ts
3178
3186
  init_cjs_shims();
3179
- var import_perfect_debounce3 = require("perfect-debounce");
3187
+ var import_perfect_debounce4 = require("perfect-debounce");
3180
3188
 
3181
3189
  // src/core/component/state/index.ts
3182
3190
  init_cjs_shims();
@@ -4088,10 +4096,10 @@ function createComponentsDevToolsPlugin(app) {
4088
4096
  await api.sendInspectorState("components");
4089
4097
  }
4090
4098
  });
4091
- const debounceSendInspectorTree = (0, import_perfect_debounce3.debounce)(() => {
4099
+ const debounceSendInspectorTree = (0, import_perfect_debounce4.debounce)(() => {
4092
4100
  api.sendInspectorTree(INSPECTOR_ID);
4093
4101
  }, 120);
4094
- const debounceSendInspectorState = (0, import_perfect_debounce3.debounce)(() => {
4102
+ const debounceSendInspectorState = (0, import_perfect_debounce4.debounce)(() => {
4095
4103
  api.sendInspectorState(INSPECTOR_ID);
4096
4104
  }, 120);
4097
4105
  const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
@@ -4213,7 +4221,7 @@ function registerDevToolsPlugin(app) {
4213
4221
  // src/core/router/index.ts
4214
4222
  init_cjs_shims();
4215
4223
  var import_devtools_shared16 = require("@vue/devtools-shared");
4216
- var import_perfect_debounce4 = require("perfect-debounce");
4224
+ var import_perfect_debounce5 = require("perfect-debounce");
4217
4225
 
4218
4226
  // src/ctx/router.ts
4219
4227
  init_cjs_shims();
@@ -4291,11 +4299,13 @@ function normalizeRouterInfo(appRecord, activeAppRecord2) {
4291
4299
  console.warn = c;
4292
4300
  }
4293
4301
  init();
4294
- hook.on.componentUpdated((0, import_perfect_debounce4.debounce)(() => {
4302
+ hook.on.componentUpdated((0, import_perfect_debounce5.debounce)(() => {
4295
4303
  var _a25;
4296
4304
  if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
4297
4305
  return;
4298
4306
  init();
4307
+ if (devtoolsState.highPerfModeEnabled)
4308
+ return;
4299
4309
  devtoolsContext.hooks.callHook("routerInfoUpdated" /* ROUTER_INFO_UPDATED */, { state: import_devtools_shared16.target[ROUTER_INFO_KEY] });
4300
4310
  }, 200));
4301
4311
  }
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 debounce2 } from "perfect-debounce";
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
- hooks2.hook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, async ({ inspectorId, plugin }) => {
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("sendInspectorState" /* SEND_INSPECTOR_STATE */, async ({ inspectorId, plugin }) => {
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,10 @@ function createDevToolsCtxHooks() {
2487
2491
  addTimelineLayer(options, plugin.descriptor);
2488
2492
  });
2489
2493
  hooks2.hook("timelineEventAdded" /* TIMELINE_EVENT_ADDED */, ({ options, plugin }) => {
2494
+ var _a25;
2495
+ const internalLayerIds = ["performance", "component-event", "keyboard", "mouse"];
2496
+ if (devtoolsState.highPerfModeEnabled || !((_a25 = devtoolsState.timelineLayersState) == null ? void 0 : _a25[plugin.descriptor.id]) && !internalLayerIds.includes(options.layerId))
2497
+ return;
2490
2498
  hooks2.callHookWith(async (callbacks) => {
2491
2499
  await Promise.all(callbacks.map((cb) => cb(options)));
2492
2500
  }, "sendTimelineEventToClient" /* SEND_TIMELINE_EVENT_TO_CLIENT */);
@@ -2548,10 +2556,10 @@ function initStateFactory() {
2548
2556
  }
2549
2557
  var _a9, _b9;
2550
2558
  (_b9 = (_a9 = global)[STATE_KEY]) != null ? _b9 : _a9[STATE_KEY] = initStateFactory();
2551
- var callStateUpdatedHook = debounce2((state) => {
2559
+ var callStateUpdatedHook = debounce3((state) => {
2552
2560
  devtoolsContext.hooks.callHook("devtoolsStateUpdated" /* DEVTOOLS_STATE_UPDATED */, { state });
2553
2561
  });
2554
- var callConnectedUpdatedHook = debounce2((state, oldState) => {
2562
+ var callConnectedUpdatedHook = debounce3((state, oldState) => {
2555
2563
  devtoolsContext.hooks.callHook("devtoolsConnectedUpdated" /* DEVTOOLS_CONNECTED_UPDATED */, { state, oldState });
2556
2564
  });
2557
2565
  var devtoolsAppRecords = new Proxy(global.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
@@ -3085,7 +3093,7 @@ var DevToolsPluginAPI = DevToolsV6PluginAPI;
3085
3093
 
3086
3094
  // src/core/plugin/components.ts
3087
3095
  init_esm_shims();
3088
- import { debounce as debounce3 } from "perfect-debounce";
3096
+ import { debounce as debounce4 } from "perfect-debounce";
3089
3097
 
3090
3098
  // src/core/component/state/index.ts
3091
3099
  init_esm_shims();
@@ -3997,10 +4005,10 @@ function createComponentsDevToolsPlugin(app) {
3997
4005
  await api.sendInspectorState("components");
3998
4006
  }
3999
4007
  });
4000
- const debounceSendInspectorTree = debounce3(() => {
4008
+ const debounceSendInspectorTree = debounce4(() => {
4001
4009
  api.sendInspectorTree(INSPECTOR_ID);
4002
4010
  }, 120);
4003
- const debounceSendInspectorState = debounce3(() => {
4011
+ const debounceSendInspectorState = debounce4(() => {
4004
4012
  api.sendInspectorState(INSPECTOR_ID);
4005
4013
  }, 120);
4006
4014
  const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
@@ -4122,7 +4130,7 @@ function registerDevToolsPlugin(app) {
4122
4130
  // src/core/router/index.ts
4123
4131
  init_esm_shims();
4124
4132
  import { deepClone, target as global3 } from "@vue/devtools-shared";
4125
- import { debounce as debounce4 } from "perfect-debounce";
4133
+ import { debounce as debounce5 } from "perfect-debounce";
4126
4134
 
4127
4135
  // src/ctx/router.ts
4128
4136
  init_esm_shims();
@@ -4200,11 +4208,13 @@ function normalizeRouterInfo(appRecord, activeAppRecord2) {
4200
4208
  console.warn = c;
4201
4209
  }
4202
4210
  init();
4203
- hook.on.componentUpdated(debounce4(() => {
4211
+ hook.on.componentUpdated(debounce5(() => {
4204
4212
  var _a25;
4205
4213
  if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
4206
4214
  return;
4207
4215
  init();
4216
+ if (devtoolsState.highPerfModeEnabled)
4217
+ return;
4208
4218
  devtoolsContext.hooks.callHook("routerInfoUpdated" /* ROUTER_INFO_UPDATED */, { state: global3[ROUTER_INFO_KEY] });
4209
4219
  }, 200));
4210
4220
  }
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",
4
+ "version": "7.5.6",
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-next.git"
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.4"
32
+ "@vue/devtools-shared": "^7.5.6"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/speakingurl": "^13.0.6",