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/builder-4YBB3RSZ.mjs +5 -0
- package/dist/{builder-K2NEYSSB.mjs.map → builder-4YBB3RSZ.mjs.map} +1 -1
- package/dist/builder.cjs +37 -11
- package/dist/builder.cjs.map +1 -1
- package/dist/builder.mjs +4 -4
- package/dist/{chunk-QSMHZVDK.mjs → chunk-3WJDFE7Q.mjs} +37 -11
- package/dist/chunk-3WJDFE7Q.mjs.map +1 -0
- package/dist/{chunk-US3RVEXR.mjs → chunk-B6S4V5Q5.mjs} +5 -5
- package/dist/chunk-B6S4V5Q5.mjs.map +1 -0
- package/dist/{chunk-HOF4GU5I.mjs → chunk-MPZVVZDL.mjs} +3 -3
- package/dist/{chunk-HOF4GU5I.mjs.map → chunk-MPZVVZDL.mjs.map} +1 -1
- package/dist/index.cjs +37 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/veo-builder.js +11 -10
- package/dist/veo-builder.js.map +1 -1
- package/dist/veo-guides.js +9 -8
- package/dist/veo-guides.js.map +1 -1
- package/package.json +1 -1
- package/dist/builder-K2NEYSSB.mjs +0 -5
- package/dist/chunk-QSMHZVDK.mjs.map +0 -1
- package/dist/chunk-US3RVEXR.mjs.map +0 -1
|
@@ -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-
|
|
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
|
-
|
|
500
|
-
|
|
501
|
-
|
|
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: #
|
|
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);
|
|
655
|
-
|
|
656
|
-
|
|
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 || "
|
|
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);
|
|
@@ -1977,7 +2003,7 @@ function injectBuilderPanel(opts) {
|
|
|
1977
2003
|
header.className = "veo-panel-header";
|
|
1978
2004
|
const title = document.createElement("span");
|
|
1979
2005
|
title.className = "veo-panel-title";
|
|
1980
|
-
title.textContent = "
|
|
2006
|
+
title.textContent = "OnUser \xB7 Editor";
|
|
1981
2007
|
const actions = document.createElement("div");
|
|
1982
2008
|
actions.className = "veo-panel-actions";
|
|
1983
2009
|
const popout = document.createElement("button");
|
|
@@ -2109,7 +2135,7 @@ var PANEL_CSS = `
|
|
|
2109
2135
|
flex: 0 0 auto;
|
|
2110
2136
|
display: flex; align-items: center; justify-content: space-between;
|
|
2111
2137
|
padding: 8px 10px 8px 12px;
|
|
2112
|
-
background: #
|
|
2138
|
+
background: #1b1714; color: #f7f1eb;
|
|
2113
2139
|
font-size: 13px; font-weight: 600;
|
|
2114
2140
|
cursor: grab;
|
|
2115
2141
|
}
|