@vue/devtools-kit 7.3.3 → 7.3.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 CHANGED
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target21) => (target21 = mod != null ? __create(
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.5__@swc+core@1.5.29_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js
36
+ // ../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.9__@swc+core@1.5.29_postcss@8.4.38_typescript@5.5.2/node_modules/tsup/assets/cjs_shims.js
37
37
  var init_cjs_shims = __esm({
38
- "../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.5__@swc+core@1.5.29_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js"() {
38
+ "../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.9__@swc+core@1.5.29_postcss@8.4.38_typescript@5.5.2/node_modules/tsup/assets/cjs_shims.js"() {
39
39
  "use strict";
40
40
  }
41
41
  });
@@ -2386,18 +2386,38 @@ function onDevToolsConnected(fn) {
2386
2386
  });
2387
2387
  });
2388
2388
  }
2389
+ var resolveIcon = (icon) => {
2390
+ if (!icon)
2391
+ return;
2392
+ if (icon.startsWith("baseline-")) {
2393
+ return `custom-ic-${icon}`;
2394
+ }
2395
+ if (icon.startsWith("i-") || (0, import_devtools_shared3.isUrlString)(icon))
2396
+ return icon;
2397
+ return `custom-ic-baseline-${icon}`;
2398
+ };
2389
2399
  function addCustomTab(tab) {
2390
2400
  const tabs = import_devtools_shared3.target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
2391
2401
  if (tabs.some((t) => t.name === tab.name))
2392
2402
  return;
2393
- tabs.push(tab);
2403
+ tabs.push({
2404
+ ...tab,
2405
+ icon: resolveIcon(tab.icon)
2406
+ });
2394
2407
  updateAllStates();
2395
2408
  }
2396
2409
  function addCustomCommand(action) {
2397
2410
  const commands = import_devtools_shared3.target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
2398
2411
  if (commands.some((t) => t.id === action.id))
2399
2412
  return;
2400
- commands.push(action);
2413
+ commands.push({
2414
+ ...action,
2415
+ icon: resolveIcon(action.icon),
2416
+ children: action.children ? action.children.map((child) => ({
2417
+ ...child,
2418
+ icon: resolveIcon(child.icon)
2419
+ })) : void 0
2420
+ });
2401
2421
  updateAllStates();
2402
2422
  }
2403
2423
  function removeCustomCommand(actionId) {
@@ -2460,7 +2480,7 @@ function getActiveInspectors() {
2460
2480
  id: options.id,
2461
2481
  label: options.label,
2462
2482
  logo: descriptor.logo,
2463
- icon: `i-ic-baseline-${(_a24 = options == null ? void 0 : options.icon) == null ? void 0 : _a24.replace(/_/g, "-")}`,
2483
+ icon: `custom-ic-baseline-${(_a24 = options == null ? void 0 : options.icon) == null ? void 0 : _a24.replace(/_/g, "-")}`,
2464
2484
  packageName: descriptor.packageName,
2465
2485
  homepage: descriptor.homepage
2466
2486
  };
@@ -3655,10 +3675,10 @@ function processRefs(instance) {
3655
3675
  }));
3656
3676
  }
3657
3677
  function processEventListeners(instance) {
3658
- var _a24;
3678
+ var _a24, _b24;
3659
3679
  const emitsDefinition = instance.type.emits;
3660
3680
  const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition != null ? emitsDefinition : {});
3661
- const keys = Object.keys((_a24 = instance.vnode.props) != null ? _a24 : {});
3681
+ const keys = Object.keys((_b24 = (_a24 = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a24.props) != null ? _b24 : {});
3662
3682
  const result = [];
3663
3683
  for (const key of keys) {
3664
3684
  const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);
package/dist/index.d.cts CHANGED
@@ -177,7 +177,7 @@ declare const devtoolsAppRecords: DevToolsAppRecords[] & {
177
177
  value: DevToolsAppRecords[];
178
178
  };
179
179
  declare const addDevToolsAppRecord: (app: AppRecord) => void;
180
- declare const removeDevToolsAppRecord: (app: AppRecord['app']) => void;
180
+ declare const removeDevToolsAppRecord: (app: AppRecord["app"]) => void;
181
181
  declare const activeAppRecord: AppRecord & {
182
182
  value: AppRecord;
183
183
  id: string;
@@ -393,8 +393,8 @@ interface DevToolsContextHooks extends DevToolsV6PluginAPIHooks {
393
393
  declare function createDevToolsCtxHooks(): hookable.Hookable<DevToolsContextHooks & DevToolsMessagingHooks, hookable.HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>;
394
394
 
395
395
  declare function createDevToolsApi(hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>): {
396
- getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], 'inspectorId' | 'filter'>): Promise<never[]>;
397
- getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], 'inspectorId' | 'nodeId'>): Promise<CustomInspectorState>;
396
+ getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
397
+ getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
398
398
  editInspectorState(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]): void;
399
399
  sendInspectorState(inspectorId: string): void;
400
400
  inspectComponentInspector(): Promise<string>;
