veo-sdk 0.3.11 → 0.3.14

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-B6S4V5Q5.mjs';
2
+ import './chunk-3WJDFE7Q.mjs';
3
+ import './chunk-PTG3BTJE.mjs';
4
+ //# sourceMappingURL=builder-4YBB3RSZ.mjs.map
5
+ //# sourceMappingURL=builder-4YBB3RSZ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-V4OZGEVP.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-4YBB3RSZ.mjs"}
package/dist/builder.cjs CHANGED
@@ -455,6 +455,15 @@ function applyDesignVars(host, style) {
455
455
  host.style.setProperty(key, value);
456
456
  }
457
457
  }
458
+ if (typeof s.background === "string" && COLOR_RE.test(s.background.trim())) {
459
+ host.style.setProperty("--veo-bg", s.background.trim());
460
+ }
461
+ if (typeof s.textColor === "string" && COLOR_RE.test(s.textColor.trim())) {
462
+ host.style.setProperty("--veo-text", s.textColor.trim());
463
+ }
464
+ if (typeof s.textSecondaryColor === "string" && COLOR_RE.test(s.textSecondaryColor.trim())) {
465
+ host.style.setProperty("--veo-text-secondary", s.textSecondaryColor.trim());
466
+ }
458
467
  if (typeof s.radius === "number" && Number.isFinite(s.radius)) {
459
468
  host.style.setProperty("--veo-radius", `${clamp(s.radius, 0, 48)}px`);
460
469
  }
@@ -496,10 +505,26 @@ function applyDesignVars(host, style) {
496
505
  applyElementVars(host, "title", el.title);
497
506
  applyElementVars(host, "text", el.text);
498
507
  applyElementVars(host, "image", el.image);
499
- const cta = el.cta;
500
- if (cta && typeof cta.align === "string" && ALIGN_JUSTIFY[cta.align]) {
501
- host.style.setProperty("--veo-actions-justify", ALIGN_JUSTIFY[cta.align]);
502
- }
508
+ applyCtaVars(host, el.cta);
509
+ }
510
+ }
511
+ function applyCtaVars(host, raw) {
512
+ if (!raw || typeof raw !== "object") return;
513
+ const cta = raw;
514
+ if (typeof cta.align === "string" && ALIGN_JUSTIFY[cta.align]) {
515
+ host.style.setProperty("--veo-actions-justify", ALIGN_JUSTIFY[cta.align]);
516
+ }
517
+ if (typeof cta.background === "string" && COLOR_RE.test(cta.background.trim())) {
518
+ host.style.setProperty("--veo-cta-bg", cta.background.trim());
519
+ }
520
+ if (typeof cta.color === "string" && COLOR_RE.test(cta.color.trim())) {
521
+ host.style.setProperty("--veo-cta-color", cta.color.trim());
522
+ }
523
+ if (typeof cta.fontSize === "number" && Number.isFinite(cta.fontSize)) {
524
+ host.style.setProperty("--veo-cta-size", `${clamp(cta.fontSize, 10, 24)}px`);
525
+ }
526
+ if (typeof cta.radius === "number" && Number.isFinite(cta.radius)) {
527
+ host.style.setProperty("--veo-cta-radius", `${clamp(cta.radius, 0, 48)}px`);
503
528
  }
504
529
  }
