veo-sdk 0.3.12 → 0.3.15

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.
package/dist/builder.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import './chunk-HOF4GU5I.mjs';
2
- import { initBuilderMode } from './chunk-US3RVEXR.mjs';
3
- export { createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-US3RVEXR.mjs';
4
- export { closeGuidePreview, previewGuide } from './chunk-QSMHZVDK.mjs';
1
+ import './chunk-WVLVN422.mjs';
2
+ import { initBuilderMode } from './chunk-EF4BZR5R.mjs';
3
+ export { createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-EF4BZR5R.mjs';
4
+ export { closeGuidePreview, previewGuide } from './chunk-2INDL77W.mjs';
5
5
  import './chunk-PTG3BTJE.mjs';
6
6
 
7
7
  // src/builder.ts
@@ -475,6 +475,15 @@ function applyDesignVars(host, style) {
475
475
  host.style.setProperty(key, value);
476
476
  }
477
477
  }
478
+ if (typeof s.background === "string" && COLOR_RE.test(s.background.trim())) {
479
+ host.style.setProperty("--veo-bg", s.background.trim());
480
+ }
481
+ if (typeof s.textColor === "string" && COLOR_RE.test(s.textColor.trim())) {
482
+ host.style.setProperty("--veo-text", s.textColor.trim());
483
+ }
484
+ if (typeof s.textSecondaryColor === "string" && COLOR_RE.test(s.textSecondaryColor.trim())) {
485
+ host.style.setProperty("--veo-text-secondary", s.textSecondaryColor.trim());
486
+ }
478
487
  if (typeof s.radius === "number" && Number.isFinite(s.radius)) {
479
488
  host.style.setProperty("--veo-radius", `${clamp(s.radius, 0, 48)}px`);
480
489
  }
@@ -516,10 +525,26 @@ function applyDesignVars(host, style) {
516
525
  applyElementVars(host, "title", el.title);
517
526
  applyElementVars(host, "text", el.text);
518
527
  applyElementVars(host, "image", el.image);
519
- const cta = el.cta;
520
- if (cta && typeof cta.align === "string" && ALIGN_JUSTIFY[cta.align]) {
521
- host.style.setProperty("--veo-actions-justify", ALIGN_JUSTIFY[cta.align]);
522
- }
528
+ applyCtaVars(host, el.cta);
529
+ }
530
+ }
531
+ function applyCtaVars(host, raw) {
532
+ if (!raw || typeof raw !== "object") return;
533
+ const cta = raw;
534
+ if (typeof cta.align === "string" && ALIGN_JUSTIFY[cta.align]) {
535
+ host.style.setProperty("--veo-actions-justify", ALIGN_JUSTIFY[cta.align]);
536
+ }
537
+ if (typeof cta.background === "string" && COLOR_RE.test(cta.background.trim())) {
538
+ host.style.setProperty("--veo-cta-bg", cta.background.trim());
539
+ }
540
+ if (typeof cta.color === "string" && COLOR_RE.test(cta.color.trim())) {
541
+ host.style.setProperty("--veo-cta-color", cta.color.trim());
542
+ }
543
+ if (typeof cta.fontSize === "number" && Number.isFinite(cta.fontSize)) {
544
+ host.style.setProperty("--veo-cta-size", `${clamp(cta.fontSize, 10, 24)}px`);
545
+ }
546
+ if (typeof cta.radius === "number" && Number.isFinite(cta.radius)) {
547
+ host.style.setProperty("--veo-cta-radius", `${clamp(cta.radius, 0, 48)}px`);
523
548
  }
524
549
  }
