ov25-setup 0.2.14 → 0.2.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/index.js
CHANGED
|
@@ -27,7 +27,7 @@ const ns = "https://app.ov25.ai/configurator-preview", Mm = "http://app.localhos
|
|
|
27
27
|
useSimpleVariantsSelector: !0,
|
|
28
28
|
variantHideOptionsCsv: ""
|
|
29
29
|
},
|
|
30
|
-
flags: { hidePricing: !1, hideAr: !1, deferThreeD: !1, showOptional: !1, forceMobile: !1, autoOpen: !1 },
|
|
30
|
+
flags: { hidePricing: !1, disableAddToCart: !1, hideAr: !1, deferThreeD: !1, showOptional: !1, forceMobile: !1, autoOpen: !1 },
|
|
31
31
|
branding: { logoURL: "", mobileLogoURL: "", cssString: "" },
|
|
32
32
|
style: {},
|
|
33
33
|
elementStyles: {}
|
|
@@ -560,6 +560,7 @@ function _s(n, e, t) {
|
|
|
560
560
|
},
|
|
561
561
|
flags: {
|
|
562
562
|
hidePricing: e.flags.hidePricing,
|
|
563
|
+
disableAddToCart: e.flags.disableAddToCart,
|
|
563
564
|
hideAr: e.flags.hideAr,
|
|
564
565
|
deferThreeD: e.flags.deferThreeD,
|
|
565
566
|
showOptional: e.flags.showOptional,
|
|
@@ -5547,7 +5548,7 @@ xd.displayName = wd;
|
|
|
5547
5548
|
function oa(n) {
|
|
5548
5549
|
return n ? "open" : "closed";
|
|
5549
5550
|
}
|
|
5550
|
-
var Sd = "DialogTitleWarning", [
|
|
5551
|
+
var Sd = "DialogTitleWarning", [qA, Od] = _b(Sd, {
|
|
5551
5552
|
contentName: kn,
|
|
5552
5553
|
titleName: ia,
|
|
5553
5554
|
docsSlug: "dialog"
|
|
@@ -23270,8 +23271,8 @@ KC.displayName = qC;
|
|
|
23270
23271
|
function um(n) {
|
|
23271
23272
|
return n ? "open" : "closed";
|
|
23272
23273
|
}
|
|
23273
|
-
var ZC = nm, JC = om,
|
|
23274
|
-
const
|
|
23274
|
+
var ZC = nm, JC = om, eA = sm, hm = lm;
|
|
23275
|
+
const tA = ZC, nA = JC, dm = b.forwardRef(({ className: n, align: e = "center", sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ m(eA, { children: /* @__PURE__ */ m(
|
|
23275
23276
|
hm,
|
|
23276
23277
|
{
|
|
23277
23278
|
ref: i,
|
|
@@ -23299,8 +23300,8 @@ function fm({ value: n, onChange: e, className: t, debounceMs: r = 200, emptyDis
|
|
|
23299
23300
|
const v = parseInt(g.slice(1, 3), 16), y = parseInt(g.slice(3, 5), 16), x = parseInt(g.slice(5, 7), 16);
|
|
23300
23301
|
return v > 240 && y > 240 && x > 240;
|
|
23301
23302
|
}, d = !o || o === "", f = d && i ? i : o, p = !!i && d;
|
|
23302
|
-
return /* @__PURE__ */ R(
|
|
23303
|
-
/* @__PURE__ */ m(
|
|
23303
|
+
return /* @__PURE__ */ R(tA, { open: l, onOpenChange: a, children: [
|
|
23304
|
+
/* @__PURE__ */ m(nA, { asChild: !0, children: /* @__PURE__ */ m(
|
|
23304
23305
|
"button",
|
|
23305
23306
|
{
|
|
23306
23307
|
type: "button",
|
|
@@ -23336,9 +23337,9 @@ var pm = ["PageUp", "PageDown"], gm = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
23336
23337
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
23337
23338
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
23338
23339
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
23339
|
-
}, mr = "Slider", [Vl,
|
|
23340
|
-
|
|
23341
|
-
]), [
|
|
23340
|
+
}, mr = "Slider", [Vl, rA, iA] = Jl(mr), [bm] = Et(mr, [
|
|
23341
|
+
iA
|
|
23342
|
+
]), [oA, es] = bm(mr), vm = b.forwardRef(
|
|
23342
23343
|
(n, e) => {
|
|
23343
23344
|
const {
|
|
23344
23345
|
name: t,
|
|
@@ -23357,7 +23358,7 @@ var pm = ["PageUp", "PageDown"], gm = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
23357
23358
|
inverted: f = !1,
|
|
23358
23359
|
form: p,
|
|
23359
23360
|
...g
|
|
23360
|
-
} = n, v = b.useRef(/* @__PURE__ */ new Set()), y = b.useRef(0), S = s === "horizontal" ?
|
|
23361
|
+
} = n, v = b.useRef(/* @__PURE__ */ new Set()), y = b.useRef(0), S = s === "horizontal" ? sA : lA, [w = [], O] = en({
|
|
23361
23362
|
prop: u,
|
|
23362
23363
|
defaultProp: c,
|
|
23363
23364
|
onChange: (T) => {
|
|
@@ -23366,7 +23367,7 @@ var pm = ["PageUp", "PageDown"], gm = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
23366
23367
|
}
|
|
23367
23368
|
}), C = b.useRef(w);
|
|
23368
23369
|
function k(T) {
|
|
23369
|
-
const A =
|
|
23370
|
+
const A = dA(w, T);
|
|
23370
23371
|
D(T, A);
|
|
23371
23372
|
}
|
|
23372
23373
|
function M(T) {
|
|
@@ -23377,10 +23378,10 @@ var pm = ["PageUp", "PageDown"], gm = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
23377
23378
|
w[y.current] !== T && d(w);
|
|
23378
23379
|
}
|
|
23379
23380
|
function D(T, A, { commit: B } = { commit: !1 }) {
|
|
23380
|
-
const Q =
|
|
23381
|
+
const Q = mA(o), $ = bA(Math.round((T - r) / o) * o + r, Q), _ = $r($, [r, i]);
|
|
23381
23382
|
O((W = []) => {
|
|
23382
|
-
const F =
|
|
23383
|
-
if (
|
|
23383
|
+
const F = uA(W, _, A);
|
|
23384
|
+
if (gA(F, a * o)) {
|
|
23384
23385
|
y.current = F.indexOf(_);
|
|
23385
23386
|
const X = String(F) !== String(W);
|
|
23386
23387
|
return X && B && d(F), X ? F : W;
|
|
@@ -23389,7 +23390,7 @@ var pm = ["PageUp", "PageDown"], gm = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
23389
23390
|
});
|
|
23390
23391
|
}
|
|
23391
23392
|
return /* @__PURE__ */ m(
|
|
23392
|
-
|
|
23393
|
+
oA,
|
|
23393
23394
|
{
|
|
23394
23395
|
scope: n.__scopeSlider,
|
|
23395
23396
|
name: t,
|
|
@@ -23437,7 +23438,7 @@ var [ym, wm] = bm(mr, {
|
|
|
23437
23438
|
endEdge: "right",
|
|
23438
23439
|
size: "width",
|
|
23439
23440
|
direction: 1
|
|
23440
|
-
}),
|
|
23441
|
+
}), sA = b.forwardRef(
|
|
23441
23442
|
(n, e) => {
|
|
23442
23443
|
const {
|
|
23443
23444
|
min: t,
|
|
@@ -23493,7 +23494,7 @@ var [ym, wm] = bm(mr, {
|
|
|
23493
23494
|
}
|
|
23494
23495
|
);
|
|
23495
23496
|
}
|
|
23496
|
-
),
|
|
23497
|
+
), lA = b.forwardRef(
|
|
23497
23498
|
(n, e) => {
|
|
23498
23499
|
const {
|
|
23499
23500
|
min: t,
|
|
@@ -23620,15 +23621,15 @@ var Wl = "SliderRange", km = b.forwardRef(
|
|
|
23620
23621
|
km.displayName = Wl;
|
|
23621
23622
|
var Hl = "SliderThumb", Cm = b.forwardRef(
|
|
23622
23623
|
(n, e) => {
|
|
23623
|
-
const t =
|
|
23624
|
+
const t = rA(n.__scopeSlider), [r, i] = b.useState(null), o = q(e, (l) => i(l)), s = b.useMemo(
|
|
23624
23625
|
() => r ? t().findIndex((l) => l.ref.current === r) : -1,
|
|
23625
23626
|
[t, r]
|
|
23626
23627
|
);
|
|
23627
|
-
return /* @__PURE__ */ m(
|
|
23628
|
+
return /* @__PURE__ */ m(aA, { ...n, ref: o, index: s });
|
|
23628
23629
|
}
|
|
23629
|
-
),
|
|
23630
|
+
), aA = b.forwardRef(
|
|
23630
23631
|
(n, e) => {
|
|
23631
|
-
const { __scopeSlider: t, index: r, name: i, ...o } = n, s = es(Hl, t), l = wm(Hl, t), [a, c] = b.useState(null), u = q(e, (x) => c(x)), h = a ? s.form || !!a.closest("form") : !0, d = la(a), f = s.values[r], p = f === void 0 ? 0 : Pm(f, s.min, s.max), g =
|
|
23632
|
+
const { __scopeSlider: t, index: r, name: i, ...o } = n, s = es(Hl, t), l = wm(Hl, t), [a, c] = b.useState(null), u = q(e, (x) => c(x)), h = a ? s.form || !!a.closest("form") : !0, d = la(a), f = s.values[r], p = f === void 0 ? 0 : Pm(f, s.min, s.max), g = hA(r, s.values.length), v = d == null ? void 0 : d[l.size], y = v ? fA(v, p, l.direction) : 0;
|
|
23632
23633
|
return b.useEffect(() => {
|
|
23633
23634
|
if (a)
|
|
23634
23635
|
return s.thumbs.add(a), () => {
|
|
@@ -23678,7 +23679,7 @@ var Hl = "SliderThumb", Cm = b.forwardRef(
|
|
|
23678
23679
|
}
|
|
23679
23680
|
);
|
|
23680
23681
|
Cm.displayName = Hl;
|
|
23681
|
-
var
|
|
23682
|
+
var cA = "RadioBubbleInput", Am = b.forwardRef(
|
|
23682
23683
|
({ __scopeSlider: n, value: e, ...t }, r) => {
|
|
23683
23684
|
const i = b.useRef(null), o = q(i, r), s = sa(e);
|
|
23684
23685
|
return b.useEffect(() => {
|
|
@@ -23700,8 +23701,8 @@ var c2 = "RadioBubbleInput", Am = b.forwardRef(
|
|
|
23700
23701
|
);
|
|
23701
23702
|
}
|
|
23702
23703
|
);
|
|
23703
|
-
Am.displayName =
|
|
23704
|
-
function
|
|
23704
|
+
Am.displayName = cA;
|
|
23705
|
+
function uA(n = [], e, t) {
|
|
23705
23706
|
const r = [...n];
|
|
23706
23707
|
return r[t] = e, r.sort((i, o) => i - o);
|
|
23707
23708
|
}
|
|
@@ -23709,24 +23710,24 @@ function Pm(n, e, t) {
|
|
|
23709
23710
|
const o = 100 / (t - e) * (n - e);
|
|
23710
23711
|
return $r(o, [0, 100]);
|
|
23711
23712
|
}
|
|
23712
|
-
function
|
|
23713
|
+
function hA(n, e) {
|
|
23713
23714
|
return e > 2 ? `Value ${n + 1} of ${e}` : e === 2 ? ["Minimum", "Maximum"][n] : void 0;
|
|
23714
23715
|
}
|
|
23715
|
-
function
|
|
23716
|
+
function dA(n, e) {
|
|
23716
23717
|
if (n.length === 1) return 0;
|
|
23717
23718
|
const t = n.map((i) => Math.abs(i - e)), r = Math.min(...t);
|
|
23718
23719
|
return t.indexOf(r);
|
|
23719
23720
|
}
|
|
23720
|
-
function
|
|
23721
|
+
function fA(n, e, t) {
|
|
23721
23722
|
const r = n / 2, o = Ua([0, 50], [0, r]);
|
|
23722
23723
|
return (r - o(e) * t) * t;
|
|
23723
23724
|
}
|
|
23724
|
-
function
|
|
23725
|
+
function pA(n) {
|
|
23725
23726
|
return n.slice(0, -1).map((e, t) => n[t + 1] - e);
|
|
23726
23727
|
}
|
|
23727
|
-
function
|
|
23728
|
+
function gA(n, e) {
|
|
23728
23729
|
if (e > 0) {
|
|
23729
|
-
const t =
|
|
23730
|
+
const t = pA(n);
|
|
23730
23731
|
return Math.min(...t) >= e;
|
|
23731
23732
|
}
|
|
23732
23733
|
return !0;
|
|
@@ -23738,14 +23739,14 @@ function Ua(n, e) {
|
|
|
23738
23739
|
return e[0] + r * (t - n[0]);
|
|
23739
23740
|
};
|
|
23740
23741
|
}
|
|
23741
|
-
function
|
|
23742
|
+
function mA(n) {
|
|
23742
23743
|
return (String(n).split(".")[1] || "").length;
|
|
23743
23744
|
}
|
|
23744
|
-
function
|
|
23745
|
+
function bA(n, e) {
|
|
23745
23746
|
const t = Math.pow(10, e);
|
|
23746
23747
|
return Math.round(n * t) / t;
|
|
23747
23748
|
}
|
|
23748
|
-
var Rm = vm,
|
|
23749
|
+
var Rm = vm, vA = Om, yA = km, wA = Cm;
|
|
23749
23750
|
const zr = b.forwardRef(({ className: n, ...e }, t) => /* @__PURE__ */ R(
|
|
23750
23751
|
Rm,
|
|
23751
23752
|
{
|
|
@@ -23753,8 +23754,8 @@ const zr = b.forwardRef(({ className: n, ...e }, t) => /* @__PURE__ */ R(
|
|
|
23753
23754
|
className: Z("relative flex w-full touch-none select-none items-center", n),
|
|
23754
23755
|
...e,
|
|
23755
23756
|
children: [
|
|
23756
|
-
/* @__PURE__ */ m(
|
|
23757
|
-
/* @__PURE__ */ m(
|
|
23757
|
+
/* @__PURE__ */ m(vA, { className: "relative h-1 w-full grow overflow-hidden rounded-full bg-gray-300/50 backdrop-blur-md", children: /* @__PURE__ */ m(yA, { className: "absolute h-full bg-gradient-to-r from-[#26E8FE] via-[#808AFF] to-[#A41EFE]" }) }),
|
|
23758
|
+
/* @__PURE__ */ m(wA, { className: "cursor-pointer block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
|
23758
23759
|
]
|
|
23759
23760
|
}
|
|
23760
23761
|
));
|
|
@@ -23768,8 +23769,8 @@ function ts({ label: n, isModified: e, onReset: t, children: r }) {
|
|
|
23768
23769
|
/* @__PURE__ */ m("div", { className: "shrink-0", children: r })
|
|
23769
23770
|
] });
|
|
23770
23771
|
}
|
|
23771
|
-
const
|
|
23772
|
-
function
|
|
23772
|
+
const xA = "linear-gradient(90deg, #26E8FE 0%, #808AFF 50%, #A41EFE 100%)";
|
|
23773
|
+
function SA({ variable: n, value: e, defaultValue: t, onChange: r }) {
|
|
23773
23774
|
const i = e ?? t, o = !!e && e !== t, s = n.variable === "--ov25-highlight-color";
|
|
23774
23775
|
return /* @__PURE__ */ m(ts, { label: n.label, isModified: o, onReset: () => r(""), children: /* @__PURE__ */ m(
|
|
23775
23776
|
fm,
|
|
@@ -23777,11 +23778,11 @@ function S2({ variable: n, value: e, defaultValue: t, onChange: r }) {
|
|
|
23777
23778
|
value: i,
|
|
23778
23779
|
onChange: r,
|
|
23779
23780
|
className: "!w-7 !h-7 !rounded-md !shadow-sm",
|
|
23780
|
-
emptyDisplayBackground: s ?
|
|
23781
|
+
emptyDisplayBackground: s ? xA : void 0
|
|
23781
23782
|
}
|
|
23782
23783
|
) });
|
|
23783
23784
|
}
|
|
23784
|
-
function
|
|
23785
|
+
function OA({ variable: n, value: e, defaultValue: t, onChange: r }) {
|
|
23785
23786
|
const i = e || t, o = !!e && e !== t;
|
|
23786
23787
|
return /* @__PURE__ */ m(ts, { label: n.label, isModified: o, onReset: () => r(""), children: /* @__PURE__ */ m("div", { className: "flex gap-1", children: Qm.map((s) => /* @__PURE__ */ m(
|
|
23787
23788
|
"button",
|
|
@@ -23805,11 +23806,11 @@ function O2({ variable: n, value: e, defaultValue: t, onChange: r }) {
|
|
|
23805
23806
|
s.value
|
|
23806
23807
|
)) }) });
|
|
23807
23808
|
}
|
|
23808
|
-
function
|
|
23809
|
+
function kA(n) {
|
|
23809
23810
|
return parseFloat(n) || 0;
|
|
23810
23811
|
}
|
|
23811
|
-
function
|
|
23812
|
-
const o =
|
|
23812
|
+
function CA({ variable: n, value: e, defaultValue: t, onChange: r }) {
|
|
23813
|
+
const o = kA(e || t), s = !!e && e !== t, l = n.sliderUnit || "px", a = n.sliderMin ?? 0, c = n.sliderMax ?? 100, u = n.sliderStep ?? 1, h = n.sliderLabels;
|
|
23813
23814
|
return /* @__PURE__ */ R("div", { className: "space-y-1.5", children: [
|
|
23814
23815
|
/* @__PURE__ */ m(ts, { label: n.label, isModified: s, onReset: () => r(""), children: /* @__PURE__ */ R("span", { className: "text-[10px] text-muted-foreground font-mono tabular-nums w-14 text-right", children: [
|
|
23815
23816
|
o,
|
|
@@ -23822,7 +23823,7 @@ function C2({ variable: n, value: e, defaultValue: t, onChange: r }) {
|
|
|
23822
23823
|
] })
|
|
23823
23824
|
] });
|
|
23824
23825
|
}
|
|
23825
|
-
function
|
|
23826
|
+
function AA({ variable: n, value: e, defaultValue: t, onChange: r }) {
|
|
23826
23827
|
const i = e || t, o = !!e && e !== t;
|
|
23827
23828
|
return /* @__PURE__ */ m(ts, { label: n.label, isModified: o, onReset: () => r(""), children: /* @__PURE__ */ R(jn, { value: i, onValueChange: r, children: [
|
|
23828
23829
|
/* @__PURE__ */ m(yn, { className: "h-7 w-[130px] text-xs", children: /* @__PURE__ */ m(Xn, {}) }),
|
|
@@ -23833,16 +23834,16 @@ function ju({ variable: n, value: e, onChange: t }) {
|
|
|
23833
23834
|
const r = { variable: n, value: e, defaultValue: n.defaultValue, onChange: t };
|
|
23834
23835
|
switch (n.control) {
|
|
23835
23836
|
case "color":
|
|
23836
|
-
return /* @__PURE__ */ m(
|
|
23837
|
+
return /* @__PURE__ */ m(SA, { ...r });
|
|
23837
23838
|
case "corner":
|
|
23838
|
-
return /* @__PURE__ */ m(
|
|
23839
|
+
return /* @__PURE__ */ m(OA, { ...r });
|
|
23839
23840
|
case "slider":
|
|
23840
|
-
return /* @__PURE__ */ m(
|
|
23841
|
+
return /* @__PURE__ */ m(CA, { ...r });
|
|
23841
23842
|
case "font":
|
|
23842
|
-
return /* @__PURE__ */ m(
|
|
23843
|
+
return /* @__PURE__ */ m(AA, { ...r });
|
|
23843
23844
|
}
|
|
23844
23845
|
}
|
|
23845
|
-
function
|
|
23846
|
+
function PA({ property: n, value: e, onChange: t }) {
|
|
23846
23847
|
switch (_m[n] || "text") {
|
|
23847
23848
|
case "color":
|
|
23848
23849
|
return /* @__PURE__ */ R("div", { className: "flex items-center gap-1.5 flex-1", children: [
|
|
@@ -23894,23 +23895,23 @@ function P2({ property: n, value: e, onChange: t }) {
|
|
|
23894
23895
|
return /* @__PURE__ */ m(Je, { value: e, onChange: (i) => t(i.target.value), placeholder: "value", className: "h-7 text-[11px] font-mono flex-1" });
|
|
23895
23896
|
}
|
|
23896
23897
|
}
|
|
23897
|
-
function
|
|
23898
|
+
function RA({ property: n, value: e, onPropertyChange: t, onValueChange: r, onRemove: i, availableProperties: o }) {
|
|
23898
23899
|
return /* @__PURE__ */ m("div", { className: "space-y-1", children: /* @__PURE__ */ R("div", { className: "flex items-center gap-1.5", children: [
|
|
23899
23900
|
/* @__PURE__ */ R(jn, { value: n, onValueChange: t, children: [
|
|
23900
23901
|
/* @__PURE__ */ m(yn, { className: "h-7 w-[120px] text-[11px] font-mono shrink-0", children: /* @__PURE__ */ m(Xn, { placeholder: "property" }) }),
|
|
23901
23902
|
/* @__PURE__ */ m(wn, { children: o.map((s) => /* @__PURE__ */ m(xn, { value: s, className: "text-[11px] font-mono", children: s }, s)) })
|
|
23902
23903
|
] }),
|
|
23903
|
-
/* @__PURE__ */ m(
|
|
23904
|
+
/* @__PURE__ */ m(PA, { property: n, value: e, onChange: r }),
|
|
23904
23905
|
/* @__PURE__ */ m("button", { type: "button", onClick: i, className: "shrink-0 p-1 hover:bg-muted rounded", children: /* @__PURE__ */ m(lh, { className: "h-3 w-3 text-muted-foreground" }) })
|
|
23905
23906
|
] }) });
|
|
23906
23907
|
}
|
|
23907
|
-
function
|
|
23908
|
+
function TA({ onClick: n }) {
|
|
23908
23909
|
return /* @__PURE__ */ R("button", { type: "button", onClick: n, className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors", children: [
|
|
23909
23910
|
/* @__PURE__ */ m(oh, { className: "h-3 w-3" }),
|
|
23910
23911
|
"Add property"
|
|
23911
23912
|
] });
|
|
23912
23913
|
}
|
|
23913
|
-
function
|
|
23914
|
+
function EA({ elementStyles: n, onUpdate: e }) {
|
|
23914
23915
|
const [t, r] = xe(!1), [i, o] = xe(""), [s, l] = xe(!1), a = Object.keys(n).filter(
|
|
23915
23916
|
(v) => Object.keys(n[v]).length > 0
|
|
23916
23917
|
), c = me(async () => {
|
|
@@ -23945,7 +23946,7 @@ function E2({ elementStyles: n, onUpdate: e }) {
|
|
|
23945
23946
|
a.map((v) => {
|
|
23946
23947
|
const y = n[v], x = Xa.find((w) => w.selector === v), S = Object.entries(y);
|
|
23947
23948
|
return /* @__PURE__ */ m(
|
|
23948
|
-
|
|
23949
|
+
MA,
|
|
23949
23950
|
{
|
|
23950
23951
|
selector: v,
|
|
23951
23952
|
label: (x == null ? void 0 : x.label) || v,
|
|
@@ -23988,7 +23989,7 @@ function E2({ elementStyles: n, onUpdate: e }) {
|
|
|
23988
23989
|
] })
|
|
23989
23990
|
] });
|
|
23990
23991
|
}
|
|
23991
|
-
function
|
|
23992
|
+
function MA({ selector: n, label: e, entries: t, onUpdateProperty: r, onRemoveProperty: i, onAddProperty: o, onRemoveAll: s }) {
|
|
23992
23993
|
const [l, a] = xe(!0), [c, u] = xe(!1);
|
|
23993
23994
|
return /* @__PURE__ */ R("div", { className: "rounded-md border border-border overflow-hidden", children: [
|
|
23994
23995
|
/* @__PURE__ */ R("div", { className: "flex items-center gap-1.5 px-2 py-1.5 bg-muted/50", children: [
|
|
@@ -24007,7 +24008,7 @@ ${d.map(([p, g]) => ` ${p}: ${g};`).join(`
|
|
|
24007
24008
|
] }),
|
|
24008
24009
|
l && /* @__PURE__ */ R("div", { className: "p-2 space-y-1.5", children: [
|
|
24009
24010
|
t.map(([d, f]) => /* @__PURE__ */ m(
|
|
24010
|
-
|
|
24011
|
+
RA,
|
|
24011
24012
|
{
|
|
24012
24013
|
property: d,
|
|
24013
24014
|
value: f,
|
|
@@ -24018,11 +24019,11 @@ ${d.map(([p, g]) => ` ${p}: ${g};`).join(`
|
|
|
24018
24019
|
},
|
|
24019
24020
|
d || "__empty"
|
|
24020
24021
|
)),
|
|
24021
|
-
/* @__PURE__ */ m(
|
|
24022
|
+
/* @__PURE__ */ m(TA, { onClick: o })
|
|
24022
24023
|
] })
|
|
24023
24024
|
] });
|
|
24024
24025
|
}
|
|
24025
|
-
function
|
|
24026
|
+
function NA({ label: n, description: e, defaultOpen: t = !0, children: r }) {
|
|
24026
24027
|
const [i, o] = xe(t);
|
|
24027
24028
|
return /* @__PURE__ */ R("div", { className: "space-y-2.5", children: [
|
|
24028
24029
|
/* @__PURE__ */ R("button", { type: "button", onClick: () => o(!i), className: "flex items-center gap-1.5 w-full text-left", children: [
|
|
@@ -24032,7 +24033,7 @@ function N2({ label: n, description: e, defaultOpen: t = !0, children: r }) {
|
|
|
24032
24033
|
i && /* @__PURE__ */ m("div", { className: "space-y-2.5", children: r })
|
|
24033
24034
|
] });
|
|
24034
24035
|
}
|
|
24035
|
-
function
|
|
24036
|
+
function DA({ currentSettings: n, updateSettings: e, updateNested: t }) {
|
|
24036
24037
|
const r = Mr(() => Object.keys(n.style).length > 0 || Object.keys(n.elementStyles).length > 0, [n.style, n.elementStyles]), i = me(() => {
|
|
24037
24038
|
e("style", {}), e("elementStyles", {});
|
|
24038
24039
|
}, [e]), o = me((l, a) => {
|
|
@@ -24066,7 +24067,7 @@ function D2({ currentSettings: n, updateSettings: e, updateNested: t }) {
|
|
|
24066
24067
|
var d;
|
|
24067
24068
|
const c = l.variables.find((f) => f.variable === "--ov25-highlight-color"), u = (((d = n.style[$u]) == null ? void 0 : d.trim().toLowerCase()) || "") === Vu, h = l.id === "variants" ? l.variables.filter((f) => f.variable !== "--ov25-highlight-color") : l.variables;
|
|
24068
24069
|
return /* @__PURE__ */ R("div", { children: [
|
|
24069
|
-
/* @__PURE__ */ R(
|
|
24070
|
+
/* @__PURE__ */ R(NA, { label: l.label, description: l.description, defaultOpen: a < 2, children: [
|
|
24070
24071
|
l.id === "variants" && c && /* @__PURE__ */ R("div", { className: "rounded-md border border-border bg-muted/40 p-3 space-y-3 mb-2.5", children: [
|
|
24071
24072
|
/* @__PURE__ */ m(Ue, { description: "Padding around the selected thumb shows this frame: gradient by default, or outline color when custom is on.", children: "Variant outline" }),
|
|
24072
24073
|
/* @__PURE__ */ m(
|
|
@@ -24100,7 +24101,7 @@ function D2({ currentSettings: n, updateSettings: e, updateNested: t }) {
|
|
|
24100
24101
|
] }, l.id);
|
|
24101
24102
|
}),
|
|
24102
24103
|
/* @__PURE__ */ m(Lt, {}),
|
|
24103
|
-
/* @__PURE__ */ m(
|
|
24104
|
+
/* @__PURE__ */ m(EA, { elementStyles: n.elementStyles, onUpdate: s }),
|
|
24104
24105
|
/* @__PURE__ */ m(Lt, {}),
|
|
24105
24106
|
/* @__PURE__ */ R("div", { className: "space-y-2", children: [
|
|
24106
24107
|
/* @__PURE__ */ m(Ue, { description: "Raw CSS that overrides everything above", children: "Custom CSS" }),
|
|
@@ -24124,49 +24125,50 @@ const Xu = [
|
|
|
24124
24125
|
label: "Bed",
|
|
24125
24126
|
description: "Bed configurator (standard shell, bed UX options)"
|
|
24126
24127
|
}
|
|
24127
|
-
],
|
|
24128
|
+
], IA = {
|
|
24128
24129
|
standard: "Standard",
|
|
24129
24130
|
snap2: "Snap2",
|
|
24130
24131
|
bedConfigurator: "Bed configurator"
|
|
24131
|
-
},
|
|
24132
|
+
}, LA = [
|
|
24132
24133
|
{ value: "none", label: "None", desc: "No product images" },
|
|
24133
24134
|
{ value: "carousel", label: "Carousel", desc: "Horizontal scroll" },
|
|
24134
24135
|
{ value: "stacked", label: "Stacked", desc: "Vertical grid" }
|
|
24135
|
-
],
|
|
24136
|
+
], BA = [
|
|
24136
24137
|
{ value: "inline", label: "Inline", desc: "Embedded beside the gallery" },
|
|
24137
24138
|
{ value: "sheet", label: "Sheet", desc: "Slides in from the sides." },
|
|
24138
24139
|
{ value: "modal", label: "Modal", desc: "Centered overlay dialog" },
|
|
24139
24140
|
{ value: "variants-only-sheet", label: "Variants sheet", desc: "Sheet with variants only" }
|
|
24140
|
-
],
|
|
24141
|
+
], QA = [
|
|
24141
24142
|
{ value: "inline", label: "Inline", desc: "Embedded below gallery" },
|
|
24142
24143
|
{ value: "drawer", label: "Drawer", desc: "Slides up from bottom" },
|
|
24143
24144
|
{ value: "modal", label: "Modal", desc: "Centered overlay dialog" },
|
|
24144
24145
|
{ value: "variants-only-sheet", label: "Variants sheet", desc: "Sheet with variants only" }
|
|
24145
|
-
],
|
|
24146
|
+
], _A = [
|
|
24146
24147
|
{ value: "single-button", label: "Single", desc: "One configure button" },
|
|
24147
24148
|
{ value: "split-buttons", label: "Split", desc: "Separate add & configure" }
|
|
24148
|
-
],
|
|
24149
|
+
], FA = [
|
|
24149
24150
|
{ value: "tree", label: "Tree", desc: "Nested groups" },
|
|
24150
24151
|
{ value: "list", label: "List", desc: "Flat list" },
|
|
24151
24152
|
{ value: "tabs", label: "Tabs", desc: "Tabbed groups" },
|
|
24152
24153
|
{ value: "accordion", label: "Accordion", desc: "Collapsible groups" },
|
|
24153
24154
|
{ value: "wizard", label: "Wizard", desc: "Step by step" }
|
|
24154
|
-
],
|
|
24155
|
+
], zA = [
|
|
24155
24156
|
{ key: "gallery", label: "Configurator" },
|
|
24156
24157
|
{ key: "price", label: "Price" },
|
|
24157
24158
|
{ key: "name", label: "Product name" },
|
|
24158
24159
|
{ key: "variants", label: "Variant controls" },
|
|
24159
24160
|
{ key: "swatches", label: "Swatches" },
|
|
24160
24161
|
{ key: "configureButton", label: "Configure button" }
|
|
24161
|
-
], $
|
|
24162
|
+
], $A = [
|
|
24162
24163
|
{ key: "hidePricing", label: "Hide pricing" },
|
|
24164
|
+
{ key: "disableAddToCart", label: "Disable Add to Cart button" },
|
|
24163
24165
|
{ key: "hideAr", label: "Hide AR button" },
|
|
24164
24166
|
{ key: "deferThreeD", label: "Defer 3D loading" },
|
|
24165
24167
|
{ key: "showOptional", label: "Show optional variants" },
|
|
24166
24168
|
{ key: "forceMobile", label: "Force mobile layout" },
|
|
24167
24169
|
{ key: "autoOpen", label: "Auto-open configurator" }
|
|
24168
24170
|
];
|
|
24169
|
-
function
|
|
24171
|
+
function VA({ formState: n, currentSettings: e, setLayout: t, updateSettings: r, updateNested: i, getExportJson: o, onSave: s, hideSaveButton: l }) {
|
|
24170
24172
|
const [a, c] = xe(!1), [u, h] = xe("current"), [d, f] = xe(!1), p = n.layout === "snap2", g = n.layout === "bedConfigurator", v = (w, O) => {
|
|
24171
24173
|
i("selectors", w, { ...e.selectors[w], enabled: O });
|
|
24172
24174
|
}, y = me(() => {
|
|
@@ -24238,7 +24240,7 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24238
24240
|
/* @__PURE__ */ m(Lt, {}),
|
|
24239
24241
|
/* @__PURE__ */ R("div", { className: "space-y-2.5", children: [
|
|
24240
24242
|
/* @__PURE__ */ m(Ue, { description: "Toggle which UI elements the configurator injects into your page", children: "Elements" }),
|
|
24241
|
-
|
|
24243
|
+
zA.map(({ key: w, label: O }) => /* @__PURE__ */ m(
|
|
24242
24244
|
it,
|
|
24243
24245
|
{
|
|
24244
24246
|
label: O,
|
|
@@ -24260,8 +24262,8 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24260
24262
|
mobileValue: e.configurator.displayModeMobile,
|
|
24261
24263
|
onDesktopChange: (w) => i("configurator", "displayModeDesktop", w),
|
|
24262
24264
|
onMobileChange: (w) => i("configurator", "displayModeMobile", w),
|
|
24263
|
-
options:
|
|
24264
|
-
mobileOptions:
|
|
24265
|
+
options: BA,
|
|
24266
|
+
mobileOptions: QA
|
|
24265
24267
|
}
|
|
24266
24268
|
),
|
|
24267
24269
|
/* @__PURE__ */ m(
|
|
@@ -24272,7 +24274,7 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24272
24274
|
mobileValue: e.configurator.triggerStyleMobile,
|
|
24273
24275
|
onDesktopChange: (w) => i("configurator", "triggerStyleDesktop", w),
|
|
24274
24276
|
onMobileChange: (w) => i("configurator", "triggerStyleMobile", w),
|
|
24275
|
-
options:
|
|
24277
|
+
options: _A
|
|
24276
24278
|
}
|
|
24277
24279
|
),
|
|
24278
24280
|
/* @__PURE__ */ m(
|
|
@@ -24283,7 +24285,7 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24283
24285
|
mobileValue: e.configurator.variantDisplayMobile,
|
|
24284
24286
|
onDesktopChange: (w) => i("configurator", "variantDisplayDesktop", w),
|
|
24285
24287
|
onMobileChange: (w) => i("configurator", "variantDisplayMobile", w),
|
|
24286
|
-
options:
|
|
24288
|
+
options: FA
|
|
24287
24289
|
}
|
|
24288
24290
|
),
|
|
24289
24291
|
/* @__PURE__ */ R("div", { children: [
|
|
@@ -24312,7 +24314,7 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24312
24314
|
mobileValue: e.carousel.mobile,
|
|
24313
24315
|
onDesktopChange: (w) => i("carousel", "desktop", w),
|
|
24314
24316
|
onMobileChange: (w) => i("carousel", "mobile", w),
|
|
24315
|
-
options:
|
|
24317
|
+
options: LA
|
|
24316
24318
|
}
|
|
24317
24319
|
),
|
|
24318
24320
|
/* @__PURE__ */ R("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
@@ -24452,7 +24454,7 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24452
24454
|
/* @__PURE__ */ m(Lt, {}),
|
|
24453
24455
|
/* @__PURE__ */ R("div", { className: "space-y-2.5", children: [
|
|
24454
24456
|
/* @__PURE__ */ m(Ue, { description: "Fine-tune loading behaviour, visibility, and layout overrides", children: "Behaviour" }),
|
|
24455
|
-
$
|
|
24457
|
+
$A.map(({ key: w, label: O }) => /* @__PURE__ */ m(
|
|
24456
24458
|
it,
|
|
24457
24459
|
{
|
|
24458
24460
|
label: O,
|
|
@@ -24464,7 +24466,7 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24464
24466
|
] }),
|
|
24465
24467
|
/* @__PURE__ */ m("div", { className: "h-4" })
|
|
24466
24468
|
] }) }) }),
|
|
24467
|
-
/* @__PURE__ */ m(Vs, { value: "style", className: "flex-1 min-h-0 mt-0", children: /* @__PURE__ */ m(
|
|
24469
|
+
/* @__PURE__ */ m(Vs, { value: "style", className: "flex-1 min-h-0 mt-0", children: /* @__PURE__ */ m(DA, { currentSettings: e, updateSettings: r, updateNested: i }) }),
|
|
24468
24470
|
!l && /* @__PURE__ */ m("div", { className: "shrink-0 pt-3 pb-1", children: /* @__PURE__ */ R(
|
|
24469
24471
|
"button",
|
|
24470
24472
|
{
|
|
@@ -24491,7 +24493,7 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24491
24493
|
onClick: () => h("current"),
|
|
24492
24494
|
className: `px-3 py-1.5 rounded-full transition-colors ${u === "current" ? "bg-foreground text-background shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
|
|
24493
24495
|
children: [
|
|
24494
|
-
|
|
24496
|
+
IA[n.layout],
|
|
24495
24497
|
" only"
|
|
24496
24498
|
]
|
|
24497
24499
|
}
|
|
@@ -24524,8 +24526,8 @@ function V2({ formState: n, currentSettings: e, setLayout: t, updateSettings: r,
|
|
|
24524
24526
|
] }) })
|
|
24525
24527
|
] });
|
|
24526
24528
|
}
|
|
24527
|
-
const
|
|
24528
|
-
function
|
|
24529
|
+
const WA = "OV25_CONFIG", HA = "OV25_PREVIEW_READY";
|
|
24530
|
+
function UA(n, e) {
|
|
24529
24531
|
if (n) return n;
|
|
24530
24532
|
if (typeof window > "u" || e === !1) return ns;
|
|
24531
24533
|
const t = window.location.hostname;
|
|
@@ -24536,18 +24538,18 @@ const Gu = {
|
|
|
24536
24538
|
mobile: { width: "375px", label: "Mobile" }
|
|
24537
24539
|
};
|
|
24538
24540
|
function Yu(n, e) {
|
|
24539
|
-
n != null && n.contentWindow && n.contentWindow.postMessage({ type:
|
|
24541
|
+
n != null && n.contentWindow && n.contentWindow.postMessage({ type: WA, config: e }, "*");
|
|
24540
24542
|
}
|
|
24541
|
-
function
|
|
24543
|
+
function jA({ serializableConfig: n, previewBaseUrl: e, useLocalPreview: t }) {
|
|
24542
24544
|
const r = _e(null), i = _e(n), [o, s] = xe("desktop"), [l, a] = xe(0);
|
|
24543
24545
|
i.current = n;
|
|
24544
|
-
const c =
|
|
24546
|
+
const c = UA(e, t), u = me(() => {
|
|
24545
24547
|
Yu(r.current, i.current);
|
|
24546
24548
|
}, []);
|
|
24547
24549
|
return qe(() => {
|
|
24548
24550
|
const h = (d) => {
|
|
24549
24551
|
var f, p;
|
|
24550
|
-
((f = d.data) == null ? void 0 : f.type) ===
|
|
24552
|
+
((f = d.data) == null ? void 0 : f.type) === HA && (p = r.current) != null && p.contentWindow && d.source === r.current.contentWindow && Yu(r.current, i.current);
|
|
24551
24553
|
};
|
|
24552
24554
|
return window.addEventListener("message", h), () => window.removeEventListener("message", h);
|
|
24553
24555
|
}, []), qe(() => {
|
|
@@ -24630,7 +24632,7 @@ function j2({ serializableConfig: n, previewBaseUrl: e, useLocalPreview: t }) {
|
|
|
24630
24632
|
)
|
|
24631
24633
|
] });
|
|
24632
24634
|
}
|
|
24633
|
-
function
|
|
24635
|
+
function e2(n) {
|
|
24634
24636
|
const e = {
|
|
24635
24637
|
apiKey: n.apiKey,
|
|
24636
24638
|
productLink: n.productLink,
|
|
@@ -24649,9 +24651,9 @@ function eA(n) {
|
|
|
24649
24651
|
getExportJson: a
|
|
24650
24652
|
} = Jm(e);
|
|
24651
24653
|
return /* @__PURE__ */ R("div", { className: n.className || "h-screen flex", children: [
|
|
24652
|
-
!n.hidePreview && /* @__PURE__ */ m("main", { className: "flex-1 min-h-0 p-4", children: /* @__PURE__ */ m(
|
|
24654
|
+
!n.hidePreview && /* @__PURE__ */ m("main", { className: "flex-1 min-h-0 p-4", children: /* @__PURE__ */ m(jA, { serializableConfig: l, previewBaseUrl: n.previewBaseUrl, useLocalPreview: n.useLocalPreview }) }),
|
|
24653
24655
|
/* @__PURE__ */ m("aside", { className: n.hidePreview ? "w-full h-full flex flex-col" : "w-[370px] shrink-0 border-l bg-white px-4 pt-4 pb-4 h-full flex flex-col overflow-hidden", children: /* @__PURE__ */ m(
|
|
24654
|
-
|
|
24656
|
+
VA,
|
|
24655
24657
|
{
|
|
24656
24658
|
formState: t,
|
|
24657
24659
|
currentSettings: r,
|
|
@@ -24666,9 +24668,9 @@ function eA(n) {
|
|
|
24666
24668
|
] });
|
|
24667
24669
|
}
|
|
24668
24670
|
export {
|
|
24669
|
-
|
|
24670
|
-
|
|
24671
|
-
|
|
24671
|
+
VA as ConfigPanel,
|
|
24672
|
+
e2 as ConfiguratorSetup,
|
|
24673
|
+
jA as PreviewArea,
|
|
24672
24674
|
ja as STYLE_GROUPS,
|
|
24673
24675
|
_s as buildSerializableConfig,
|
|
24674
24676
|
Ju as generateElementCSS,
|