veo-sdk 0.5.32 → 0.5.34

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.
@@ -34,7 +34,7 @@ interface CustomPlacement {
34
34
  height?: number | string;
35
35
  }
36
36
  type UrlMatchType = 'exact' | 'prefix' | 'regex';
37
- type ActivationTrigger = 'immediate' | 'on_element' | 'on_event' | 'delayed' | 'on_click' | 'on_hover';
37
+ type ActivationTrigger = 'immediate' | 'on_element' | 'on_event' | 'delayed' | 'on_click' | 'on_hover' | 'manual';
38
38
  type CtaAction = 'dismiss' | 'next' | 'url' | 'guide';
39
39
  /**
40
40
  * Acciones de un bloque `button` en el modelo unificado (estilo Pendo). Superset
@@ -45,12 +45,42 @@ interface UrlMatcher {
45
45
  type: UrlMatchType;
46
46
  pattern: string;
47
47
  }
48
+ type RepeatUnit = 'minute' | 'hour' | 'day' | 'week';
49
+ type ActivationDevices = 'all' | 'desktop' | 'mobile';
50
+ /** «Repetir la aparición»: el intervalo y el tope los aplica el BACKEND en el
51
+ * resolve; el SDK usa `onLoad` (retomar el último paso visto). */
52
+ interface ActivationRepeat {
53
+ every: number;
54
+ unit: RepeatUnit;
55
+ stopAfter: {
56
+ kind: 'never';
57
+ } | {
58
+ kind: 'dismissals';
59
+ count: number;
60
+ } | {
61
+ kind: 'completed';
62
+ };
63
+ onLoad: 'restart' | 'resume';
64
+ }
48
65
  interface ActivationRules {
49
66
  url: UrlMatcher;
50
67
  trigger: ActivationTrigger;
51
68
  selector?: string;
52
69
  eventName?: string;
53
70
  delayMs?: number;
71
+ /**
72
+ * Con `on_click`/`on_hover`: además de abrirse al interactuar con el
73
+ * elemento objetivo, la guía arranca sola al cargar (Automático + Elemento
74
+ * objetivo). `delayMs` aplica a ese arranque automático.
75
+ */
76
+ autoShow?: boolean | null;
77
+ repeat?: ActivationRepeat | null;
78
+ /** En qué dispositivos se muestra; lo filtra el SDK (`isDeviceAllowed`). */
79
+ devices?: ActivationDevices | null;
80
+ /** Solo editor: cómo se derivó `selector` (sugerido/padre/custom/heredado del paso 1). */
81
+ targetMode?: 'suggested' | 'parent' | 'custom' | 'inherit' | null;
82
+ /** Solo editor: selector tal como lo devolvió el picker (base de los modos). */
83
+ targetBase?: string | null;
54
84
  }
55
85
  /** Tipo de un bloque de contenido (para pasos con varios títulos/textos/botones). */
56
86
  type StepBlockType = 'title' | 'text' | 'button' | 'image' | 'code' | 'form';
@@ -152,6 +182,18 @@ interface PreviewGuideInput {
152
182
  formSubmit?: (answers: Record<string, unknown>) => Promise<boolean>;
153
183
  /** Nota bajo el "¡Gracias!" cuando hay `formSubmit` propio. */
154
184
  formSubmitNote?: string;
185
+ /** Modo badge: montar con el tooltip ABIERTO (toggle del editor). */
186
+ /**
187
+ * Badge: tooltip abierto (true) o cerrado (false). Sin definir, se abre si la
188
+ * activación es automática (igual que el runtime).
189
+ */
190
+ badgeOpen?: boolean;
191
+ /**
192
+ * Se llama cuando el USUARIO cierra la preview (✕ / descartar), no cuando el
193
+ * editor la reemplaza por otra. El modo builder lo usa para re-armar el
194
+ * disparador por elemento objetivo.
195
+ */
196
+ onClosed?: () => void;
155
197
  }
156
198
  /** Resultado del primer render de una preview. */
