@vue/devtools-kit 7.0.17 → 7.0.18

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
@@ -1597,7 +1597,8 @@ __export(src_exports, {
1597
1597
  stringify: () => stringify,
1598
1598
  toEdit: () => toEdit,
1599
1599
  toSubmit: () => toSubmit,
1600
- toggleComponentInspectorEnabled: () => toggleComponentInspectorEnabled
1600
+ toggleComponentInspectorEnabled: () => toggleComponentInspectorEnabled,
1601
+ toggleHighPerfMode: () => toggleHighPerfMode
1601
1602
  });
1602
1603
  module.exports = __toCommonJS(src_exports);
1603
1604
  init_cjs_shims();
@@ -2943,6 +2944,8 @@ function registerComponentDevToolsPlugin(app) {
2943
2944
  }, 120);
2944
2945
  const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
2945
2946
  var _a10, _b10, _c;
2947
+ if (devtoolsState.highPerfModeEnabled)
2948
+ return;
2946
2949
  if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
2947
2950
  return;
2948
2951
  if (!app2 || typeof uid !== "number" && !uid || !component)
@@ -2965,6 +2968,8 @@ function registerComponentDevToolsPlugin(app) {
2965
2968
  });
2966
2969
  const componentUpdatedCleanup = hook.on.componentUpdated(async (app2, uid, parentUid, component) => {
2967
2970
  var _a10, _b10, _c;
2971
+ if (devtoolsState.highPerfModeEnabled)
2972
+ return;
2968
2973
  if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
2969
2974
  return;
2970
2975
  if (!app2 || typeof uid !== "number" && !uid || !component)
@@ -2988,6 +2993,8 @@ function registerComponentDevToolsPlugin(app) {
2988
2993
  });
2989
2994
  const componentRemovedCleanup = hook.on.componentRemoved(async (app2, uid, parentUid, component) => {
2990
2995
  var _a10, _b10, _c;
2996
+ if (devtoolsState.highPerfModeEnabled)
2997
+ return;
2991
2998
  if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
2992
2999
  return;
2993
3000
  if (!app2 || typeof uid !== "number" && !uid || !component)
@@ -3937,9 +3944,8 @@ function getComponentInspector() {
3937
3944
  init_cjs_shims();
3938
3945
  var import_devtools_shared9 = require("@vue/devtools-shared");
3939
3946
  function openInEditor(options = {}) {
3940
- const { file, line = 0, column = 0 } = options;
3947
+ const { file, baseUrl = window.location.origin, line = 0, column = 0 } = options;
3941
3948
  if (file) {
3942
- const baseUrl = window.location.origin;
3943
3949
  if (devtoolsState.vitePluginDetected) {
3944
3950
  import_devtools_shared9.target.__VUE_INSPECTOR__.openInEditor(baseUrl, file, line, column);
3945
3951
  } else {
@@ -4195,7 +4201,8 @@ function initStateFactory() {
4195
4201
  tabs: [],
4196
4202
  commands: [],
4197
4203
  vitePluginDetected: false,
4198
- activeAppRecordId: null
4204
+ activeAppRecordId: null,
4205
+ highPerfModeEnabled: false
4199
4206
  };
4200
4207
  }
4201
4208
  var _a4, _b4;
@@ -4426,6 +4433,12 @@ function onDevToolsClientConnected(fn) {
4426
4433
  });
4427
4434
  }
4428
4435
 
4436
+ // src/core/high-perf-mode/index.ts
4437
+ init_cjs_shims();
4438
+ function toggleHighPerfMode(state) {
4439
+ devtoolsState.highPerfModeEnabled = state != null ? state : !devtoolsState.highPerfModeEnabled;
4440
+ }
4441
+
4429
4442
  // src/index.ts
4430
4443
  var devtools = {
4431
4444
  state: devtoolsState,
@@ -4454,5 +4467,6 @@ var devtools = {
4454
4467
  stringify,
4455
4468
  toEdit,
4456
4469
  toSubmit,
4457
- toggleComponentInspectorEnabled
4470
+ toggleComponentInspectorEnabled,
4471
+ toggleHighPerfMode
4458
4472
  });
package/dist/index.d.cts CHANGED
@@ -493,6 +493,7 @@ interface DevToolsState {
493
493
  tabs: CustomTab[];
494
494
  commands: CustomCommand[];
495
495
  activeAppRecordId: string | null;
496
+ highPerfModeEnabled: boolean;
496
497
  }
497
498
 
498
499
  interface RouterInfo {
@@ -517,6 +518,7 @@ interface DevToolsEnv {
517
518
  }
518
519
 
519
520
  interface OpenInEditorOptions {
521
+ baseUrl?: string;
520
522
  file?: string;
521
523
  line?: number;
522
524
  column?: number;
@@ -591,6 +593,8 @@ declare const devtoolsContext: DevToolsContext;
591
593
 
592
594
  declare function setDevToolsEnv(env: Partial<DevToolsEnv>): void;
593
595
 
596
+ declare function toggleHighPerfMode(state?: boolean): void;
597
+
594
598
  declare function getInspectorStateValueType(value: any, raw?: boolean): string;
595
599
  declare function formatInspectorStateValue(value: any, quotes?: boolean): any;
596
600
  declare function getRaw(value: InspectorState['value']): {
@@ -624,4 +628,4 @@ declare const devtools: {
624
628
  readonly api: DevToolsPluginApi;
625
629
  };
626
630
 
627
- export { type AddInspectorApiPayload, type AppRecord, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentHighLighterOptions, type ComponentInspector, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, type DevToolsContext, type DevToolsEnv, type DevToolsEvent, type DevToolsHook, DevToolsHooks, type DevToolsState, type DevToolsType, type Inspector, type InspectorApiPayload, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, type OpenInEditorOptions, type PluginApi, type PluginDescriptor, type PluginSettingsItem, type PluginSetupFunction, type PropPath, type RouterInfo, type ScrollToComponentOptions, type TimelineEvent, type TimelineLayerItem, UNDEFINED, type VueAppInstance, type VueHooks, addCustomCommand, addCustomTab, addInspector, addTimelineLayer, type customTypeEnums, devtools, formatInspectorStateValue, getComponentInspector, getInspector, getInspectorStateValueType, getRaw, getTimelineLayer, highlight, inspectComponentHighLighter, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, removeCustomCommand, scrollToComponent, setDevToolsEnv, setupDevToolsPlugin, stringify, toEdit, toSubmit, toggleComponentHighLighter, toggleComponentInspectorEnabled, unhighlight, updateInspector };
631
+ export { type AddInspectorApiPayload, type AppRecord, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentHighLighterOptions, type ComponentInspector, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, type DevToolsContext, type DevToolsEnv, type DevToolsEvent, type DevToolsHook, DevToolsHooks, type DevToolsState, type DevToolsType, type Inspector, type InspectorApiPayload, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, type OpenInEditorOptions, type PluginApi, type PluginDescriptor, type PluginSettingsItem, type PluginSetupFunction, type PropPath, type RouterInfo, type ScrollToComponentOptions, type TimelineEvent, type TimelineLayerItem, UNDEFINED, type VueAppInstance, type VueHooks, addCustomCommand, addCustomTab, addInspector, addTimelineLayer, type customTypeEnums, devtools, formatInspectorStateValue, getComponentInspector, getInspector, getInspectorStateValueType, getRaw, getTimelineLayer, highlight, inspectComponentHighLighter, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, removeCustomCommand, scrollToComponent, setDevToolsEnv, setupDevToolsPlugin, stringify, toEdit, toSubmit, toggleComponentHighLighter, toggleComponentInspectorEnabled, toggleHighPerfMode, unhighlight, updateInspector };
package/dist/index.d.ts CHANGED
@@ -493,6 +493,7 @@ interface DevToolsState {
493
493
  tabs: CustomTab[];
494
494
  commands: CustomCommand[];
495
495
  activeAppRecordId: string | null;
496
+ highPerfModeEnabled: boolean;
496
497
  }
497
498
 
498
499
  interface RouterInfo {
@@ -517,6 +518,7 @@ interface DevToolsEnv {
517
518
  }
518
519
 
519
520
  interface OpenInEditorOptions {
521
+ baseUrl?: string;
520
522
  file?: string;
521
523
  line?: number;
522
524
  column?: number;
@@ -591,6 +593,8 @@ declare const devtoolsContext: DevToolsContext;
591
593
 
592
594
  declare function setDevToolsEnv(env: Partial<DevToolsEnv>): void;
593
595
 
596
+ declare function toggleHighPerfMode(state?: boolean): void;
597
+
594
598
  declare function getInspectorStateValueType(value: any, raw?: boolean): string;
595
599
  declare function formatInspectorStateValue(value: any, quotes?: boolean): any;
596
600
  declare function getRaw(value: InspectorState['value']): {
@@ -624,4 +628,4 @@ declare const devtools: {
624
628
  readonly api: DevToolsPluginApi;
625
629
  };
626
630
 
627
- export { type AddInspectorApiPayload, type AppRecord, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentHighLighterOptions, type ComponentInspector, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, type DevToolsContext, type DevToolsEnv, type DevToolsEvent, type DevToolsHook, DevToolsHooks, type DevToolsState, type DevToolsType, type Inspector, type InspectorApiPayload, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, type OpenInEditorOptions, type PluginApi, type PluginDescriptor, type PluginSettingsItem, type PluginSetupFunction, type PropPath, type RouterInfo, type ScrollToComponentOptions, type TimelineEvent, type TimelineLayerItem, UNDEFINED, type VueAppInstance, type VueHooks, addCustomCommand, addCustomTab, addInspector, addTimelineLayer, type customTypeEnums, devtools, formatInspectorStateValue, getComponentInspector, getInspector, getInspectorStateValueType, getRaw, getTimelineLayer, highlight, inspectComponentHighLighter, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, removeCustomCommand, scrollToComponent, setDevToolsEnv, setupDevToolsPlugin, stringify, toEdit, toSubmit, toggleComponentHighLighter, toggleComponentInspectorEnabled, unhighlight, updateInspector };
631
+ export { type AddInspectorApiPayload, type AppRecord, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentHighLighterOptions, type ComponentInspector, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, type DevToolsContext, type DevToolsEnv, type DevToolsEvent, type DevToolsHook, DevToolsHooks, type DevToolsState, type DevToolsType, type Inspector, type InspectorApiPayload, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, type OpenInEditorOptions, type PluginApi, type PluginDescriptor, type PluginSettingsItem, type PluginSetupFunction, type PropPath, type RouterInfo, type ScrollToComponentOptions, type TimelineEvent, type TimelineLayerItem, UNDEFINED, type VueAppInstance, type VueHooks, addCustomCommand, addCustomTab, addInspector, addTimelineLayer, type customTypeEnums, devtools, formatInspectorStateValue, getComponentInspector, getInspector, getInspectorStateValueType, getRaw, getTimelineLayer, highlight, inspectComponentHighLighter, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, removeCustomCommand, scrollToComponent, setDevToolsEnv, setupDevToolsPlugin, stringify, toEdit, toSubmit, toggleComponentHighLighter, toggleComponentInspectorEnabled, toggleHighPerfMode, unhighlight, updateInspector };
package/dist/index.js CHANGED
@@ -2916,6 +2916,8 @@ function registerComponentDevToolsPlugin(app) {
2916
2916
  }, 120);
2917
2917
  const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
2918
2918
  var _a10, _b10, _c;
2919
+ if (devtoolsState.highPerfModeEnabled)
2920
+ return;
2919
2921
  if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
2920
2922
  return;
2921
2923
  if (!app2 || typeof uid !== "number" && !uid || !component)
@@ -2938,6 +2940,8 @@ function registerComponentDevToolsPlugin(app) {
2938
2940
  });
2939
2941
  const componentUpdatedCleanup = hook.on.componentUpdated(async (app2, uid, parentUid, component) => {
2940
2942
  var _a10, _b10, _c;
2943
+ if (devtoolsState.highPerfModeEnabled)
2944
+ return;
2941
2945
  if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
2942
2946
  return;
2943
2947
  if (!app2 || typeof uid !== "number" && !uid || !component)
@@ -2961,6 +2965,8 @@ function registerComponentDevToolsPlugin(app) {
2961
2965
  });
2962
2966
  const componentRemovedCleanup = hook.on.componentRemoved(async (app2, uid, parentUid, component) => {
2963
2967
  var _a10, _b10, _c;
2968
+ if (devtoolsState.highPerfModeEnabled)
2969
+ return;
2964
2970
  if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
2965
2971
  return;
2966
2972
  if (!app2 || typeof uid !== "number" && !uid || !component)
@@ -3910,9 +3916,8 @@ function getComponentInspector() {
3910
3916
  init_esm_shims();
3911
3917
  import { target as target5 } from "@vue/devtools-shared";
3912
3918
  function openInEditor(options = {}) {
3913
- const { file, line = 0, column = 0 } = options;
3919
+ const { file, baseUrl = window.location.origin, line = 0, column = 0 } = options;
3914
3920
  if (file) {
3915
- const baseUrl = window.location.origin;
3916
3921
  if (devtoolsState.vitePluginDetected) {
3917
3922
  target5.__VUE_INSPECTOR__.openInEditor(baseUrl, file, line, column);
3918
3923
  } else {
@@ -4168,7 +4173,8 @@ function initStateFactory() {
4168
4173
  tabs: [],
4169
4174
  commands: [],
4170
4175
  vitePluginDetected: false,
4171
- activeAppRecordId: null
4176
+ activeAppRecordId: null,
4177
+ highPerfModeEnabled: false
4172
4178
  };
4173
4179
  }
4174
4180
  var _a4, _b4;
@@ -4399,6 +4405,12 @@ function onDevToolsClientConnected(fn) {
4399
4405
  });
4400
4406
  }
4401
4407
 
4408
+ // src/core/high-perf-mode/index.ts
4409
+ init_esm_shims();
4410
+ function toggleHighPerfMode(state) {
4411
+ devtoolsState.highPerfModeEnabled = state != null ? state : !devtoolsState.highPerfModeEnabled;
4412
+ }
4413
+
4402
4414
  // src/index.ts
4403
4415
  var devtools = {
4404
4416
  state: devtoolsState,
@@ -4426,5 +4438,6 @@ export {
4426
4438
  stringify,
4427
4439
  toEdit,
4428
4440
  toSubmit,
4429
- toggleComponentInspectorEnabled
4441
+ toggleComponentInspectorEnabled,
4442
+ toggleHighPerfMode
4430
4443
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue/devtools-kit",
3
3
  "type": "module",
4
- "version": "7.0.17",
4
+ "version": "7.0.18",
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.17"
28
+ "@vue/devtools-shared": "^7.0.18"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/speakingurl": "^13.0.6",