@vue/devtools-kit 7.6.1 → 7.6.3

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 });
@@ -2420,9 +2427,12 @@ var callInspectorUpdatedHook = (0, import_perfect_debounce.debounce)(() => {
2420
2427
  devtoolsContext.hooks.callHook("sendInspectorToClient" /* SEND_INSPECTOR_TO_CLIENT */, getActiveInspectors());
2421
2428
  });
2422
2429
  function addInspector(inspector, descriptor) {
2430
+ var _a25, _b25;
2423
2431
  devtoolsInspector.push({
2424
2432
  options: inspector,
2425
2433
  descriptor,
2434
+ treeFilterPlaceholder: (_a25 = inspector.treeFilterPlaceholder) != null ? _a25 : "Search tree...",
2435
+ stateFilterPlaceholder: (_b25 = inspector.stateFilterPlaceholder) != null ? _b25 : "Search state...",
2426
2436
  treeFilter: "",
2427
2437
  selectedNodeId: "",
2428
2438
  appRecord: getAppRecord(descriptor.app)
@@ -2462,7 +2472,9 @@ function getInspectorInfo(id) {
2462
2472
  logo: descriptor.logo,
2463
2473
  packageName: descriptor.packageName,
2464
2474
  homepage: descriptor.homepage,
2465
- timelineLayers
2475
+ timelineLayers,
2476
+ treeFilterPlaceholder: inspector.treeFilterPlaceholder,
2477
+ stateFilterPlaceholder: inspector.stateFilterPlaceholder
2466
2478
  };
2467
2479
  }
2468
2480
  function getInspector(id, app) {
@@ -3017,8 +3029,7 @@ function createDevToolsHook() {
3017
3029
  }
3018
3030
  };
3019
3031
  }
3020
- function subscribeDevToolsHook() {
3021
- const hook2 = import_devtools_shared10.target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
3032
+ function subscribeDevToolsHook(hook2) {
3022
3033
  hook2.on("app:init" /* APP_INIT */, (app, version, types) => {
3023
3034
  var _a25, _b25, _c;
3024
3035
  if ((_c = (_b25 = (_a25 = app == null ? void 0 : app._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
@@ -3404,8 +3415,9 @@ function resolveMergedOptions(instance) {
3404
3415
  return options;
3405
3416
  }
3406
3417
  function processProps(instance) {
3418
+ var _a25;
3407
3419
  const props = [];
3408
- const propDefinitions = instance.type.props;
3420
+ const propDefinitions = (_a25 = instance == null ? void 0 : instance.type) == null ? void 0 : _a25.props;
3409
3421
  for (const key in instance.props) {
3410
3422
  const propDefinition = propDefinitions ? propDefinitions[key] : null;
3411
3423
  const camelizeKey = (0, import_devtools_shared11.camelize)(key);
@@ -3413,6 +3425,7 @@ function processProps(instance) {
3413
3425
  type: "props",
3414
3426
  key: camelizeKey,
3415
3427
  value: returnError(() => instance.props[key]),
3428
+ editable: true,
3416
3429
  meta: propDefinition ? {
3417
3430
  type: propDefinition.type ? getPropType(propDefinition.type) : "any",
3418
3431
  required: !!propDefinition.required,
@@ -4546,14 +4559,16 @@ function initDevTools() {
4546
4559
  const isDevToolsNext = ((_a25 = import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a25.id) === "vue-devtools-next";
4547
4560
  if (import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
4548
4561
  return;
4549
- if (!import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
4550
- import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__ = createDevToolsHook();
4551
- } else {
4552
- if (!import_devtools_shared21.isNuxtApp) {
4553
- Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, createDevToolsHook());
4562
+ const _devtoolsHook = createDevToolsHook();
4563
+ if (import_devtools_shared21.target.__VUE_DEVTOOLS_HOOK_REPLAY__) {
4564
+ try {
4565
+ import_devtools_shared21.target.__VUE_DEVTOOLS_HOOK_REPLAY__.forEach((cb) => cb(_devtoolsHook));
4566
+ import_devtools_shared21.target.__VUE_DEVTOOLS_HOOK_REPLAY__ = [];
4567
+ } catch (e) {
4568
+ console.error("[vue-devtools] Error during hook replay", e);
4554
4569
  }
4555
4570
  }
4556
- import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.once("init", (Vue) => {
4571
+ _devtoolsHook.once("init", (Vue) => {
4557
4572
  import_devtools_shared21.target.__VUE_DEVTOOLS_VUE2_APP_DETECTED__ = true;
4558
4573
  console.log("%c[_____Vue DevTools v7 log_____]", "color: red; font-bold: 600; font-size: 16px;");
4559
4574
  console.log("%cVue DevTools v7 detected in your Vue2 project. v7 only supports Vue3 and will not work.", "font-bold: 500; font-size: 14px;");
@@ -4576,7 +4591,7 @@ function initDevTools() {
4576
4591
  onLegacyDevToolsPluginApiAvailable(() => {
4577
4592
  const normalizedPluginBuffer = devtoolsPluginBuffer.filter(([item]) => item.id !== "components");
4578
4593
  normalizedPluginBuffer.forEach(([pluginDescriptor, setupFn]) => {
4579
- import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
4594
+ _devtoolsHook.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
4580
4595
  });
4581
4596
  });
4582
4597
  hook.on.vueAppInit(async (app, version, types) => {
@@ -4597,7 +4612,7 @@ function initDevTools() {
4597
4612
  updateDevToolsState({
4598
4613
  connected: true
4599
4614
  });
4600
- import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.push(app);
4615
+ _devtoolsHook.apps.push(app);
4601
4616
  });
4602
4617
  hook.on.vueAppUnmount(async (app) => {
4603
4618
  const activeRecords = devtoolsAppRecords.value.filter((appRecord) => appRecord.app !== app);
@@ -4615,7 +4630,18 @@ function initDevTools() {
4615
4630
  import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.splice(import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.indexOf(app), 1);
4616
4631
  removeRegisteredPluginApp(app);
4617
4632
  });
4618
- subscribeDevToolsHook();
4633
+ subscribeDevToolsHook(_devtoolsHook);
4634
+ if (!import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
4635
+ Object.defineProperty(import_devtools_shared21.target, "__VUE_DEVTOOLS_GLOBAL_HOOK__", {
4636
+ get() {
4637
+ return _devtoolsHook;
4638
+ }
4639
+ });
4640
+ } else {
4641
+ if (!import_devtools_shared21.isNuxtApp) {
4642
+ Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, _devtoolsHook);
4643
+ }
4644
+ }
4619
4645
  }
4620
4646
  function onDevToolsClientConnected(fn) {
4621
4647
  return new Promise((resolve) => {
package/dist/index.d.cts CHANGED
@@ -537,6 +537,8 @@ declare function setDevToolsEnv(env: Partial<any>): void;
537
537
  interface DevToolsKitInspector {
538
538
  options: CustomInspectorOptions;
539
539
  descriptor: PluginDescriptor;
540
+ treeFilterPlaceholder: string;
541
+ stateFilterPlaceholder: string;
540
542
  treeFilter: string;
541
543
  selectedNodeId: string;
542
544
  appRecord: unknown;
@@ -564,6 +566,8 @@ declare function getInspectorInfo(id: string): {
564
566
  label: string;
565
567
  color: number;
566
568
  }[];
569
+ treeFilterPlaceholder: string;
570
+ stateFilterPlaceholder: string;
567
571
  } | undefined;
568
572
  declare function getInspector(id: string, app?: App$1): DevToolsKitInspector | undefined;
569
573
  declare function getInspectorActions(id: string): {
package/dist/index.d.ts CHANGED
@@ -537,6 +537,8 @@ declare function setDevToolsEnv(env: Partial<any>): void;
537
537
  interface DevToolsKitInspector {
538
538
  options: CustomInspectorOptions;
539
539
  descriptor: PluginDescriptor;
540
+ treeFilterPlaceholder: string;
541
+ stateFilterPlaceholder: string;
540
542
  treeFilter: string;
541
543
  selectedNodeId: string;
542
544
  appRecord: unknown;
@@ -564,6 +566,8 @@ declare function getInspectorInfo(id: string): {
564
566
  label: string;
565
567
  color: number;
566
568
  }[];
569
+ treeFilterPlaceholder: string;
570
+ stateFilterPlaceholder: string;
567
571
  } | undefined;
568
572
  declare function getInspector(id: string, app?: App$1): DevToolsKitInspector | undefined;
569
573
  declare function getInspectorActions(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.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 });
@@ -2329,9 +2336,12 @@ var callInspectorUpdatedHook = debounce(() => {
2329
2336
  devtoolsContext.hooks.callHook("sendInspectorToClient" /* SEND_INSPECTOR_TO_CLIENT */, getActiveInspectors());
2330
2337
  });
2331
2338
  function addInspector(inspector, descriptor) {
2339
+ var _a25, _b25;
2332
2340
  devtoolsInspector.push({
2333
2341
  options: inspector,
2334
2342
  descriptor,
2343
+ treeFilterPlaceholder: (_a25 = inspector.treeFilterPlaceholder) != null ? _a25 : "Search tree...",
2344
+ stateFilterPlaceholder: (_b25 = inspector.stateFilterPlaceholder) != null ? _b25 : "Search state...",
2335
2345
  treeFilter: "",
2336
2346
  selectedNodeId: "",
2337
2347
  appRecord: getAppRecord(descriptor.app)
@@ -2371,7 +2381,9 @@ function getInspectorInfo(id) {
2371
2381
  logo: descriptor.logo,
2372
2382
  packageName: descriptor.packageName,
2373
2383
  homepage: descriptor.homepage,
2374
- timelineLayers
2384
+ timelineLayers,
2385
+ treeFilterPlaceholder: inspector.treeFilterPlaceholder,
2386
+ stateFilterPlaceholder: inspector.stateFilterPlaceholder
2375
2387
  };
2376
2388
  }
2377
2389
  function getInspector(id, app) {
@@ -2926,8 +2938,7 @@ function createDevToolsHook() {
2926
2938
  }
2927
2939
  };
2928
2940
  }
2929
- function subscribeDevToolsHook() {
2930
- const hook2 = target7.__VUE_DEVTOOLS_GLOBAL_HOOK__;
2941
+ function subscribeDevToolsHook(hook2) {
2931
2942
  hook2.on("app:init" /* APP_INIT */, (app, version, types) => {
2932
2943
  var _a25, _b25, _c;
2933
2944
  if ((_c = (_b25 = (_a25 = app == null ? void 0 : app._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
@@ -3313,8 +3324,9 @@ function resolveMergedOptions(instance) {
3313
3324
  return options;
3314
3325
  }
3315
3326
  function processProps(instance) {
3327
+ var _a25;
3316
3328
  const props = [];
3317
- const propDefinitions = instance.type.props;
3329
+ const propDefinitions = (_a25 = instance == null ? void 0 : instance.type) == null ? void 0 : _a25.props;
3318
3330
  for (const key in instance.props) {
3319
3331
  const propDefinition = propDefinitions ? propDefinitions[key] : null;
3320
3332
  const camelizeKey = camelize(key);
@@ -3322,6 +3334,7 @@ function processProps(instance) {
3322
3334
  type: "props",
3323
3335
  key: camelizeKey,
3324
3336
  value: returnError(() => instance.props[key]),
3337
+ editable: true,
3325
3338
  meta: propDefinition ? {
3326
3339
  type: propDefinition.type ? getPropType(propDefinition.type) : "any",
3327
3340
  required: !!propDefinition.required,
@@ -4455,14 +4468,16 @@ function initDevTools() {
4455
4468
  const isDevToolsNext = ((_a25 = target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a25.id) === "vue-devtools-next";
4456
4469
  if (target13.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
4457
4470
  return;
4458
- if (!target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
4459
- target13.__VUE_DEVTOOLS_GLOBAL_HOOK__ = createDevToolsHook();
4460
- } else {
4461
- if (!isNuxtApp) {
4462
- Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, createDevToolsHook());
4471
+ const _devtoolsHook = createDevToolsHook();
4472
+ if (target13.__VUE_DEVTOOLS_HOOK_REPLAY__) {
4473
+ try {
4474
+ target13.__VUE_DEVTOOLS_HOOK_REPLAY__.forEach((cb) => cb(_devtoolsHook));
4475
+ target13.__VUE_DEVTOOLS_HOOK_REPLAY__ = [];
4476
+ } catch (e) {
4477
+ console.error("[vue-devtools] Error during hook replay", e);
4463
4478
  }
4464
4479
  }
4465
- target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.once("init", (Vue) => {
4480
+ _devtoolsHook.once("init", (Vue) => {
4466
4481
  target13.__VUE_DEVTOOLS_VUE2_APP_DETECTED__ = true;
4467
4482
  console.log("%c[_____Vue DevTools v7 log_____]", "color: red; font-bold: 600; font-size: 16px;");
4468
4483
  console.log("%cVue DevTools v7 detected in your Vue2 project. v7 only supports Vue3 and will not work.", "font-bold: 500; font-size: 14px;");
@@ -4485,7 +4500,7 @@ function initDevTools() {
4485
4500
  onLegacyDevToolsPluginApiAvailable(() => {
4486
4501
  const normalizedPluginBuffer = devtoolsPluginBuffer.filter(([item]) => item.id !== "components");
4487
4502
  normalizedPluginBuffer.forEach(([pluginDescriptor, setupFn]) => {
4488
- target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
4503
+ _devtoolsHook.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
4489
4504
  });
4490
4505
  });
4491
4506
  hook.on.vueAppInit(async (app, version, types) => {
@@ -4506,7 +4521,7 @@ function initDevTools() {
4506
4521
  updateDevToolsState({
4507
4522
  connected: true
4508
4523
  });
4509
- target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.push(app);
4524
+ _devtoolsHook.apps.push(app);
4510
4525
  });
4511
4526
  hook.on.vueAppUnmount(async (app) => {
4512
4527
  const activeRecords = devtoolsAppRecords.value.filter((appRecord) => appRecord.app !== app);
@@ -4524,7 +4539,18 @@ function initDevTools() {
4524
4539
  target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.splice(target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.indexOf(app), 1);
4525
4540
  removeRegisteredPluginApp(app);
4526
4541
  });
4527
- subscribeDevToolsHook();
4542
+ subscribeDevToolsHook(_devtoolsHook);
4543
+ if (!target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
4544
+ Object.defineProperty(target13, "__VUE_DEVTOOLS_GLOBAL_HOOK__", {
4545
+ get() {
4546
+ return _devtoolsHook;
4547
+ }
4548
+ });
4549
+ } else {
4550
+ if (!isNuxtApp) {
4551
+ Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, _devtoolsHook);
4552
+ }
4553
+ }
4528
4554
  }
4529
4555
  function onDevToolsClientConnected(fn) {
4530
4556
  return new Promise((resolve) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue/devtools-kit",
3
3
  "type": "module",
4
- "version": "7.6.1",
4
+ "version": "7.6.3",
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.1"
32
+ "@vue/devtools-shared": "^7.6.3"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/speakingurl": "^13.0.6",