veo-sdk 0.5.32 → 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.
@@ -1,5 +1,5 @@
1
- import { P as PreviewGuideInput } from './guide-preview-XUnTmzUO.cjs';
2
- export { a as PreviewHandle, b as PreviewResult, c as closeGuidePreview, p as previewGuide } from './guide-preview-XUnTmzUO.cjs';
1
+ import { P as PreviewGuideInput } from './guide-preview-C73rKO0u.cjs';
2
+ export { a as PreviewHandle, b as PreviewResult, c as closeGuidePreview, p as previewGuide } from './guide-preview-C73rKO0u.cjs';
3
3
 
4
4
  /** Dónde soltó el autor un bloque nuevo. */
5
5
  interface BlockDropPayload {
@@ -81,8 +81,10 @@ interface ElementPickerOptions {
81
81
  onCancel?: () => void;
82
82
  /** Niveles de ancestros del selector. Default 5 (igual que autocapture). */
83
83
  maxAncestors?: number;
84
- /** Texto del banner superior. Default en español. */
84
+ /** Título del banner superior. Default en español. */
85
85
  hint?: string;
86
+ /** Subtítulo del banner (default: cómo abrir menús con Alt + clic). */
87
+ subhint?: string;
86
88
  }
87
89
  interface ElementPickerHandle {
88
90
  /** Cierra el picker sin elegir nada. Idempotente. */
@@ -119,9 +121,87 @@ declare function stopElementPicker(): void;
119
121
  * 4. La app responde con eventos (`picked`, `pick-cancelled`, …).
120
122
  */
121
123
 
124
+ /**
125
+ * Estado que el panel (editor) publica para que el SDK pinte el "chrome" del
126
+ * editor (topbar + fila de pasos) ENCIMA de la app. El panel es la única fuente
127
+ * de verdad; el chrome solo lo refleja y devuelve `chrome-action`s.
128
+ */
129
+ interface EditorChromeState {
130
+ guideName: string;
131
+ /** ISO de creación (null = guía nueva sin guardar). */
132
+ createdAt: string | null;
133
+ steps: Array<{
134
+ id: string;
135
+ label: string;
136
+ presentation: 'floating' | 'inline';
137
+ }>;
138
+ activeStep: number;
139
+ /** Qué muestra el panel: ajustes de activación o el paso activo. */
140
+ section: 'activation' | 'step' | 'badge' | 'target';
141
+ saving: boolean;
142
+ dirty: boolean;
143
+ /**
144
+ * Estado de publicación de la guía, para que el autor vea en la barra si lo
145
+ * que edita está Activa/Borrador/etc. (sin esto, guardar una guía en borrador
146
+ * y no verla en la app era un misterio). `tone` elige el color del chip.
147
+ */
148
+ status?: {
149
+ label: string;
150
+ tone: 'live' | 'testing' | 'review' | 'draft' | 'paused';
151
+ } | null;
152
+ }
153
+ /**
154
+ * Qué está haciendo la preview en la app. El SDK lo publica cada vez que
155
+ * evalúa un comando `preview` con `honorTrigger`, para que el panel explique
156
+ * por qué la guía no se ve (retraso, elemento objetivo, otra página, otro
157
+ * dispositivo) en vez de parecer rota.
158
+ */
159
+ type PreviewStatus = {
160
+ state: 'shown';
161
+ } | {
162
+ state: 'waiting-delay';
163
+ delayMs: number;
164
+ } | {
165
+ state: 'waiting-trigger';
166
+ trigger: 'on_click' | 'on_hover';
167
+ selector: string;
168
+ } | {
169
+ state: 'page-mismatch';
170
+ pattern: string;
171
+ } | {
172
+ state: 'device-mismatch';
173
+ devices: 'desktop' | 'mobile';
174
+ };
175
+ /** Acciones que el usuario dispara en el chrome (barras) y el panel ejecuta. */
176
+ type ChromeAction = {
177
+ action: 'select-activation';
178
+ } | {
179
+ action: 'select-step';
180
+ index: number;
181
+ } | {
182
+ action: 'add-step';
183
+ } | {
184
+ action: 'save';
185
+ exit: boolean;
186
+ } | {
187
+ action: 'exit';
188
+ } | {
189
+ action: 'dock';
190
+ position: 'top' | 'bottom';
191
+ } | {
192
+ action: 'show-panel';
193
+ } | {
194
+ action: 'preview';
195
+ } | {
196
+ action: 'exit-preview';
197
+ };
122
198
  /** Eventos que la app del cliente envía al dashboard. */
123
199
  type BuilderEvent = {
124
200
  type: 'ready';
201
+ chrome?: boolean;
202
+ } | {
203
+ type: 'chrome-action';
204
+ payload: ChromeAction;
125
205
  } | {
126
206
  type: 'picked';
127
207
  payload: PickedElement;
@@ -133,6 +213,9 @@ type BuilderEvent = {
133
213
  } | {
134
214
  type: 'block-dropped';
135
215
  payload: BlockDropPayload;
216
+ } | {
217
+ type: 'preview-status';
218
+ payload: PreviewStatus;
136
219
  } | {
137
220
  type: 'closed';
138
221
  };
@@ -147,6 +230,7 @@ type BuilderCommand = {
147
230
  type: 'preview';
148
231
  guide: PreviewGuideInput;
149
232
  editable?: boolean;
233
+ honorTrigger?: boolean;
150
234
  } | {
151
235
  type: 'block-drag';
152
236
  phase: 'move' | 'drop' | 'cancel';
@@ -158,6 +242,12 @@ type BuilderCommand = {
158
242
  type: 'close-preview';
159
243
  } | {
160
244
  type: 'teardown';
245
+ } | {
246
+ type: 'editor-state';
247
+ state: EditorChromeState;
248
+ } | {
249
+ type: 'panel-visibility';
250
+ visible: boolean;
161
251
  } | {
162
252
  type: 'panel-ready';
163
253
  };
package/dist/builder.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PreviewGuideInput } from './guide-preview-XUnTmzUO.js';
2
- export { a as PreviewHandle, b as PreviewResult, c as closeGuidePreview, p as previewGuide } from './guide-preview-XUnTmzUO.js';
1
+ import { P as PreviewGuideInput } from './guide-preview-C73rKO0u.js';
2
+ export { a as PreviewHandle, b as PreviewResult, c as closeGuidePreview, p as previewGuide } from './guide-preview-C73rKO0u.js';
3
3
 
4
4
  /** Dónde soltó el autor un bloque nuevo. */
5
5
  interface BlockDropPayload {
@@ -81,8 +81,10 @@ interface ElementPickerOptions {
81
81
  onCancel?: () => void;
82
82
  /** Niveles de ancestros del selector. Default 5 (igual que autocapture). */
83
83
  maxAncestors?: number;
84
- /** Texto del banner superior. Default en español. */
84
+ /** Título del banner superior. Default en español. */
85
85
  hint?: string;
86
+ /** Subtítulo del banner (default: cómo abrir menús con Alt + clic). */
87
+ subhint?: string;
86
88
  }
87
89
  interface ElementPickerHandle {
88
90
  /** Cierra el picker sin elegir nada. Idempotente. */
@@ -119,9 +121,87 @@ declare function stopElementPicker(): void;
119
121
  * 4. La app responde con eventos (`picked`, `pick-cancelled`, …).
120
122
  */
121
123
 
124
+ /**
125
+ * Estado que el panel (editor) publica para que el SDK pinte el "chrome" del
126
+ * editor (topbar + fila de pasos) ENCIMA de la app. El panel es la única fuente
127
+ * de verdad; el chrome solo lo refleja y devuelve `chrome-action`s.
128
+ */
129
+ interface EditorChromeState {
130
+ guideName: string;
131
+ /** ISO de creación (null = guía nueva sin guardar). */
132
+ createdAt: string | null;
133
+ steps: Array<{
134
+ id: string;
135
+ label: string;
136
+ presentation: 'floating' | 'inline';
137
+ }>;
138
+ activeStep: number;
139
+ /** Qué muestra el panel: ajustes de activación o el paso activo. */
140
+ section: 'activation' | 'step' | 'badge' | 'target';
141
+ saving: boolean;
142
+ dirty: boolean;
143
+ /**
144
+ * Estado de publicación de la guía, para que el autor vea en la barra si lo
145
+ * que edita está Activa/Borrador/etc. (sin esto, guardar una guía en borrador
146
+ * y no verla en la app era un misterio). `tone` elige el color del chip.
147
+ */
148
+ status?: {
149
+ label: string;
150
+ tone: 'live' | 'testing' | 'review' | 'draft' | 'paused';
151
+ } | null;
152
+ }
153
+ /**
154
+ * Qué está haciendo la preview en la app. El SDK lo publica cada vez que
155
+ * evalúa un comando `preview` con `honorTrigger`, para que el panel explique
156
+ * por qué la guía no se ve (retraso, elemento objetivo, otra página, otro
157
+ * dispositivo) en vez de parecer rota.
158
+ */
159
+ type PreviewStatus = {
160
+ state: 'shown';
161
+ } | {
162
+ state: 'waiting-delay';
163
+ delayMs: number;
164
+ } | {
165
+ state: 'waiting-trigger';
166
+ trigger: 'on_click' | 'on_hover';
167
+ selector: string;
168
+ } | {
169
+ state: 'page-mismatch';
170
+ pattern: string;
171
+ } | {
172
+ state: 'device-mismatch';
173
+ devices: 'desktop' | 'mobile';
174
+ };
175
+ /** Acciones que el usuario dispara en el chrome (barras) y el panel ejecuta. */
176
+ type ChromeAction = {
177
+ action: 'select-activation';
178
+ } | {
179
+ action: 'select-step';
180
+ index: number;
181
+ } | {
182
+ action: 'add-step';
183
+ } | {
184
+ action: 'save';
185
+ exit: boolean;
186
+ } | {
187
+ action: 'exit';
188
+ } | {
189
+ action: 'dock';
190
+ position: 'top' | 'bottom';
191
+ } | {
192
+ action: 'show-panel';
193
+ } | {
194
+ action: 'preview';
195
+ } | {
196
+ action: 'exit-preview';
197
+ };
122
198
  /** Eventos que la app del cliente envía al dashboard. */
123
199
  type BuilderEvent = {
124
200
  type: 'ready';
201
+ chrome?: boolean;
202
+ } | {
203
+ type: 'chrome-action';
204
+ payload: ChromeAction;
125
205
  } | {
126
206
  type: 'picked';
127
207
  payload: PickedElement;
@@ -133,6 +213,9 @@ type BuilderEvent = {
133
213
  } | {
134
214
  type: 'block-dropped';
135
215
  payload: BlockDropPayload;
216
+ } | {
217
+ type: 'preview-status';
218
+ payload: PreviewStatus;
136
219
  } | {
137
220
  type: 'closed';
138
221
  };
@@ -147,6 +230,7 @@ type BuilderCommand = {
147
230
  type: 'preview';
148
231
  guide: PreviewGuideInput;
149
232
  editable?: boolean;
233
+ honorTrigger?: boolean;
150
234
  } | {
151
235
  type: 'block-drag';
152
236
  phase: 'move' | 'drop' | 'cancel';
@@ -158,6 +242,12 @@ type BuilderCommand = {
158
242
  type: 'close-preview';
159
243
  } | {
160
244
  type: 'teardown';
245
+ } | {
246
+ type: 'editor-state';
247
+ state: EditorChromeState;
248
+ } | {
249
+ type: 'panel-visibility';
250
+ visible: boolean;
161
251
  } | {
162
252
  type: 'panel-ready';
163
253
  };
package/dist/builder.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import './chunk-JPANNXIK.mjs';
2
- import { initBuilderMode } from './chunk-AFU5ZG6Z.mjs';
3
- export { createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-AFU5ZG6Z.mjs';
4
- export { closeGuidePreview, previewGuide } from './chunk-X27GD7IT.mjs';
1
+ import './chunk-FZ72JUAR.mjs';
2
+ import { initBuilderMode } from './chunk-3ZOKCQ54.mjs';
3
+ export { createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-3ZOKCQ54.mjs';
4
+ export { closeGuidePreview, previewGuide } from './chunk-M6PB5UMW.mjs';
5
5
  import './chunk-PTG3BTJE.mjs';
6
6
 
7
7
  // src/builder.ts