525
550
  function applyElementVars(host, prefix, raw) {
@@ -553,7 +578,7 @@ function applyElementVars(host, prefix, raw) {
553
578
  // src/plugins/guides/styles.ts
554
579
  var GUIDE_STYLES = `
555
580
  :host {
556
- --veo-primary: #4f46e5;
581
+ --veo-primary: #FF5B35;
557
582
  --veo-text: #1f2937;
558
583
  --veo-text-secondary: #4b5563;
559
584
  --veo-bg: #ffffff;
@@ -671,9 +696,10 @@ var GUIDE_STYLES = `
671
696
  display: flex; gap: 8px; justify-content: var(--veo-actions-justify);
672
697
  }
673
698
  .veo-guide-cta {
674
- background: var(--veo-primary); color: #fff; border: none;
675
- padding: 9px 18px; border-radius: 8px;
676
- font-size: 14px; font-weight: 500; cursor: pointer;
699
+ background: var(--veo-cta-bg, var(--veo-primary));
700
+ color: var(--veo-cta-color, #fff); border: none;
701
+ padding: 9px 18px; border-radius: var(--veo-cta-radius, 8px);
702
+ font-size: var(--veo-cta-size, 14px); font-weight: 500; cursor: pointer;
677
703
  transition: opacity 120ms ease;
678
704
  }
679
705
  .veo-guide-cta:hover { opacity: 0.9; }
@@ -686,6 +712,24 @@ var GUIDE_STYLES = `
686
712
  cursor: pointer; color: #9ca3af; padding: 0;
687
713
  }
688
714
  .veo-guide-close:hover { color: var(--veo-text); }
715
+ /*
716
+ * Si el PRIMER bloque es una imagen, la \u2715 quedar\xEDa sobre la esquina de la foto
717
+ * (invisible seg\xFAn el color). En ese caso pasa a ser una pastilla flotante con
718
+ * fondo propio, legible sobre cualquier imagen. (Sin soporte de :has() queda el
719
+ * estilo base \u2014 mismo comportamiento de antes, sin regresi\xF3n.)
720
+ */
721
+ .veo-guide-content:has(> .veo-guide-image:first-child) > .veo-guide-close {
722
+ top: 2px; right: 2px;
723
+ display: flex; align-items: center; justify-content: center;
724
+ font-size: 16px; color: #374151;
725
+ background: rgba(255, 255, 255, 0.92);
726
+ border: 1px solid rgba(0, 0, 0, 0.08);
727
+ border-radius: 50%;
728
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
729
+ }
730
+ .veo-guide-content:has(> .veo-guide-image:first-child) > .veo-guide-close:hover {
731
+ color: #111827;
732
+ }
689
733
 
690
734
  .veo-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
691
735
  .veo-form-field { display: flex; flex-direction: column; gap: 6px; }
@@ -978,7 +1022,7 @@ function mountCustomFrame(doc, step, context, opts) {
978
1022
  const iframe = doc.createElement("iframe");
979
1023
  iframe.className = "veo-custom-frame";
980
1024
  iframe.setAttribute("sandbox", "allow-scripts");
981
- iframe.setAttribute("title", context.guide.guideName || "Veo");
1025
+ iframe.setAttribute("title", context.guide.guideName || "OnUser");
982
1026
  iframe.style.width = opts.width;
983
1027
  const hasFixedHeight = opts.fixedHeight !== void 0 && opts.fixedHeight !== null;
984
1028
  if (hasFixedHeight) iframe.style.height = toCssSize(opts.fixedHeight);
@@ -1238,7 +1282,7 @@ function mountFormContent(card, context, doc) {
1238
1282
  const empty = value === void 0 || value === null || value === "";
1239
1283
  if (empty) {
1240
1284
  if (field.required) {
1241
- error.textContent = `Complet\xE1 "${field.label}"`;
1285
+ error.textContent = `Completa "${field.label}"`;
1242
1286
  error.style.display = "block";
1243
1287
  return;
1244
1288
  }
@@ -1247,7 +1291,7 @@ function mountFormContent(card, context, doc) {
1247
1291
  answers[field.key] = value;
1248
1292
  }
1249
1293
  if (Object.keys(answers).length === 0) {
1250
- error.textContent = "Respond\xE9 al menos un campo";
1294
+ error.textContent = "Responde al menos un campo";
1251
1295
  error.style.display = "block";
1252
1296
  return;
1253
1297
  }
@@ -1256,7 +1300,7 @@ function mountFormContent(card, context, doc) {
1256
1300
  void submitFn(answers).then((ok) => {
1257
1301
  if (!ok) {
1258
1302
  submit.disabled = false;
1259
- error.textContent = "No se pudo enviar. Prob\xE1 de nuevo.";
1303
+ error.textContent = "No se pudo enviar. Prueba de nuevo.";
1260
1304
  error.style.display = "block";
1261
1305
  return;
1262
1306
  }
@@ -1315,7 +1359,7 @@ function buildField(field, doc) {
1315
1359
  select.className = "veo-form-input";
1316
1360
  const blank = doc.createElement("option");
1317
1361
  blank.value = "";
1318
- blank.textContent = field.placeholder || "Eleg\xED una opci\xF3n\u2026";
1362
+ blank.textContent = field.placeholder || "Elige una opci\xF3n\u2026";
1319
1363
  select.appendChild(blank);
1320
1364
  for (const opt of field.options ?? []) {
1321
1365
  const option = doc.createElement("option");
@@ -2098,5 +2142,5 @@ function buildSelectorPath(element, maxAncestors = 5) {
2098
2142
  }
2099
2143
 
2100
2144
  export { ALWAYS_BLOCK_SELECTORS, BannerRenderer, CustomRenderer, DEFAULT_AUTOCAPTURE_CONFIG, DEFAULT_TRACKER_BATCH_SIZE, DEFAULT_TRACKER_FLUSH_INTERVAL_MS, DEFAULT_TRACKER_MAX_RETRIES, FREQUENCY_CACHE_KEY_PREFIX, FREQUENCY_CACHE_MAX_ENTRIES, FREQUENCY_CACHE_TTL_MS, FormRenderer, InlineCustomRenderer, InlineFormRenderer, InlineRenderer, MAX_ANCESTORS, ModalRenderer, PRIORITY_ATTRIBUTES, SENSITIVE_ATTRIBUTES, TooltipRenderer, WALKTHROUGH_ABANDONMENT_TIMEOUT_MS, WALKTHROUGH_STATE_KEY_PREFIX, WalkthroughRenderer, buildSelectorPath, clearBuilderToken, closeGuidePreview, filterHumanClasses, hasDocument, hasLocalStorage, hasNavigatorSendBeacon, hasWindow, isBuilderMode, previewGuide, resolveBuilderContext, resolveBuilderToken, uuidv7 };
2101
- //# sourceMappingURL=chunk-QSMHZVDK.mjs.map
2102
- //# sourceMappingURL=chunk-QSMHZVDK.mjs.map
2145
+ //# sourceMappingURL=chunk-2INDL77W.mjs.map
2146
+ //# sourceMappingURL=chunk-2INDL77W.mjs.map