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 +17 -11
- package/dist/builder.cjs +2072 -0
- package/dist/builder.cjs.map +1 -0
- package/dist/builder.d.cts +162 -0
- package/dist/builder.d.ts +162 -0
- package/dist/builder.mjs +449 -0
- package/dist/builder.mjs.map +1 -0
- package/dist/chunk-BBAA5BRS.mjs +2728 -0
- package/dist/chunk-BBAA5BRS.mjs.map +1 -0
- package/dist/guide-preview-CO5ShtNf.d.cts +137 -0
- package/dist/guide-preview-CO5ShtNf.d.ts +137 -0
- package/dist/index.cjs +1785 -727
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -28
- package/dist/index.d.ts +43 -28
- package/dist/index.mjs +343 -2009
- package/dist/index.mjs.map +1 -1
- package/dist/veo-builder.js +289 -0
- package/dist/veo-builder.js.map +1 -0
- package/dist/veo-guides.js +259 -0
- package/dist/veo-guides.js.map +1 -0
- package/dist/veo.js +2 -169
- package/dist/veo.js.map +1 -1
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
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
|
|
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 '
|
|
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
|
-
|
|
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
|
|
37
|
-
|
|
38
|
-
veo.init({ apiKey: 'pk_xxx',
|
|
39
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|