ui-agent-annotation 0.1.4
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 +336 -0
- package/dist/cjs/index.cjs +1783 -0
- package/dist/cjs/index.cjs.map +7 -0
- package/dist/cjs/index.native.cjs +1004 -0
- package/dist/cjs/index.native.cjs.map +7 -0
- package/dist/cjs/index.web.cjs +83 -0
- package/dist/cjs/index.web.cjs.map +7 -0
- package/dist/esm/index.js +1758 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/index.native.js +1012 -0
- package/dist/esm/index.native.js.map +7 -0
- package/dist/esm/index.web.js +62 -0
- package/dist/esm/index.web.js.map +7 -0
- package/dist/types/components/AnnotationInput.d.ts +8 -0
- package/dist/types/components/AnnotationList.d.ts +1 -0
- package/dist/types/components/Draggable.d.ts +10 -0
- package/dist/types/components/ErrorBoundary.d.ts +159 -0
- package/dist/types/components/Highlighter.d.ts +1 -0
- package/dist/types/components/Toolbar.d.ts +1 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.web.d.ts +69 -0
- package/dist/types/store.d.ts +66 -0
- package/dist/types/utils/fiber.d.ts +51 -0
- package/dist/types/utils/platform.d.ts +8 -0
- package/dist/types/utils/screenshot.d.ts +28 -0
- package/package.json +115 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ScreenshotOptions {
|
|
2
|
+
/** Scale factor for higher resolution (default: 2) */
|
|
3
|
+
scale?: number;
|
|
4
|
+
/** Background color (default: transparent) */
|
|
5
|
+
backgroundColor?: string | null;
|
|
6
|
+
/** Whether to copy to clipboard (default: true) */
|
|
7
|
+
copyToClipboard?: boolean;
|
|
8
|
+
/** Whether to download as file (default: false) */
|
|
9
|
+
download?: boolean;
|
|
10
|
+
/** Filename when downloading (default: 'screenshot.png') */
|
|
11
|
+
filename?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ScreenshotResult {
|
|
14
|
+
success: boolean;
|
|
15
|
+
dataUrl?: string;
|
|
16
|
+
blob?: Blob;
|
|
17
|
+
error?: string;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface Window {
|
|
21
|
+
__TAURI_INTERNALS__?: unknown;
|
|
22
|
+
__TAURI_CLIPBOARD_WRITE_IMAGE__?: (bytes: Uint8Array) => Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Captures a screenshot of the given HTML element
|
|
27
|
+
*/
|
|
28
|
+
export declare function captureScreenshot(element: HTMLElement, options?: ScreenshotOptions): Promise<ScreenshotResult>;
|
package/package.json
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ui-agent-annotation",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "AI-powered annotation toolkit for UI inspection and annotation",
|
|
5
|
+
"main": "dist/cjs/index.cjs",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"react-native": "dist/esm/index.native.js",
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"react-native": {
|
|
13
|
+
"types": "./dist/types/index.native.d.ts",
|
|
14
|
+
"import": "./dist/esm/index.native.js",
|
|
15
|
+
"require": "./dist/cjs/index.native.cjs"
|
|
16
|
+
},
|
|
17
|
+
"types": "./dist/types/index.d.ts",
|
|
18
|
+
"import": "./dist/esm/index.js",
|
|
19
|
+
"require": "./dist/cjs/index.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./native": {
|
|
22
|
+
"types": "./dist/types/index.native.d.ts",
|
|
23
|
+
"import": "./dist/esm/index.native.js",
|
|
24
|
+
"require": "./dist/cjs/index.native.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./web": {
|
|
27
|
+
"types": "./dist/types/index.web.d.ts",
|
|
28
|
+
"import": "./dist/esm/index.web.js",
|
|
29
|
+
"require": "./dist/cjs/index.web.cjs"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "bun run scripts/publish.ts --dry-run",
|
|
38
|
+
"build:extension": "bun run scripts/build-extension.ts",
|
|
39
|
+
"dev:extension": "bun --watch scripts/build-extension.ts",
|
|
40
|
+
"typecheck": "tsc --noEmit",
|
|
41
|
+
"typecheck:extension": "tsc --noEmit --project tsconfig.extension.json",
|
|
42
|
+
"publish:patch": "bun run scripts/publish.ts patch",
|
|
43
|
+
"publish:minor": "bun run scripts/publish.ts minor",
|
|
44
|
+
"publish:major": "bun run scripts/publish.ts major",
|
|
45
|
+
"publish:dry": "bun run scripts/publish.ts --dry-run",
|
|
46
|
+
"release": "bun run scripts/publish.ts"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"react",
|
|
50
|
+
"react-native",
|
|
51
|
+
"annotation",
|
|
52
|
+
"ai",
|
|
53
|
+
"component-inspector",
|
|
54
|
+
"developer-tools",
|
|
55
|
+
"chrome-extension"
|
|
56
|
+
],
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"clsx": "^2.1.0",
|
|
59
|
+
"tailwind-merge": "^2.2.1"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"react": ">=16.8.0",
|
|
63
|
+
"react-dom": ">=16.8.0",
|
|
64
|
+
"react-native": ">=0.60.0",
|
|
65
|
+
"@tauri-apps/api": "^2",
|
|
66
|
+
"@tauri-apps/plugin-clipboard-manager": "^2",
|
|
67
|
+
"react-native-view-shot": ">=3.0.0",
|
|
68
|
+
"expo-clipboard": ">=4.0.0",
|
|
69
|
+
"expo-media-library": ">=15.0.0"
|
|
70
|
+
},
|
|
71
|
+
"peerDependenciesMeta": {
|
|
72
|
+
"react-dom": {
|
|
73
|
+
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"react-native": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
78
|
+
"@tauri-apps/api": {
|
|
79
|
+
"optional": true
|
|
80
|
+
},
|
|
81
|
+
"@tauri-apps/plugin-clipboard-manager": {
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"react-native-view-shot": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"expo-clipboard": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"expo-media-library": {
|
|
91
|
+
"optional": true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"optionalDependencies": {
|
|
95
|
+
"framer-motion": "^12.26.2",
|
|
96
|
+
"html2canvas": "^1.4.1",
|
|
97
|
+
"lucide-react": "^0.562.0"
|
|
98
|
+
},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@types/bun": "^1.2.12",
|
|
101
|
+
"@types/chrome": "^0.0.287",
|
|
102
|
+
"@types/react": "^19.2.9",
|
|
103
|
+
"@types/react-dom": "^19.2.3",
|
|
104
|
+
"@types/react-native": "^0.73.0",
|
|
105
|
+
"@types/sharp": "^0.32.0",
|
|
106
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
107
|
+
"crx3": "^2.0.0",
|
|
108
|
+
"esbuild": "^0.25.4",
|
|
109
|
+
"react": "^19.1.0",
|
|
110
|
+
"react-dom": "^19.1.0",
|
|
111
|
+
"sharp": "^0.34.5",
|
|
112
|
+
"typescript": "^5.9.3",
|
|
113
|
+
"vite": "^6.3.5"
|
|
114
|
+
}
|
|
115
|
+
}
|