157
199
  interface PreviewResult {
@@ -34,7 +34,7 @@ interface CustomPlacement {
34
34
  height?: number | string;
35
35
  }
36
36
  type UrlMatchType = 'exact' | 'prefix' | 'regex';
37
- type ActivationTrigger = 'immediate' | 'on_element' | 'on_event' | 'delayed' | 'on_click' | 'on_hover';
37
+ type ActivationTrigger = 'immediate' | 'on_element' | 'on_event' | 'delayed' | 'on_click' | 'on_hover' | 'manual';
38
38
  type CtaAction = 'dismiss' | 'next' | 'url' | 'guide';
39
39
  /**
40
40
  * Acciones de un bloque `button` en el modelo unificado (estilo Pendo). Superset
@@ -45,12 +45,42 @@ interface UrlMatcher {
45
45
  type: UrlMatchType;
46
46
  pattern: string;
47
47
  }
48
+ type RepeatUnit = 'minute' | 'hour' | 'day' | 'week';
49
+ type ActivationDevices = 'all' | 'desktop' | 'mobile';
50
+ /** «Repetir la aparición»: el intervalo y el tope los aplica el BACKEND en el
51
+ * resolve; el SDK usa `onLoad` (retomar el último paso visto). */
52
+ interface ActivationRepeat {
53
+ every: number;
54
+ unit: RepeatUnit;
55
+ stopAfter: {
56
+ kind: 'never';
57
+ } | {
58
+ kind: 'dismissals';
59
+ count: number;
60
+ } | {
61
+ kind: 'completed';
62
+ };
63
+ onLoad: 'restart' | 'resume';
64
+ }
48
65
  interface ActivationRules {
49
66
  url: UrlMatcher;
50
67
  trigger: ActivationTrigger;
51
68
  selector?: string;
52
69
  eventName?: string;
53
70
  delayMs?: number;
71
+ /**
72
+ * Con `on_click`/`on_hover`: además de abrirse al interactuar con el
73
+ * elemento objetivo, la guía arranca sola al cargar (Automático + Elemento
74
+ * objetivo). `delayMs` aplica a ese arranque automático.
75
+ */
76
+ autoShow?: boolean | null;
77
+ repeat?: ActivationRepeat | null;
78
+ /** En qué dispositivos se muestra; lo filtra el SDK (`isDeviceAllowed`). */
79
+ devices?: ActivationDevices | null;
80
+ /** Solo editor: cómo se derivó `selector` (sugerido/padre/custom/heredado del paso 1). */
81
+ targetMode?: 'suggested' | 'parent' | 'custom' | 'inherit' | null;
82
+ /** Solo editor: selector tal como lo devolvió el picker (base de los modos). */
83
+ targetBase?: string | null;
54
84
  }
55
85
  /** Tipo de un bloque de contenido (para pasos con varios títulos/textos/botones). */
56
86
  type StepBlockType = 'title' | 'text' | 'button' | 'image' | 'code' | 'form';
@@ -152,6 +182,18 @@ interface PreviewGuideInput {
152
182
  formSubmit?: (answers: Record<string, unknown>) => Promise<boolean>;
153
183
  /** Nota bajo el "¡Gracias!" cuando hay `formSubmit` propio. */
154
184
  formSubmitNote?: string;
185
+ /** Modo badge: montar con el tooltip ABIERTO (toggle del editor). */
186
+ /**
187
+ * Badge: tooltip abierto (true) o cerrado (false). Sin definir, se abre si la
188
+ * activación es automática (igual que el runtime).
189
+ */
190
+ badgeOpen?: boolean;
191
+ /**
192
+ * Se llama cuando el USUARIO cierra la preview (✕ / descartar), no cuando el
193
+ * editor la reemplaza por otra. El modo builder lo usa para re-armar el
194
+ * disparador por elemento objetivo.
195
+ */
196
+ onClosed?: () => void;
155
197
  }
156
198
  /** Resultado del primer render de una preview. */
157
199
  interface PreviewResult {