@moonbase.sh/storefront 2.4.0 → 2.4.1
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/moonbase.js +33 -15
- package/dist/moonbase.umd.cjs +12 -12
- package/package.json +2 -2
package/dist/moonbase.js
CHANGED
|
@@ -9796,22 +9796,40 @@ function ul(e) {
|
|
|
9796
9796
|
return;
|
|
9797
9797
|
const n = (t = document.head.querySelector('meta[name="color-scheme"]')) == null ? void 0 : t.getAttribute("content");
|
|
9798
9798
|
n && (e += `${e.includes("?") ? "&" : "?"}color_scheme=${encodeURIComponent(n)}`);
|
|
9799
|
-
const r =
|
|
9800
|
-
r
|
|
9801
|
-
const o =
|
|
9802
|
-
|
|
9803
|
-
|
|
9799
|
+
const r = document.createElement("iframe");
|
|
9800
|
+
r.id = "moonbase-checkout", r.src = e, r.style.border = "none", r.style.colorScheme = "normal", r.style.backgroundColor = "transparent", r.style.zIndex = Number.MAX_SAFE_INTEGER.toString(), r.setAttribute("background", "transparent"), r.setAttribute("frameborder", "0"), r.setAttribute("allowtransparency", "true"), r.setAttribute("allow", "payment"), r.style.setProperty("position", "fixed", "important"), r.style.setProperty("top", "0px", "important"), r.style.setProperty("left", "0px", "important"), r.style.setProperty("max-width", "none", "important"), r.style.setProperty("max-height", "none", "important"), r.style.setProperty("min-width", "0", "important"), r.style.setProperty("min-height", "0", "important"), r.style.setProperty("transform-origin", "0 0", "important");
|
|
9801
|
+
const o = () => {
|
|
9802
|
+
const a = Hh();
|
|
9803
|
+
if (a === null) {
|
|
9804
|
+
r.style.removeProperty("transform"), r.style.setProperty("width", "100%", "important"), r.style.setProperty("height", "100%", "important");
|
|
9805
|
+
return;
|
|
9806
|
+
}
|
|
9807
|
+
r.style.setProperty("transform", `scale(${a})`, "important"), r.style.setProperty("width", `${window.innerWidth / a}px`, "important"), r.style.setProperty("height", `${window.innerHeight / a}px`, "important");
|
|
9808
|
+
};
|
|
9809
|
+
o(), document.body.append(r), document.documentElement.style.overflow = "hidden";
|
|
9810
|
+
const s = new MutationObserver(o);
|
|
9811
|
+
s.observe(document.head, {
|
|
9812
|
+
childList: !0,
|
|
9813
|
+
subtree: !0,
|
|
9814
|
+
attributes: !0,
|
|
9815
|
+
attributeFilter: ["content", "name"]
|
|
9816
|
+
}), window.addEventListener("resize", o), window.addEventListener("orientationchange", o);
|
|
9817
|
+
const i = () => {
|
|
9818
|
+
s.disconnect(), window.removeEventListener("resize", o), window.removeEventListener("orientationchange", o);
|
|
9819
|
+
};
|
|
9820
|
+
window.onmessage = function(a) {
|
|
9821
|
+
var l;
|
|
9804
9822
|
try {
|
|
9805
|
-
const
|
|
9806
|
-
|
|
9807
|
-
detail:
|
|
9808
|
-
}))),
|
|
9809
|
-
detail:
|
|
9810
|
-
})),
|
|
9811
|
-
detail:
|
|
9823
|
+
const u = S1.parse(a.data);
|
|
9824
|
+
u.event === "close" && (document.body.contains(r) && (i(), document.documentElement.style.removeProperty("overflow"), document.body.removeChild(r)), window.dispatchEvent(new CustomEvent("moonbase-checkout-closed", {
|
|
9825
|
+
detail: u
|
|
9826
|
+
}))), u.event === "billing-details-updated" && window.dispatchEvent(new CustomEvent("moonbase-checkout-billing-details-updated", {
|
|
9827
|
+
detail: u
|
|
9828
|
+
})), u.event === "completed" && window.dispatchEvent(new CustomEvent("moonbase-checkout-completed", {
|
|
9829
|
+
detail: u
|
|
9812
9830
|
}));
|
|
9813
|
-
} catch (
|
|
9814
|
-
((
|
|
9831
|
+
} catch (u) {
|
|
9832
|
+
((l = a.data) == null ? void 0 : l.source) === "moonbase-checkout" && console.error("Could not parse event:", a.data, u);
|
|
9815
9833
|
}
|
|
9816
9834
|
};
|
|
9817
9835
|
}
|
|
@@ -17651,7 +17669,7 @@ const ge = /* @__PURE__ */ br(Mk, [["render", Rk]]), Lk = { class: "moonbase:abo
|
|
|
17651
17669
|
}, Uk = /* @__PURE__ */ ae({
|
|
17652
17670
|
__name: "About",
|
|
17653
17671
|
setup(e) {
|
|
17654
|
-
const t = we(), n = typeof window < "u" && window.__moonbaseTestVersionOverride || "2.4.
|
|
17672
|
+
const t = we(), n = typeof window < "u" && window.__moonbaseTestVersionOverride || "2.4.1", r = W(() => {
|
|
17655
17673
|
const o = n.match(/-(next)-/);
|
|
17656
17674
|
if (o)
|
|
17657
17675
|
return o[1];
|