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 +15 -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 +1952 -904
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -22
- package/dist/index.d.ts +41 -22
- package/dist/index.mjs +351 -2027
- 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 +1 -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,17 @@ 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
|
-
apiUrl: 'https://
|
|
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
|
|
37
|
-
|
|
38
|
-
veo.init({ apiKey: 'pk_xxx', apiUrl: 'https://
|
|
39
|
-
|
|
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
|
-
|
|
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
|
|