veo-sdk 0.1.0 → 0.2.1

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,18 @@ 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
+ guides: true, // opt-in: renderiza guías in-app
28
+ // apiUrl es OPCIONAL: por defecto apunta al backend gestionado de Veo.
29
+ // Solo se pasa para self-hosted / otra región.
27
30
  });
28
31
 
29
32
  veo.identify({ visitor: { id: 'user_123', traits: { email: 'a@b.com' } } });
@@ -32,17 +35,20 @@ veo.track('button_clicked');
32
35
 
33
36
  ### CDN (sin bundler)
34
37
 
38
+ Cargá `veo.js` desde unpkg y llamá `init` en el `onload` del `<script>`
39
+ (NO uses un stub con cola: el drain del IIFE saltea el `init` encolado):
40
+
35
41
  ```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' } });
42
+ <script
43
+ src="https://unpkg.com/veo-sdk@0.2.1/dist/veo.js"
44
+ onload="window.veo.init({ apiKey: 'pk_xxx', guides: true });
45
+ window.veo.identify({ visitor: { id: 'user_123' } });">
40
46
  </script>
41
47
  ```
42
48
 
43
- ### Snippet (recomendado)
44
-
45
- Ver `snippet/snippet.html` para el snippet copy-paste.
49
+ `apiUrl` es opcional (default = backend gestionado). Fijá la versión (`@0.2.1`)
50
+ para no romperte con un release futuro. También por jsDelivr:
51
+ `https://cdn.jsdelivr.net/npm/veo-sdk@0.2.1/dist/veo.js`.
46
52
 
47
53
  ## API
48
54