@@ -445,12 +445,12 @@ declare function getInspectorInfo(id: string): {
445
445
  declare function getInspector(id: string, app?: App$1): DevToolsKitInspector | undefined;
446
446
  declare function getInspectorActions(id: string): {
447
447
  icon: string;
448
- tooltip?: string | undefined;
448
+ tooltip?: string;
449
449
  action: () => void | Promise<void>;
450
450
  }[] | undefined;
451
451
  declare function getInspectorNodeActions(id: string): {
452
452
  icon: string;
453
- tooltip?: string | undefined;
453
+ tooltip?: string;
454
454
  action: (nodeId: string) => void | Promise<void>;
455
455
  }[] | undefined;
456
456
 
@@ -1014,27 +1014,9 @@ declare const devtools: {
1014
1014
  init: () => void;
1015
1015
  readonly ctx: DevtoolsContext;
1016
1016
  readonly api: {
1017
- getInspectorTree(payload: Pick<{
1018
- app: any;
1019
- inspectorId: string;
1020
- filter: string;
1021
- rootNodes: CustomInspectorNode[];
1022
- }, "inspectorId" | "filter">): Promise<never[]>;
1023
- getInspectorState(payload: Pick<{
1024
- app: any;
1025
- inspectorId: string;
1026
- nodeId: string;
1027
- state: CustomInspectorState;
1028
- }, "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
1029
- editInspectorState(payload: {
1030
- app: any;
1031
- inspectorId: string;
1032
- nodeId: string;
1033
- path: string[];
1034
- type: string;
1035
- state: EditStatePayload;
1036
- set: (object: any, path?: string | string[] | undefined, value?: any, cb?: ((object: any, field: string, value: any) => void) | undefined) => void;
1037
- }): void;
1017
+ getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
1018
+ getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
1019
+ editInspectorState(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]): void;
1038
1020
  sendInspectorState(inspectorId: string): void;
1039
1021
  inspectComponentInspector(): Promise<string>;
1040
1022
  cancelInspectComponentInspector(): void;
package/dist/index.d.ts CHANGED
@@ -177,7 +177,7 @@ declare const devtoolsAppRecords: DevToolsAppRecords[] & {
177
177
  value: DevToolsAppRecords[];
178
178
  };
179
179
  declare const addDevToolsAppRecord: (app: AppRecord) => void;
180
- declare const removeDevToolsAppRecord: (app: AppRecord['app']) => void;
180
+ declare const removeDevToolsAppRecord: (app: AppRecord["app"]) => void;
181
181
  declare const activeAppRecord: AppRecord & {
182
182
  value: AppRecord;
183
183
  id: string;
@@ -393,8 +393,8 @@ interface DevToolsContextHooks extends DevToolsV6PluginAPIHooks {
393
393
  declare function createDevToolsCtxHooks(): hookable.Hookable<DevToolsContextHooks & DevToolsMessagingHooks, hookable.HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>;
394
394
 
395
395
  declare function createDevToolsApi(hooks: Hookable<DevToolsContextHooks & DevToolsMessagingHooks, HookKeys<DevToolsContextHooks & DevToolsMessagingHooks>>): {
396
- getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], 'inspectorId' | 'filter'>): Promise<never[]>;
397
- getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], 'inspectorId' | 'nodeId'>): Promise<CustomInspectorState>;
396
+ getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
397
+ getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
398
398
  editInspectorState(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]): void;
399
399
  sendInspectorState(inspectorId: string): void;
400
400
  inspectComponentInspector(): Promise<string>;
@@ -445,12 +445,12 @@ declare function getInspectorInfo(id: string): {
445
445
  declare function getInspector(id: string, app?: App$1): DevToolsKitInspector | undefined;
446
446
  declare function getInspectorActions(id: string): {
447
447
  icon: string;
448
- tooltip?: string | undefined;
448
+ tooltip?: string;
449
449
  action: () => void | Promise<void>;
450
450
  }[] | undefined;
451
451
  declare function getInspectorNodeActions(id: string): {
452
452
  icon: string;
453
- tooltip?: string | undefined;
453
+ tooltip?: string;
454
454
  action: (nodeId: string) => void | Promise<void>;
455
455
  }[] | undefined;
456
456
 
@@ -1014,27 +1014,9 @@ declare const devtools: {
1014
1014
  init: () => void;
1015
1015
  readonly ctx: DevtoolsContext;
1016
1016
  readonly api: {
1017
- getInspectorTree(payload: Pick<{
1018
- app: any;
1019
- inspectorId: string;
1020
- filter: string;
1021
- rootNodes: CustomInspectorNode[];
1022
- }, "inspectorId" | "filter">): Promise<never[]>;
1023
- getInspectorState(payload: Pick<{
1024
- app: any;
1025
- inspectorId: string;
1026
- nodeId: string;
1027
- state: CustomInspectorState;
1028
- }, "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
1029
- editInspectorState(payload: {
1030
- app: any;
1031
- inspectorId: string;
1032
- nodeId: string;
1033
- path: string[];
1034
- type: string;
1035
- state: EditStatePayload;
1036
- set: (object: any, path?: string | string[] | undefined, value?: any, cb?: ((object: any, field: string, value: any) => void) | undefined) => void;
1037
- }): void;
1017
+ getInspectorTree(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE], "inspectorId" | "filter">): Promise<never[]>;
1018
+ getInspectorState(payload: Pick<DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE], "inspectorId" | "nodeId">): Promise<CustomInspectorState>;
1019
+ editInspectorState(payload: DevToolsV6PluginAPIHookPayloads[DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE]): void;
1038
1020
  sendInspectorState(inspectorId: string): void;
1039
1021
  inspectComponentInspector(): Promise<string>;
1040
1022
  cancelInspectComponentInspector(): void;
package/dist/index.js CHANGED
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target21) => (target21 = mod != null ? __create(
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.5__@swc+core@1.5.29_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.9__@swc+core@1.5.29_postcss@8.4.38_typescript@5.5.2/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.5__@swc+core@1.5.29_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.9__@swc+core@1.5.29_postcss@8.4.38_typescript@5.5.2/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -2169,7 +2169,7 @@ import { debounce as debounce2 } from "perfect-debounce";
2169
2169
 
2170
2170
  // src/ctx/state.ts
2171
2171
  init_esm_shims();
2172
- import { target as global } from "@vue/devtools-shared";
2172
+ import { target as global, isUrlString } from "@vue/devtools-shared";
2173
2173
  import { debounce } from "perfect-debounce";
2174
2174
  var _a2, _b2;
2175
2175
  (_b2 = (_a2 = global).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null ? _b2 : _a2.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [];
@@ -2297,18 +2297,38 @@ function onDevToolsConnected(fn) {
2297
2297
  });
2298
2298
  });
2299
2299
  }
2300
+ var resolveIcon = (icon) => {
2301
+ if (!icon)
2302
+ return;
2303
+ if (icon.startsWith("baseline-")) {
2304
+ return `custom-ic-${icon}`;
2305
+ }
2306
+ if (icon.startsWith("i-") || isUrlString(icon))
2307
+ return icon;
2308
+ return `custom-ic-baseline-${icon}`;
2309
+ };
2300
2310
  function addCustomTab(tab) {
2301
2311
  const tabs = global.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
2302
2312
  if (tabs.some((t) => t.name === tab.name))
2303
2313
  return;
2304
- tabs.push(tab);
2314
+ tabs.push({
2315
+ ...tab,
2316
+ icon: resolveIcon(tab.icon)
2317
+ });
2305
2318
  updateAllStates();
2306
2319
  }
2307
2320
  function addCustomCommand(action) {
2308
2321
  const commands = global.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
2309
2322
  if (commands.some((t) => t.id === action.id))
2310
2323
  return;
2311
- commands.push(action);
2324
+ commands.push({
2325
+ ...action,
2326
+ icon: resolveIcon(action.icon),
2327
+ children: action.children ? action.children.map((child) => ({
2328
+ ...child,
2329
+ icon: resolveIcon(child.icon)
2330
+ })) : void 0
2331
+ });
2312
2332
  updateAllStates();
2313
2333
  }
2314
2334
  function removeCustomCommand(actionId) {
@@ -2371,7 +2391,7 @@ function getActiveInspectors() {
2371
2391
  id: options.id,
2372
2392
  label: options.label,
2373
2393
  logo: descriptor.logo,
2374
- icon: `i-ic-baseline-${(_a24 = options == null ? void 0 : options.icon) == null ? void 0 : _a24.replace(/_/g, "-")}`,
2394
+ icon: `custom-ic-baseline-${(_a24 = options == null ? void 0 : options.icon) == null ? void 0 : _a24.replace(/_/g, "-")}`,
2375
2395
  packageName: descriptor.packageName,
2376
2396
  homepage: descriptor.homepage
2377
2397
  };
@@ -3566,10 +3586,10 @@ function processRefs(instance) {
3566
3586
  }));
3567
3587
  }
3568
3588
  function processEventListeners(instance) {
3569
- var _a24;
3589
+ var _a24, _b24;
3570
3590
  const emitsDefinition = instance.type.emits;
3571
3591
  const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition != null ? emitsDefinition : {});
3572
- const keys = Object.keys((_a24 = instance.vnode.props) != null ? _a24 : {});
3592
+ const keys = Object.keys((_b24 = (_a24 = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a24.props) != null ? _b24 : {});
3573
3593
  const result = [];
3574
3594
  for (const key of keys) {
3575
3595
  const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue/devtools-kit",
3
3
  "type": "module",
4
- "version": "7.3.3",
4
+ "version": "7.3.5",
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.3.3"
32
+ "@vue/devtools-shared": "^7.3.5"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/speakingurl": "^13.0.6",
36
- "vue": "^3.4.29",
37
- "vue-router": "^4.3.3"
36
+ "vue": "^3.4.31",
37
+ "vue-router": "^4.4.0"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "tsup --clean",