@vue/devtools-kit 7.4.5 → 7.4.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
@@ -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.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.5__@swc+core@1.5.29_jiti@1.21.6__hrrjfaj2jdrhlrlzgjkczhq5ey/node_modules/tsup/assets/cjs_shims.js
36
+ // ../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.0_@types+node@20.16.5__@swc+core@1.5.29_jiti@1.21.6__ldnw4a7r4ccknnz6q542psuydy/node_modules/tsup/assets/cjs_shims.js
37
37
  var init_cjs_shims = __esm({
38
- "../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.5__@swc+core@1.5.29_jiti@1.21.6__hrrjfaj2jdrhlrlzgjkczhq5ey/node_modules/tsup/assets/cjs_shims.js"() {
38
+ "../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.0_@types+node@20.16.5__@swc+core@1.5.29_jiti@1.21.6__ldnw4a7r4ccknnz6q542psuydy/node_modules/tsup/assets/cjs_shims.js"() {
39
39
  "use strict";
40
40
  }
41
41
  });
@@ -2386,7 +2386,8 @@ function getActiveInspectors() {
2386
2386
  logo: descriptor.logo,
2387
2387
  icon: `custom-ic-baseline-${(_a25 = options == null ? void 0 : options.icon) == null ? void 0 : _a25.replace(/_/g, "-")}`,
2388
2388
  packageName: descriptor.packageName,
2389
- homepage: descriptor.homepage
2389
+ homepage: descriptor.homepage,
2390
+ pluginId: descriptor.id
2390
2391
  };
2391
2392
  });
2392
2393
  }
@@ -2798,10 +2799,12 @@ function getPluginLocalKey(pluginId) {
2798
2799
  return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
2799
2800
  }
2800
2801
  function getPluginSettingsOptions(pluginId) {
2801
- var _a25, _b25, _c, _d;
2802
- const descriptor = (_a25 = getInspector(pluginId)) == null ? void 0 : _a25.descriptor;
2803
- const item = (_c = (_b25 = devtoolsPluginBuffer.find((item2) => item2[0].id === (descriptor == null ? void 0 : descriptor.id))) == null ? void 0 : _b25[0]) != null ? _c : null;
2804
- return (_d = item == null ? void 0 : item.settings) != null ? _d : null;
2802
+ var _a25, _b25, _c;
2803
+ const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => {
2804
+ var _a26;
2805
+ return item2[0].id === pluginId && !!((_a26 = item2[0]) == null ? void 0 : _a26.settings);
2806
+ })) == null ? void 0 : _a25[0]) != null ? _b25 : null;
2807
+ return (_c = item == null ? void 0 : item.settings) != null ? _c : null;
2805
2808
  }
2806
2809
  function getPluginSettings(pluginId, fallbackValue) {
2807
2810
  var _a25, _b25, _c;
@@ -3073,8 +3076,7 @@ var DevToolsV6PluginAPI = class {
3073
3076
  }
3074
3077
  // settings
3075
3078
  getSettings(pluginId) {
3076
- const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
3077
- return getPluginSettings(pluginId != null ? pluginId : inspector == null ? void 0 : inspector.id, this.plugin.descriptor.settings);
3079
+ return getPluginSettings(pluginId != null ? pluginId : this.plugin.descriptor.id, this.plugin.descriptor.settings);
3078
3080
  }
3079
3081
  // utilities
3080
3082
  getComponentInstances(app) {
@@ -3921,13 +3923,6 @@ function callDevToolsPluginSetupFn(plugin, app) {
3921
3923
  });
3922
3924
  }
3923
3925
  setupFn(api);
3924
- if (pluginDescriptor.settings) {
3925
- const inspector = devtoolsInspector.find((inspector2) => inspector2.descriptor.id === pluginDescriptor.id);
3926
- if (inspector) {
3927
- inspector.descriptor.settings = pluginDescriptor.settings;
3928
- initPluginSettings(inspector.options.id, pluginDescriptor.settings);
3929
- }
3930
- }
3931
3926
  }
