@blqke/vgentation 0.1.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.
- package/README.md +1 -0
- package/dist/components/AnnotationPopup.vue.d.ts +52 -0
- package/dist/components/Vgentation.vue.d.ts +103 -0
- package/dist/components/icons/AnimatedBunny.vue.d.ts +7 -0
- package/dist/components/icons/IconCheckSmallAnimated.vue.d.ts +6 -0
- package/dist/components/icons/IconCopyAnimated.vue.d.ts +7 -0
- package/dist/components/icons/IconEyeAnimated.vue.d.ts +7 -0
- package/dist/components/icons/IconPausePlayAnimated.vue.d.ts +7 -0
- package/dist/components/icons/index.d.ts +34 -0
- package/dist/composables/useVgentation.d.ts +63 -0
- package/dist/index.cjs +5059 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +5059 -0
- package/dist/nuxt/module.d.ts +9 -0
- package/dist/nuxt.cjs +47 -0
- package/dist/nuxt.d.ts +4 -0
- package/dist/nuxt.mjs +48 -0
- package/dist/playground/App.vue.d.ts +3 -0
- package/dist/playground/main.d.ts +1 -0
- package/dist/plugin.d.ts +37 -0
- package/dist/types.d.ts +54 -0
- package/dist/utils/config.d.ts +98 -0
- package/dist/utils/devtools-integration.d.ts +190 -0
- package/dist/utils/element-identification.d.ts +72 -0
- package/dist/utils/nuxt-detection.d.ts +90 -0
- package/dist/utils/storage.d.ts +5 -0
- package/dist/utils/vue-detection.d.ts +78 -0
- package/dist/vgentation.css +1790 -0
- package/package.json +61 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { SourceLocation } from './devtools-integration';
|
|
2
|
+
/**
|
|
3
|
+
* Vue component instance interface (partial, for detection purposes)
|
|
4
|
+
*/
|
|
5
|
+
interface VueComponentInstance {
|
|
6
|
+
$?: {
|
|
7
|
+
type?: {
|
|
8
|
+
name?: string;
|
|
9
|
+
__name?: string;
|
|
10
|
+
__file?: string;
|
|
11
|
+
};
|
|
12
|
+
parent?: VueComponentInstance['$'];
|
|
13
|
+
props?: Record<string, unknown>;
|
|
14
|
+
setupState?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
type?: {
|
|
17
|
+
name?: string;
|
|
18
|
+
__name?: string;
|
|
19
|
+
__file?: string;
|
|
20
|
+
};
|
|
21
|
+
parent?: VueComponentInstance;
|
|
22
|
+
props?: Record<string, unknown>;
|
|
23
|
+
setupState?: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
export interface VueComponentInfo {
|
|
26
|
+
name: string;
|
|
27
|
+
filePath?: string;
|
|
28
|
+
props?: Record<string, unknown>;
|
|
29
|
+
sourceLocation?: SourceLocation;
|
|
30
|
+
isPage?: boolean;
|
|
31
|
+
isLayout?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface VueDetectionResult {
|
|
34
|
+
component?: VueComponentInfo;
|
|
35
|
+
componentPath?: string;
|
|
36
|
+
componentTree?: VueComponentInfo[];
|
|
37
|
+
sourceLocation?: SourceLocation;
|
|
38
|
+
devToolsEnhanced?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Check if Vue devtools mode is available (component info accessible)
|
|
42
|
+
*/
|
|
43
|
+
export declare function isVueDevMode(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Get Vue component instance from a DOM element
|
|
46
|
+
*/
|
|
47
|
+
export declare function getVueInstance(element: HTMLElement): VueComponentInstance | null;
|
|
48
|
+
/**
|
|
49
|
+
* Extract component name from a Vue instance
|
|
50
|
+
* Uses DevTools-enhanced naming when available for better accuracy
|
|
51
|
+
*/
|
|
52
|
+
export declare function getComponentName(instance: VueComponentInstance): string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Extract file path from a Vue instance
|
|
55
|
+
* Tries multiple sources to find the file path
|
|
56
|
+
*/
|
|
57
|
+
export declare function getComponentFilePath(instance: VueComponentInstance): string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Get props from a Vue instance (sanitized for display)
|
|
60
|
+
*/
|
|
61
|
+
export declare function getComponentProps(instance: VueComponentInstance): Record<string, unknown> | null;
|
|
62
|
+
/**
|
|
63
|
+
* Get parent Vue component instance
|
|
64
|
+
*/
|
|
65
|
+
export declare function getParentComponent(instance: VueComponentInstance): VueComponentInstance | null;
|
|
66
|
+
/**
|
|
67
|
+
* Build component tree from element to root
|
|
68
|
+
*/
|
|
69
|
+
export declare function buildComponentTree(element: HTMLElement): VueComponentInfo[];
|
|
70
|
+
/**
|
|
71
|
+
* Main detection function - gets Vue context for an element
|
|
72
|
+
*/
|
|
73
|
+
export declare function detectVueContext(element: HTMLElement): VueDetectionResult;
|
|
74
|
+
/**
|
|
75
|
+
* Find the closest Vue component for an element
|
|
76
|
+
*/
|
|
77
|
+
export declare function findClosestComponent(element: HTMLElement): VueComponentInfo | null;
|
|
78
|
+
export {};
|