viewgate-wrapper 1.9.2 → 1.9.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 +60 -25
- package/dist/components/ShadowRootWrapper.d.ts +8 -0
- package/dist/components/ShadowRootWrapper.d.ts.map +1 -0
- package/dist/components/ViewGateOverlay.d.ts.map +1 -1
- package/dist/components/ViewGateProvider.d.ts +77 -3
- package/dist/components/ViewGateProvider.d.ts.map +1 -1
- package/dist/viewgate-wrapper.js +5914 -1095
- package/dist/viewgate-wrapper.umd.cjs +16 -6
- package/package.json +54 -53
- package/CLIENT_SETUP_GUIDE.md +0 -64
package/package.json
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "viewgate-wrapper",
|
|
3
|
-
"version": "1.9.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "./dist/viewgate-wrapper.umd.cjs",
|
|
6
|
-
"module": "./dist/viewgate-wrapper.js",
|
|
7
|
-
"bin": {
|
|
8
|
-
"viewgate-wrapper": "./dist/cli.js"
|
|
9
|
-
},
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
|
-
"import": "./dist/viewgate-wrapper.js",
|
|
15
|
-
"require": "./dist/viewgate-wrapper.umd.cjs"
|
|
16
|
-
},
|
|
17
|
-
"./dist/*": "./dist/*"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist",
|
|
21
|
-
"mcp-server/dist",
|
|
22
|
-
"mcp-server/package.json"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
"react": "^19.0.0"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"html-to-image": "^1.11.13",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"@types/
|
|
46
|
-
"@types/react
|
|
47
|
-
"@
|
|
48
|
-
"react": "^
|
|
49
|
-
"react
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"vite
|
|
53
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "viewgate-wrapper",
|
|
3
|
+
"version": "1.9.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/viewgate-wrapper.umd.cjs",
|
|
6
|
+
"module": "./dist/viewgate-wrapper.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"viewgate-wrapper": "./dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/viewgate-wrapper.js",
|
|
15
|
+
"require": "./dist/viewgate-wrapper.umd.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./dist/*": "./dist/*"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"mcp-server/dist",
|
|
22
|
+
"mcp-server/package.json"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build": "vite build && tsc --emitDeclarationOnly && npx tsc src/cli.ts --outDir dist --module nodenext --target esnext --moduleResolution nodenext --esModuleInterop --skipLibCheck --rootDir src && npx tsc src/plugin/transform-logic.ts src/plugin/vite-plugin-viewgate.ts src/plugin/next-loader.ts --outDir dist/plugin --module nodenext --target esnext --moduleResolution nodenext --esModuleInterop --skipLibCheck --rootDir src/plugin && cd mcp-server && npm run build",
|
|
27
|
+
"preview": "vite preview"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [],
|
|
30
|
+
"author": "Mauro Aceituno",
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"description": "ViewGate Wrapper for React applications",
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": "^19.0.0",
|
|
35
|
+
"react-dom": "^19.0.0"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
39
|
+
"html-to-image": "^1.11.13",
|
|
40
|
+
"html2canvas": "^1.4.1",
|
|
41
|
+
"lucide-react": "^0.577.0",
|
|
42
|
+
"node-fetch": "^2.7.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^22.0.0",
|
|
46
|
+
"@types/react": "^19.0.0",
|
|
47
|
+
"@types/react-dom": "^19.0.0",
|
|
48
|
+
"@vitejs/plugin-react-swc": "^4.2.3",
|
|
49
|
+
"react": "^19.2.4",
|
|
50
|
+
"react-dom": "^19.2.4",
|
|
51
|
+
"typescript": "^5.9.3",
|
|
52
|
+
"vite": "^7.3.1",
|
|
53
|
+
"vite-plugin-css-injected-by-js": "^4.0.1"
|
|
54
|
+
}
|
|
54
55
|
}
|
package/CLIENT_SETUP_GUIDE.md
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Guía de Instalación para Clientes - ViewGate
|
|
2
|
-
|
|
3
|
-
Esta guía explica cómo integrar ViewGate en tu proyecto React y configurar el servidor MCP para que la IA pueda ayudarte a gestionar el feedback.
|
|
4
|
-
|
|
5
|
-
## 1. Instalación del Paquete
|
|
6
|
-
|
|
7
|
-
Instala la librería `viewgate-wrapper` en tu proyecto:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install viewgate-wrapper
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## 2. Configuración del Servidor MCP (Antigravity)
|
|
14
|
-
|
|
15
|
-
Para que Antigravity (tu asistente de IA) pueda leer las anotaciones y el feedback de la UI, debes registrar el servidor MCP incluido en el paquete.
|
|
16
|
-
|
|
17
|
-
Ejecuta el siguiente comando en la raíz de tu proyecto:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npx viewgate setup
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Este comando:
|
|
24
|
-
- Detecta automáticamente tu archivo `mcp_config.json`.
|
|
25
|
-
- Registra el servidor MCP con las rutas correctas hacia tu carpeta `node_modules`.
|
|
26
|
-
- Configura las variables de entorno base.
|
|
27
|
-
|
|
28
|
-
### Configuración Manual de API Key
|
|
29
|
-
Una vez ejecutado el comando, asegúrate de tener tu API Key configurada. Puedes editarla directamente en tu `mcp_config.json` o pasarla como variable de entorno si prefieres.
|
|
30
|
-
|
|
31
|
-
## 3. Integración en el Código (React)
|
|
32
|
-
|
|
33
|
-
### Configurar el Plugin de Vite
|
|
34
|
-
En tu `vite.config.ts`, agrega el plugin para habilitar el rastreo de código fuente:
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
import { viewgatePlugin } from 'viewgate-wrapper';
|
|
38
|
-
|
|
39
|
-
export default defineConfig({
|
|
40
|
-
plugins: [
|
|
41
|
-
// ... otros plugins
|
|
42
|
-
viewgatePlugin()
|
|
43
|
-
]
|
|
44
|
-
});
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Envolver la aplicación
|
|
48
|
-
En tu archivo de entrada principal (ej. `main.tsx`), envuelve tu App con el proveedor de ViewGate:
|
|
49
|
-
|
|
50
|
-
```tsx
|
|
51
|
-
import { ViewGate } from 'viewgate-wrapper';
|
|
52
|
-
import 'viewgate-wrapper/dist/viewgate-wrapper.css';
|
|
53
|
-
|
|
54
|
-
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
55
|
-
<ViewGate language="es" apiKey="TU_API_KEY">
|
|
56
|
-
<App />
|
|
57
|
-
</ViewGate>
|
|
58
|
-
);
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## 4. ¡Listo!
|
|
62
|
-
Ahora puedes interactuar con Antigravity pidiéndole cosas como:
|
|
63
|
-
- *"Lee las anotaciones de feedback actuales"*
|
|
64
|
-
- *"Ayúdame a resolver los problemas reportados en la UI"*
|