3932
3927
  function removeRegisteredPluginApp(app) {
3933
3928
  import_devtools_shared12.target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.delete(app);
@@ -4269,6 +4264,9 @@ function initDevTools() {
4269
4264
  var _a26;
4270
4265
  addDevToolsPluginToBuffer(pluginDescriptor, setupFn);
4271
4266
  const { app } = (_a26 = activeAppRecord) != null ? _a26 : {};
4267
+ if (pluginDescriptor.settings) {
4268
+ initPluginSettings(pluginDescriptor.id, pluginDescriptor.settings);
4269
+ }
4272
4270
  if (!app)
4273
4271
  return;
4274
4272
  callDevToolsPluginSetupFn([pluginDescriptor, setupFn], app);
package/dist/index.d.cts CHANGED
@@ -5,36 +5,6 @@ import { Router, RouteLocationNormalizedLoaded, RouteRecordNormalized } from 'vu
5
5
  export { Router } from 'vue-router';
6
6
  import { BirpcOptions, ChannelOptions, BirpcGroup, BirpcReturn } from 'birpc';
7
7
 
8
- interface ComponentInspector {
9
- enabled: boolean;
10
- position: {
11
- x: number;
12
- y: number;
13
- };
14
- linkParams: {
15
- file: string;
16
- line: number;
17
- column: number;
18
- };
19
- enable: () => void;
20
- disable: () => void;
21
- toggleEnabled: () => void;
22
- openInEditor: (baseUrl: string, file: string, line: number, column: number) => void;
23
- onUpdated: () => void;
24
- }
25
- declare function toggleComponentInspectorEnabled(enabled: boolean): void;
26
- declare function getComponentInspector(): Promise<ComponentInspector>;
27
-
28
- interface OpenInEditorOptions {
29
- baseUrl?: string;
30
- file?: string;
31
- line?: number;
32
- column?: number;
33
- host?: string;
34
- }
35
- declare function setOpenInEditorBaseUrl(url: string): void;
36
- declare function openInEditor(options?: OpenInEditorOptions): void;
37
-
38
8
  type App = any;
39
9
  type VueAppInstance = ComponentInternalInstance & {
40
10
  type: {
@@ -485,6 +455,36 @@ interface DevToolsContextHooks extends DevToolsV6PluginAPIHooks {
485
455
  }
486
456
  declare function createDevToolsCtxHooks(): hookable.Hookable<DevToolsContextHooks & DevToolsMessagingHooks, hookable.HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>;
487
457
 
458
+ interface ComponentInspector {
459
+ enabled: boolean;
460
+ position: {
461
+ x: number;
462
+ y: number;
463
+ };
464
+ linkParams: {
465
+ file: string;
466
+ line: number;
467
+ column: number;
468
+ };
469
+ enable: () => void;
470
+ disable: () => void;
471
+ toggleEnabled: () => void;
472
+ openInEditor: (baseUrl: string, file: string, line: number, column: number) => void;
473
+ onUpdated: () => void;
474
+ }
475
+ declare function toggleComponentInspectorEnabled(enabled: boolean): void;
476
+ declare function getComponentInspector(): Promise<ComponentInspector>;
477
+
478
+ interface OpenInEditorOptions {
479
+ baseUrl?: string;
480
+ file?: string;
481
+ line?: number;
482
+ column?: number;
483
+ host?: string;
484
+ }
485
+ declare function setOpenInEditorBaseUrl(url: string): void;
486
+ declare function openInEditor(options?: OpenInEditorOptions): void;
487
+
488
488
  declare function createDevToolsApi(hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>): {
489
489
  getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
490
490
  getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
@@ -545,6 +545,7 @@ declare function getActiveInspectors(): {
545
545
  icon: string;
546
546
  packageName: string | undefined;
547
547
  homepage: string | undefined;
548
+ pluginId: string;
548
549
  }[];
549
550
  declare function getInspectorInfo(id: string): {
550
551
  id: string;
package/dist/index.d.ts CHANGED
@@ -5,36 +5,6 @@ import { Router, RouteLocationNormalizedLoaded, RouteRecordNormalized } from 'vu
5
5
  export { Router } from 'vue-router';
6
6
  import { BirpcOptions, ChannelOptions, BirpcGroup, BirpcReturn } from 'birpc';
7
7
 
8
- interface ComponentInspector {
9
- enabled: boolean;
10
- position: {
11
- x: number;
12
- y: number;
13
- };
14
- linkParams: {
15
- file: string;
16
- line: number;
17
- column: number;
18
- };
19
- enable: () => void;
20
- disable: () => void;
21
- toggleEnabled: () => void;
22
- openInEditor: (baseUrl: string, file: string, line: number, column: number) => void;
23
- onUpdated: () => void;
24
- }
25
- declare function toggleComponentInspectorEnabled(enabled: boolean): void;
26
- declare function getComponentInspector(): Promise<ComponentInspector>;
27
-
28
- interface OpenInEditorOptions {
29
- baseUrl?: string;
30
- file?: string;
31
- line?: number;
32
- column?: number;
33
- host?: string;
34
- }
35
- declare function setOpenInEditorBaseUrl(url: string): void;
36
- declare function openInEditor(options?: OpenInEditorOptions): void;
37
-
38
8
  type App = any;
39
9
  type VueAppInstance = ComponentInternalInstance & {
40
10
  type: {
@@ -485,6 +455,36 @@ interface DevToolsContextHooks extends DevToolsV6PluginAPIHooks {
485
455
  }
486
456
  declare function createDevToolsCtxHooks(): hookable.Hookable<DevToolsContextHooks & DevToolsMessagingHooks, hookable.HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>;
487
457
 
458
+ interface ComponentInspector {
459
+ enabled: boolean;
460
+ position: {
461
+ x: number;
462
+ y: number;
463
+ };
464
+ linkParams: {
465
+ file: string;
466
+ line: number;
467
+ column: number;
468
+ };
469
+ enable: () => void;
470
+ disable: () => void;
471
+ toggleEnabled: () => void;
472
+ openInEditor: (baseUrl: string, file: string, line: number, column: number) => void;
473
+ onUpdated: () => void;
474
+ }
475
+ declare function toggleComponentInspectorEnabled(enabled: boolean): void;
476
+ declare function getComponentInspector(): Promise<ComponentInspector>;
477
+
478
+ interface OpenInEditorOptions {
479
+ baseUrl?: string;
480
+ file?: string;
481
+ line?: number;
482
+ column?: number;
483
+ host?: string;
484
+ }
485
+ declare function setOpenInEditorBaseUrl(url: string): void;
486
+ declare function openInEditor(options?: OpenInEditorOptions): void;
487
+
488
488
  declare function createDevToolsApi(hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>): {
489
489
  getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
490
490
  getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
@@ -545,6 +545,7 @@ declare function getActiveInspectors(): {
545
545
  icon: string;
546
546
  packageName: string | undefined;
547
547
  homepage: string | undefined;
548
+ pluginId: string;
548
549
  }[];
549
550
  declare function getInspectorInfo(id: string): {
550
551
  id: string;
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.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.5__@swc+core@1.5.29_jiti@1.21.6__hrrjfaj2jdrhlrlzgjkczhq5ey/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.0_@types+node@20.16.5__@swc+core@1.5.29_jiti@1.21.6__ldnw4a7r4ccknnz6q542psuydy/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.5__@swc+core@1.5.29_jiti@1.21.6__hrrjfaj2jdrhlrlzgjkczhq5ey/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.0_@types+node@20.16.5__@swc+core@1.5.29_jiti@1.21.6__ldnw4a7r4ccknnz6q542psuydy/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -2296,7 +2296,8 @@ function getActiveInspectors() {
2296
2296
  logo: descriptor.logo,
2297
2297
  icon: `custom-ic-baseline-${(_a25 = options == null ? void 0 : options.icon) == null ? void 0 : _a25.replace(/_/g, "-")}`,
2298
2298
  packageName: descriptor.packageName,
2299
- homepage: descriptor.homepage
2299
+ homepage: descriptor.homepage,
2300
+ pluginId: descriptor.id
2300
2301
  };
2301
2302
  });
2302
2303
  }
@@ -2708,10 +2709,12 @@ function getPluginLocalKey(pluginId) {
2708
2709
  return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
2709
2710
  }
2710
2711
  function getPluginSettingsOptions(pluginId) {
2711
- var _a25, _b25, _c, _d;
2712
- const descriptor = (_a25 = getInspector(pluginId)) == null ? void 0 : _a25.descriptor;
2713
- const item = (_c = (_b25 = devtoolsPluginBuffer.find((item2) => item2[0].id === (descriptor == null ? void 0 : descriptor.id))) == null ? void 0 : _b25[0]) != null ? _c : null;
2714
- return (_d = item == null ? void 0 : item.settings) != null ? _d : null;
2712
+ var _a25, _b25, _c;
2713
+ const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => {
2714
+ var _a26;
2715
+ return item2[0].id === pluginId && !!((_a26 = item2[0]) == null ? void 0 : _a26.settings);
2716
+ })) == null ? void 0 : _a25[0]) != null ? _b25 : null;
2717
+ return (_c = item == null ? void 0 : item.settings) != null ? _c : null;
2715
2718
  }
2716
2719
  function getPluginSettings(pluginId, fallbackValue) {
2717
2720
  var _a25, _b25, _c;
@@ -2983,8 +2986,7 @@ var DevToolsV6PluginAPI = class {
2983
2986
  }
2984
2987
  // settings
2985
2988
  getSettings(pluginId) {
2986
- const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
2987
- return getPluginSettings(pluginId != null ? pluginId : inspector == null ? void 0 : inspector.id, this.plugin.descriptor.settings);
2989
+ return getPluginSettings(pluginId != null ? pluginId : this.plugin.descriptor.id, this.plugin.descriptor.settings);
2988
2990
  }
2989
2991
  // utilities
2990
2992
  getComponentInstances(app) {
@@ -3831,13 +3833,6 @@ function callDevToolsPluginSetupFn(plugin, app) {
3831
3833
  });
3832
3834
  }
3833
3835
  setupFn(api);
3834
- if (pluginDescriptor.settings) {
3835
- const inspector = devtoolsInspector.find((inspector2) => inspector2.descriptor.id === pluginDescriptor.id);
3836
- if (inspector) {
3837
- inspector.descriptor.settings = pluginDescriptor.settings;
3838
- initPluginSettings(inspector.options.id, pluginDescriptor.settings);
3839
- }
3840
- }
3841
3836
  }
3842
3837
  function removeRegisteredPluginApp(app) {
3843
3838
  target8.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.delete(app);
@@ -4179,6 +4174,9 @@ function initDevTools() {
4179
4174
  var _a26;
4180
4175
  addDevToolsPluginToBuffer(pluginDescriptor, setupFn);
4181
4176
  const { app } = (_a26 = activeAppRecord) != null ? _a26 : {};
4177
+ if (pluginDescriptor.settings) {
4178
+ initPluginSettings(pluginDescriptor.id, pluginDescriptor.settings);
4179
+ }
4182
4180
  if (!app)
4183
4181
  return;
4184
4182
  callDevToolsPluginSetupFn([pluginDescriptor, setupFn], app);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue/devtools-kit",
3
3
  "type": "module",
4
- "version": "7.4.5",
4
+ "version": "7.4.6",
5
5
  "author": "webfansplz",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,12 +29,12 @@
29
29
  "perfect-debounce": "^1.0.0",
30
30
  "speakingurl": "^14.0.1",
31
31
  "superjson": "^2.2.1",
32
- "@vue/devtools-shared": "^7.4.5"
32
+ "@vue/devtools-shared": "^7.4.6"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/speakingurl": "^13.0.6",
36
- "vue": "^3.5.3",
37
- "vue-router": "^4.4.3"
36
+ "vue": "^3.5.8",
37
+ "vue-router": "^4.4.5"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "tsup --clean",