@bluepic/embed 0.1.26 → 0.1.28
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/lib/bluepic-embed.es.js
CHANGED
|
@@ -94459,7 +94459,8 @@ const BluepicLogo = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_re
|
|
|
94459
94459
|
inline: { type: Boolean, default: !1 },
|
|
94460
94460
|
exportActions: {},
|
|
94461
94461
|
embedProjectId: {},
|
|
94462
|
-
embedV2Server: {}
|
|
94462
|
+
embedV2Server: {},
|
|
94463
|
+
branding: { type: Boolean }
|
|
94463
94464
|
}, {
|
|
94464
94465
|
serial: {
|
|
94465
94466
|
required: !1
|
|
@@ -95211,7 +95212,7 @@ const BluepicLogo = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_re
|
|
|
95211
95212
|
])
|
|
95212
95213
|
], 6));
|
|
95213
95214
|
}
|
|
95214
|
-
}),
|
|
95215
|
+
}), BluepicEmbeddedEditor_vue_vue_type_style_index_0_scoped_beb077c7_lang = "", BluepicEmbeddedEditor = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-beb077c7"]]), _hoisted_1$a = { class: "collection-field-popup" }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
95215
95216
|
__name: "CollectionFieldPopup",
|
|
95216
95217
|
props: /* @__PURE__ */ mergeModels({
|
|
95217
95218
|
layout: {},
|
|
@@ -98930,7 +98931,8 @@ async function getProjectWithRetries(m, c, de, ye, ke) {
|
|
|
98930
98931
|
const Ze = await fetch(
|
|
98931
98932
|
`https://embed-api-v2.bluepic.workers.dev/api/public/project?${new URLSearchParams({
|
|
98932
98933
|
hostname: m,
|
|
98933
|
-
slug: c
|
|
98934
|
+
slug: c,
|
|
98935
|
+
env: ke
|
|
98934
98936
|
})}`,
|
|
98935
98937
|
{
|
|
98936
98938
|
method: "GET"
|
|
@@ -98951,46 +98953,46 @@ window.addEventListener("load", async () => {
|
|
|
98951
98953
|
const m = document.querySelectorAll(".bluepic-embed");
|
|
98952
98954
|
console.log("Auto-BluepicEmbed elements", m);
|
|
98953
98955
|
for (const c of m) {
|
|
98954
|
-
const de = c.getAttribute("data-embed-project-id"), ye = c.getAttribute("data-template-id"), ke = c.getAttribute("data-init-data"),
|
|
98956
|
+
const de = c.getAttribute("data-embed-project-id"), ye = c.getAttribute("data-template-id"), ke = c.getAttribute("data-stripe-env") ?? "prod", xe = c.getAttribute("data-init-data"), Ze = c.getAttribute("data-studio-resources-base-url") ?? void 0, ie = c.getAttribute("data-cloudflare-pages-hostname") ?? void 0, ii = c.getAttribute("data-bx-core-version") ?? void 0, di = c.getAttribute("data-published-slug") ?? void 0, li = xe ? JSON.parse(xe) : void 0;
|
|
98955
98957
|
if (de) {
|
|
98956
|
-
const
|
|
98957
|
-
if (!
|
|
98958
|
+
const mi = await getProjectWithRetries("live.bluepic.io", de, 3, 2e3, ke);
|
|
98959
|
+
if (!mi) {
|
|
98958
98960
|
console.error("No embedProject found");
|
|
98959
98961
|
continue;
|
|
98960
98962
|
}
|
|
98961
|
-
const
|
|
98962
|
-
initData:
|
|
98963
|
-
displayMode:
|
|
98964
|
-
allowPanAndZoom:
|
|
98965
|
-
studioResourcesBaseUrl:
|
|
98966
|
-
cloudflarePagesHostname:
|
|
98967
|
-
bxCoreVersion:
|
|
98968
|
-
publishedSlug:
|
|
98969
|
-
darkmode:
|
|
98963
|
+
const Ei = Color(mi.config.backgroundColor).isDark(), Ai = new BluepicEmbed(c, mi.templates[0], {
|
|
98964
|
+
initData: li,
|
|
98965
|
+
displayMode: mi.config.layout,
|
|
98966
|
+
allowPanAndZoom: mi.config.allowPanAndZoom,
|
|
98967
|
+
studioResourcesBaseUrl: Ze,
|
|
98968
|
+
cloudflarePagesHostname: ie,
|
|
98969
|
+
bxCoreVersion: ii,
|
|
98970
|
+
publishedSlug: di,
|
|
98971
|
+
darkmode: Ei,
|
|
98970
98972
|
theme: (() => {
|
|
98971
|
-
if (
|
|
98972
|
-
const
|
|
98973
|
+
if (mi.config.backgroundColor) {
|
|
98974
|
+
const Ci = mi.config.backgroundColor, Bi = Ei ? Color(Ci).darken(0.1).hex() : Color(Ci).lighten(0.1).hex();
|
|
98973
98975
|
return {
|
|
98974
|
-
fieldsViewBackgroundColor:
|
|
98975
|
-
editorViewBackgroundColor:
|
|
98976
|
+
fieldsViewBackgroundColor: Ci,
|
|
98977
|
+
editorViewBackgroundColor: Bi
|
|
98976
98978
|
};
|
|
98977
98979
|
}
|
|
98978
98980
|
})()
|
|
98979
98981
|
});
|
|
98980
|
-
console.log("!", c,
|
|
98982
|
+
console.log("!", c, Ai);
|
|
98981
98983
|
} else if (ye) {
|
|
98982
|
-
const
|
|
98983
|
-
initData:
|
|
98984
|
-
displayMode:
|
|
98985
|
-
allowPanAndZoom:
|
|
98986
|
-
darkmode:
|
|
98987
|
-
studioResourcesBaseUrl:
|
|
98988
|
-
cloudflarePagesHostname:
|
|
98989
|
-
bxCoreVersion:
|
|
98990
|
-
publishedSlug:
|
|
98991
|
-
theme:
|
|
98984
|
+
const mi = c.getAttribute("data-display-mode"), Ei = c.getAttribute("data-allow-pan-and-zoom"), Ai = c.getAttribute("data-darkmode"), Ci = c.getAttribute("data-bx-core-version") ?? void 0, Bi = c.getAttribute("data-published-slug") ?? void 0, $i = c.getAttribute("data-theme"), Xi = xe ? JSON.parse(xe) : void 0, Di = $i ? JSON.parse($i) : void 0, Gi = Ei === "true", Ui = Ai === "true", ar = mi === "mobile" ? "mobile" : mi === "stack" ? "stack" : "auto", nr = new BluepicEmbed(c, ye, {
|
|
98985
|
+
initData: Xi,
|
|
98986
|
+
displayMode: ar,
|
|
98987
|
+
allowPanAndZoom: Gi,
|
|
98988
|
+
darkmode: Ui,
|
|
98989
|
+
studioResourcesBaseUrl: Ze,
|
|
98990
|
+
cloudflarePagesHostname: ie,
|
|
98991
|
+
bxCoreVersion: Ci,
|
|
98992
|
+
publishedSlug: Bi,
|
|
98993
|
+
theme: Di
|
|
98992
98994
|
});
|
|
98993
|
-
console.log("!", c,
|
|
98995
|
+
console.log("!", c, nr);
|
|
98994
98996
|
}
|
|
98995
98997
|
}
|
|
98996
98998
|
});
|