@vingy/vuebugger 0.3.4 → 0.4.0

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.
@@ -0,0 +1,3 @@
1
+ import { Plugin } from 'vue';
2
+ import { PluginOptions } from './types';
3
+ export declare const plugin: Plugin<[PluginOptions?]>;
@@ -0,0 +1,6 @@
1
+ import { VuebuggerEntry } from './types';
2
+ export declare const byUid: Map<string, VuebuggerEntry>;
3
+ export declare const byGroupId: Map<string, Set<string>>;
4
+ export declare const upsert: (entry: VuebuggerEntry) => void;
5
+ export declare const remove: (entry: VuebuggerEntry) => void;
6
+ export declare const onUpdate: (fn: (entry: VuebuggerEntry) => void) => void;
@@ -0,0 +1,16 @@
1
+ import { setupDevToolsPlugin } from '@vue/devtools-api';
2
+ import { ComponentInternalInstance } from 'vue';
3
+ export type VuebuggerEntry = {
4
+ groupId: string;
5
+ uid: string;
6
+ componentName: string;
7
+ componentInstance: ComponentInternalInstance | null;
8
+ debugState: Record<string, any>;
9
+ };
10
+ export type DevtoolsApi = Parameters<Parameters<typeof setupDevToolsPlugin>['1']>['0'];
11
+ export type HandlerNames = keyof DevtoolsApi['on'];
12
+ export type DevtoolsApiHandler<T extends HandlerNames> = Parameters<DevtoolsApi['on'][T]>['0'];
13
+ export type DevtoolsApiHandlerPayload<T extends HandlerNames> = Parameters<DevtoolsApiHandler<T>>[0];
14
+ export type PluginOptions = {
15
+ uidFn?: () => string;
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vingy/vuebugger",
3
- "version": "0.3.4",
3
+ "version": "0.4.0",
4
4
  "description": "Vue devtools plugin to debug anything.",
5
5
  "keywords": [
6
6
  "composable",
@@ -22,25 +22,28 @@
22
22
  ],
23
23
  "type": "module",
24
24
  "sideEffects": false,
25
- "main": "./dist/index.mjs",
26
- "types": "./dist/index.d.mts",
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
27
  "exports": {
28
28
  ".": {
29
- "types": "./dist/index.d.mts",
30
- "import": "./dist/index.mjs"
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js"
31
31
  }
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
36
  "devDependencies": {
37
- "@vue/devtools-api": "^8.0.5"
37
+ "@vitejs/plugin-vue": "^6.0.5",
38
+ "@vue/devtools-api": "^8.0.5",
39
+ "vite": "^8.0.3",
40
+ "vite-plugin-dts": "^4.5.4"
38
41
  },
39
42
  "peerDependencies": {
40
43
  "vue": "^3.5.0"
41
44
  },
42
45
  "scripts": {
43
- "build": "tsdown",
44
- "dev": "tsdown -w"
46
+ "build": "vite build",
47
+ "dev": "vite build --watch"
45
48
  }
46
49
  }
package/dist/index.d.mts DELETED
@@ -1,32 +0,0 @@
1
- import { ComponentInternalInstance, Plugin } from "vue";
2
-
3
- //#region ../../node_modules/.pnpm/hookable@6.0.1/node_modules/hookable/dist/index.d.mts
4
- type CreateTask = (name?: string) => {
5
- run: (function_: () => Promise<any> | any) => Promise<any> | any;
6
- };
7
- declare global {
8
- interface Console {
9
- createTask?: CreateTask;
10
- }
11
- }
12
- /** @deprecated */
13
- //#endregion
14
- //#region src/types.d.ts
15
- type VuebuggerEntry = {
16
- groupId: string;
17
- uid: string;
18
- componentName: string;
19
- componentInstance: ComponentInternalInstance | null;
20
- debugState: Record<string, any>;
21
- };
22
- type PluginOptions = {
23
- uidFn?: () => string;
24
- };
25
- //#endregion
26
- //#region src/debug.d.ts
27
- declare const debug: <T extends Record<string, any>>(groupId: VuebuggerEntry["groupId"], state: T) => T;
28
- //#endregion
29
- //#region src/index.d.ts
30
- declare const plugin$1: Plugin<[PluginOptions?]>;
31
- //#endregion
32
- export { plugin$1 as DebugPlugin, plugin$1 as default, debug };