@vue/devtools-kit 7.6.2 → 7.6.4

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
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target22) => (target22 = mod != null ? __create(
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.0_@types+node@20.16.14__@swc+core@1.5.29_jiti@2.0.0__utvtwgyeu6xd57udthcnogp47u/node_modules/tsup/assets/cjs_shims.js
36
+ // ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.43.0_@types+node@22.9.0__@swc+core@1.5.29_jiti@2.0.0_po_lnt5yfvawfblpk67opvcdwbq7u/node_modules/tsup/assets/cjs_shims.js
37
37
  var init_cjs_shims = __esm({
38
- "../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.0_@types+node@20.16.14__@swc+core@1.5.29_jiti@2.0.0__utvtwgyeu6xd57udthcnogp47u/node_modules/tsup/assets/cjs_shims.js"() {
38
+ "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.43.0_@types+node@22.9.0__@swc+core@1.5.29_jiti@2.0.0_po_lnt5yfvawfblpk67opvcdwbq7u/node_modules/tsup/assets/cjs_shims.js"() {
39
39
  "use strict";
40
40
  }
41
41
  });
@@ -1954,10 +1954,15 @@ async function editComponentState(payload, stateEditor2) {
1954
1954
  return;
1955
1955
  const targetPath = path.slice();
1956
1956
  let target22;
1957
- if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0]))
1957
+ if (Object.keys(instance.props).includes(path[0])) {
1958
+ target22 = instance.props;
1959
+ } else if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0])) {
1958
1960
  target22 = instance.devtoolsRawSetupState;
1959
- if (instance.data && Object.keys(instance.data).includes(path[0]))
1961
+ } else if (instance.data && Object.keys(instance.data).includes(path[0])) {
1960
1962
  target22 = instance.data;
1963
+ } else {
1964
+ target22 = instance.proxy;
1965
+ }
1961
1966
  if (target22 && targetPath) {
1962
1967
  if (state.type === "object" && type === "reactive") {
1963
1968
  }
@@ -2176,6 +2181,8 @@ function update(options) {
2176
2181
  }
2177
2182
  function highlight(instance) {
2178
2183
  const bounds = getComponentBoundingRect(instance);
2184
+ if (!bounds.width && !bounds.height)
2185
+ return;
2179
2186
  const name = getInstanceName(instance);
2180
2187
  const container = getContainerElement();
2181
2188
  container ? update({ bounds, name }) : create({ bounds, name });
@@ -3122,6 +3129,9 @@ var DevToolsV6PluginAPI = class {
3122
3129
  // component inspector
3123
3130
  notifyComponentUpdate(instance) {
3124
3131
  var _a25;
3132
+ if (devtoolsState.highPerfModeEnabled) {
3133
+ return;
3134
+ }
3125
3135
  const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
3126
3136
  if (inspector == null ? void 0 : inspector.id) {
3127
3137
  if (instance) {
@@ -3146,9 +3156,15 @@ var DevToolsV6PluginAPI = class {
3146
3156
  }
3147
3157
  }
3148
3158
  sendInspectorTree(inspectorId) {
3159
+ if (devtoolsState.highPerfModeEnabled) {
3160
+ return;
3161
+ }
3149
3162
  this.hooks.callHook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, { inspectorId, plugin: this.plugin });
3150
3163
  }
3151
3164
  sendInspectorState(inspectorId) {
3165
+ if (devtoolsState.highPerfModeEnabled) {
3166
+ return;
3167
+ }
3152
3168
  this.hooks.callHook("sendInspectorState" /* SEND_INSPECTOR_STATE */, { inspectorId, plugin: this.plugin });
3153
3169
  }
3154
3170
  selectInspectorNode(inspectorId, nodeId) {
@@ -3159,12 +3175,18 @@ var DevToolsV6PluginAPI = class {
3159
3175
  }
3160
3176
  // timeline
3161
3177
  now() {
3178
+ if (devtoolsState.highPerfModeEnabled) {
3179
+ return 0;
3180
+ }
3162
3181
  return Date.now();
3163
3182
  }
3164
3183
  addTimelineLayer(options) {
3165
3184
  this.hooks.callHook("timelineLayerAdded" /* TIMELINE_LAYER_ADDED */, { options, plugin: this.plugin });
3166
3185
  }
3167
3186
  addTimelineEvent(options) {
3187
+ if (devtoolsState.highPerfModeEnabled) {
3188
+ return;
3189
+ }
3168
3190
  this.hooks.callHook("timelineEventAdded" /* TIMELINE_EVENT_ADDED */, { options, plugin: this.plugin });
3169
3191
  }
3170
3192
  // settings
@@ -3408,15 +3430,17 @@ function resolveMergedOptions(instance) {
3408
3430
  return options;
3409
3431
  }
3410
3432
  function processProps(instance) {
3433
+ var _a25;
3411
3434
  const props = [];
3412
- const propDefinitions = instance.type.props;
3413
- for (const key in instance.props) {
3435
+ const propDefinitions = (_a25 = instance == null ? void 0 : instance.type) == null ? void 0 : _a25.props;
3436
+ for (const key in instance == null ? void 0 : instance.props) {
3414
3437
  const propDefinition = propDefinitions ? propDefinitions[key] : null;
3415
3438
  const camelizeKey = (0, import_devtools_shared11.camelize)(key);
3416
3439
  props.push({
3417
3440
  type: "props",
3418
3441
  key: camelizeKey,
3419
3442
  value: returnError(() => instance.props[key]),
3443
+ editable: true,
3420
3444
  meta: propDefinition ? {
3421
3445
  type: propDefinition.type ? getPropType(propDefinition.type) : "any",
3422
3446
  required: !!propDefinition.required,
@@ -3430,7 +3454,7 @@ function processProps(instance) {
3430
3454
  }
3431
3455
  function processState(instance) {
3432
3456
  const type = instance.type;
3433
- const props = type.props;
3457
+ const props = type == null ? void 0 : type.props;
3434
3458
  const getters = type.vuex && type.vuex.getters;
3435
3459
  const computedDefs = type.computed;
3436
3460
  const data = {
@@ -4229,7 +4253,7 @@ function removeRegisteredPluginApp(app) {
4229
4253
  import_devtools_shared14.target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.delete(app);
4230
4254
  }
4231
4255
  function registerDevToolsPlugin(app) {
4232
- if (import_devtools_shared14.target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app))
4256
+ if (import_devtools_shared14.target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app) || devtoolsState.highPerfModeEnabled)
4233
4257
  return;
4234
4258
  import_devtools_shared14.target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
4235
4259
  devtoolsPluginBuffer.forEach((plugin) => {
@@ -4654,6 +4678,9 @@ function onDevToolsClientConnected(fn) {
4654
4678
  init_cjs_shims();
4655
4679
  function toggleHighPerfMode(state) {
4656
4680
  devtoolsState.highPerfModeEnabled = state != null ? state : !devtoolsState.highPerfModeEnabled;
4681
+ if (!state && activeAppRecord.value) {
4682
+ registerDevToolsPlugin(activeAppRecord.value.app);
4683
+ }
4657
4684
  }
4658
4685
 
4659
4686
  // src/core/component/state/format.ts
@@ -6190,7 +6217,7 @@ function getFunctionDetails(func) {
6190
6217
  return {
6191
6218
  _custom: {
6192
6219
  type: "function",
6193
- displayText: `<span style="opacity:.5;margin-right:5px;">function</span> <span style="white-space:nowrap;">${escape(name)}${args}</span>`,
6220
+ displayText: `<span style="opacity:.8;margin-right:5px;">function</span> <span style="white-space:nowrap;">${escape(name)}${args}</span>`,
6194
6221
  tooltipText: string.trim() ? `<pre>${string}</pre>` : null
6195
6222
  }
6196
6223
  };
package/dist/index.js CHANGED
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target22) => (target22 = mod != null ? __create(
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.0_@types+node@20.16.14__@swc+core@1.5.29_jiti@2.0.0__utvtwgyeu6xd57udthcnogp47u/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.43.0_@types+node@22.9.0__@swc+core@1.5.29_jiti@2.0.0_po_lnt5yfvawfblpk67opvcdwbq7u/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.0_@types+node@20.16.14__@swc+core@1.5.29_jiti@2.0.0__utvtwgyeu6xd57udthcnogp47u/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.43.0_@types+node@22.9.0__@swc+core@1.5.29_jiti@2.0.0_po_lnt5yfvawfblpk67opvcdwbq7u/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -1863,10 +1863,15 @@ async function editComponentState(payload, stateEditor2) {
1863
1863
  return;
1864
1864
  const targetPath = path.slice();
1865
1865
  let target22;
1866
- if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0]))
1866
+ if (Object.keys(instance.props).includes(path[0])) {
1867
+ target22 = instance.props;
1868
+ } else if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0])) {
1867
1869
  target22 = instance.devtoolsRawSetupState;
1868
- if (instance.data && Object.keys(instance.data).includes(path[0]))
1870
+ } else if (instance.data && Object.keys(instance.data).includes(path[0])) {
1869
1871
  target22 = instance.data;
1872
+ } else {
1873
+ target22 = instance.proxy;
1874
+ }
1870
1875
  if (target22 && targetPath) {
1871
1876
  if (state.type === "object" && type === "reactive") {
1872
1877
  }
@@ -2085,6 +2090,8 @@ function update(options) {
2085
2090
  }
2086
2091
  function highlight(instance) {
2087
2092
  const bounds = getComponentBoundingRect(instance);
2093
+ if (!bounds.width && !bounds.height)
2094
+ return;
2088
2095
  const name = getInstanceName(instance);
2089
2096
  const container = getContainerElement();
2090
2097
  container ? update({ bounds, name }) : create({ bounds, name });
@@ -3031,6 +3038,9 @@ var DevToolsV6PluginAPI = class {
3031
3038
  // component inspector
3032
3039
  notifyComponentUpdate(instance) {
3033
3040
  var _a25;
3041
+ if (devtoolsState.highPerfModeEnabled) {
3042
+ return;
3043
+ }
3034
3044
  const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
3035
3045
  if (inspector == null ? void 0 : inspector.id) {
3036
3046
  if (instance) {
@@ -3055,9 +3065,15 @@ var DevToolsV6PluginAPI = class {
3055
3065
  }
3056
3066
  }
3057
3067
  sendInspectorTree(inspectorId) {
3068
+ if (devtoolsState.highPerfModeEnabled) {
3069
+ return;
3070
+ }
3058
3071
  this.hooks.callHook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, { inspectorId, plugin: this.plugin });
3059
3072
  }
3060
3073
  sendInspectorState(inspectorId) {
3074
+ if (devtoolsState.highPerfModeEnabled) {
3075
+ return;
3076
+ }
3061
3077
  this.hooks.callHook("sendInspectorState" /* SEND_INSPECTOR_STATE */, { inspectorId, plugin: this.plugin });
3062
3078
  }
3063
3079
  selectInspectorNode(inspectorId, nodeId) {
@@ -3068,12 +3084,18 @@ var DevToolsV6PluginAPI = class {
3068
3084
  }
3069
3085
  // timeline
3070
3086
  now() {
3087
+ if (devtoolsState.highPerfModeEnabled) {
3088
+ return 0;
3089
+ }
3071
3090
  return Date.now();
3072
3091
  }
3073
3092
  addTimelineLayer(options) {
3074
3093
  this.hooks.callHook("timelineLayerAdded" /* TIMELINE_LAYER_ADDED */, { options, plugin: this.plugin });
3075
3094
  }
3076
3095
  addTimelineEvent(options) {
3096
+ if (devtoolsState.highPerfModeEnabled) {
3097
+ return;
3098
+ }
3077
3099
  this.hooks.callHook("timelineEventAdded" /* TIMELINE_EVENT_ADDED */, { options, plugin: this.plugin });
3078
3100
  }
3079
3101
  // settings
@@ -3317,15 +3339,17 @@ function resolveMergedOptions(instance) {
3317
3339
  return options;
3318
3340
  }
3319
3341
  function processProps(instance) {
3342
+ var _a25;
3320
3343
  const props = [];
3321
- const propDefinitions = instance.type.props;
3322
- for (const key in instance.props) {
3344
+ const propDefinitions = (_a25 = instance == null ? void 0 : instance.type) == null ? void 0 : _a25.props;
3345
+ for (const key in instance == null ? void 0 : instance.props) {
3323
3346
  const propDefinition = propDefinitions ? propDefinitions[key] : null;
3324
3347
  const camelizeKey = camelize(key);
3325
3348
  props.push({
3326
3349
  type: "props",
3327
3350
  key: camelizeKey,
3328
3351
  value: returnError(() => instance.props[key]),
3352
+ editable: true,
3329
3353
  meta: propDefinition ? {
3330
3354
  type: propDefinition.type ? getPropType(propDefinition.type) : "any",
3331
3355
  required: !!propDefinition.required,
@@ -3339,7 +3363,7 @@ function processProps(instance) {
3339
3363
  }
3340
3364
  function processState(instance) {
3341
3365
  const type = instance.type;
3342
- const props = type.props;
3366
+ const props = type == null ? void 0 : type.props;
3343
3367
  const getters = type.vuex && type.vuex.getters;
3344
3368
  const computedDefs = type.computed;
3345
3369
  const data = {
@@ -4138,7 +4162,7 @@ function removeRegisteredPluginApp(app) {
4138
4162
  target8.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.delete(app);
4139
4163
  }
4140
4164
  function registerDevToolsPlugin(app) {
4141
- if (target8.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app))
4165
+ if (target8.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app) || devtoolsState.highPerfModeEnabled)
4142
4166
  return;
4143
4167
  target8.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
4144
4168
  devtoolsPluginBuffer.forEach((plugin) => {
@@ -4563,6 +4587,9 @@ function onDevToolsClientConnected(fn) {
4563
4587
  init_esm_shims();
4564
4588
  function toggleHighPerfMode(state) {
4565
4589
  devtoolsState.highPerfModeEnabled = state != null ? state : !devtoolsState.highPerfModeEnabled;
4590
+ if (!state && activeAppRecord.value) {
4591
+ registerDevToolsPlugin(activeAppRecord.value.app);
4592
+ }
4566
4593
  }
4567
4594
 
4568
4595
  // src/core/component/state/format.ts
@@ -6099,7 +6126,7 @@ function getFunctionDetails(func) {
6099
6126
  return {
6100
6127
  _custom: {
6101
6128
  type: "function",
6102
- displayText: `<span style="opacity:.5;margin-right:5px;">function</span> <span style="white-space:nowrap;">${escape(name)}${args}</span>`,
6129
+ displayText: `<span style="opacity:.8;margin-right:5px;">function</span> <span style="white-space:nowrap;">${escape(name)}${args}</span>`,
6103
6130
  tooltipText: string.trim() ? `<pre>${string}</pre>` : null
6104
6131
  }
6105
6132
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue/devtools-kit",
3
3
  "type": "module",
4
- "version": "7.6.2",
4
+ "version": "7.6.4",
5
5
  "author": "webfansplz",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -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.6.2"
32
+ "@vue/devtools-shared": "^7.6.4"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/speakingurl": "^13.0.6",