veo-sdk 0.1.0 → 0.2.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 CHANGED
@@ -1,4 +1,4 @@
1
- # @veo/sdk
1
+ # veo-sdk
2
2
 
3
3
  SDK oficial de Veo para web apps. Captura eventos de analytics y muestra
4
4
  guías in-app (tooltips, modales, walkthroughs).
@@ -15,15 +15,17 @@ guías in-app (tooltips, modales, walkthroughs).
15
15
  ### npm
16
16
 
17
17
  ```bash
18
- pnpm add @veo/sdk
18
+ npm install veo-sdk # o: pnpm add veo-sdk / yarn add veo-sdk
19
19
  ```
20
20
 
21
21
  ```ts
22
- import { init } from '@veo/sdk';
22
+ import { init } from 'veo-sdk';
23
23
 
24
+ // Solo en el navegador (usa localStorage/DOM). En Next: client component.
24
25
  const veo = init({
25
26
  apiKey: 'pk_xxx',
26
- apiUrl: 'https://api.veo.io',
27
+ apiUrl: 'https://TU-BACKEND', // URL pública del veo-backend
28
+ guides: true, // opt-in: renderiza guías in-app
27
29
  });
28
30
 
29
31
  veo.identify({ visitor: { id: 'user_123', traits: { email: 'a@b.com' } } });
@@ -32,17 +34,19 @@ veo.track('button_clicked');
32
34
 
33
35
  ### CDN (sin bundler)
34
36
 
37
+ Cargá `veo.js` desde unpkg y llamá `init` en el `onload` del `<script>`
38
+ (NO uses un stub con cola: el drain del IIFE saltea el `init` encolado):
39
+
35
40
  ```html
36
- <script src="https://cdn.veo.io/sdk/v1.js"></script>
37
- <script>
38
- veo.init({ apiKey: 'pk_xxx', apiUrl: 'https://api.veo.io' });
39
- veo.identify({ visitor: { id: 'user_123' } });
41
+ <script
42
+ src="https://unpkg.com/veo-sdk@0.2.0/dist/veo.js"
43
+ onload="window.veo.init({ apiKey: 'pk_xxx', apiUrl: 'https://TU-BACKEND', guides: true });
44
+ window.veo.identify({ visitor: { id: 'user_123' } });">
40
45
  </script>
41
46
  ```
42
47
 
43
- ### Snippet (recomendado)
44
-
45
- Ver `snippet/snippet.html` para el snippet copy-paste.
48
+ Fijá la versión (`@0.2.0`) para no romperte con un release futuro. También
49
+ disponible por jsDelivr: `https://cdn.jsdelivr.net/npm/veo-sdk@0.2.0/dist/veo.js`.
46
50
 
47
51
  ## API
48
52