veo-sdk 0.5.1 → 0.5.2

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 { attachDesignManipulator, createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-7Q7IBICO.mjs';
2
+ import './chunk-5QI3UUE5.mjs';
3
+ import './chunk-PTG3BTJE.mjs';
4
+ //# sourceMappingURL=builder-LSWVQYFZ.mjs.map
5
+ //# sourceMappingURL=builder-LSWVQYFZ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-R2BHDQZH.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-LSWVQYFZ.mjs"}
package/dist/builder.cjs CHANGED
@@ -265,6 +265,33 @@ function buildStepContent(step, doc, callbacks) {
265
265
  container.appendChild(createCloseButton(doc, () => callbacks.onDismiss()));
266
266
  return container;
267
267
  }
268
+ function buildContentNodes(step, doc) {
269
+ const blocks = normalizeBlocks(step);
270
+ if (blocks) {
271
+ return blocks.filter((b) => b.type !== "button").map((b) => buildContentBlock(b, doc)).filter((n) => n !== null);
272
+ }
273
+ const nodes = [];
274
+ if (typeof step.imageUrl === "string" && step.imageUrl && isSafeUrl(step.imageUrl)) {
275
+ const img = doc.createElement("img");
276
+ img.className = "veo-guide-image";
277
+ img.src = step.imageUrl;
278
+ img.alt = typeof step.title === "string" ? step.title : "";
279
+ nodes.push(img);
280
+ }
281
+ if (typeof step.title === "string" && step.title) {
282
+ const heading = doc.createElement("h2");
283
+ heading.className = "veo-guide-title";
284
+ heading.textContent = step.title;
285
+ nodes.push(heading);
286
+ }
287
+ if (typeof step.content === "string" && step.content) {
288
+ const paragraph = doc.createElement("p");
289
+ paragraph.className = "veo-guide-text";
290
+ paragraph.textContent = step.content;
291
+ nodes.push(paragraph);
292
+ }
293
+ return nodes;
294
+ }
268
295
  function renderLegacyStep(container, step, doc, callbacks) {
269
296
  if (typeof step.imageUrl === "string" && step.imageUrl && isSafeUrl(step.imageUrl)) {
270
297
  const img = doc.createElement("img");
@@ -830,6 +857,18 @@ var GUIDE_STYLES = `
830
857
  .veo-guide-text em { font-style: italic; }
831
858
  .veo-guide-text u { text-decoration: underline; }
832
859
  .veo-guide-text s { text-decoration: line-through; }
860
+ /*
861
+ * El \xDALTIMO bloque de contenido no deja su margin-bottom colgando: ese margen
862
+ * existe para separar del bloque SIGUIENTE, y sin siguiente se suma al padding
863
+ * de la tarjeta y parece un "hueco fantasma" (p.ej. quitar el bot\xF3n de un
864
+ * tooltip dejaba el espacio como si siguiera ah\xED). El pen\xFAltimo hijo es el
865
+ * \xFAltimo bloque real (el \u2715 de cerrar siempre va \xFAltimo y es absoluto). La
866
+ * mayor especificidad le gana a las reglas por clase, pero NO a un margen
867
+ * inline elegido expl\xEDcitamente por el autor (block.style.marginBottom).
868
+ */
869
+ .veo-guide-content > :nth-last-child(2) {
870
+ margin-bottom: 0;
871
+ }
833
872
  .veo-guide-actions {
834
873
  display: flex; gap: 8px; justify-content: var(--veo-actions-justify);
835
874
  }
@@ -1447,24 +1486,8 @@ function buildWalkthroughStepContent(step, stepIndex, totalSteps, doc, callbacks
1447
1486
  progress.appendChild(dot);
1448
1487
  }
1449
1488
  container.appendChild(progress);
1450
- if (typeof step.imageUrl === "string" && step.imageUrl && isSafeUrl(step.imageUrl)) {
1451
- const img = doc.createElement("img");
1452
- img.className = "veo-guide-image";
1453
- img.src = step.imageUrl;
1454
- img.alt = typeof step.title === "string" ? step.title : "";
1455
- container.appendChild(img);
1456
- }
1457
- if (typeof step.title === "string" && step.title) {
1458
- const heading = doc.createElement("h2");
1459
- heading.className = "veo-guide-title";
1460
- heading.textContent = step.title;
1461
- container.appendChild(heading);
1462
- }
1463
- if (typeof step.content === "string" && step.content) {
1464
- const paragraph = doc.createElement("p");
1465
- paragraph.className = "veo-guide-text";
1466
- paragraph.textContent = step.content;
1467
- container.appendChild(paragraph);
1489
+ for (const node of buildContentNodes(step, doc)) {
1490
+ container.appendChild(node);
1468
1491
  }
1469
1492
  const actions = doc.createElement("div");
1470
1493
  actions.className = "veo-walkthrough-actions";