veo-sdk 0.5.31 → 0.5.33

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.
@@ -45,12 +45,36 @@ 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
+ repeat?: ActivationRepeat | null;
72
+ /** En qué dispositivos se muestra; lo filtra el SDK (`isDeviceAllowed`). */
73
+ devices?: ActivationDevices | null;
74
+ /** Solo editor: cómo se derivó `selector` (sugerido/padre/custom/heredado del paso 1). */
75
+ targetMode?: 'suggested' | 'parent' | 'custom' | 'inherit' | null;
76
+ /** Solo editor: selector tal como lo devolvió el picker (base de los modos). */
77
+ targetBase?: string | null;
54
78
  }
55
79
  /** Tipo de un bloque de contenido (para pasos con varios títulos/textos/botones). */
56
80
  type StepBlockType = 'title' | 'text' | 'button' | 'image' | 'code' | 'form';
@@ -152,6 +176,14 @@ interface PreviewGuideInput {
152
176
  formSubmit?: (answers: Record<string, unknown>) => Promise<boolean>;
153
177
  /** Nota bajo el "¡Gracias!" cuando hay `formSubmit` propio. */
154
178
  formSubmitNote?: string;
179
+ /** Modo badge: montar con el tooltip ABIERTO (toggle del editor). */
180
+ badgeOpen?: boolean;
181
+ /**
182
+ * Se llama cuando el USUARIO cierra la preview (✕ / descartar), no cuando el
183
+ * editor la reemplaza por otra. El modo builder lo usa para re-armar el
184
+ * disparador por elemento objetivo.
185
+ */
186
+ onClosed?: () => void;
155
187
  }
156
188
  /** Resultado del primer render de una preview. */
157
189
  interface PreviewResult {
@@ -45,12 +45,36 @@ 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
+ repeat?: ActivationRepeat | null;
72
+ /** En qué dispositivos se muestra; lo filtra el SDK (`isDeviceAllowed`). */
73
+ devices?: ActivationDevices | null;
74
+ /** Solo editor: cómo se derivó `selector` (sugerido/padre/custom/heredado del paso 1). */
75
+ targetMode?: 'suggested' | 'parent' | 'custom' | 'inherit' | null;
76
+ /** Solo editor: selector tal como lo devolvió el picker (base de los modos). */
77
+ targetBase?: string | null;
54
78
  }
55
79
  /** Tipo de un bloque de contenido (para pasos con varios títulos/textos/botones). */
56
80
  type StepBlockType = 'title' | 'text' | 'button' | 'image' | 'code' | 'form';
@@ -152,6 +176,14 @@ interface PreviewGuideInput {
152
176
  formSubmit?: (answers: Record<string, unknown>) => Promise<boolean>;
153
177
  /** Nota bajo el "¡Gracias!" cuando hay `formSubmit` propio. */
154
178
  formSubmitNote?: string;
179
+ /** Modo badge: montar con el tooltip ABIERTO (toggle del editor). */
180
+ badgeOpen?: boolean;
181
+ /**
182
+ * Se llama cuando el USUARIO cierra la preview (✕ / descartar), no cuando el
183
+ * editor la reemplaza por otra. El modo builder lo usa para re-armar el
184
+ * disparador por elemento objetivo.
185
+ */
186
+ onClosed?: () => void;
155
187
  }
156
188
  /** Resultado del primer render de una preview. */
157
189
  interface PreviewResult {