505
530
  function applyElementVars(host, prefix, raw) {
@@ -533,7 +558,7 @@ function applyElementVars(host, prefix, raw) {
533
558
  // src/plugins/guides/styles.ts
534
559
  var GUIDE_STYLES = `
535
560
  :host {
536
- --veo-primary: #4f46e5;
561
+ --veo-primary: #FF5B35;
537
562
  --veo-text: #1f2937;
538
563
  --veo-text-secondary: #4b5563;
539
564
  --veo-bg: #ffffff;
@@ -651,9 +676,10 @@ var GUIDE_STYLES = `
651
676
  display: flex; gap: 8px; justify-content: var(--veo-actions-justify);
652
677
  }
653
678
  .veo-guide-cta {
654
- background: var(--veo-primary); color: #fff; border: none;
655
- padding: 9px 18px; border-radius: 8px;
656
- font-size: 14px; font-weight: 500; cursor: pointer;
679
+ background: var(--veo-cta-bg, var(--veo-primary));
680
+ color: var(--veo-cta-color, #fff); border: none;
681
+ padding: 9px 18px; border-radius: var(--veo-cta-radius, 8px);
682
+ font-size: var(--veo-cta-size, 14px); font-weight: 500; cursor: pointer;
657
683
  transition: opacity 120ms ease;
658
684
  }
659
685
  .veo-guide-cta:hover { opacity: 0.9; }
@@ -958,7 +984,7 @@ function mountCustomFrame(doc, step, context, opts) {
958
984
  const iframe = doc.createElement("iframe");
959
985
  iframe.className = "veo-custom-frame";
960
986
  iframe.setAttribute("sandbox", "allow-scripts");
961
- iframe.setAttribute("title", context.guide.guideName || "Veo");
987
+ iframe.setAttribute("title", context.guide.guideName || "OnUser");
962
988
  iframe.style.width = opts.width;
963
989
  const hasFixedHeight = opts.fixedHeight !== void 0 && opts.fixedHeight !== null;
964
990
  if (hasFixedHeight) iframe.style.height = toCssSize(opts.fixedHeight);
@@ -1069,7 +1095,11 @@ function buildSrcdoc(html, css, js, token, opts) {
1069
1095
  // html{height:100%}, fondo del layout…) que en un iframe embebido lo estirarían a
1070
1096
  // toda la pantalla (caja negra) en vez de ajustarse al contenido. Neutralizamos
1071
1097
  // tamaño/fondo/overflow (mantenemos color y fuente heredados de la app).
1072
- "<style>html,body{margin:0!important;padding:0!important;background:transparent!important;height:auto!important;min-height:0!important;max-height:none!important;width:auto!important;min-width:0!important;overflow:visible!important;}</style>" + tailwind + // Inline en <body>: gana incluso sobre reglas `!important` de la app (p. ej.
1098
+ // `color-scheme:normal` es CLAVE para la transparencia: si el CSS de la app
1099
+ // declara `:root{color-scheme:dark}` y no coincide con el del elemento iframe
1100
+ // del host (normal), el navegador pinta el canvas OPACO (negro) en vez de
1101
+ // transparente — igualamos ambos lados para conservar el fondo transparente.
1102
+ "<style>html,body{margin:0!important;padding:0!important;background:transparent!important;height:auto!important;min-height:0!important;max-height:none!important;width:auto!important;min-width:0!important;overflow:visible!important;color-scheme:normal!important;}</style>" + tailwind + // Inline en <body>: gana incluso sobre reglas `!important` de la app (p. ej.
1073
1103
  // `.dark body{background:#000!important}`) porque el estilo inline tiene la
1074
1104
  // mayor especificidad dentro de la capa important-author.
1075
1105
  `<style>${escapeClosing(css, "style")}</style></head><body style="margin:0!important;background:transparent!important;min-height:0!important;height:auto!important;"><div id="__veo_root">${html}</div><script>${bridge}</script>` + (js ? `<script>${escapeClosing(js, "script")}</script>` : "") + "</body></html>"
@@ -1973,7 +2003,7 @@ function injectBuilderPanel(opts) {
1973
2003
  header.className = "veo-panel-header";
1974
2004
  const title = document.createElement("span");
1975
2005
  title.className = "veo-panel-title";
1976
- title.textContent = "Veo \xB7 Editor";
2006
+ title.textContent = "OnUser \xB7 Editor";
1977
2007
  const actions = document.createElement("div");
1978
2008
  actions.className = "veo-panel-actions";
1979
2009
  const popout = document.createElement("button");
@@ -2105,7 +2135,7 @@ var PANEL_CSS = `
2105
2135
  flex: 0 0 auto;
2106
2136
  display: flex; align-items: center; justify-content: space-between;
2107
2137
  padding: 8px 10px 8px 12px;
2108
- background: #0f172a; color: #fff;
2138
+ background: #1b1714; color: #f7f1eb;
2109
2139
  font-size: 13px; font-weight: 600;
2110
2140
  cursor: grab;
2111
2141
  }