@builder.io/sdk-vue 1.1.0 → 1.1.2
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/{block-styles-pH055x__.cjs → block-styles-KQRcYCT9.cjs} +1 -1
- package/lib/browser/{block-styles-hVSCZLht.js → block-styles-yF029qLO.js} +1 -1
- package/lib/browser/{block-wrapper-PdilPYSc.cjs → block-wrapper-W0P89bhM.cjs} +1 -1
- package/lib/browser/{block-wrapper-B4mopocX.js → block-wrapper-slzYlPm8.js} +3 -3
- package/lib/browser/{component-ref-SFX2F3bY.js → component-ref-f280Pij9.js} +2 -2
- package/lib/browser/{component-ref-VyS6vjOp.cjs → component-ref-gWh-KGno.cjs} +1 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{get-block-properties-TEHnuqqp.cjs → get-block-properties-EtNc4iW1.cjs} +1 -1
- package/lib/browser/{get-block-properties-gtAx61I-.js → get-block-properties-ReTq0tzj.js} +1 -1
- package/lib/browser/{index-L0JvA2cv.cjs → index-QwWHODkZ.cjs} +3 -3
- package/lib/browser/{index-pkNn0AMk.js → index-yersTeTV.js} +47 -60
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-zRMQ06gJ.cjs → repeated-block-0lhWWEpG.cjs} +1 -1
- package/lib/browser/{repeated-block-eDelxd7F.js → repeated-block-SxyAWZbs.js} +2 -2
- package/lib/browser/types/components.d.ts +10 -0
- package/lib/{node/block-styles-ZJ56zLnC.js → edge/block-styles-eLJAbzLQ.js} +1 -1
- package/lib/edge/{block-styles-ZRuvNLMj.cjs → block-styles-zhL-ZVzT.cjs} +1 -1
- package/lib/edge/{block-wrapper-O5E-Z4KR.js → block-wrapper-CQRALj_U.js} +3 -3
- package/lib/{node/block-wrapper-vGhDJZ3O.cjs → edge/block-wrapper-KoPu2uk3.cjs} +1 -1
- package/lib/{node/component-ref-Nf4Q0a6c.cjs → edge/component-ref-O-8ZCGwW.cjs} +1 -1
- package/lib/{node/component-ref-wjlGg_3v.js → edge/component-ref-hQVwaczx.js} +2 -2
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties-IEhsPKiE.cjs → get-block-properties-aNnHrNuZ.cjs} +1 -1
- package/lib/edge/{get-block-properties-EEHdmgx7.js → get-block-properties-nrMer_9r.js} +1 -1
- package/lib/edge/{index--krN2cNJ.js → index-1_sMRASk.js} +374 -387
- package/lib/edge/{index-ZwGA38cw.cjs → index-mPTdNlEd.cjs} +9 -9
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{repeated-block-92i9I3-t.js → repeated-block-BC4qb8GI.js} +2 -2
- package/lib/edge/{repeated-block-fUtozBXq.cjs → repeated-block-m2Y8nhgF.cjs} +1 -1
- package/lib/edge/types/components.d.ts +10 -0
- package/lib/node/{block-styles-MAXNsV7u.cjs → block-styles-BVyQCkS3.cjs} +1 -1
- package/lib/{edge/block-styles-AnXusYlj.js → node/block-styles-qwbfY_0r.js} +1 -1
- package/lib/{edge/block-wrapper-xg4xxSOu.cjs → node/block-wrapper-67YpxGJy.cjs} +1 -1
- package/lib/node/{block-wrapper-CGPh6nuu.js → block-wrapper-U7AIQ7GW.js} +3 -3
- package/lib/{edge/component-ref-DHKSjoxr.js → node/component-ref-91bKp89Q.js} +2 -2
- package/lib/{edge/component-ref-LL0eIbCC.cjs → node/component-ref-SjuqwDaZ.cjs} +1 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties-I0Jx6OxP.js → get-block-properties-LS4sGehE.js} +1 -1
- package/lib/node/{get-block-properties-nOONIP-7.cjs → get-block-properties-_Ao2htNM.cjs} +1 -1
- package/lib/node/{index-F5e3dfCs.js → index-QePuMUih.js} +6 -19
- package/lib/node/{index-SYGA4dVv.cjs → index-yffFzLQJ.cjs} +4 -4
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/node/{repeated-block-Owzbr2FO.js → repeated-block-0Y81SWSj.js} +2 -2
- package/lib/node/{repeated-block-CfOeLITP.cjs → repeated-block-fSrNRZJS.cjs} +1 -1
- package/lib/node/types/components.d.ts +10 -0
- package/package.json +1 -1
|
@@ -154,7 +154,7 @@ const Pt = () => {
|
|
|
154
154
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
155
155
|
} else
|
|
156
156
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
157
|
-
}, Et = () => typeof navigator == "object" && navigator.userAgent || "",
|
|
157
|
+
}, Et = () => typeof navigator == "object" && navigator.userAgent || "", Fe = () => {
|
|
158
158
|
const e = Et(), t = {
|
|
159
159
|
Android() {
|
|
160
160
|
return e.match(/Android/i);
|
|
@@ -196,7 +196,7 @@ const Pt = () => {
|
|
|
196
196
|
isEditing: R(),
|
|
197
197
|
isBrowser: T(),
|
|
198
198
|
isServer: !T(),
|
|
199
|
-
getUserAttributes: () =>
|
|
199
|
+
getUserAttributes: () => Fe()
|
|
200
200
|
}), Vt = (e, {
|
|
201
201
|
isExpression: t = !0
|
|
202
202
|
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, Se = ({
|
|
@@ -212,7 +212,7 @@ const Pt = () => {
|
|
|
212
212
|
builder: t,
|
|
213
213
|
context: n,
|
|
214
214
|
event: o,
|
|
215
|
-
state:
|
|
215
|
+
state: Le({
|
|
216
216
|
rootState: s,
|
|
217
217
|
localState: r,
|
|
218
218
|
rootSetState: i
|
|
@@ -220,7 +220,7 @@ const Pt = () => {
|
|
|
220
220
|
});
|
|
221
221
|
return new Function(...l.map(([a]) => a), e)(...l.map(([, a]) => a));
|
|
222
222
|
};
|
|
223
|
-
function
|
|
223
|
+
function Le({
|
|
224
224
|
rootState: e,
|
|
225
225
|
localState: t,
|
|
226
226
|
rootSetState: n
|
|
@@ -230,7 +230,7 @@ function Fe({
|
|
|
230
230
|
if (t && r in t)
|
|
231
231
|
return t[r];
|
|
232
232
|
const i = o[r];
|
|
233
|
-
return typeof i == "object" && i !== null ?
|
|
233
|
+
return typeof i == "object" && i !== null ? Le({
|
|
234
234
|
rootState: i,
|
|
235
235
|
localState: void 0,
|
|
236
236
|
rootSetState: n ? (s) => {
|
|
@@ -256,7 +256,7 @@ const Nt = () => {
|
|
|
256
256
|
return !1;
|
|
257
257
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
258
258
|
return e && t && !n ? (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;
|
|
259
|
-
},
|
|
259
|
+
}, Ft = (e) => (T() || Nt(), Se(e)), V = class V {
|
|
260
260
|
static getCacheKey(t) {
|
|
261
261
|
return JSON.stringify({
|
|
262
262
|
...t,
|
|
@@ -305,7 +305,7 @@ function te({
|
|
|
305
305
|
return h.value;
|
|
306
306
|
}
|
|
307
307
|
try {
|
|
308
|
-
const u =
|
|
308
|
+
const u = Ft(a);
|
|
309
309
|
if (l) {
|
|
310
310
|
const h = U.getCacheKey(a);
|
|
311
311
|
U.setCachedValue(h, u);
|
|
@@ -324,7 +324,7 @@ const Y = (e) => JSON.parse(JSON.stringify(e)), Oe = (e, t, n) => {
|
|
|
324
324
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
325
325
|
return o.slice(0, -1).reduce((r, i, s) => Object(r[i]) === r[i] ? r[i] : r[i] = Math.abs(Number(o[s + 1])) >> 0 === +o[s + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
326
326
|
};
|
|
327
|
-
const
|
|
327
|
+
const Lt = ({
|
|
328
328
|
block: e,
|
|
329
329
|
context: t,
|
|
330
330
|
localState: n,
|
|
@@ -364,7 +364,7 @@ function De({
|
|
|
364
364
|
rootSetState: i
|
|
365
365
|
}) {
|
|
366
366
|
const s = e;
|
|
367
|
-
return n ?
|
|
367
|
+
return n ? Lt({
|
|
368
368
|
block: s,
|
|
369
369
|
localState: o,
|
|
370
370
|
rootState: r,
|
|
@@ -591,22 +591,22 @@ const Kt = ({
|
|
|
591
591
|
"Error while attempting to dynamically import component DynamicDiv at ../dynamic-div.vue",
|
|
592
592
|
e
|
|
593
593
|
), e;
|
|
594
|
-
}), Xt = () => import("./block-styles-
|
|
594
|
+
}), Xt = () => import("./block-styles-yF029qLO.js").then((e) => e.default).catch((e) => {
|
|
595
595
|
throw console.error(
|
|
596
596
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
597
597
|
e
|
|
598
598
|
), e;
|
|
599
|
-
}), Zt = () => import("./block-wrapper-
|
|
599
|
+
}), Zt = () => import("./block-wrapper-slzYlPm8.js").then((e) => e.default).catch((e) => {
|
|
600
600
|
throw console.error(
|
|
601
601
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
602
602
|
e
|
|
603
603
|
), e;
|
|
604
|
-
}), _t = () => import("./component-ref-
|
|
604
|
+
}), _t = () => import("./component-ref-f280Pij9.js").then((e) => e.default).catch((e) => {
|
|
605
605
|
throw console.error(
|
|
606
606
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
607
607
|
e
|
|
608
608
|
), e;
|
|
609
|
-
}), en = () => import("./repeated-block-
|
|
609
|
+
}), en = () => import("./repeated-block-SxyAWZbs.js").then((e) => e.default).catch((e) => {
|
|
610
610
|
throw console.error(
|
|
611
611
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
612
612
|
e
|
|
@@ -1284,12 +1284,12 @@ const En = /* @__PURE__ */ b(Bn, [["render", Pn]]), xn = (e) => {
|
|
|
1284
1284
|
} catch (r) {
|
|
1285
1285
|
B.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
|
|
1286
1286
|
}
|
|
1287
|
-
}, Nn = "builder.tests", ye = (e) => `${Nn}.${e}`,
|
|
1287
|
+
}, Nn = "builder.tests", ye = (e) => `${Nn}.${e}`, Fn = ({
|
|
1288
1288
|
contentId: e
|
|
1289
1289
|
}) => Je({
|
|
1290
1290
|
name: ye(e),
|
|
1291
1291
|
canTrack: !0
|
|
1292
|
-
}),
|
|
1292
|
+
}), Ln = ({
|
|
1293
1293
|
contentId: e
|
|
1294
1294
|
}) => ze({
|
|
1295
1295
|
name: ye(e),
|
|
@@ -1346,7 +1346,7 @@ const En = /* @__PURE__ */ b(Bn, [["render", Pn]]), xn = (e) => {
|
|
|
1346
1346
|
return;
|
|
1347
1347
|
if (!Ye(e))
|
|
1348
1348
|
return e;
|
|
1349
|
-
const n =
|
|
1349
|
+
const n = Ln({
|
|
1350
1350
|
contentId: e.id
|
|
1351
1351
|
}) || Qe({
|
|
1352
1352
|
variations: e.variations,
|
|
@@ -1365,7 +1365,7 @@ const En = /* @__PURE__ */ b(Bn, [["render", Pn]]), xn = (e) => {
|
|
|
1365
1365
|
}) => {
|
|
1366
1366
|
if (!t || !Ye(e))
|
|
1367
1367
|
return e;
|
|
1368
|
-
const o = await
|
|
1368
|
+
const o = await Fn({
|
|
1369
1369
|
contentId: e.id
|
|
1370
1370
|
}) || Qe({
|
|
1371
1371
|
variations: e.variations,
|
|
@@ -2468,20 +2468,7 @@ const vo = /* @__PURE__ */ b(go, [["render", ko]]), Co = {
|
|
|
2468
2468
|
type: "url",
|
|
2469
2469
|
required: !0,
|
|
2470
2470
|
defaultValue: "",
|
|
2471
|
-
helperText: "e.g. enter a youtube url, google map, etc"
|
|
2472
|
-
onChange: (e) => {
|
|
2473
|
-
const t = e.get("url");
|
|
2474
|
-
if (t) {
|
|
2475
|
-
e.set("content", "Loading...");
|
|
2476
|
-
const n = _iframelyApiKey;
|
|
2477
|
-
return fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=${n}`).then((o) => o.json()).then((o) => {
|
|
2478
|
-
e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
|
|
2479
|
-
}).catch((o) => {
|
|
2480
|
-
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
2481
|
-
});
|
|
2482
|
-
} else
|
|
2483
|
-
e.delete("content");
|
|
2484
|
-
}
|
|
2471
|
+
helperText: "e.g. enter a youtube url, google map, etc"
|
|
2485
2472
|
}, {
|
|
2486
2473
|
name: "content",
|
|
2487
2474
|
type: "html",
|
|
@@ -2918,12 +2905,12 @@ const Ro = /* @__PURE__ */ b(To, [["render", $o]]), Bo = {
|
|
|
2918
2905
|
}
|
|
2919
2906
|
if (this.successUrl)
|
|
2920
2907
|
if (this.$refs.formRef) {
|
|
2921
|
-
const
|
|
2908
|
+
const F = new CustomEvent("route", {
|
|
2922
2909
|
detail: {
|
|
2923
2910
|
url: this.successUrl
|
|
2924
2911
|
}
|
|
2925
2912
|
});
|
|
2926
|
-
this.$refs.formRef.dispatchEvent(
|
|
2913
|
+
this.$refs.formRef.dispatchEvent(F), F.defaultPrevented || (location.href = this.successUrl);
|
|
2927
2914
|
} else
|
|
2928
2915
|
location.href = this.successUrl;
|
|
2929
2916
|
}
|
|
@@ -2983,7 +2970,7 @@ function No(e, t, n, o, r, i) {
|
|
|
2983
2970
|
}, null, 8, ["blocks", "context"])) : v("", !0)
|
|
2984
2971
|
], 16, Vo);
|
|
2985
2972
|
}
|
|
2986
|
-
const
|
|
2973
|
+
const Fo = /* @__PURE__ */ b(Ao, [["render", No], ["__scopeId", "data-v-489330f7"]]), Lo = {
|
|
2987
2974
|
shouldReceiveBuilderProps: {
|
|
2988
2975
|
builderBlock: !1,
|
|
2989
2976
|
builderContext: !1,
|
|
@@ -3494,11 +3481,11 @@ const br = /* @__PURE__ */ b(cr, [["render", fr]]), gr = () => [{
|
|
|
3494
3481
|
component: Ro,
|
|
3495
3482
|
...Co
|
|
3496
3483
|
}, {
|
|
3497
|
-
component:
|
|
3484
|
+
component: Fo,
|
|
3498
3485
|
...Bo
|
|
3499
3486
|
}, {
|
|
3500
3487
|
component: Mo,
|
|
3501
|
-
...
|
|
3488
|
+
...Lo
|
|
3502
3489
|
}, {
|
|
3503
3490
|
component: Xo,
|
|
3504
3491
|
...Go
|
|
@@ -3738,37 +3725,37 @@ const Er = "v3", Ie = "builder.", xr = "options.", rt = (e) => {
|
|
|
3738
3725
|
cacheSeconds: m,
|
|
3739
3726
|
staleCacheSeconds: C,
|
|
3740
3727
|
sort: y,
|
|
3741
|
-
includeUnpublished:
|
|
3728
|
+
includeUnpublished: F
|
|
3742
3729
|
} = e;
|
|
3743
3730
|
if (!i)
|
|
3744
3731
|
throw new Error("Missing API key");
|
|
3745
3732
|
if (!["v3"].includes(a))
|
|
3746
3733
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
|
|
3747
3734
|
const X = t !== 1, w = new URL(`https://cdn.builder.io/api/${a}/content/${r}`);
|
|
3748
|
-
if (w.searchParams.set("apiKey", i), w.searchParams.set("limit", String(t)), w.searchParams.set("noTraverse", String(X)), w.searchParams.set("includeRefs", String(!0)), l && w.searchParams.set("locale", l), s && w.searchParams.set("enrich", String(s)), w.searchParams.set("omit", h || "meta.componentsUsed"), u && w.searchParams.set("fields", u), Number.isFinite(c) && c > -1 && w.searchParams.set("offset", String(Math.floor(c))), typeof
|
|
3749
|
-
const
|
|
3735
|
+
if (w.searchParams.set("apiKey", i), w.searchParams.set("limit", String(t)), w.searchParams.set("noTraverse", String(X)), w.searchParams.set("includeRefs", String(!0)), l && w.searchParams.set("locale", l), s && w.searchParams.set("enrich", String(s)), w.searchParams.set("omit", h || "meta.componentsUsed"), u && w.searchParams.set("fields", u), Number.isFinite(c) && c > -1 && w.searchParams.set("offset", String(Math.floor(c))), typeof F == "boolean" && w.searchParams.set("includeUnpublished", String(F)), m && $e(m) && w.searchParams.set("cacheSeconds", String(m)), C && $e(C) && w.searchParams.set("staleCacheSeconds", String(C)), y) {
|
|
3736
|
+
const L = pe({
|
|
3750
3737
|
sort: y
|
|
3751
3738
|
});
|
|
3752
|
-
for (const j in
|
|
3753
|
-
w.searchParams.set(j, JSON.stringify(
|
|
3739
|
+
for (const j in L)
|
|
3740
|
+
w.searchParams.set(j, JSON.stringify(L[j]));
|
|
3754
3741
|
}
|
|
3755
3742
|
const pt = {
|
|
3756
3743
|
...Ar(),
|
|
3757
3744
|
...We(e.options || {})
|
|
3758
3745
|
}, Ce = pe(pt);
|
|
3759
|
-
for (const
|
|
3760
|
-
w.searchParams.set(
|
|
3746
|
+
for (const L in Ce)
|
|
3747
|
+
w.searchParams.set(L, String(Ce[L]));
|
|
3761
3748
|
if (n && w.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
3762
|
-
const
|
|
3749
|
+
const L = ot({
|
|
3763
3750
|
query: o
|
|
3764
3751
|
});
|
|
3765
|
-
for (const j in
|
|
3766
|
-
w.searchParams.set(j, JSON.stringify(
|
|
3752
|
+
for (const j in L)
|
|
3753
|
+
w.searchParams.set(j, JSON.stringify(L[j]));
|
|
3767
3754
|
}
|
|
3768
3755
|
return w;
|
|
3769
3756
|
}, Vr = (e) => "results" in e;
|
|
3770
3757
|
async function ve(e) {
|
|
3771
|
-
const t = await
|
|
3758
|
+
const t = await Fr({
|
|
3772
3759
|
...e,
|
|
3773
3760
|
limit: 1
|
|
3774
3761
|
});
|
|
@@ -3794,7 +3781,7 @@ const Wr = async (e) => {
|
|
|
3794
3781
|
}
|
|
3795
3782
|
return t.results;
|
|
3796
3783
|
};
|
|
3797
|
-
async function
|
|
3784
|
+
async function Fr(e) {
|
|
3798
3785
|
try {
|
|
3799
3786
|
const t = ke(e), n = await Wr(e);
|
|
3800
3787
|
return Vr(n) ? Nr(e, n) : (B.error("Error fetching data. ", {
|
|
@@ -3806,7 +3793,7 @@ async function Lr(e) {
|
|
|
3806
3793
|
return B.error("Error fetching data. ", t), null;
|
|
3807
3794
|
}
|
|
3808
3795
|
}
|
|
3809
|
-
function
|
|
3796
|
+
function Lr(e) {
|
|
3810
3797
|
const t = e || (T() ? window.location.search : void 0);
|
|
3811
3798
|
return t ? Ne(t).indexOf("builder.preview=") !== -1 : !1;
|
|
3812
3799
|
}
|
|
@@ -3925,7 +3912,7 @@ const st = "builderSessionId", Dr = async ({
|
|
|
3925
3912
|
...await Jr({
|
|
3926
3913
|
canTrack: t
|
|
3927
3914
|
}),
|
|
3928
|
-
userAttributes:
|
|
3915
|
+
userAttributes: Fe(),
|
|
3929
3916
|
ownerId: n
|
|
3930
3917
|
}
|
|
3931
3918
|
});
|
|
@@ -4001,7 +3988,7 @@ function ct(e, t) {
|
|
|
4001
3988
|
const n = new URL(t.origin), o = n.hostname;
|
|
4002
3989
|
return (e || Zr).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
4003
3990
|
}
|
|
4004
|
-
const _r = "1.1.
|
|
3991
|
+
const _r = "1.1.2", Pe = {};
|
|
4005
3992
|
function ei(e, t) {
|
|
4006
3993
|
let n = Pe[e];
|
|
4007
3994
|
if (n || (n = Pe[e] = []), n.push(t), T()) {
|
|
@@ -4130,7 +4117,7 @@ const dt = (e = {}) => {
|
|
|
4130
4117
|
break;
|
|
4131
4118
|
}
|
|
4132
4119
|
}
|
|
4133
|
-
},
|
|
4120
|
+
}, Fi = (e, t, n) => {
|
|
4134
4121
|
if (!T)
|
|
4135
4122
|
return B.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
4136
4123
|
};
|
|
@@ -4250,7 +4237,7 @@ font-weight: ${s};
|
|
|
4250
4237
|
variationId: i !== s ? i : void 0
|
|
4251
4238
|
});
|
|
4252
4239
|
}
|
|
4253
|
-
|
|
4240
|
+
Lr() && !R() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
4254
4241
|
new CustomEvent("initpreviewingbldr")
|
|
4255
4242
|
);
|
|
4256
4243
|
}
|
|
@@ -4696,7 +4683,7 @@ function yi(e, t, n, o, r, i) {
|
|
|
4696
4683
|
trustedHosts: e.trustedHosts
|
|
4697
4684
|
}, {}), {
|
|
4698
4685
|
default: W(() => {
|
|
4699
|
-
var h, c, m, C, y,
|
|
4686
|
+
var h, c, m, C, y, F, X;
|
|
4700
4687
|
return [
|
|
4701
4688
|
e.isSsrAbTest ? (d(), k(s, {
|
|
4702
4689
|
key: 0,
|
|
@@ -4711,7 +4698,7 @@ function yi(e, t, n, o, r, i) {
|
|
|
4711
4698
|
customFonts: (y = (C = e.builderContextSignal.content) == null ? void 0 : C.data) == null ? void 0 : y.customFonts
|
|
4712
4699
|
}, null, 8, ["isNestedRender", "contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
4713
4700
|
$(a, {
|
|
4714
|
-
blocks: (X = (
|
|
4701
|
+
blocks: (X = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : X.blocks,
|
|
4715
4702
|
context: e.builderContextSignal,
|
|
4716
4703
|
registeredComponents: e.registeredComponents,
|
|
4717
4704
|
linkComponent: e.linkComponent
|
|
@@ -4959,7 +4946,7 @@ function Ii(e, t, n, o, r, i) {
|
|
|
4959
4946
|
], 16);
|
|
4960
4947
|
}
|
|
4961
4948
|
const $i = /* @__PURE__ */ b(Ti, [["render", Ii]]), xe = {};
|
|
4962
|
-
function
|
|
4949
|
+
function Li(e) {
|
|
4963
4950
|
if (T()) {
|
|
4964
4951
|
Object.assign(xe, e);
|
|
4965
4952
|
const t = {
|
|
@@ -4993,7 +4980,7 @@ export {
|
|
|
4993
4980
|
Nr as A,
|
|
4994
4981
|
be as B,
|
|
4995
4982
|
bn as C,
|
|
4996
|
-
|
|
4983
|
+
Fr as D,
|
|
4997
4984
|
ve as E,
|
|
4998
4985
|
kn as F,
|
|
4999
4986
|
Ei as G,
|
|
@@ -5020,13 +5007,13 @@ export {
|
|
|
5020
5007
|
M as o,
|
|
5021
5008
|
Si as p,
|
|
5022
5009
|
R as q,
|
|
5023
|
-
|
|
5010
|
+
Lr as r,
|
|
5024
5011
|
yr as s,
|
|
5025
5012
|
ei as t,
|
|
5026
|
-
|
|
5013
|
+
Li as u,
|
|
5027
5014
|
rt as v,
|
|
5028
5015
|
bi as w,
|
|
5029
5016
|
Ni as x,
|
|
5030
|
-
|
|
5017
|
+
Fi as y,
|
|
5031
5018
|
Oi as z
|
|
5032
5019
|
};
|
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-QwWHODkZ.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 { o as a, k as r, l as o, C as i, p as n, F as c, I as g, S as m, m as l, n as u, V as d, A as p, s as C, z as E, D as B, E as S, v as f, q as h, r as x, t as b, u as k, y, x as P } from "./index-
|
|
2
|
+
import { o as a, k as r, l as o, C as i, p as n, F as c, I as g, S as m, m as l, n as u, V as d, A as p, s as C, z as E, D as B, E as S, v as f, q as h, r as x, t as b, u as k, y, x as P } from "./index-yersTeTV.js";
|
|
3
3
|
export {
|
|
4
4
|
a as Blocks,
|
|
5
5
|
r as BuilderContext,
|
|
@@ -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-QwWHODkZ.cjs"),r=()=>Promise.resolve().then(()=>require("./index-QwWHODkZ.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,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 { k as s, f as l } from "./index-
|
|
4
|
-
const i = () => import("./index-
|
|
3
|
+
import { k as s, f as l } from "./index-yersTeTV.js";
|
|
4
|
+
const i = () => import("./index-yersTeTV.js").then((o) => o.H).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
|
|
@@ -105,6 +105,16 @@ export interface ComponentInfo {
|
|
|
105
105
|
*/
|
|
106
106
|
requiredPermissions?: Array<Permission>;
|
|
107
107
|
hidden?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* When overriding built-in components, if you don't want any special behavior that
|
|
110
|
+
* the original has, set this to `true` to skip the default behavior
|
|
111
|
+
*
|
|
112
|
+
* Default behaviors include special "virtual options", such as a custom
|
|
113
|
+
* aspect ratio editor for Images, or a special column editor for Columns
|
|
114
|
+
*
|
|
115
|
+
* Learn more about overriding built-in components here: https://www.builder.io/c/docs/custom-components-overriding
|
|
116
|
+
*/
|
|
117
|
+
override?: boolean;
|
|
108
118
|
/**
|
|
109
119
|
* Whether or not the component should receive SDK-related props.
|
|
110
120
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as g, resolveComponent as B, openBlock as v, createBlock as C, createCommentVNode as _ } from "vue";
|
|
2
|
-
import { _ as $, T, g as p, c as y, a as w, b as l, d as k, e as E, f as I } from "./index-
|
|
2
|
+
import { _ as $, T, g as p, c as y, a as w, b as l, d as k, e as E, f as I } from "./index-1_sMRASk.js";
|
|
3
3
|
const N = g({
|
|
4
4
|
name: "block-styles",
|
|
5
5
|
components: { InlinedStyles: $ },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),e=require("./index-mPTdNlEd.cjs"),f=a.defineComponent({name:"block-styles",components:{InlinedStyles:e._sfc_main},props:["block","context"],data(){return{TARGET:e.TARGET}},computed:{canShowBlock(){const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return e.checkIsDefined(t.hide)?!t.hide:e.checkIsDefined(t.show)?t.show:!0},css(){var m,h,y;const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),s=t.responsiveStyles,c=this.context.content,r=e.getSizesForBreakpoints(((m=c==null?void 0:c.meta)==null?void 0:m.breakpoints)||{}),i=s==null?void 0:s.large,d=s==null?void 0:s.medium,l=s==null?void 0:s.small,n=t.id;if(!n)return"";const k=i?e.createCssClass({className:n,styles:i}):"",p=d?e.createCssClass({className:n,styles:d,mediaQuery:e.getMaxWidthQueryForSize("medium",r)}):"",C=l?e.createCssClass({className:n,styles:l,mediaQuery:e.getMaxWidthQueryForSize("small",r)}):"",o=t.animations&&t.animations.find(u=>u.trigger==="hover");let S="";if(o){const u=((y=(h=o.steps)==null?void 0:h[1])==null?void 0:y.styles)||{};S=e.createCssClass({className:`${n}:hover`,styles:{...u,transition:`all ${o.duration}s ${e.camelToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[k,p,C,S].join(" ")}}});function g(t,s,c,r,i,d){const l=a.resolveComponent("InlinedStyles");return t.TARGET!=="reactNative"&&t.css&&t.canShowBlock?(a.openBlock(),a.createBlock(l,{key:0,id:"builderio-block",styles:t.css},null,8,["styles"])):a.createCommentVNode("",!0)}const x=e._export_sfc(f,[["render",g]]);exports.default=x;
|
|
@@ -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 { f as m } from "./index
|
|
4
|
-
const d = () => import("./index
|
|
2
|
+
import { g as s, a as l } from "./get-block-properties-nrMer_9r.js";
|
|
3
|
+
import { f as m } from "./index-1_sMRASk.js";
|
|
4
|
+
const d = () => import("./index-1_sMRASk.js").then((e) => e.G).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-aNnHrNuZ.cjs"),n=require("./index-mPTdNlEd.cjs"),c=()=>Promise.resolve().then(()=>require("./index-mPTdNlEd.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-mPTdNlEd.cjs"),a=require("./get-block-properties-aNnHrNuZ.cjs"),u=t.defineComponent({name:"interactive-element",props:["includeBlockProps","block","context","wrapperProps","Wrapper"],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 d(e,o,p,s,n,i){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({attributes:e.attributes},e.wrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"])}const m=c._export_sfc(u,[["render",d]]),f=({componentOptions:e,builderBlock:o,context:p,componentRef:s,includeBlockProps:n,isInteractive:i,contextValue:l})=>{const r={...e,...n?{attributes:a.getBlockProperties({block:o,context:l})}:{}};return i?{Wrapper:s,block:o,context:p,wrapperProps:e,includeBlockProps:n}:r},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:f}}});function b(e,o,p,s,n,i){const l=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,(r,k)=>(t.openBlock(),t.createBlock(l,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const C=c._export_sfc(B,[["render",b]]);exports.default=C;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as m, openBlock as r, createBlock as a, resolveDynamicComponent as k, mergeProps as u, withCtx as d, renderSlot as h, resolveComponent as B, normalizeProps as P, createElementBlock as g, Fragment as $, renderList as v, createCommentVNode as S } from "vue";
|
|
2
|
-
import { f, B as W, w } from "./index-
|
|
3
|
-
import { a as b, g as R } from "./get-block-properties-
|
|
2
|
+
import { f, B as W, w } from "./index-1_sMRASk.js";
|
|
3
|
+
import { a as b, g as R } from "./get-block-properties-nrMer_9r.js";
|
|
4
4
|
const x = m({
|
|
5
5
|
name: "interactive-element",
|
|
6
6
|
props: ["includeBlockProps", "block", "context", "wrapperProps", "Wrapper"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1.2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./index-
|
|
1
|
+
"use strict";const a=require("./index-mPTdNlEd.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1,enableCache:!0});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const s=r[o];let n=c(o);if(e.stripPrefix)switch(a.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(s,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:a.getStyle({block:e,context:t}),[a.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;
|