@builder.io/sdk-vue 2.0.31 → 3.0.0
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/browser/{awaiter-zzvk2NgH.cjs → awaiter-XqdWIlSd.cjs} +1 -1
- package/lib/browser/{awaiter-CBFYn8Rc.js → awaiter-pA1AuJSn.js} +1 -1
- package/lib/browser/{block-styles-eG8aHEnR.cjs → block-styles-i6cpfJgi.cjs} +1 -1
- package/lib/browser/{block-styles-1TjUGG0M.js → block-styles-ytvCIXMJ.js} +1 -1
- package/lib/browser/{block-wrapper-t1YyB3qf.cjs → block-wrapper-4Ddr9Ro1.cjs} +1 -1
- package/lib/browser/{block-wrapper-mHstZCm3.js → block-wrapper-UdxI8OCZ.js} +3 -3
- package/lib/browser/{component-ref-4iD2JOXe.cjs → component-ref-1UbPu9gf.cjs} +1 -1
- package/lib/browser/{component-ref-SiTniDkf.js → component-ref-CKlhzm4D.js} +3 -3
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/get-content/index.d.ts +1 -1
- package/lib/browser/{get-block-properties-WnxZnXsK.js → get-block-properties-C5uVrmU3.js} +1 -1
- package/lib/browser/{get-block-properties-qCNopliW.cjs → get-block-properties-pUTK7jyd.cjs} +1 -1
- package/lib/browser/{index-EOpyZR3_.cjs → index-N0sk5VKQ.cjs} +3 -3
- package/lib/browser/{index-nG43II0w.js → index-tDGIvfSj.js} +50 -52
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-WkFOmnw-.js → repeated-block-9RoptQEu.js} +2 -2
- package/lib/browser/{repeated-block-Zrynel2G.cjs → repeated-block-h7zSwvTu.cjs} +1 -1
- package/lib/edge/{awaiter-tqyHYP24.cjs → awaiter-V9rb_a7Q.cjs} +1 -1
- package/lib/edge/{awaiter-ETIQ3Y1O.js → awaiter-yLbJL6E0.js} +1 -1
- package/lib/edge/{block-styles-xeGiE5b9.js → block-styles-8rJVuUSs.js} +1 -1
- package/lib/edge/{block-styles-UFZvXK12.cjs → block-styles-ZvyyqPxg.cjs} +1 -1
- package/lib/edge/{block-wrapper-rWfNhUAl.js → block-wrapper-jr4gy0mp.js} +3 -3
- package/lib/edge/{block-wrapper-Kx9lGbVC.cjs → block-wrapper-m7_ZegT7.cjs} +1 -1
- package/lib/edge/{component-ref-jL8V5feH.cjs → component-ref-_qPvv-Qb.cjs} +1 -1
- package/lib/edge/{component-ref-2gTfqFWa.js → component-ref-uZEXLaN7.js} +3 -3
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/get-content/index.d.ts +1 -1
- package/lib/edge/{get-block-properties-U4aZTxWN.cjs → get-block-properties-4gxUIMch.cjs} +1 -1
- package/lib/edge/{get-block-properties-rSB9DXAm.js → get-block-properties-IQuU2YJ7.js} +1 -1
- package/lib/edge/{index-1wQww2g6.cjs → index-LY5CDeZs.cjs} +12 -12
- package/lib/edge/{index-61CJkECh.js → index-Qfd4FC6c.js} +66 -68
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/{node/repeated-block-z6QgHzWM.cjs → edge/repeated-block-48-vVIqv.cjs} +1 -1
- package/lib/edge/{repeated-block-sibYzFQC.js → repeated-block-J3gmF8cW.js} +2 -2
- package/lib/node/{awaiter-YeTQ3hOV.cjs → awaiter-pBLgVddK.cjs} +1 -1
- package/lib/node/{awaiter--0e1RmdV.js → awaiter-yHq7zte0.js} +1 -1
- package/lib/node/{block-styles-OsL48K76.cjs → block-styles-JKmWb0f1.cjs} +1 -1
- package/lib/node/{block-styles-mmmG5Zvb.js → block-styles-UKsSQRSe.js} +1 -1
- package/lib/node/{block-wrapper-6FrZVnI8.js → block-wrapper-Ql9JBZTu.js} +3 -3
- package/lib/node/{block-wrapper-hK9iEXhq.cjs → block-wrapper-UkD5beND.cjs} +1 -1
- package/lib/node/{component-ref-u2wfD4PU.js → component-ref-GQuqlfCd.js} +3 -3
- package/lib/node/{component-ref-yN1A7uFk.cjs → component-ref-KSw6L492.cjs} +1 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/get-content/index.d.ts +1 -1
- package/lib/node/{get-block-properties-EkNcjp0K.cjs → get-block-properties-RPZW1-a0.cjs} +1 -1
- package/lib/node/{get-block-properties-QhUhlrxy.js → get-block-properties-y-gYAn-I.js} +1 -1
- package/lib/node/{index-GJHkrBmN.js → index-5bUk_uLu.js} +66 -68
- package/lib/node/{index-EBQK2Vx-.cjs → index-W6CSiGOt.cjs} +3 -3
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/node/{repeated-block-h-cU9AMQ.js → repeated-block-_Z2mgv3f.js} +2 -2
- package/lib/{edge/repeated-block-YThkmdHp.cjs → node/repeated-block-sc5a_YJK.cjs} +1 -1
- package/package.json +1 -1
|
@@ -41,8 +41,8 @@ function St(e, t, n, o, r, i) {
|
|
|
41
41
|
const pe = /* @__PURE__ */ g(vt, [["render", St]]), Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42
42
|
__proto__: null,
|
|
43
43
|
default: pe
|
|
44
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
45
|
-
switch (
|
|
44
|
+
}, Symbol.toStringTag, { value: "Module" })), E = "vue", _ = () => {
|
|
45
|
+
switch (E) {
|
|
46
46
|
case "react":
|
|
47
47
|
case "reactNative":
|
|
48
48
|
case "rsc":
|
|
@@ -130,7 +130,7 @@ function Et(e, ...t) {
|
|
|
130
130
|
delete n[o];
|
|
131
131
|
return n;
|
|
132
132
|
}
|
|
133
|
-
const Q = "[Builder.io]: ",
|
|
133
|
+
const Q = "[Builder.io]: ", B = {
|
|
134
134
|
log: (...e) => console.log(Q, ...e),
|
|
135
135
|
error: (...e) => console.error(Q, ...e),
|
|
136
136
|
warn: (...e) => console.warn(Q, ...e),
|
|
@@ -151,7 +151,7 @@ const Pt = (e) => {
|
|
|
151
151
|
function Bt() {
|
|
152
152
|
return $() && window.self !== window.top;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function P(e) {
|
|
155
155
|
return Bt() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
|
|
156
156
|
Oe(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
|
|
157
157
|
}
|
|
@@ -179,7 +179,7 @@ const xt = () => {
|
|
|
179
179
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
180
180
|
},
|
|
181
181
|
any() {
|
|
182
|
-
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() ||
|
|
182
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || E === "reactNative";
|
|
183
183
|
}
|
|
184
184
|
}, n = e.match(/Tablet|iPad/i), o = xt();
|
|
185
185
|
return {
|
|
@@ -200,7 +200,7 @@ const xt = () => {
|
|
|
200
200
|
context: t,
|
|
201
201
|
event: n
|
|
202
202
|
}), Wt = () => ({
|
|
203
|
-
isEditing:
|
|
203
|
+
isEditing: P(),
|
|
204
204
|
isBrowser: $(),
|
|
205
205
|
isServer: !$(),
|
|
206
206
|
getUserAttributes: () => Fe()
|
|
@@ -264,7 +264,7 @@ const Ft = ({
|
|
|
264
264
|
if (!Ot())
|
|
265
265
|
return !1;
|
|
266
266
|
const t = process.arch === "arm64", n = process.version.startsWith("v20"), o = (r = process.env.NODE_OPTIONS) == null ? void 0 : r.includes("--no-node-snapshot");
|
|
267
|
-
return t && n && !o ? (e &&
|
|
267
|
+
return t && n && !o ? (e && B.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
268
268
|
}, Dt = (e) => ($() || Ft({
|
|
269
269
|
shouldLogWarning: !0
|
|
270
270
|
}), Ce(e)), Lt = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, Ut = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, Mt = (e) => {
|
|
@@ -302,7 +302,7 @@ function J({
|
|
|
302
302
|
try {
|
|
303
303
|
return Dt(a);
|
|
304
304
|
} catch (u) {
|
|
305
|
-
|
|
305
|
+
B.error("Failed code evaluation: " + u.message, {
|
|
306
306
|
code: e
|
|
307
307
|
});
|
|
308
308
|
return;
|
|
@@ -326,7 +326,7 @@ function ce(e) {
|
|
|
326
326
|
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = ce(e[n]));
|
|
327
327
|
return t;
|
|
328
328
|
}
|
|
329
|
-
const Ht = ["svelte", "vue", "angular", "qwik", "solid"].includes(
|
|
329
|
+
const Ht = ["svelte", "vue", "angular", "qwik", "solid"].includes(E), jt = (e) => {
|
|
330
330
|
if (Ht) {
|
|
331
331
|
const t = me(e);
|
|
332
332
|
return {
|
|
@@ -450,8 +450,8 @@ const Ie = "builder.", Xt = "options.", Ue = (e) => {
|
|
|
450
450
|
return {};
|
|
451
451
|
const e = new URLSearchParams(window.location.search);
|
|
452
452
|
return Ue(e);
|
|
453
|
-
}, Me = "
|
|
454
|
-
"X-Builder-SDK":
|
|
453
|
+
}, Me = "3.0.0", He = () => ({
|
|
454
|
+
"X-Builder-SDK": E,
|
|
455
455
|
"X-Builder-SDK-GEN": "2",
|
|
456
456
|
"X-Builder-SDK-Version": Me
|
|
457
457
|
}), Zt = (e) => {
|
|
@@ -467,7 +467,7 @@ const Ie = "builder.", Xt = "options.", Ue = (e) => {
|
|
|
467
467
|
try {
|
|
468
468
|
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
469
469
|
} catch (o) {
|
|
470
|
-
|
|
470
|
+
B.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
471
471
|
return;
|
|
472
472
|
}
|
|
473
473
|
}, Ke = async (e) => je(e), _t = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(D).join("; "), en = [["secure", ""], ["SameSite", "None"]], tn = ({
|
|
@@ -493,7 +493,7 @@ const Ie = "builder.", Xt = "options.", Ue = (e) => {
|
|
|
493
493
|
});
|
|
494
494
|
document.cookie = r;
|
|
495
495
|
} catch (r) {
|
|
496
|
-
|
|
496
|
+
B.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
function nn() {
|
|
@@ -580,7 +580,7 @@ const Ge = "builderSessionId", on = async ({
|
|
|
580
580
|
});
|
|
581
581
|
function he(e) {
|
|
582
582
|
var t;
|
|
583
|
-
typeof process < "u" && ((t = process.env) != null && t.DEBUG) && String(process.env.DEBUG) == "true" &&
|
|
583
|
+
typeof process < "u" && ((t = process.env) != null && t.DEBUG) && String(process.env.DEBUG) == "true" && B.log(e);
|
|
584
584
|
}
|
|
585
585
|
const pn = async ({
|
|
586
586
|
canTrack: e
|
|
@@ -625,10 +625,10 @@ async function de({
|
|
|
625
625
|
...t
|
|
626
626
|
}) {
|
|
627
627
|
if (!t.apiKey) {
|
|
628
|
-
|
|
628
|
+
B.error("Missing API key for track call. Please provide your API key.");
|
|
629
629
|
return;
|
|
630
630
|
}
|
|
631
|
-
if (!t.canTrack ||
|
|
631
|
+
if (!t.canTrack || P() || !($() || E === "reactNative"))
|
|
632
632
|
return;
|
|
633
633
|
const o = `${e || "https://cdn.builder.io"}/api/v1/track`;
|
|
634
634
|
return he(o), fetch(o, {
|
|
@@ -684,7 +684,7 @@ const Qe = (e = {}) => {
|
|
|
684
684
|
$e || ($e = !0, $() && ((t = window.parent) == null || t.postMessage({
|
|
685
685
|
type: "builder.sdkInfo",
|
|
686
686
|
data: {
|
|
687
|
-
target:
|
|
687
|
+
target: E,
|
|
688
688
|
version: Me,
|
|
689
689
|
supportsPatchUpdates: !1,
|
|
690
690
|
// Supports builder-model="..." attribute which is needed to
|
|
@@ -768,7 +768,7 @@ const Qe = (e = {}) => {
|
|
|
768
768
|
}
|
|
769
769
|
}, Di = (e, t, n) => {
|
|
770
770
|
if (!$)
|
|
771
|
-
return
|
|
771
|
+
return B.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
772
772
|
};
|
|
773
773
|
Qe();
|
|
774
774
|
const o = Ze({
|
|
@@ -821,7 +821,7 @@ const Qe = (e = {}) => {
|
|
|
821
821
|
contentId: e.id,
|
|
822
822
|
value: t
|
|
823
823
|
}).catch((n) => {
|
|
824
|
-
|
|
824
|
+
B.error("could not store A/B test variation: ", n);
|
|
825
825
|
}), t;
|
|
826
826
|
}, tt = ({
|
|
827
827
|
item: e,
|
|
@@ -981,7 +981,7 @@ const En = async (e) => {
|
|
|
981
981
|
return await (await n(t.href, o)).json();
|
|
982
982
|
}, Pn = async (e, t, n = be(e)) => {
|
|
983
983
|
const o = G(e.canTrack);
|
|
984
|
-
if (n.search.includes("preview="), !o || !($() ||
|
|
984
|
+
if (n.search.includes("preview="), !o || !($() || E === "reactNative"))
|
|
985
985
|
return t.results;
|
|
986
986
|
try {
|
|
987
987
|
const r = [];
|
|
@@ -992,21 +992,19 @@ const En = async (e) => {
|
|
|
992
992
|
}));
|
|
993
993
|
t.results = r;
|
|
994
994
|
} catch (r) {
|
|
995
|
-
|
|
995
|
+
B.error("Could not process A/B tests. ", r);
|
|
996
996
|
}
|
|
997
997
|
return t.results;
|
|
998
998
|
};
|
|
999
999
|
async function Bn(e) {
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1000
|
+
const t = be(e), n = await En(e);
|
|
1001
|
+
if (!Rn(n))
|
|
1002
|
+
throw B.error("Error fetching data. ", {
|
|
1003
1003
|
url: t,
|
|
1004
1004
|
content: n,
|
|
1005
1005
|
options: e
|
|
1006
|
-
}),
|
|
1007
|
-
|
|
1008
|
-
return E.error("Error fetching data. ", t), null;
|
|
1009
|
-
}
|
|
1006
|
+
}), n;
|
|
1007
|
+
return Pn(e, n);
|
|
1010
1008
|
}
|
|
1011
1009
|
const Li = async (e) => {
|
|
1012
1010
|
var o, r, i;
|
|
@@ -1156,7 +1154,7 @@ const Mi = ({
|
|
|
1156
1154
|
block: e
|
|
1157
1155
|
}));
|
|
1158
1156
|
function at(e) {
|
|
1159
|
-
switch (
|
|
1157
|
+
switch (E) {
|
|
1160
1158
|
case "svelte":
|
|
1161
1159
|
case "vue":
|
|
1162
1160
|
case "solid":
|
|
@@ -1241,22 +1239,22 @@ const Fn = ({
|
|
|
1241
1239
|
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
1242
1240
|
e
|
|
1243
1241
|
), e;
|
|
1244
|
-
}), Kn = () => import("./block-styles-
|
|
1242
|
+
}), Kn = () => import("./block-styles-ytvCIXMJ.js").then((e) => e.default).catch((e) => {
|
|
1245
1243
|
throw console.error(
|
|
1246
1244
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
1247
1245
|
e
|
|
1248
1246
|
), e;
|
|
1249
|
-
}), qn = () => import("./block-wrapper-
|
|
1247
|
+
}), qn = () => import("./block-wrapper-UdxI8OCZ.js").then((e) => e.default).catch((e) => {
|
|
1250
1248
|
throw console.error(
|
|
1251
1249
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
1252
1250
|
e
|
|
1253
1251
|
), e;
|
|
1254
|
-
}), zn = () => import("./component-ref-
|
|
1252
|
+
}), zn = () => import("./component-ref-CKlhzm4D.js").then((e) => e.default).catch((e) => {
|
|
1255
1253
|
throw console.error(
|
|
1256
1254
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
1257
1255
|
e
|
|
1258
1256
|
), e;
|
|
1259
|
-
}), Gn = () => import("./repeated-block-
|
|
1257
|
+
}), Gn = () => import("./repeated-block-9RoptQEu.js").then((e) => e.default).catch((e) => {
|
|
1260
1258
|
throw console.error(
|
|
1261
1259
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
1262
1260
|
e
|
|
@@ -1349,7 +1347,7 @@ const Fn = ({
|
|
|
1349
1347
|
registeredComponents: this.registeredComponents,
|
|
1350
1348
|
builderBlock: this.processedBlock,
|
|
1351
1349
|
includeBlockProps: ((t = this.blockComponent) == null ? void 0 : t.noWrap) === !0,
|
|
1352
|
-
isInteractive: !((n = this.blockComponent) != null && n.isRSC &&
|
|
1350
|
+
isInteractive: !((n = this.blockComponent) != null && n.isRSC && E === "rsc")
|
|
1353
1351
|
};
|
|
1354
1352
|
}
|
|
1355
1353
|
}
|
|
@@ -1454,7 +1452,7 @@ const ke = /* @__PURE__ */ g(Jn, [["render", Yn]]), Hi = /* @__PURE__ */ Object.
|
|
|
1454
1452
|
methods: {
|
|
1455
1453
|
onClick() {
|
|
1456
1454
|
var e, t;
|
|
1457
|
-
|
|
1455
|
+
P() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
1458
1456
|
{
|
|
1459
1457
|
type: "builder.clickEmptyBlocks",
|
|
1460
1458
|
data: {
|
|
@@ -1467,7 +1465,7 @@ const ke = /* @__PURE__ */ g(Jn, [["render", Yn]]), Hi = /* @__PURE__ */ Object.
|
|
|
1467
1465
|
},
|
|
1468
1466
|
onMouseEnter() {
|
|
1469
1467
|
var e, t;
|
|
1470
|
-
|
|
1468
|
+
P() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
|
|
1471
1469
|
{
|
|
1472
1470
|
type: "builder.hoverEmptyBlocks",
|
|
1473
1471
|
data: {
|
|
@@ -1625,7 +1623,7 @@ const Y = /* @__PURE__ */ g(to, [["render", no]]), oo = /* @__PURE__ */ Object.f
|
|
|
1625
1623
|
"builderComponents"
|
|
1626
1624
|
],
|
|
1627
1625
|
data() {
|
|
1628
|
-
return { TARGET:
|
|
1626
|
+
return { TARGET: E, getColumnsClass: io };
|
|
1629
1627
|
},
|
|
1630
1628
|
computed: {
|
|
1631
1629
|
gutterSize() {
|
|
@@ -3363,7 +3361,7 @@ const lr = /* @__PURE__ */ g(ir, [["render", ar]]), cr = {
|
|
|
3363
3361
|
this.builderContext.rootSetState ? (o = (n = this.builderContext).rootSetState) == null || o.call(n, t) : this.builderContext.rootState = t;
|
|
3364
3362
|
},
|
|
3365
3363
|
submissionState() {
|
|
3366
|
-
return
|
|
3364
|
+
return P() && this.previewState || this.formState;
|
|
3367
3365
|
},
|
|
3368
3366
|
onSubmit(e) {
|
|
3369
3367
|
var n;
|
|
@@ -3581,7 +3579,7 @@ const br = /* @__PURE__ */ g(pr, [["render", fr], ["__scopeId", "data-v-cd94d6c1
|
|
|
3581
3579
|
"required"
|
|
3582
3580
|
],
|
|
3583
3581
|
data() {
|
|
3584
|
-
return { isEditing:
|
|
3582
|
+
return { isEditing: P, filterAttrs: W };
|
|
3585
3583
|
}
|
|
3586
3584
|
}), kr = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
3587
3585
|
function vr(e, t, n, o, r, i) {
|
|
@@ -3641,7 +3639,7 @@ const Sr = /* @__PURE__ */ g(yr, [["render", vr]]), Cr = {
|
|
|
3641
3639
|
name: "builder-select-component",
|
|
3642
3640
|
props: ["attributes", "value", "defaultValue", "name", "required", "options"],
|
|
3643
3641
|
data() {
|
|
3644
|
-
return { isEditing:
|
|
3642
|
+
return { isEditing: P, filterAttrs: W };
|
|
3645
3643
|
}
|
|
3646
3644
|
}), Tr = ["value", "defaultValue", "name", "required"], Ir = ["value"];
|
|
3647
3645
|
function $r(e, t, n, o, r, i) {
|
|
@@ -3777,7 +3775,7 @@ const Or = /* @__PURE__ */ g(Vr, [["render", Nr]]), Fr = {
|
|
|
3777
3775
|
"attributes"
|
|
3778
3776
|
],
|
|
3779
3777
|
data() {
|
|
3780
|
-
return { isEditing:
|
|
3778
|
+
return { isEditing: P, filterAttrs: W };
|
|
3781
3779
|
}
|
|
3782
3780
|
}), Lr = ["alt", "src"];
|
|
3783
3781
|
function Ur(e, t, n, o, r, i) {
|
|
@@ -4143,7 +4141,7 @@ const Xr = /* @__PURE__ */ g(jr, [["render", Yr]]), Qr = () => [{
|
|
|
4143
4141
|
})), ei = ({
|
|
4144
4142
|
canTrack: e,
|
|
4145
4143
|
content: t
|
|
4146
|
-
}) => !(!(Z(t).length > 0) || !e), ti = (e) => e === "react" || e === "reactNative", ut = ti(
|
|
4144
|
+
}) => !(!(Z(t).length > 0) || !e), ti = (e) => e === "react" || e === "reactNative", ut = ti(E), ni = () => `
|
|
4147
4145
|
window.${ct} = ${Zr}
|
|
4148
4146
|
window.${dt} = ${_r}
|
|
4149
4147
|
`, oi = (e, t) => `
|
|
@@ -4300,7 +4298,7 @@ font-weight: ${s};
|
|
|
4300
4298
|
mounted() {
|
|
4301
4299
|
var e, t;
|
|
4302
4300
|
if ($()) {
|
|
4303
|
-
if (
|
|
4301
|
+
if (P() && !this.isNestedRender && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4304
4302
|
new CustomEvent("initeditingbldr")
|
|
4305
4303
|
), this.builderContextSignal.content && G(this.canTrack)) {
|
|
4306
4304
|
const o = (e = this.builderContextSignal.content) == null ? void 0 : e.testVariationId, r = (t = this.builderContextSignal.content) == null ? void 0 : t.id, i = this.apiKey;
|
|
@@ -4313,7 +4311,7 @@ font-weight: ${s};
|
|
|
4313
4311
|
variationId: o !== r ? o : void 0
|
|
4314
4312
|
});
|
|
4315
4313
|
}
|
|
4316
|
-
zt() && !
|
|
4314
|
+
zt() && !P() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4317
4315
|
new CustomEvent("initpreviewingbldr")
|
|
4318
4316
|
);
|
|
4319
4317
|
}
|
|
@@ -4450,7 +4448,7 @@ font-weight: ${s};
|
|
|
4450
4448
|
var t, n;
|
|
4451
4449
|
const e = ((n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) ?? {};
|
|
4452
4450
|
Object.entries(e).forEach(([o, r]) => {
|
|
4453
|
-
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !
|
|
4451
|
+
if (!r || this.httpReqsPending[o] || this.httpReqsData[o] && !P())
|
|
4454
4452
|
return;
|
|
4455
4453
|
this.httpReqsPending[o] = !0;
|
|
4456
4454
|
const i = r.replace(
|
|
@@ -4477,7 +4475,7 @@ font-weight: ${s};
|
|
|
4477
4475
|
});
|
|
4478
4476
|
},
|
|
4479
4477
|
emitStateUpdate() {
|
|
4480
|
-
|
|
4478
|
+
P() && window.dispatchEvent(
|
|
4481
4479
|
new CustomEvent(
|
|
4482
4480
|
"builder:component:stateChange",
|
|
4483
4481
|
{
|
|
@@ -4684,7 +4682,7 @@ const ki = /* @__PURE__ */ g(gi, [["render", yi]]), vi = ({
|
|
|
4684
4682
|
BlocksWrapperProps: this.blocksWrapperProps || {},
|
|
4685
4683
|
nonce: this.nonce || ""
|
|
4686
4684
|
},
|
|
4687
|
-
TARGET:
|
|
4685
|
+
TARGET: E
|
|
4688
4686
|
};
|
|
4689
4687
|
},
|
|
4690
4688
|
provide() {
|
|
@@ -4697,7 +4695,7 @@ const ki = /* @__PURE__ */ g(gi, [["render", yi]]), vi = ({
|
|
|
4697
4695
|
},
|
|
4698
4696
|
created() {
|
|
4699
4697
|
var t, n;
|
|
4700
|
-
this.apiKey ||
|
|
4698
|
+
this.apiKey || B.error(
|
|
4701
4699
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
4702
4700
|
);
|
|
4703
4701
|
const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
@@ -4800,7 +4798,7 @@ const Ii = /* @__PURE__ */ g(wi, [["render", Ti]]), $i = b({
|
|
|
4800
4798
|
canTrack: G(this.canTrack),
|
|
4801
4799
|
content: this.content
|
|
4802
4800
|
}),
|
|
4803
|
-
TARGET:
|
|
4801
|
+
TARGET: E,
|
|
4804
4802
|
getInitVariantsFnsScriptString: ni,
|
|
4805
4803
|
getVariants: Z
|
|
4806
4804
|
};
|
|
@@ -4921,7 +4919,7 @@ const Ei = /* @__PURE__ */ g($i, [["render", Ri]]), Pi = async ({
|
|
|
4921
4919
|
}
|
|
4922
4920
|
}
|
|
4923
4921
|
}).catch((n) => {
|
|
4924
|
-
|
|
4922
|
+
B.error("Could not fetch symbol content: ", n);
|
|
4925
4923
|
});
|
|
4926
4924
|
}, Bi = b({
|
|
4927
4925
|
name: "builder-symbol",
|
|
@@ -5022,7 +5020,7 @@ export {
|
|
|
5022
5020
|
Hi as G,
|
|
5023
5021
|
vo as I,
|
|
5024
5022
|
wo as S,
|
|
5025
|
-
|
|
5023
|
+
E as T,
|
|
5026
5024
|
Xr as V,
|
|
5027
5025
|
ve as _,
|
|
5028
5026
|
Ui as a,
|
|
@@ -5040,7 +5038,7 @@ export {
|
|
|
5040
5038
|
Xo as m,
|
|
5041
5039
|
U as n,
|
|
5042
5040
|
Ei as o,
|
|
5043
|
-
|
|
5041
|
+
P as p,
|
|
5044
5042
|
zt as q,
|
|
5045
5043
|
Gt as r,
|
|
5046
5044
|
Yt as s,
|
package/lib/browser/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
var t=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-N0sk5VKQ.cjs");exports.Blocks=e.Blocks;exports.BuilderContext=e.BuilderContext;exports.Button=e.Button;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.Fragment=e.Fragment;exports.Image=e.Image;exports.Section=e.Section;exports.Symbol=e.Symbol;exports.Text=e.Text;exports.Video=e.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
package/lib/browser/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { n as a, j as r, k as o, C as i, o as n, F as c, I as g, S as m, l, m as u, V as d, z as p, r as C, y as B, A as E, D as S, u as f, p as h, q as x, s as b, t as k, x as y, v as P } from "./index-
|
|
2
|
+
import { n as a, j as r, k as o, C as i, o as n, F as c, I as g, S as m, l, m as u, V as d, z as p, r as C, y as B, A as E, D as S, u as f, p as h, q as x, s as b, t as k, x as y, v as P } from "./index-tDGIvfSj.js";
|
|
3
3
|
export {
|
|
4
4
|
a as Blocks,
|
|
5
5
|
r as BuilderContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as t, defineAsyncComponent as n, resolveComponent as r, openBlock as p, createBlock as c } from "vue";
|
|
3
|
-
import { j as s, e as l } from "./index-
|
|
4
|
-
const i = () => import("./index-
|
|
3
|
+
import { j as s, e as l } from "./index-tDGIvfSj.js";
|
|
4
|
+
const i = () => import("./index-tDGIvfSj.js").then((o) => o.G).then((o) => o.default).catch((o) => {
|
|
5
5
|
throw console.error(
|
|
6
6
|
"Error while attempting to dynamically import component Block at ../block.vue",
|
|
7
7
|
o
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index-
|
|
1
|
+
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index-N0sk5VKQ.cjs"),r=()=>Promise.resolve().then(()=>require("./index-N0sk5VKQ.cjs")).then(e=>e.block).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Block at ../block.vue",e),e}),c=o.defineComponent({name:"repeated-block",components:{Block:o.defineAsyncComponent(r)},props:["repeatContext","block","registeredComponents","linkComponent"],data(){return{store:this.repeatContext}},provide(){const e=this;return{[t.BuilderContext.key]:e.store}}});function s(e,i,p,m,a,d){const n=o.resolveComponent("Block");return o.openBlock(),o.createBlock(n,{block:e.block,context:e.store,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"])}const l=t._export_sfc(c,[["render",s]]);exports.default=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-LY5CDeZs.cjs"),n=e.defineComponent({name:"awaiter",props:[],mounted(){}});function o(t,a,c,i,u,d){return e.renderSlot(t.$slots,"default")}const s=r._export_sfc(n,[["render",o]]);exports.default=s;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as C, resolveComponent as g, openBlock as $, createBlock as v, createCommentVNode as B } from "vue";
|
|
2
|
-
import { _, T, c as h, g as w, a as l, b as k, d as I, e as N } from "./index-
|
|
2
|
+
import { _, T, c as h, g as w, a as l, b as k, d as I, e as N } from "./index-Qfd4FC6c.js";
|
|
3
3
|
const z = C({
|
|
4
4
|
name: "block-styles",
|
|
5
5
|
components: { InlinedStyles: _ },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-LY5CDeZs.cjs"),f=l.defineComponent({name:"block-styles",components:{InlinedStyles:s._sfc_main},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{canShowBlock(){const e=this.block;return s.checkIsDefined(e.hide)?!e.hide:s.checkIsDefined(e.show)?e.show:!0},css(){var y,p,h;const e=this.block,t=e.responsiveStyles,c=this.context.content,a=s.getSizesForBreakpoints(((y=c==null?void 0:c.meta)==null?void 0:y.breakpoints)||{}),i=t==null?void 0:t.large,d=t==null?void 0:t.medium,r=t==null?void 0:t.small,n=e.id;if(!n)return"";const S=i?s.createCssClass({className:n,styles:i}):"",k=d?s.createCssClass({className:n,styles:d,mediaQuery:s.getMaxWidthQueryForSize("medium",a)}):"",C=r?s.createCssClass({className:n,styles:r,mediaQuery:s.getMaxWidthQueryForSize("small",a)}):"",o=e.animations&&e.animations.find(m=>m.trigger==="hover");let u="";if(o){const m=((h=(p=o.steps)==null?void 0:p[1])==null?void 0:h.styles)||{};u=s.createCssClass({className:`${n}:hover`,styles:{...m,transition:`all ${o.duration}s ${s.camelToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[S,k,C,u].join(" ")}}});function b(e,t,c,a,i,d){const r=l.resolveComponent("InlinedStyles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(l.openBlock(),l.createBlock(r,{key:0,id:"builderio-block",styles:e.css,nonce:e.context.nonce},null,8,["styles","nonce"])):l.createCommentVNode("",!0)}const g=s._export_sfc(f,[["render",b]]);exports.default=g;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as i, renderSlot as p } from "vue";
|
|
2
|
-
import { g as s, a as l } from "./get-block-properties-
|
|
3
|
-
import { e as m } from "./index-
|
|
4
|
-
const d = () => import("./index-
|
|
2
|
+
import { g as s, a as l } from "./get-block-properties-IQuU2YJ7.js";
|
|
3
|
+
import { e as m } from "./index-Qfd4FC6c.js";
|
|
4
|
+
const d = () => import("./index-Qfd4FC6c.js").then((e) => e.E).then((e) => e.default).catch((e) => {
|
|
5
5
|
throw console.error(
|
|
6
6
|
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
7
7
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-4gxUIMch.cjs"),n=require("./index-LY5CDeZs.cjs"),c=()=>Promise.resolve().then(()=>require("./index-LY5CDeZs.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,m,u){const r=t.resolveComponent("DynamicRenderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i]]);exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-LY5CDeZs.cjs"),a=require("./get-block-properties-4gxUIMch.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-V9rb_a7Q.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),d=t.defineComponent({name:"interactive-element",components:{Awaiter:t.defineAsyncComponent(u)},props:["includeBlockProps","block","context","Wrapper","wrapperProps"],computed:{attributes(){return this.includeBlockProps?{...a.getBlockProperties({block:this.block,context:this.context}),...a.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})}:{}}}});function f(e,n,s,l,r,i){const o=t.resolveComponent("Awaiter");return e.Wrapper.load?(t.openBlock(),t.createBlock(o,{key:0,load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["load","fallback","props","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.wrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))}const m=c._export_sfc(d,[["render",f]]),b=({componentOptions:e,builderBlock:n,context:s,componentRef:l,includeBlockProps:r,isInteractive:i,contextValue:o})=>{const p={...e,...r?{attributes:a.getBlockProperties({block:n,context:o})}:{}};return i?{Wrapper:l,block:n,context:s,wrapperProps:e,includeBlockProps:r}:p},B=t.defineComponent({name:"component-ref",components:{Block:c.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?c.wrapComponentRef(m):this.componentRef,getWrapperProps:b}}});function C(e,n,s,l,r,i){const o=t.resolveComponent("Block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.blockChildren,(p,k)=>(t.openBlock(),t.createBlock(o,{key:p.id,block:p,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const h=c._export_sfc(B,[["render",C]]);exports.default=h;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, defineAsyncComponent as P, resolveComponent as k, openBlock as o, createBlock as a, withCtx as l, renderSlot as m, resolveDynamicComponent as f, mergeProps as b, normalizeProps as B, createElementBlock as g, Fragment as $, renderList as v, createCommentVNode as W } from "vue";
|
|
2
|
-
import { e as h, B as S, w as y } from "./index-
|
|
3
|
-
import { a as C, g as A } from "./get-block-properties-
|
|
4
|
-
const R = () => import("./awaiter-
|
|
2
|
+
import { e as h, B as S, w as y } from "./index-Qfd4FC6c.js";
|
|
3
|
+
import { a as C, g as A } from "./get-block-properties-IQuU2YJ7.js";
|
|
4
|
+
const R = () => import("./awaiter-yLbJL6E0.js").then((e) => e.default).catch((e) => {
|
|
5
5
|
throw console.error(
|
|
6
6
|
"Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
|
|
7
7
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "3.0.0";
|
|
@@ -14,5 +14,5 @@ export declare const _processContentResult: (options: GetContentOptions, content
|
|
|
14
14
|
/**
|
|
15
15
|
* Returns a paginated array of entries that match the given options.
|
|
16
16
|
*/
|
|
17
|
-
export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[]
|
|
17
|
+
export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[]>;
|
|
18
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./index-
|
|
1
|
+
"use strict";const s=require("./index-LY5CDeZs.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const a=r[o];let n=c(o);if(e.stripPrefix)switch(s.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(a,e)}return t}function u({properties:e}){return e}const f=e=>({href:e.href});function p({block:e,context:t}){var o;const r={...f(e),...e.properties,"builder-id":e.id,style:s.getStyle({block:e,context:t}),[s.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=p;
|