veo-sdk 0.3.7 → 0.3.8

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.
@@ -0,0 +1,5 @@
1
+ export { createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-T4BZ53QV.mjs';
2
+ import './chunk-E2KQJBUT.mjs';
3
+ import './chunk-PTG3BTJE.mjs';
4
+ //# sourceMappingURL=builder-YYMD7MNK.mjs.map
5
+ //# sourceMappingURL=builder-YYMD7MNK.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-7MBMYL26.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-YYMD7MNK.mjs"}
package/dist/builder.cjs CHANGED
@@ -207,11 +207,17 @@ function renderBlocks(container, blocks, doc, callbacks) {
207
207
  if (block?.type === "button") {
208
208
  const actions = doc.createElement("div");
209
209
  actions.className = "veo-guide-actions";
210
+ let rowAlign;
210
211
  while (i < blocks.length && blocks[i]?.type === "button") {
211
212
  const btnBlock = blocks[i];
213
+ if (!rowAlign) {
214
+ const a = btnBlock.style?.align;
215
+ if (a === "left" || a === "center" || a === "right") rowAlign = a;
216
+ }
212
217
  actions.appendChild(buildButtonBlock(btnBlock, doc, callbacks));
213
218
  i++;
214
219
  }
220
+ if (rowAlign) actions.style.justifyContent = BLOCK_ALIGN_SELF[rowAlign];
215
221
  container.appendChild(actions);
216
222
  continue;
217
223
  }
@@ -276,7 +282,7 @@ function applyBlockStyle(el, style, kind) {
276
282
  const align = typeof s.align === "string" ? s.align : null;
277
283
  if (align && (align === "left" || align === "center" || align === "right")) {
278
284
  if (kind === "text") el.style.textAlign = align;
279
- else el.style.alignSelf = BLOCK_ALIGN_SELF[align];
285
+ else if (kind === "image") el.style.alignSelf = BLOCK_ALIGN_SELF[align];
280
286
  }
281
287
  if (kind !== "image" && typeof s.color === "string") el.style.color = s.color;
282
288
  if (kind === "text" && typeof s.fontSize === "number" && Number.isFinite(s.fontSize)) {
@@ -614,6 +620,12 @@ var GUIDE_STYLES = `
614
620
  position: relative;
615
621
  display: flex; flex-direction: column;
616
622
  }
623
+ /* Reserva espacio para la \u2715 (esquina sup. derecha) SOLO en el primer bloque:
624
+ as\xED el texto alineado a la derecha no queda tapado por el bot\xF3n de cerrar. */
625
+ .veo-guide-content > .veo-guide-title:first-child,
626
+ .veo-guide-content > .veo-guide-text:first-child {
627
+ padding-right: 20px;
628
+ }
617
629
  .veo-guide-image {
618
630
  display: block;
619
631
  width: var(--veo-image-width, 100%);
@@ -1648,6 +1660,8 @@ var TooltipRenderer = class extends BaseRenderer {
1648
1660
  if (typeof selector !== "string" || selector.length === 0) return;
1649
1661
  const anchor = await waitForElement(selector);
1650
1662
  if (!anchor) return;
1663
+ const rawSide = step.style?.tooltipPlacement;
1664
+ const side = rawSide === "top" || rawSide === "left" || rawSide === "right" ? rawSide : "bottom";
1651
1665
  const { root } = this.createHost();
1652
1666
  this.applyDesign(step.style);
1653
1667
  const ownerDocument = root.ownerDocument ?? document;
@@ -1675,7 +1689,7 @@ var TooltipRenderer = class extends BaseRenderer {
1675
1689
  root.appendChild(tooltip);
1676
1690
  const updatePosition = async () => {
1677
1691
  const { x, y, placement, middlewareData } = await dom.computePosition(anchor, tooltip, {
1678
- placement: "bottom",
1692
+ placement: side,
1679
1693
  middleware: [dom.offset(10), dom.flip(), dom.shift({ padding: 8 }), dom.arrow({ element: arrowEl })]
1680
1694
  });
1681
1695
  tooltip.style.left = `${x}px`;
@@ -1707,6 +1721,8 @@ var WalkthroughRenderer = class extends BaseRenderer {
1707
1721
  if (typeof selector !== "string" || selector.length === 0) return false;
1708
1722
  const anchor = await waitForElement(selector, WALKTHROUGH_STEP_SELECTOR_TIMEOUT_MS);
1709
1723
  if (!anchor) return false;
1724
+ const rawSide = step.style?.tooltipPlacement;
1725
+ const side = rawSide === "top" || rawSide === "left" || rawSide === "right" ? rawSide : "bottom";
1710
1726
  const { root } = this.createHost();
1711
1727
  this.applyDesign(step.style);
1712
1728
  const ownerDocument = root.ownerDocument ?? document;
@@ -1726,7 +1742,7 @@ var WalkthroughRenderer = class extends BaseRenderer {
1726
1742
  root.appendChild(tooltip);
1727
1743
  const updatePosition = async () => {
1728
1744
  const { x, y, placement, middlewareData } = await dom.computePosition(anchor, tooltip, {
1729
- placement: "bottom",
1745
+ placement: side,
1730
1746
  middleware: [dom.offset(10), dom.flip(), dom.shift({ padding: 8 }), dom.arrow({ element: arrowEl })]
1731
1747
  });
1732
1748
  tooltip.style.left = `${x}px`;