veo-sdk 0.3.16 → 0.4.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.
@@ -1,5 +1,37 @@
1
- import { P as PreviewGuideInput } from './guide-preview-DewCTa-B.cjs';
2
- export { a as PreviewHandle, b as PreviewResult, c as closeGuidePreview, p as previewGuide } from './guide-preview-DewCTa-B.cjs';
1
+ import { P as PreviewGuideInput } from './guide-preview-D_xhRVLe.cjs';
2
+ export { a as PreviewHandle, b as PreviewResult, c as closeGuidePreview, p as previewGuide } from './guide-preview-D_xhRVLe.cjs';
3
+
4
+ /**
5
+ * Manipulación DIRECTA del diseño en modo editor: arrastrar la tarjeta de una
6
+ * modal para posicionarla, redimensionarla desde bordes/esquinas, y arrastrar
7
+ * un banner para alternar top/bottom. Vive en el bundle builder (veo-builder.js)
8
+ * — el runtime de guías no carga nada de esto.
9
+ *
10
+ * Funciona como DECORATOR: se adjunta DESPUÉS del render sobre el shadow root
11
+ * abierto del host de la guía (no toca los renderers). Durante el gesto aplica
12
+ * las variables CSS localmente (feedback a 60fps, sin postMessage); al soltar
13
+ * (`pointerup`) emite UN `onCommit(patch)` con los valores finales, que el
14
+ * builder-mode postea al panel como `design-updated`. El panel actualiza su
15
+ * estado y re-manda `preview` — que entra por el update in-place con las
16
+ * MISMAS variables → no hay loop ni parpadeo.
17
+ *
18
+ * Geometría del modal (ver styles.ts): la card usa `left: posX%` +
19
+ * `translate(-posX%)`, o sea `cardLeft = posX * (viewportW - cardW)` →
20
+ * `posX = cardLeft / (viewportW - cardW)`. Mismo modelo que serializa el
21
+ * dashboard (`style.posX/posY` en 0..1) y consume `applyDesignVars`.
22
+ */
23
+
24
+ /** Merge superficial sobre `step.style` del paso activo (lo aplica el panel). */
25
+ interface DesignPatch {
26
+ stepIndex: number;
27
+ style: {
28
+ posX?: number;
29
+ posY?: number;
30
+ width?: number;
31
+ height?: number;
32
+ position?: 'top' | 'bottom';
33
+ };
34
+ }
3
35
 
4
36
  /**
5
37
  * Element picker — el "inspeccionar" del navegador, pero del SDK. Corre
@@ -86,6 +118,9 @@ type BuilderEvent = {
86
118
  payload: PickedElement;
87
119
  } | {
88
120
  type: 'pick-cancelled';
121
+ } | {
122
+ type: 'design-updated';
123
+ payload: DesignPatch;
89
124
  } | {
90
125
  type: 'closed';
91
126
  };
@@ -99,6 +134,7 @@ type BuilderCommand = {
99
134
  } | {
100
135
  type: 'preview';
101
136
  guide: PreviewGuideInput;
137
+ editable?: boolean;
102
138
  } | {
103
139
  type: 'close-preview';
104
140
  } | {
package/dist/builder.d.ts CHANGED
@@ -1,5 +1,37 @@
1
- import { P as PreviewGuideInput } from './guide-preview-DewCTa-B.js';
2
- export { a as PreviewHandle, b as PreviewResult, c as closeGuidePreview, p as previewGuide } from './guide-preview-DewCTa-B.js';
1
+ import { P as PreviewGuideInput } from './guide-preview-D_xhRVLe.js';
2
+ export { a as PreviewHandle, b as PreviewResult, c as closeGuidePreview, p as previewGuide } from './guide-preview-D_xhRVLe.js';
3
+
4
+ /**
5
+ * Manipulación DIRECTA del diseño en modo editor: arrastrar la tarjeta de una
6
+ * modal para posicionarla, redimensionarla desde bordes/esquinas, y arrastrar
7
+ * un banner para alternar top/bottom. Vive en el bundle builder (veo-builder.js)
8
+ * — el runtime de guías no carga nada de esto.
9
+ *
10
+ * Funciona como DECORATOR: se adjunta DESPUÉS del render sobre el shadow root
11
+ * abierto del host de la guía (no toca los renderers). Durante el gesto aplica
12
+ * las variables CSS localmente (feedback a 60fps, sin postMessage); al soltar
13
+ * (`pointerup`) emite UN `onCommit(patch)` con los valores finales, que el
14
+ * builder-mode postea al panel como `design-updated`. El panel actualiza su
15
+ * estado y re-manda `preview` — que entra por el update in-place con las
16
+ * MISMAS variables → no hay loop ni parpadeo.
17
+ *
18
+ * Geometría del modal (ver styles.ts): la card usa `left: posX%` +
19
+ * `translate(-posX%)`, o sea `cardLeft = posX * (viewportW - cardW)` →
20
+ * `posX = cardLeft / (viewportW - cardW)`. Mismo modelo que serializa el
21
+ * dashboard (`style.posX/posY` en 0..1) y consume `applyDesignVars`.
22
+ */
23
+
24
+ /** Merge superficial sobre `step.style` del paso activo (lo aplica el panel). */
25
+ interface DesignPatch {
26
+ stepIndex: number;
27
+ style: {
28
+ posX?: number;
29
+ posY?: number;
30
+ width?: number;
31
+ height?: number;
32
+ position?: 'top' | 'bottom';
33
+ };
34
+ }
3
35
 
4
36
  /**
5
37
  * Element picker — el "inspeccionar" del navegador, pero del SDK. Corre
@@ -86,6 +118,9 @@ type BuilderEvent = {
86
118
  payload: PickedElement;
87
119
  } | {
88
120
  type: 'pick-cancelled';
121
+ } | {
122
+ type: 'design-updated';
123
+ payload: DesignPatch;
89
124
  } | {
90
125
  type: 'closed';
91
126
  };
@@ -99,6 +134,7 @@ type BuilderCommand = {
99
134
  } | {
100
135
  type: 'preview';
101
136
  guide: PreviewGuideInput;
137
+ editable?: boolean;
102
138
  } | {
103
139
  type: 'close-preview';
104
140
  } | {
package/dist/builder.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import './chunk-IEHGG5NL.mjs';
2
- import { initBuilderMode } from './chunk-QCIT7CGE.mjs';
3
- export { createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-QCIT7CGE.mjs';
4
- export { closeGuidePreview, previewGuide } from './chunk-YHUPUTWH.mjs';
1
+ import './chunk-KLN46YQI.mjs';
2
+ import { initBuilderMode } from './chunk-ULH64GMX.mjs';
3
+ export { createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-ULH64GMX.mjs';
4
+ export { closeGuidePreview, previewGuide } from './chunk-F2ZWZUTR.mjs';
5
5
  import './chunk-PTG3BTJE.mjs';
6
6
 
7
7
  // src/builder.ts