veo-sdk 0.5.6 → 0.5.10
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-2TBF3NZF.mjs +5 -0
- package/dist/{builder-AMCPHL4K.mjs.map → builder-2TBF3NZF.mjs.map} +1 -1
- package/dist/builder.cjs +502 -250
- package/dist/builder.cjs.map +1 -1
- package/dist/builder.mjs +4 -4
- package/dist/{chunk-764FSEHS.mjs → chunk-END325ZM.mjs} +504 -252
- package/dist/chunk-END325ZM.mjs.map +1 -0
- package/dist/{chunk-CPSHNLZG.mjs → chunk-RO5IHBTJ.mjs} +119 -3
- package/dist/chunk-RO5IHBTJ.mjs.map +1 -0
- package/dist/{chunk-A4RHMCCM.mjs → chunk-S2CLUAAC.mjs} +3 -3
- package/dist/{chunk-A4RHMCCM.mjs.map → chunk-S2CLUAAC.mjs.map} +1 -1
- package/dist/index.cjs +725 -349
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/veo-builder.js +10 -10
- package/dist/veo-builder.js.map +1 -1
- package/dist/veo-guides.js +5 -5
- package/dist/veo-guides.js.map +1 -1
- package/package.json +1 -1
- package/dist/builder-AMCPHL4K.mjs +0 -5
- package/dist/chunk-764FSEHS.mjs.map +0 -1
- package/dist/chunk-CPSHNLZG.mjs.map +0 -1
|
@@ -483,6 +483,42 @@ function applyBlockStyle(el, style, kind) {
|
|
|
483
483
|
if (typeof s.marginBottom === "number" && Number.isFinite(s.marginBottom)) {
|
|
484
484
|
el.style.marginBottom = `${clampNum(s.marginBottom, 0, 64)}px`;
|
|
485
485
|
}
|
|
486
|
+
if (kind !== "image") {
|
|
487
|
+
if (typeof s.fontSize === "number" && Number.isFinite(s.fontSize)) {
|
|
488
|
+
el.style.fontSize = `${clampNum(s.fontSize, 8, 96)}px`;
|
|
489
|
+
}
|
|
490
|
+
if (typeof s.fontFamily === "string" && s.fontFamily && s.fontFamily !== "inherit") {
|
|
491
|
+
el.style.fontFamily = s.fontFamily;
|
|
492
|
+
}
|
|
493
|
+
if (typeof s.fontWeight === "string" && s.fontWeight) el.style.fontWeight = s.fontWeight;
|
|
494
|
+
if (typeof s.textTransform === "string" && s.textTransform && s.textTransform !== "none") {
|
|
495
|
+
el.style.textTransform = s.textTransform;
|
|
496
|
+
}
|
|
497
|
+
if (typeof s.lineHeight === "number" && Number.isFinite(s.lineHeight)) {
|
|
498
|
+
el.style.lineHeight = `${clampNum(s.lineHeight, 50, 300)}%`;
|
|
499
|
+
}
|
|
500
|
+
if (typeof s.letterSpacing === "number" && Number.isFinite(s.letterSpacing)) {
|
|
501
|
+
el.style.letterSpacing = `${clampNum(s.letterSpacing, -5, 20)}px`;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
if (typeof s.background === "string" && s.background) el.style.background = s.background;
|
|
505
|
+
if (typeof s.borderWidth === "number" && s.borderWidth > 0) {
|
|
506
|
+
const bc = typeof s.borderColor === "string" && s.borderColor ? s.borderColor : "#bbbbbb";
|
|
507
|
+
el.style.border = `${clampNum(s.borderWidth, 0, 20)}px solid ${bc}`;
|
|
508
|
+
}
|
|
509
|
+
if (kind !== "image" && typeof s.radius === "number" && Number.isFinite(s.radius)) {
|
|
510
|
+
el.style.borderRadius = `${clampNum(s.radius, 0, 64)}px`;
|
|
511
|
+
}
|
|
512
|
+
for (const side of ["Top", "Right", "Bottom", "Left"]) {
|
|
513
|
+
const p = s[`padding${side}`];
|
|
514
|
+
if (typeof p === "number" && Number.isFinite(p)) {
|
|
515
|
+
el.style.setProperty(`padding-${side.toLowerCase()}`, `${clampNum(p, 0, 128)}px`);
|
|
516
|
+
}
|
|
517
|
+
const m = s[`margin${side}`];
|
|
518
|
+
if (typeof m === "number" && Number.isFinite(m)) {
|
|
519
|
+
el.style.setProperty(`margin-${side.toLowerCase()}`, `${clampNum(m, 0, 128)}px`);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
486
522
|
}
|
|
487
523
|
function createCloseButton(doc, onClose, className = "veo-guide-close") {
|
|
488
524
|
const closeBtn = doc.createElement("button");
|
|
@@ -1668,182 +1704,6 @@ var BannerRenderer = class extends BaseRenderer {
|
|
|
1668
1704
|
function bannerClassOf(position, embedded) {
|
|
1669
1705
|
return embedded ? "veo-banner veo-banner-embedded" : `veo-banner veo-banner-${position}`;
|
|
1670
1706
|
}
|
|
1671
|
-
var CompositeRenderer = class extends BaseRenderer {
|
|
1672
|
-
async render(context) {
|
|
1673
|
-
const idx = context.nav?.stepIndex ?? 0;
|
|
1674
|
-
const step = context.guide.guideSteps[idx];
|
|
1675
|
-
if (!step) return;
|
|
1676
|
-
const anchorSelector = step.position === "relative-to-element" || step.presentation === "inline" ? step.anchorSelector?.trim() || void 0 : void 0;
|
|
1677
|
-
let anchor = null;
|
|
1678
|
-
if (anchorSelector) {
|
|
1679
|
-
anchor = await waitForElement(anchorSelector);
|
|
1680
|
-
if (!anchor) return;
|
|
1681
|
-
}
|
|
1682
|
-
const { host, root } = this.createHost();
|
|
1683
|
-
const doc = root.ownerDocument ?? document;
|
|
1684
|
-
const card = doc.createElement("div");
|
|
1685
|
-
card.className = "veo-card";
|
|
1686
|
-
applyCompositeDesign(card, step.design ?? {});
|
|
1687
|
-
const dismiss = (action, meta) => {
|
|
1688
|
-
context.onInteraction({
|
|
1689
|
-
guideId: context.guide.guideId,
|
|
1690
|
-
stepIndex: idx,
|
|
1691
|
-
action,
|
|
1692
|
-
...meta?.id ? { metadata: { buttonId: meta.id } } : {}
|
|
1693
|
-
});
|
|
1694
|
-
};
|
|
1695
|
-
const synthetic = { blocks: step.blocks ?? [] };
|
|
1696
|
-
for (const node of buildContentNodes(synthetic, doc)) card.appendChild(node);
|
|
1697
|
-
const buttons = (step.blocks ?? []).filter((b) => b.type === "button");
|
|
1698
|
-
if (buttons.length) {
|
|
1699
|
-
const row = doc.createElement("div");
|
|
1700
|
-
row.className = "veo-guide-actions";
|
|
1701
|
-
for (const b of buttons) row.appendChild(this.buildButton(b, doc, context, dismiss));
|
|
1702
|
-
card.appendChild(row);
|
|
1703
|
-
}
|
|
1704
|
-
card.appendChild(
|
|
1705
|
-
createCloseButton(doc, () => {
|
|
1706
|
-
dismiss("dismissed");
|
|
1707
|
-
this.closeOrSkip(context);
|
|
1708
|
-
})
|
|
1709
|
-
);
|
|
1710
|
-
if (step.presentation === "inline" && anchor) {
|
|
1711
|
-
host.style.display = "block";
|
|
1712
|
-
const pos = inlinePosOf(step.inlinePosition);
|
|
1713
|
-
root.appendChild(card);
|
|
1714
|
-
insertHost(anchor, host, pos);
|
|
1715
|
-
this.registerCleanup(keepHostAttached(host, anchorSelector, pos));
|
|
1716
|
-
} else if (step.position === "relative-to-element" && anchor) {
|
|
1717
|
-
const wrapper = doc.createElement("div");
|
|
1718
|
-
wrapper.className = "veo-composite-anchored";
|
|
1719
|
-
wrapper.appendChild(card);
|
|
1720
|
-
root.appendChild(wrapper);
|
|
1721
|
-
this.registerCleanup(await anchorPosition(anchor, wrapper));
|
|
1722
|
-
} else {
|
|
1723
|
-
const overlay = doc.createElement("div");
|
|
1724
|
-
overlay.className = "veo-composite-overlay";
|
|
1725
|
-
if (step.position === "center" && step.design?.backdrop !== false) {
|
|
1726
|
-
overlay.classList.add("veo-composite-overlay--dim");
|
|
1727
|
-
overlay.addEventListener("click", (e) => {
|
|
1728
|
-
if (e.target === overlay) {
|
|
1729
|
-
dismiss("dismissed");
|
|
1730
|
-
this.closeOrSkip(context);
|
|
1731
|
-
}
|
|
1732
|
-
});
|
|
1733
|
-
}
|
|
1734
|
-
applyViewportPosition(card, step.position);
|
|
1735
|
-
overlay.appendChild(card);
|
|
1736
|
-
root.appendChild(overlay);
|
|
1737
|
-
}
|
|
1738
|
-
context.onInteraction({ guideId: context.guide.guideId, stepIndex: idx, action: "shown" });
|
|
1739
|
-
}
|
|
1740
|
-
/** Botón con enrutado de acción (navegación / cierre / url / guía). */
|
|
1741
|
-
buildButton(block, doc, context, emit) {
|
|
1742
|
-
const btn = doc.createElement("button");
|
|
1743
|
-
btn.type = "button";
|
|
1744
|
-
btn.className = "veo-guide-cta";
|
|
1745
|
-
btn.textContent = block.text?.trim() || "OK";
|
|
1746
|
-
btn.addEventListener("click", () => {
|
|
1747
|
-
emit("cta_clicked", block);
|
|
1748
|
-
const nav = context.nav?.callbacks;
|
|
1749
|
-
switch (block.action) {
|
|
1750
|
-
case "next":
|
|
1751
|
-
case "submit-forms":
|
|
1752
|
-
case "submit-forms-advance":
|
|
1753
|
-
if (nav) nav.onNext();
|
|
1754
|
-
else context.onClose();
|
|
1755
|
-
break;
|
|
1756
|
-
case "prev":
|
|
1757
|
-
nav?.onBack();
|
|
1758
|
-
break;
|
|
1759
|
-
case "url":
|
|
1760
|
-
if (typeof block.url === "string" && isSafeUrl(block.url)) {
|
|
1761
|
-
window.open(block.url, "_blank", "noopener,noreferrer");
|
|
1762
|
-
}
|
|
1763
|
-
break;
|
|
1764
|
-
case "guide":
|
|
1765
|
-
if (block.targetGuideId) context.onOpenGuide?.(block.targetGuideId);
|
|
1766
|
-
this.closeOrSkip(context);
|
|
1767
|
-
break;
|
|
1768
|
-
default:
|
|
1769
|
-
this.closeOrSkip(context);
|
|
1770
|
-
}
|
|
1771
|
-
});
|
|
1772
|
-
return btn;
|
|
1773
|
-
}
|
|
1774
|
-
closeOrSkip(context) {
|
|
1775
|
-
if (context.nav?.callbacks) context.nav.callbacks.onSkip();
|
|
1776
|
-
else context.onClose();
|
|
1777
|
-
}
|
|
1778
|
-
};
|
|
1779
|
-
function inlinePosOf(p) {
|
|
1780
|
-
return p === "before" || p === "prepend" || p === "append" ? p : "after";
|
|
1781
|
-
}
|
|
1782
|
-
function applyViewportPosition(card, position) {
|
|
1783
|
-
const s = card.style;
|
|
1784
|
-
s.position = "fixed";
|
|
1785
|
-
const M = "16px";
|
|
1786
|
-
const v = position.includes("top") ? "top" : position.includes("bottom") ? "bottom" : "middle";
|
|
1787
|
-
const h = position.includes("left") ? "left" : position.includes("right") ? "right" : "middle";
|
|
1788
|
-
if (position === "center") {
|
|
1789
|
-
s.top = "50%";
|
|
1790
|
-
s.left = "50%";
|
|
1791
|
-
s.transform = "translate(-50%, -50%)";
|
|
1792
|
-
return;
|
|
1793
|
-
}
|
|
1794
|
-
if (v === "top") s.top = M;
|
|
1795
|
-
else if (v === "bottom") s.bottom = M;
|
|
1796
|
-
else {
|
|
1797
|
-
s.top = "50%";
|
|
1798
|
-
s.transform = "translateY(-50%)";
|
|
1799
|
-
}
|
|
1800
|
-
if (h === "left") s.left = M;
|
|
1801
|
-
else if (h === "right") s.right = M;
|
|
1802
|
-
else {
|
|
1803
|
-
s.left = "50%";
|
|
1804
|
-
s.transform = `${s.transform} translateX(-50%)`.trim();
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
async function anchorPosition(anchor, wrapper) {
|
|
1808
|
-
const update = async () => {
|
|
1809
|
-
const { x, y } = await computePosition(anchor, wrapper, {
|
|
1810
|
-
placement: "bottom",
|
|
1811
|
-
strategy: "fixed",
|
|
1812
|
-
middleware: [offset(8), flip(), shift({ padding: 8 })]
|
|
1813
|
-
});
|
|
1814
|
-
wrapper.style.left = `${x}px`;
|
|
1815
|
-
wrapper.style.top = `${y}px`;
|
|
1816
|
-
};
|
|
1817
|
-
await update();
|
|
1818
|
-
const reposition = () => void update();
|
|
1819
|
-
window.addEventListener("scroll", reposition, true);
|
|
1820
|
-
window.addEventListener("resize", reposition);
|
|
1821
|
-
return () => {
|
|
1822
|
-
window.removeEventListener("scroll", reposition, true);
|
|
1823
|
-
window.removeEventListener("resize", reposition);
|
|
1824
|
-
};
|
|
1825
|
-
}
|
|
1826
|
-
function applyCompositeDesign(card, design) {
|
|
1827
|
-
const s = card.style;
|
|
1828
|
-
const px = (v) => typeof v === "number" && Number.isFinite(v) ? `${v}px` : null;
|
|
1829
|
-
const strv = (v) => typeof v === "string" && v ? v : null;
|
|
1830
|
-
if (strv(design.background)) s.background = design.background;
|
|
1831
|
-
if (strv(design.textColor)) s.color = design.textColor;
|
|
1832
|
-
if (px(design.fontSize)) s.fontSize = px(design.fontSize);
|
|
1833
|
-
if (strv(design.fontWeight)) s.fontWeight = design.fontWeight;
|
|
1834
|
-
if (strv(design.align)) s.textAlign = design.align;
|
|
1835
|
-
if (typeof design.lineHeight === "number") s.lineHeight = `${design.lineHeight}%`;
|
|
1836
|
-
if (px(design.radius)) s.borderRadius = px(design.radius);
|
|
1837
|
-
if (px(design.width)) s.width = px(design.width);
|
|
1838
|
-
const bw = px(design.borderWidth);
|
|
1839
|
-
if (bw) s.border = `${bw} solid ${strv(design.borderColor) ?? "#e5e5e5"}`;
|
|
1840
|
-
for (const side of ["Top", "Right", "Bottom", "Left"]) {
|
|
1841
|
-
const p = px(design[`padding${side}`]);
|
|
1842
|
-
if (p) s.setProperty(`padding-${side.toLowerCase()}`, p);
|
|
1843
|
-
const m = px(design[`margin${side}`]);
|
|
1844
|
-
if (m) s.setProperty(`margin-${side.toLowerCase()}`, m);
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
1707
|
|
|
1848
1708
|
// src/utils/uuid.ts
|
|
1849
1709
|
function uuidv7() {
|
|
@@ -2000,85 +1860,53 @@ function escapeClosing(code, tag) {
|
|
|
2000
1860
|
return code.replace(rx, `<\\/${tag}`);
|
|
2001
1861
|
}
|
|
2002
1862
|
|
|
2003
|
-
// src/plugins/guides/
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
async render(context) {
|
|
2009
|
-
const step = context.guide.guideSteps[0];
|
|
2010
|
-
if (!step || typeof step.html !== "string" || step.html.length === 0) return;
|
|
2011
|
-
const placement = step.placement ?? DEFAULT_PLACEMENT;
|
|
2012
|
-
let anchor = null;
|
|
2013
|
-
if (placement.mode === "anchored") {
|
|
2014
|
-
const selector = placement.selector ?? step.selector ?? context.guide.activationRules.selector;
|
|
2015
|
-
if (typeof selector !== "string" || selector.length === 0) return;
|
|
2016
|
-
anchor = await waitForElement(selector);
|
|
2017
|
-
if (!anchor) return;
|
|
2018
|
-
}
|
|
2019
|
-
const { root } = this.createHost();
|
|
2020
|
-
const doc = root.ownerDocument ?? document;
|
|
1863
|
+
// src/plugins/guides/code-block.ts
|
|
1864
|
+
function mountCodeBlock(block, doc, context) {
|
|
1865
|
+
if (block.sandboxed) {
|
|
1866
|
+
const step = { html: block.html ?? "", css: block.css, js: block.js };
|
|
1867
|
+
const { iframe, cleanup } = mountCustomFrame(doc, step, context, { width: "100%" });
|
|
2021
1868
|
const wrapper = doc.createElement("div");
|
|
2022
|
-
wrapper.className =
|
|
2023
|
-
const { iframe, cleanup } = mountCustomFrame(doc, step, context, {
|
|
2024
|
-
width: toCssSize(placement.width ?? DEFAULT_WIDTH),
|
|
2025
|
-
fixedHeight: placement.height ?? null
|
|
2026
|
-
});
|
|
2027
|
-
this.registerCleanup(cleanup);
|
|
1869
|
+
wrapper.className = "veo-code-sandbox";
|
|
2028
1870
|
wrapper.appendChild(iframe);
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
1871
|
+
return { node: wrapper, cleanup };
|
|
1872
|
+
}
|
|
1873
|
+
const hostDoc = doc;
|
|
1874
|
+
const injected = [];
|
|
1875
|
+
if (typeof block.css === "string" && block.css.trim()) {
|
|
1876
|
+
const style = hostDoc.createElement("style");
|
|
1877
|
+
style.textContent = block.css;
|
|
1878
|
+
hostDoc.head.appendChild(style);
|
|
1879
|
+
injected.push(style);
|
|
1880
|
+
}
|
|
1881
|
+
let node = null;
|
|
1882
|
+
if (typeof block.html === "string" && block.html.trim()) {
|
|
1883
|
+
node = doc.createElement("div");
|
|
1884
|
+
node.className = "veo-code-html";
|
|
1885
|
+
node.innerHTML = block.html;
|
|
1886
|
+
for (const old of Array.from(node.querySelectorAll("script"))) {
|
|
1887
|
+
injected.push(runScript(old, hostDoc));
|
|
1888
|
+
old.remove();
|
|
2034
1889
|
}
|
|
2035
|
-
context.onInteraction({ guideId: context.guide.guideId, stepIndex: 0, action: "shown" });
|
|
2036
1890
|
}
|
|
2037
|
-
|
|
2038
|
-
const
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
strategy: "fixed",
|
|
2043
|
-
middleware: [offset(placement.offsetY ?? 8), flip(), shift({ padding: 8 })]
|
|
2044
|
-
});
|
|
2045
|
-
wrapper.style.left = `${x}px`;
|
|
2046
|
-
wrapper.style.top = `${y}px`;
|
|
2047
|
-
};
|
|
2048
|
-
await update();
|
|
2049
|
-
const reposition = () => {
|
|
2050
|
-
void update();
|
|
2051
|
-
};
|
|
2052
|
-
window.addEventListener("scroll", reposition, true);
|
|
2053
|
-
window.addEventListener("resize", reposition);
|
|
2054
|
-
return () => {
|
|
2055
|
-
window.removeEventListener("scroll", reposition, true);
|
|
2056
|
-
window.removeEventListener("resize", reposition);
|
|
2057
|
-
};
|
|
2058
|
-
}
|
|
2059
|
-
};
|
|
2060
|
-
function applyFloatingPosition(wrapper, placement) {
|
|
2061
|
-
const position = placement.position ?? "bottom-right";
|
|
2062
|
-
const ox = `${placement.offsetX ?? DEFAULT_OFFSET}px`;
|
|
2063
|
-
const oy = `${placement.offsetY ?? DEFAULT_OFFSET}px`;
|
|
2064
|
-
const s = wrapper.style;
|
|
2065
|
-
if (position === "center") {
|
|
2066
|
-
s.top = "50%";
|
|
2067
|
-
s.left = "50%";
|
|
2068
|
-
s.transform = "translate(-50%, -50%)";
|
|
2069
|
-
return;
|
|
2070
|
-
}
|
|
2071
|
-
const [vertical, horizontal] = position.split("-");
|
|
2072
|
-
if (vertical === "top") s.top = oy;
|
|
2073
|
-
else s.bottom = oy;
|
|
2074
|
-
if (horizontal === "left") {
|
|
2075
|
-
s.left = ox;
|
|
2076
|
-
} else if (horizontal === "right") {
|
|
2077
|
-
s.right = ox;
|
|
2078
|
-
} else {
|
|
2079
|
-
s.left = "50%";
|
|
2080
|
-
s.transform = "translateX(-50%)";
|
|
1891
|
+
if (typeof block.js === "string" && block.js.trim()) {
|
|
1892
|
+
const s = hostDoc.createElement("script");
|
|
1893
|
+
s.textContent = block.js;
|
|
1894
|
+
hostDoc.body.appendChild(s);
|
|
1895
|
+
injected.push(s);
|
|
2081
1896
|
}
|
|
1897
|
+
return {
|
|
1898
|
+
node,
|
|
1899
|
+
cleanup: () => {
|
|
1900
|
+
for (const n of injected) n.parentNode?.removeChild(n);
|
|
1901
|
+
}
|
|
1902
|
+
};
|
|
1903
|
+
}
|
|
1904
|
+
function runScript(old, hostDoc) {
|
|
1905
|
+
const s = hostDoc.createElement("script");
|
|
1906
|
+
for (const attr of Array.from(old.attributes)) s.setAttribute(attr.name, attr.value);
|
|
1907
|
+
if (!old.src) s.textContent = old.textContent;
|
|
1908
|
+
hostDoc.body.appendChild(s);
|
|
1909
|
+
return s;
|
|
2082
1910
|
}
|
|
2083
1911
|
|
|
2084
1912
|
// src/plugins/guides/form-content.ts
|
|
@@ -2346,6 +2174,430 @@ function buildScale(wrapper, doc, min, max, btnClass, symbol) {
|
|
|
2346
2174
|
return { wrapper, read: () => selected };
|
|
2347
2175
|
}
|
|
2348
2176
|
|
|
2177
|
+
// src/plugins/guides/renderers/composite-renderer.ts
|
|
2178
|
+
var CompositeRenderer = class extends BaseRenderer {
|
|
2179
|
+
async render(context) {
|
|
2180
|
+
const idx = context.nav?.stepIndex ?? 0;
|
|
2181
|
+
const step = context.guide.guideSteps[idx];
|
|
2182
|
+
if (!step) return;
|
|
2183
|
+
const anchorSelector = step.position === "relative-to-element" || step.presentation === "inline" ? step.anchorSelector?.trim() || void 0 : void 0;
|
|
2184
|
+
let anchor = null;
|
|
2185
|
+
if (anchorSelector) {
|
|
2186
|
+
anchor = await waitForElement(anchorSelector);
|
|
2187
|
+
if (!anchor) return;
|
|
2188
|
+
}
|
|
2189
|
+
const { host, root } = this.createHost();
|
|
2190
|
+
const doc = root.ownerDocument ?? document;
|
|
2191
|
+
const design = step.design ?? {};
|
|
2192
|
+
if (typeof design.zIndex === "number") host.style.zIndex = String(design.zIndex);
|
|
2193
|
+
const card = doc.createElement("div");
|
|
2194
|
+
card.className = "veo-card";
|
|
2195
|
+
applyCompositeDesign(card, design);
|
|
2196
|
+
const dismiss = (action, meta) => {
|
|
2197
|
+
context.onInteraction({
|
|
2198
|
+
guideId: context.guide.guideId,
|
|
2199
|
+
stepIndex: idx,
|
|
2200
|
+
action,
|
|
2201
|
+
...{}
|
|
2202
|
+
});
|
|
2203
|
+
};
|
|
2204
|
+
const readers = [];
|
|
2205
|
+
this.buildContent(card, step.blocks ?? [], doc, context, idx, readers);
|
|
2206
|
+
if (design.closeButton !== false) {
|
|
2207
|
+
const closeBtn = createCloseButton(doc, () => {
|
|
2208
|
+
dismiss("dismissed");
|
|
2209
|
+
this.closeOrSkip(context);
|
|
2210
|
+
});
|
|
2211
|
+
const closeColor = typeof design.closeColor === "string" ? design.closeColor : null;
|
|
2212
|
+
const hoverColor = typeof design.closeHoverColor === "string" ? design.closeHoverColor : null;
|
|
2213
|
+
if (closeColor) closeBtn.style.color = closeColor;
|
|
2214
|
+
if (hoverColor) {
|
|
2215
|
+
closeBtn.addEventListener("mouseenter", () => {
|
|
2216
|
+
closeBtn.style.color = hoverColor;
|
|
2217
|
+
});
|
|
2218
|
+
closeBtn.addEventListener("mouseleave", () => {
|
|
2219
|
+
closeBtn.style.color = closeColor ?? "";
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2222
|
+
card.appendChild(closeBtn);
|
|
2223
|
+
}
|
|
2224
|
+
if (step.presentation === "inline" && anchor) {
|
|
2225
|
+
host.style.display = "block";
|
|
2226
|
+
const pos = inlinePosOf(step.inlinePosition);
|
|
2227
|
+
root.appendChild(card);
|
|
2228
|
+
insertHost(anchor, host, pos);
|
|
2229
|
+
this.registerCleanup(keepHostAttached(host, anchorSelector, pos));
|
|
2230
|
+
} else if (step.position === "relative-to-element" && anchor) {
|
|
2231
|
+
if (design.backdrop === true) {
|
|
2232
|
+
const bg = doc.createElement("div");
|
|
2233
|
+
bg.className = "veo-composite-overlay veo-composite-overlay--dim";
|
|
2234
|
+
if (typeof design.backdropColor === "string") bg.style.background = design.backdropColor;
|
|
2235
|
+
const bz = typeof design.backdropZIndex === "number" ? design.backdropZIndex : 2e5;
|
|
2236
|
+
bg.style.zIndex = String(bz);
|
|
2237
|
+
root.appendChild(bg);
|
|
2238
|
+
if (design.targetAbove === true) this.registerCleanup(liftTarget(anchor, bz + 1));
|
|
2239
|
+
}
|
|
2240
|
+
const wrapper = doc.createElement("div");
|
|
2241
|
+
wrapper.className = "veo-composite-anchored";
|
|
2242
|
+
const caretEl = design.caret === false ? null : makeCaret(doc, design);
|
|
2243
|
+
if (caretEl) wrapper.appendChild(caretEl);
|
|
2244
|
+
wrapper.appendChild(card);
|
|
2245
|
+
root.appendChild(wrapper);
|
|
2246
|
+
this.registerCleanup(await anchorPosition(anchor, wrapper, caretEl));
|
|
2247
|
+
} else {
|
|
2248
|
+
const overlay = doc.createElement("div");
|
|
2249
|
+
overlay.className = "veo-composite-overlay";
|
|
2250
|
+
if (step.position === "center" && design.backdrop !== false) {
|
|
2251
|
+
overlay.classList.add("veo-composite-overlay--dim");
|
|
2252
|
+
if (typeof design.backdropColor === "string") {
|
|
2253
|
+
overlay.style.background = design.backdropColor;
|
|
2254
|
+
}
|
|
2255
|
+
if (typeof design.backdropZIndex === "number") {
|
|
2256
|
+
overlay.style.zIndex = String(design.backdropZIndex);
|
|
2257
|
+
}
|
|
2258
|
+
overlay.addEventListener("click", (e) => {
|
|
2259
|
+
if (e.target === overlay) {
|
|
2260
|
+
dismiss("dismissed");
|
|
2261
|
+
this.closeOrSkip(context);
|
|
2262
|
+
}
|
|
2263
|
+
});
|
|
2264
|
+
}
|
|
2265
|
+
applyViewportPosition(card, step.position, design);
|
|
2266
|
+
overlay.appendChild(card);
|
|
2267
|
+
root.appendChild(overlay);
|
|
2268
|
+
}
|
|
2269
|
+
context.onInteraction({ guideId: context.guide.guideId, stepIndex: idx, action: "shown" });
|
|
2270
|
+
}
|
|
2271
|
+
/** Recorre los bloques en orden y los pinta en la card. */
|
|
2272
|
+
buildContent(card, blocks, doc, context, idx, readers) {
|
|
2273
|
+
const emit = (block) => {
|
|
2274
|
+
context.onInteraction({
|
|
2275
|
+
guideId: context.guide.guideId,
|
|
2276
|
+
stepIndex: idx,
|
|
2277
|
+
action: "cta_clicked",
|
|
2278
|
+
...block.id ? { metadata: { buttonId: block.id } } : {}
|
|
2279
|
+
});
|
|
2280
|
+
};
|
|
2281
|
+
let i = 0;
|
|
2282
|
+
while (i < blocks.length) {
|
|
2283
|
+
const b = blocks[i];
|
|
2284
|
+
if (!b) {
|
|
2285
|
+
i++;
|
|
2286
|
+
continue;
|
|
2287
|
+
}
|
|
2288
|
+
if (b.type === "button") {
|
|
2289
|
+
const row = doc.createElement("div");
|
|
2290
|
+
row.className = "veo-guide-actions";
|
|
2291
|
+
while (i < blocks.length && blocks[i]?.type === "button") {
|
|
2292
|
+
row.appendChild(
|
|
2293
|
+
this.buildButton(blocks[i], doc, context, idx, readers, emit)
|
|
2294
|
+
);
|
|
2295
|
+
i++;
|
|
2296
|
+
}
|
|
2297
|
+
card.appendChild(row);
|
|
2298
|
+
continue;
|
|
2299
|
+
}
|
|
2300
|
+
if (b.type === "code") {
|
|
2301
|
+
const { node: node2, cleanup } = mountCodeBlock(b, doc, context);
|
|
2302
|
+
if (node2) card.appendChild(node2);
|
|
2303
|
+
this.registerCleanup(cleanup);
|
|
2304
|
+
i++;
|
|
2305
|
+
continue;
|
|
2306
|
+
}
|
|
2307
|
+
if (b.type === "form") {
|
|
2308
|
+
const form = doc.createElement("div");
|
|
2309
|
+
form.className = "veo-form";
|
|
2310
|
+
for (const field of b.fields ?? []) {
|
|
2311
|
+
const { wrapper, read } = buildField(field, doc);
|
|
2312
|
+
readers.push({ field, read });
|
|
2313
|
+
form.appendChild(wrapper);
|
|
2314
|
+
}
|
|
2315
|
+
card.appendChild(form);
|
|
2316
|
+
i++;
|
|
2317
|
+
continue;
|
|
2318
|
+
}
|
|
2319
|
+
const node = buildContentBlock(b, doc);
|
|
2320
|
+
if (node) card.appendChild(node);
|
|
2321
|
+
i++;
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
/** Botón con enrutado de acción (navegación / cierre / url / guía / envío de forms). */
|
|
2325
|
+
buildButton(block, doc, context, idx, readers, emit) {
|
|
2326
|
+
const btn = doc.createElement("button");
|
|
2327
|
+
btn.type = "button";
|
|
2328
|
+
btn.className = "veo-guide-cta";
|
|
2329
|
+
btn.textContent = block.text?.trim() || "OK";
|
|
2330
|
+
const nav = context.nav?.callbacks;
|
|
2331
|
+
btn.addEventListener("click", () => {
|
|
2332
|
+
switch (block.action) {
|
|
2333
|
+
case "next":
|
|
2334
|
+
emit(block);
|
|
2335
|
+
if (nav) nav.onNext();
|
|
2336
|
+
else context.onClose();
|
|
2337
|
+
break;
|
|
2338
|
+
case "prev":
|
|
2339
|
+
emit(block);
|
|
2340
|
+
nav?.onBack();
|
|
2341
|
+
break;
|
|
2342
|
+
case "url":
|
|
2343
|
+
emit(block);
|
|
2344
|
+
if (typeof block.url === "string" && isSafeUrl(block.url)) {
|
|
2345
|
+
window.open(block.url, "_blank", "noopener,noreferrer");
|
|
2346
|
+
}
|
|
2347
|
+
break;
|
|
2348
|
+
case "guide":
|
|
2349
|
+
emit(block);
|
|
2350
|
+
if (block.targetGuideId) context.onOpenGuide?.(block.targetGuideId);
|
|
2351
|
+
this.closeOrSkip(context);
|
|
2352
|
+
break;
|
|
2353
|
+
case "submit-forms":
|
|
2354
|
+
case "submit-forms-advance":
|
|
2355
|
+
case "submit-forms-goto":
|
|
2356
|
+
this.submitForms(readers, context, idx, btn, () => {
|
|
2357
|
+
emit(block);
|
|
2358
|
+
if (block.action === "submit-forms" || !nav) {
|
|
2359
|
+
context.onClose();
|
|
2360
|
+
} else if (block.action === "submit-forms-goto" && typeof block.targetStep === "number" && nav.onGoto) {
|
|
2361
|
+
nav.onGoto(block.targetStep);
|
|
2362
|
+
} else {
|
|
2363
|
+
nav.onNext();
|
|
2364
|
+
}
|
|
2365
|
+
});
|
|
2366
|
+
break;
|
|
2367
|
+
default:
|
|
2368
|
+
emit(block);
|
|
2369
|
+
this.closeOrSkip(context);
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
return btn;
|
|
2373
|
+
}
|
|
2374
|
+
/** Recoge respuestas de todos los form-blocks del paso, valida y envía. */
|
|
2375
|
+
submitForms(readers, context, idx, btn, onDone) {
|
|
2376
|
+
const answers = {};
|
|
2377
|
+
for (const { field, read } of readers) {
|
|
2378
|
+
const value = read();
|
|
2379
|
+
const empty = value === void 0 || value === null || value === "";
|
|
2380
|
+
if (empty) {
|
|
2381
|
+
if (field.required) {
|
|
2382
|
+
btn.textContent = `Completa "${field.label}"`;
|
|
2383
|
+
return;
|
|
2384
|
+
}
|
|
2385
|
+
continue;
|
|
2386
|
+
}
|
|
2387
|
+
answers[field.key] = value;
|
|
2388
|
+
}
|
|
2389
|
+
if (readers.length > 0 && Object.keys(answers).length === 0) return;
|
|
2390
|
+
btn.disabled = true;
|
|
2391
|
+
const submitFn = context.onFormSubmit ?? (() => Promise.resolve(true));
|
|
2392
|
+
void submitFn(answers).then((ok) => {
|
|
2393
|
+
btn.disabled = false;
|
|
2394
|
+
if (!ok) return;
|
|
2395
|
+
context.onInteraction({
|
|
2396
|
+
guideId: context.guide.guideId,
|
|
2397
|
+
stepIndex: idx,
|
|
2398
|
+
action: "completed"
|
|
2399
|
+
});
|
|
2400
|
+
onDone();
|
|
2401
|
+
});
|
|
2402
|
+
}
|
|
2403
|
+
closeOrSkip(context) {
|
|
2404
|
+
if (context.nav?.callbacks) context.nav.callbacks.onSkip();
|
|
2405
|
+
else context.onClose();
|
|
2406
|
+
}
|
|
2407
|
+
};
|
|
2408
|
+
function inlinePosOf(p) {
|
|
2409
|
+
return p === "before" || p === "prepend" || p === "append" ? p : "after";
|
|
2410
|
+
}
|
|
2411
|
+
function applyViewportPosition(card, position, design) {
|
|
2412
|
+
const s = card.style;
|
|
2413
|
+
s.position = "fixed";
|
|
2414
|
+
const M = "16px";
|
|
2415
|
+
const hAlign = design.hAlign === "left" ? "left" : design.hAlign === "right" ? "right" : null;
|
|
2416
|
+
const v = position.includes("top") ? "top" : position.includes("bottom") ? "bottom" : "middle";
|
|
2417
|
+
const h = hAlign ?? (position.includes("left") ? "left" : position.includes("right") ? "right" : "middle");
|
|
2418
|
+
if (v === "top") s.top = M;
|
|
2419
|
+
else if (v === "bottom") s.bottom = M;
|
|
2420
|
+
else s.top = "50%";
|
|
2421
|
+
if (h === "left") s.left = M;
|
|
2422
|
+
else if (h === "right") s.right = M;
|
|
2423
|
+
else s.left = "50%";
|
|
2424
|
+
const tx = h === "middle" ? "-50%" : "0";
|
|
2425
|
+
const ty = v === "middle" ? "-50%" : "0";
|
|
2426
|
+
s.transform = tx === "0" && ty === "0" ? "" : `translate(${tx}, ${ty})`;
|
|
2427
|
+
}
|
|
2428
|
+
function makeCaret(doc, design) {
|
|
2429
|
+
const caret = doc.createElement("div");
|
|
2430
|
+
caret.className = "veo-composite-caret";
|
|
2431
|
+
const w = typeof design.caretWidth === "number" ? design.caretWidth : 12;
|
|
2432
|
+
const h = typeof design.caretHeight === "number" ? design.caretHeight : 12;
|
|
2433
|
+
const s = caret.style;
|
|
2434
|
+
s.position = "absolute";
|
|
2435
|
+
s.width = `${w}px`;
|
|
2436
|
+
s.height = `${h}px`;
|
|
2437
|
+
s.transform = "rotate(45deg)";
|
|
2438
|
+
s.background = typeof design.background === "string" ? design.background : "#ffffff";
|
|
2439
|
+
if (typeof design.borderWidth === "number" && design.borderWidth > 0) {
|
|
2440
|
+
const bc = typeof design.borderColor === "string" ? design.borderColor : "#bbbbbb";
|
|
2441
|
+
s.border = `${design.borderWidth}px solid ${bc}`;
|
|
2442
|
+
}
|
|
2443
|
+
return caret;
|
|
2444
|
+
}
|
|
2445
|
+
function liftTarget(anchor, zIndex) {
|
|
2446
|
+
const el = anchor;
|
|
2447
|
+
const prevPosition = el.style.position;
|
|
2448
|
+
const prevZ = el.style.zIndex;
|
|
2449
|
+
if (getComputedStyle(el).position === "static") el.style.position = "relative";
|
|
2450
|
+
el.style.zIndex = String(zIndex);
|
|
2451
|
+
return () => {
|
|
2452
|
+
el.style.position = prevPosition;
|
|
2453
|
+
el.style.zIndex = prevZ;
|
|
2454
|
+
};
|
|
2455
|
+
}
|
|
2456
|
+
async function anchorPosition(anchor, wrapper, caret) {
|
|
2457
|
+
const update = async () => {
|
|
2458
|
+
const { x, y, placement, middlewareData } = await computePosition(anchor, wrapper, {
|
|
2459
|
+
placement: "bottom",
|
|
2460
|
+
strategy: "fixed",
|
|
2461
|
+
middleware: [
|
|
2462
|
+
offset(caret ? 10 : 8),
|
|
2463
|
+
flip(),
|
|
2464
|
+
shift({ padding: 8 }),
|
|
2465
|
+
...caret ? [arrow({ element: caret })] : []
|
|
2466
|
+
]
|
|
2467
|
+
});
|
|
2468
|
+
wrapper.style.left = `${x}px`;
|
|
2469
|
+
wrapper.style.top = `${y}px`;
|
|
2470
|
+
if (caret) positionArrow(caret, placement, middlewareData.arrow);
|
|
2471
|
+
};
|
|
2472
|
+
await update();
|
|
2473
|
+
const reposition = () => void update();
|
|
2474
|
+
window.addEventListener("scroll", reposition, true);
|
|
2475
|
+
window.addEventListener("resize", reposition);
|
|
2476
|
+
return () => {
|
|
2477
|
+
window.removeEventListener("scroll", reposition, true);
|
|
2478
|
+
window.removeEventListener("resize", reposition);
|
|
2479
|
+
};
|
|
2480
|
+
}
|
|
2481
|
+
function applyCompositeDesign(card, design) {
|
|
2482
|
+
const s = card.style;
|
|
2483
|
+
const px = (v) => typeof v === "number" && Number.isFinite(v) ? `${v}px` : null;
|
|
2484
|
+
const strv = (v) => typeof v === "string" && v ? v : null;
|
|
2485
|
+
if (strv(design.background)) s.background = design.background;
|
|
2486
|
+
const textColor = strv(design.color) ?? strv(design.textColor);
|
|
2487
|
+
if (textColor) s.color = textColor;
|
|
2488
|
+
if (px(design.fontSize)) s.fontSize = px(design.fontSize);
|
|
2489
|
+
if (strv(design.fontWeight)) s.fontWeight = design.fontWeight;
|
|
2490
|
+
if (strv(design.fontFamily) && design.fontFamily !== "inherit") {
|
|
2491
|
+
s.fontFamily = design.fontFamily;
|
|
2492
|
+
}
|
|
2493
|
+
if (strv(design.textTransform) && design.textTransform !== "none") {
|
|
2494
|
+
s.textTransform = design.textTransform;
|
|
2495
|
+
}
|
|
2496
|
+
if (typeof design.letterSpacing === "number") s.letterSpacing = `${design.letterSpacing}px`;
|
|
2497
|
+
if (strv(design.align)) s.textAlign = design.align;
|
|
2498
|
+
if (typeof design.lineHeight === "number") s.lineHeight = `${design.lineHeight}%`;
|
|
2499
|
+
if (px(design.radius)) s.borderRadius = px(design.radius);
|
|
2500
|
+
const bw = px(design.borderWidth);
|
|
2501
|
+
if (bw) s.border = `${bw} solid ${strv(design.borderColor) ?? "#e5e5e5"}`;
|
|
2502
|
+
if (strv(design.shadowColor) || typeof design.shadowBlur === "number") {
|
|
2503
|
+
const n = (k) => typeof design[k] === "number" ? design[k] : 0;
|
|
2504
|
+
s.boxShadow = `${n("shadowX")}px ${n("shadowY")}px ${n("shadowBlur")}px ${n("shadowSpread")}px ${strv(design.shadowColor) ?? "rgba(0,0,0,0.2)"}`;
|
|
2505
|
+
}
|
|
2506
|
+
if (design.fullWidth === true) {
|
|
2507
|
+
s.width = "100%";
|
|
2508
|
+
} else if (design.widthType === "fluid") {
|
|
2509
|
+
s.width = "auto";
|
|
2510
|
+
if (px(design.width)) s.maxWidth = px(design.width);
|
|
2511
|
+
} else if (px(design.width)) {
|
|
2512
|
+
s.width = px(design.width);
|
|
2513
|
+
}
|
|
2514
|
+
for (const side of ["Top", "Right", "Bottom", "Left"]) {
|
|
2515
|
+
const p = px(design[`padding${side}`]);
|
|
2516
|
+
if (p) s.setProperty(`padding-${side.toLowerCase()}`, p);
|
|
2517
|
+
const m = px(design[`margin${side}`]);
|
|
2518
|
+
if (m) s.setProperty(`margin-${side.toLowerCase()}`, m);
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
var DEFAULT_PLACEMENT = { mode: "floating", position: "bottom-right" };
|
|
2522
|
+
var DEFAULT_OFFSET = 16;
|
|
2523
|
+
var DEFAULT_WIDTH = 360;
|
|
2524
|
+
var CustomRenderer = class extends BaseRenderer {
|
|
2525
|
+
async render(context) {
|
|
2526
|
+
const step = context.guide.guideSteps[0];
|
|
2527
|
+
if (!step || typeof step.html !== "string" || step.html.length === 0) return;
|
|
2528
|
+
const placement = step.placement ?? DEFAULT_PLACEMENT;
|
|
2529
|
+
let anchor = null;
|
|
2530
|
+
if (placement.mode === "anchored") {
|
|
2531
|
+
const selector = placement.selector ?? step.selector ?? context.guide.activationRules.selector;
|
|
2532
|
+
if (typeof selector !== "string" || selector.length === 0) return;
|
|
2533
|
+
anchor = await waitForElement(selector);
|
|
2534
|
+
if (!anchor) return;
|
|
2535
|
+
}
|
|
2536
|
+
const { root } = this.createHost();
|
|
2537
|
+
const doc = root.ownerDocument ?? document;
|
|
2538
|
+
const wrapper = doc.createElement("div");
|
|
2539
|
+
wrapper.className = placement.mode === "anchored" ? "veo-custom-anchored" : "veo-custom-floating";
|
|
2540
|
+
const { iframe, cleanup } = mountCustomFrame(doc, step, context, {
|
|
2541
|
+
width: toCssSize(placement.width ?? DEFAULT_WIDTH),
|
|
2542
|
+
fixedHeight: placement.height ?? null
|
|
2543
|
+
});
|
|
2544
|
+
this.registerCleanup(cleanup);
|
|
2545
|
+
wrapper.appendChild(iframe);
|
|
2546
|
+
root.appendChild(wrapper);
|
|
2547
|
+
if (placement.mode === "floating") {
|
|
2548
|
+
applyFloatingPosition(wrapper, placement);
|
|
2549
|
+
} else if (anchor) {
|
|
2550
|
+
this.registerCleanup(await this.setupAnchoredPosition(anchor, wrapper, placement));
|
|
2551
|
+
}
|
|
2552
|
+
context.onInteraction({ guideId: context.guide.guideId, stepIndex: 0, action: "shown" });
|
|
2553
|
+
}
|
|
2554
|
+
async setupAnchoredPosition(anchor, wrapper, placement) {
|
|
2555
|
+
const side = placement.side ?? "bottom";
|
|
2556
|
+
const update = async () => {
|
|
2557
|
+
const { x, y } = await computePosition(anchor, wrapper, {
|
|
2558
|
+
placement: side,
|
|
2559
|
+
strategy: "fixed",
|
|
2560
|
+
middleware: [offset(placement.offsetY ?? 8), flip(), shift({ padding: 8 })]
|
|
2561
|
+
});
|
|
2562
|
+
wrapper.style.left = `${x}px`;
|
|
2563
|
+
wrapper.style.top = `${y}px`;
|
|
2564
|
+
};
|
|
2565
|
+
await update();
|
|
2566
|
+
const reposition = () => {
|
|
2567
|
+
void update();
|
|
2568
|
+
};
|
|
2569
|
+
window.addEventListener("scroll", reposition, true);
|
|
2570
|
+
window.addEventListener("resize", reposition);
|
|
2571
|
+
return () => {
|
|
2572
|
+
window.removeEventListener("scroll", reposition, true);
|
|
2573
|
+
window.removeEventListener("resize", reposition);
|
|
2574
|
+
};
|
|
2575
|
+
}
|
|
2576
|
+
};
|
|
2577
|
+
function applyFloatingPosition(wrapper, placement) {
|
|
2578
|
+
const position = placement.position ?? "bottom-right";
|
|
2579
|
+
const ox = `${placement.offsetX ?? DEFAULT_OFFSET}px`;
|
|
2580
|
+
const oy = `${placement.offsetY ?? DEFAULT_OFFSET}px`;
|
|
2581
|
+
const s = wrapper.style;
|
|
2582
|
+
if (position === "center") {
|
|
2583
|
+
s.top = "50%";
|
|
2584
|
+
s.left = "50%";
|
|
2585
|
+
s.transform = "translate(-50%, -50%)";
|
|
2586
|
+
return;
|
|
2587
|
+
}
|
|
2588
|
+
const [vertical, horizontal] = position.split("-");
|
|
2589
|
+
if (vertical === "top") s.top = oy;
|
|
2590
|
+
else s.bottom = oy;
|
|
2591
|
+
if (horizontal === "left") {
|
|
2592
|
+
s.left = ox;
|
|
2593
|
+
} else if (horizontal === "right") {
|
|
2594
|
+
s.right = ox;
|
|
2595
|
+
} else {
|
|
2596
|
+
s.left = "50%";
|
|
2597
|
+
s.transform = "translateX(-50%)";
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2349
2601
|
// src/plugins/guides/renderers/form-renderer.ts
|
|
2350
2602
|
var FormRenderer = class extends BaseRenderer {
|
|
2351
2603
|
render(context) {
|
|
@@ -3061,5 +3313,5 @@ function buildSelectorPath(element, maxAncestors = 5) {
|
|
|
3061
3313
|
}
|
|
3062
3314
|
|
|
3063
3315
|
export { ALWAYS_BLOCK_SELECTORS, BadgeRenderer, BannerRenderer, CompositeRenderer, 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 };
|
|
3064
|
-
//# sourceMappingURL=chunk-
|
|
3065
|
-
//# sourceMappingURL=chunk-
|
|
3316
|
+
//# sourceMappingURL=chunk-END325ZM.mjs.map
|
|
3317
|
+
//# sourceMappingURL=chunk-END325ZM.mjs.map
|