veo-sdk 0.3.12 → 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.
package/dist/index.cjs CHANGED
@@ -659,6 +659,15 @@ function applyDesignVars(host, style) {
659
659
  host.style.setProperty(key, value);
660
660
  }
661
661
  }
662
+ if (typeof s.background === "string" && COLOR_RE.test(s.background.trim())) {
663
+ host.style.setProperty("--veo-bg", s.background.trim());
664
+ }
665
+ if (typeof s.textColor === "string" && COLOR_RE.test(s.textColor.trim())) {
666
+ host.style.setProperty("--veo-text", s.textColor.trim());
667
+ }
668
+ if (typeof s.textSecondaryColor === "string" && COLOR_RE.test(s.textSecondaryColor.trim())) {
669
+ host.style.setProperty("--veo-text-secondary", s.textSecondaryColor.trim());
670
+ }
662
671
  if (typeof s.radius === "number" && Number.isFinite(s.radius)) {
663
672
  host.style.setProperty("--veo-radius", `${clamp(s.radius, 0, 48)}px`);
664
673
  }
@@ -700,10 +709,26 @@ function applyDesignVars(host, style) {
700
709
  applyElementVars(host, "title", el.title);
701
710
  applyElementVars(host, "text", el.text);
702
711
  applyElementVars(host, "image", el.image);
703
- const cta = el.cta;
704
- if (cta && typeof cta.align === "string" && ALIGN_JUSTIFY[cta.align]) {
705
- host.style.setProperty("--veo-actions-justify", ALIGN_JUSTIFY[cta.align]);
706
- }
712
+ applyCtaVars(host, el.cta);
713
+ }
714
+ }
715
+ function applyCtaVars(host, raw) {
716
+ if (!raw || typeof raw !== "object") return;
717
+ const cta = raw;
718
+ if (typeof cta.align === "string" && ALIGN_JUSTIFY[cta.align]) {
719
+ host.style.setProperty("--veo-actions-justify", ALIGN_JUSTIFY[cta.align]);
720
+ }
721
+ if (typeof cta.background === "string" && COLOR_RE.test(cta.background.trim())) {
722
+ host.style.setProperty("--veo-cta-bg", cta.background.trim());
723
+ }
724
+ if (typeof cta.color === "string" && COLOR_RE.test(cta.color.trim())) {
725
+ host.style.setProperty("--veo-cta-color", cta.color.trim());
726
+ }
727
+ if (typeof cta.fontSize === "number" && Number.isFinite(cta.fontSize)) {
728
+ host.style.setProperty("--veo-cta-size", `${clamp(cta.fontSize, 10, 24)}px`);
729
+ }
730
+ if (typeof cta.radius === "number" && Number.isFinite(cta.radius)) {
731
+ host.style.setProperty("--veo-cta-radius", `${clamp(cta.radius, 0, 48)}px`);
707
732
  }
708
733
  }
709
734
  function applyElementVars(host, prefix, raw) {
@@ -785,7 +810,7 @@ var init_styles = __esm({
785
810
  init_constants2();
786
811
  GUIDE_STYLES = `
787
812
  :host {
788
- --veo-primary: #4f46e5;
813
+ --veo-primary: #FF5B35;
789
814
  --veo-text: #1f2937;
790
815
  --veo-text-secondary: #4b5563;
791
816
  --veo-bg: #ffffff;
@@ -903,9 +928,10 @@ var init_styles = __esm({
903
928
  display: flex; gap: 8px; justify-content: var(--veo-actions-justify);
904
929
  }
905
930
  .veo-guide-cta {
906
- background: var(--veo-primary); color: #fff; border: none;
907
- padding: 9px 18px; border-radius: 8px;
908
- font-size: 14px; font-weight: 500; cursor: pointer;
931
+ background: var(--veo-cta-bg, var(--veo-primary));
932
+ color: var(--veo-cta-color, #fff); border: none;
933
+ padding: 9px 18px; border-radius: var(--veo-cta-radius, 8px);
934
+ font-size: var(--veo-cta-size, 14px); font-weight: 500; cursor: pointer;
909
935
  transition: opacity 120ms ease;
910
936
  }
911
937
  .veo-guide-cta:hover { opacity: 0.9; }
@@ -1209,7 +1235,7 @@ function mountCustomFrame(doc, step, context, opts) {
1209
1235
  const iframe = doc.createElement("iframe");
1210
1236
  iframe.className = "veo-custom-frame";
1211
1237
  iframe.setAttribute("sandbox", "allow-scripts");
1212
- iframe.setAttribute("title", context.guide.guideName || "Veo");
1238
+ iframe.setAttribute("title", context.guide.guideName || "OnUser");
1213
1239
  iframe.style.width = opts.width;
1214
1240
  const hasFixedHeight = opts.fixedHeight !== void 0 && opts.fixedHeight !== null;
1215
1241
  if (hasFixedHeight) iframe.style.height = toCssSize(opts.fixedHeight);
@@ -2329,7 +2355,7 @@ function injectBuilderPanel(opts) {
2329
2355
  header.className = "veo-panel-header";
2330
2356
  const title = document.createElement("span");
2331
2357
  title.className = "veo-panel-title";
2332
- title.textContent = "Veo \xB7 Editor";
2358
+ title.textContent = "OnUser \xB7 Editor";
2333
2359
  const actions = document.createElement("div");
2334
2360
  actions.className = "veo-panel-actions";
2335
2361
  const popout = document.createElement("button");
@@ -2471,7 +2497,7 @@ var init_builder_panel = __esm({
2471
2497
  flex: 0 0 auto;
2472
2498
  display: flex; align-items: center; justify-content: space-between;
2473
2499
  padding: 8px 10px 8px 12px;
2474
- background: #0f172a; color: #fff;
2500
+ background: #1b1714; color: #f7f1eb;
2475
2501
  font-size: 13px; font-weight: 600;
2476
2502
  cursor: grab;
2477
2503
  }