@vue/devtools-kit 7.6.1 → 7.6.2

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
@@ -2420,9 +2420,12 @@ var callInspectorUpdatedHook = (0, import_perfect_debounce.debounce)(() => {
2420
2420
  devtoolsContext.hooks.callHook("sendInspectorToClient" /* SEND_INSPECTOR_TO_CLIENT */, getActiveInspectors());
2421
2421
  });
2422
2422
  function addInspector(inspector, descriptor) {
2423
+ var _a25, _b25;
2423
2424
  devtoolsInspector.push({
2424
2425
  options: inspector,
2425
2426
  descriptor,
2427
+ treeFilterPlaceholder: (_a25 = inspector.treeFilterPlaceholder) != null ? _a25 : "Search tree...",
2428
+ stateFilterPlaceholder: (_b25 = inspector.stateFilterPlaceholder) != null ? _b25 : "Search state...",
2426
2429
  treeFilter: "",
2427
2430
  selectedNodeId: "",
2428
2431
  appRecord: getAppRecord(descriptor.app)
@@ -2462,7 +2465,9 @@ function getInspectorInfo(id) {
2462
2465
  logo: descriptor.logo,
2463
2466
  packageName: descriptor.packageName,
2464
2467
  homepage: descriptor.homepage,
2465
- timelineLayers
2468
+ timelineLayers,
2469
+ treeFilterPlaceholder: inspector.treeFilterPlaceholder,
2470
+ stateFilterPlaceholder: inspector.stateFilterPlaceholder
2466
2471
  };
2467
2472
  }
2468
2473
  function getInspector(id, app) {
@@ -3017,8 +3022,7 @@ function createDevToolsHook() {
3017
3022
  }
3018
3023
  };
3019
3024
  }
3020
- function subscribeDevToolsHook() {
3021
- const hook2 = import_devtools_shared10.target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
3025
+ function subscribeDevToolsHook(hook2) {
3022
3026
  hook2.on("app:init" /* APP_INIT */, (app, version, types) => {
3023
3027
  var _a25, _b25, _c;
3024
3028
  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)
@@ -4546,14 +4550,16 @@ function initDevTools() {
4546
4550
  const isDevToolsNext = ((_a25 = import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a25.id) === "vue-devtools-next";
4547
4551
  if (import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
4548
4552
  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());
4553
+ const _devtoolsHook = createDevToolsHook();
4554
+ if (import_devtools_shared21.target.__VUE_DEVTOOLS_HOOK_REPLAY__) {
4555
+ try {
4556
+ import_devtools_shared21.target.__VUE_DEVTOOLS_HOOK_REPLAY__.forEach((cb) => cb(_devtoolsHook));
4557
+ import_devtools_shared21.target.__VUE_DEVTOOLS_HOOK_REPLAY__ = [];
4558
+ } catch (e) {
4559
+ console.error("[vue-devtools] Error during hook replay", e);
4554
4560
  }
4555
4561
  }
4556
- import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.once("init", (Vue) => {
4562
+ _devtoolsHook.once("init", (Vue) => {
4557
4563
  import_devtools_shared21.target.__VUE_DEVTOOLS_VUE2_APP_DETECTED__ = true;
4558
4564
  console.log("%c[_____Vue DevTools v7 log_____]", "color: red; font-bold: 600; font-size: 16px;");
4559
4565
  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 +4582,7 @@ function initDevTools() {
4576
4582
  onLegacyDevToolsPluginApiAvailable(() => {
4577
4583
  const normalizedPluginBuffer = devtoolsPluginBuffer.filter(([item]) => item.id !== "components");
4578
4584
  normalizedPluginBuffer.forEach(([pluginDescriptor, setupFn]) => {
4579
- import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
4585
+ _devtoolsHook.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
4580
4586
  });
4581
4587
  });
4582
4588
  hook.on.vueAppInit(async (app, version, types) => {
@@ -4597,7 +4603,7 @@ function initDevTools() {
4597
4603
  updateDevToolsState({
4598
4604
  connected: true
4599
4605
  });
4600
- import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.push(app);
4606
+ _devtoolsHook.apps.push(app);
4601
4607
  });
4602
4608
  hook.on.vueAppUnmount(async (app) => {
4603
4609
  const activeRecords = devtoolsAppRecords.value.filter((appRecord) => appRecord.app !== app);
@@ -4615,7 +4621,18 @@ function initDevTools() {
4615
4621
  import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.splice(import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.indexOf(app), 1);
4616
4622
  removeRegisteredPluginApp(app);
4617
4623
  });
4618
- subscribeDevToolsHook();
4624
+ subscribeDevToolsHook(_devtoolsHook);
4625
+ if (!import_devtools_shared21.target.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
4626
+ Object.defineProperty(import_devtools_shared21.target, "__VUE_DEVTOOLS_GLOBAL_HOOK__", {
4627
+ get() {
4628
+ return _devtoolsHook;
4629
+ }
4630
+ });
4631
+ } else {
4632
+ if (!import_devtools_shared21.isNuxtApp) {
4633
+ Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, _devtoolsHook);
4634
+ }
4635
+ }
4619
4636
  }
4620
4637
  function onDevToolsClientConnected(fn) {
4621
4638
  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
@@ -2329,9 +2329,12 @@ var callInspectorUpdatedHook = debounce(() => {
2329
2329
  devtoolsContext.hooks.callHook("sendInspectorToClient" /* SEND_INSPECTOR_TO_CLIENT */, getActiveInspectors());
2330
2330
  });
2331
2331
  function addInspector(inspector, descriptor) {
2332
+ var _a25, _b25;
2332
2333
  devtoolsInspector.push({
2333
2334
  options: inspector,
2334
2335
  descriptor,
2336
+ treeFilterPlaceholder: (_a25 = inspector.treeFilterPlaceholder) != null ? _a25 : "Search tree...",
2337
+ stateFilterPlaceholder: (_b25 = inspector.stateFilterPlaceholder) != null ? _b25 : "Search state...",
2335
2338
  treeFilter: "",
2336
2339
  selectedNodeId: "",
2337
2340
  appRecord: getAppRecord(descriptor.app)
@@ -2371,7 +2374,9 @@ function getInspectorInfo(id) {
2371
2374
  logo: descriptor.logo,
2372
2375
  packageName: descriptor.packageName,
2373
2376
  homepage: descriptor.homepage,
2374
- timelineLayers
2377
+ timelineLayers,
2378
+ treeFilterPlaceholder: inspector.treeFilterPlaceholder,
2379
+ stateFilterPlaceholder: inspector.stateFilterPlaceholder
2375
2380
  };
2376
2381
  }
2377
2382
  function getInspector(id, app) {
@@ -2926,8 +2931,7 @@ function createDevToolsHook() {
2926
2931
  }
2927
2932
  };
2928
2933
  }
2929
- function subscribeDevToolsHook() {
2930
- const hook2 = target7.__VUE_DEVTOOLS_GLOBAL_HOOK__;
2934
+ function subscribeDevToolsHook(hook2) {
2931
2935
  hook2.on("app:init" /* APP_INIT */, (app, version, types) => {
2932
2936
  var _a25, _b25, _c;
2933
2937
  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)
@@ -4455,14 +4459,16 @@ function initDevTools() {
4455
4459
  const isDevToolsNext = ((_a25 = target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a25.id) === "vue-devtools-next";
4456
4460
  if (target13.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
4457
4461
  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());
4462
+ const _devtoolsHook = createDevToolsHook();
4463
+ if (target13.__VUE_DEVTOOLS_HOOK_REPLAY__) {
4464
+ try {
4465
+ target13.__VUE_DEVTOOLS_HOOK_REPLAY__.forEach((cb) => cb(_devtoolsHook));
4466
+ target13.__VUE_DEVTOOLS_HOOK_REPLAY__ = [];
4467
+ } catch (e) {
4468
+ console.error("[vue-devtools] Error during hook replay", e);
4463
4469
  }
4464
4470
  }
4465
- target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.once("init", (Vue) => {
4471
+ _devtoolsHook.once("init", (Vue) => {
4466
4472
  target13.__VUE_DEVTOOLS_VUE2_APP_DETECTED__ = true;
4467
4473
  console.log("%c[_____Vue DevTools v7 log_____]", "color: red; font-bold: 600; font-size: 16px;");
4468
4474
  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 +4491,7 @@ function initDevTools() {
4485
4491
  onLegacyDevToolsPluginApiAvailable(() => {
4486
4492
  const normalizedPluginBuffer = devtoolsPluginBuffer.filter(([item]) => item.id !== "components");
4487
4493
  normalizedPluginBuffer.forEach(([pluginDescriptor, setupFn]) => {
4488
- target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
4494
+ _devtoolsHook.emit("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: "legacy" });
4489
4495
  });
4490
4496
  });
4491
4497
  hook.on.vueAppInit(async (app, version, types) => {
@@ -4506,7 +4512,7 @@ function initDevTools() {
4506
4512
  updateDevToolsState({
4507
4513
  connected: true
4508
4514
  });
4509
- target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.push(app);
4515
+ _devtoolsHook.apps.push(app);
4510
4516
  });
4511
4517
  hook.on.vueAppUnmount(async (app) => {
4512
4518
  const activeRecords = devtoolsAppRecords.value.filter((appRecord) => appRecord.app !== app);
@@ -4524,7 +4530,18 @@ function initDevTools() {
4524
4530
  target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.splice(target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.indexOf(app), 1);
4525
4531
  removeRegisteredPluginApp(app);
4526
4532
  });
4527
- subscribeDevToolsHook();
4533
+ subscribeDevToolsHook(_devtoolsHook);
4534
+ if (!target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
4535
+ Object.defineProperty(target13, "__VUE_DEVTOOLS_GLOBAL_HOOK__", {
4536
+ get() {
4537
+ return _devtoolsHook;
4538
+ }
4539
+ });
4540
+ } else {
4541
+ if (!isNuxtApp) {
4542
+ Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, _devtoolsHook);
4543
+ }
4544
+ }
4528
4545
  }
4529
4546
  function onDevToolsClientConnected(fn) {
4530
4547
  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.2",
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.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/speakingurl": "^13.0.6",