@builder.io/sdk-react-nextjs 0.7.4 → 0.7.5
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/{USE_CLIENT_BUNDLE-6b3887b7.js → USE_CLIENT_BUNDLE-02851f5b.js} +2 -2
- package/lib/{node/USE_CLIENT_BUNDLE-539be307.cjs → browser/USE_CLIENT_BUNDLE-19024ae3.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-2c9d1a5d.js → browser/USE_SERVER_BUNDLE-0dbfec06.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-e5ab43ec.cjs → browser/USE_SERVER_BUNDLE-99af92f3.cjs} +1 -1
- package/lib/browser/{bundle-df55c296.cjs → bundle-cf866f2c.cjs} +13 -13
- package/lib/browser/{bundle-fc3e7377.js → bundle-ed21dd97.js} +79 -82
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{browser/USE_CLIENT_BUNDLE-f95a196a.cjs → edge/USE_CLIENT_BUNDLE-853614ad.cjs} +1 -1
- package/lib/{node/USE_CLIENT_BUNDLE-a5c6399c.js → edge/USE_CLIENT_BUNDLE-a1ac1e61.js} +2 -2
- package/lib/{node/USE_SERVER_BUNDLE-7f4ba7e9.cjs → edge/USE_SERVER_BUNDLE-949923da.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-21bf3ffc.js → edge/USE_SERVER_BUNDLE-f8e4c4d9.js} +1 -1
- package/lib/edge/{bundle-bef73246.js → bundle-48628d9c.js} +274 -277
- package/lib/edge/{bundle-38f08fa1.cjs → bundle-97130d9a.cjs} +13 -13
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-44225d7a.cjs → node/USE_CLIENT_BUNDLE-23b5881f.cjs} +1 -1
- package/lib/{edge/USE_CLIENT_BUNDLE-a32e462e.js → node/USE_CLIENT_BUNDLE-b63c2d8e.js} +2 -2
- package/lib/{browser/USE_SERVER_BUNDLE-b314d0f7.js → node/USE_SERVER_BUNDLE-643288fc.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-eed7792a.cjs → node/USE_SERVER_BUNDLE-d645bd91.cjs} +1 -1
- package/lib/node/{bundle-74479d5d.js → bundle-3ab5a1ab.js} +77 -80
- package/lib/node/{bundle-f7863fb3.cjs → bundle-3f7e723b.cjs} +8 -8
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +1 -1
- package/types/cjs/components/content/content.helpers.d.ts +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/esm/components/content/content.helpers.d.ts +1 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LRUCache as Be } from "lru-cache";
|
|
2
2
|
import { jsx as l, Fragment as b, jsxs as w } from "react/jsx-runtime";
|
|
3
3
|
import { createElement as Pe } from "react";
|
|
4
|
-
import { I as $e, B as Y, a as Oe, b as Fe, C as We, E as Ne, F as _e, c as Le, d as Ue, S as Me, V as De, e as je } from "./USE_CLIENT_BUNDLE-
|
|
4
|
+
import { I as $e, B as Y, a as Oe, b as Fe, C as We, E as Ne, F as _e, c as Le, d as Ue, S as Me, V as De, e as je } from "./USE_CLIENT_BUNDLE-02851f5b.js";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
function Ke(e) {
|
|
7
7
|
var t;
|
|
@@ -169,14 +169,14 @@ const et = ({
|
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
171
|
for (const s in e.bindings) {
|
|
172
|
-
const c = e.bindings[s],
|
|
172
|
+
const c = e.bindings[s], f = j({
|
|
173
173
|
code: c,
|
|
174
174
|
localState: n,
|
|
175
175
|
rootState: o,
|
|
176
176
|
rootSetState: i,
|
|
177
177
|
context: t
|
|
178
178
|
});
|
|
179
|
-
Ze(r, s,
|
|
179
|
+
Ze(r, s, f);
|
|
180
180
|
}
|
|
181
181
|
return r;
|
|
182
182
|
};
|
|
@@ -239,15 +239,15 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
239
239
|
if (!Array.isArray(i))
|
|
240
240
|
return;
|
|
241
241
|
const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
|
|
242
|
-
return i.map((c,
|
|
242
|
+
return i.map((c, f) => ({
|
|
243
243
|
context: {
|
|
244
244
|
...t,
|
|
245
245
|
localState: {
|
|
246
246
|
...t.localState,
|
|
247
|
-
$index:
|
|
247
|
+
$index: f,
|
|
248
248
|
$item: c,
|
|
249
249
|
[r]: c,
|
|
250
|
-
[`$${r}Index`]:
|
|
250
|
+
[`$${r}Index`]: f
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
block: o
|
|
@@ -335,28 +335,28 @@ function K(e) {
|
|
|
335
335
|
shouldEvaluateBindings: !0
|
|
336
336
|
}), a = i.responsiveStyles, r = e.context.content, s = me(
|
|
337
337
|
((d = r == null ? void 0 : r.meta) == null ? void 0 : d.breakpoints) || {}
|
|
338
|
-
), c = a == null ? void 0 : a.large,
|
|
338
|
+
), c = a == null ? void 0 : a.large, f = a == null ? void 0 : a.medium, h = a == null ? void 0 : a.small, g = i.id;
|
|
339
339
|
if (!g)
|
|
340
340
|
return "";
|
|
341
341
|
const y = c ? _({
|
|
342
342
|
className: g,
|
|
343
343
|
styles: c
|
|
344
|
-
}) : "",
|
|
344
|
+
}) : "", u = f ? _({
|
|
345
345
|
className: g,
|
|
346
|
-
styles:
|
|
346
|
+
styles: f,
|
|
347
347
|
mediaQuery: Q(
|
|
348
348
|
"medium",
|
|
349
349
|
s
|
|
350
350
|
)
|
|
351
|
-
}) : "",
|
|
351
|
+
}) : "", m = h ? _({
|
|
352
352
|
className: g,
|
|
353
|
-
styles:
|
|
353
|
+
styles: h,
|
|
354
354
|
mediaQuery: Q(
|
|
355
355
|
"small",
|
|
356
356
|
s
|
|
357
357
|
)
|
|
358
358
|
}) : "";
|
|
359
|
-
return [y,
|
|
359
|
+
return [y, u, m].join(" ");
|
|
360
360
|
};
|
|
361
361
|
return /* @__PURE__ */ l(b, { children: n() && t() ? /* @__PURE__ */ l(b, { children: /* @__PURE__ */ l(F, { styles: n() }) }) : null });
|
|
362
362
|
}
|
|
@@ -502,7 +502,7 @@ function ht(e) {
|
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
504
|
function W(e) {
|
|
505
|
-
var
|
|
505
|
+
var f, h, g, y;
|
|
506
506
|
const t = function() {
|
|
507
507
|
return nt({
|
|
508
508
|
block: e.block,
|
|
@@ -515,7 +515,8 @@ function W(e) {
|
|
|
515
515
|
context: e.context
|
|
516
516
|
});
|
|
517
517
|
}, o = function() {
|
|
518
|
-
|
|
518
|
+
var m;
|
|
519
|
+
return (m = e.block.repeat) != null && m.collection ? e.block : $({
|
|
519
520
|
block: e.block,
|
|
520
521
|
localState: e.context.localState,
|
|
521
522
|
rootState: e.context.rootState,
|
|
@@ -526,15 +527,16 @@ function W(e) {
|
|
|
526
527
|
}, i = function() {
|
|
527
528
|
return e.block.tagName || "div";
|
|
528
529
|
}, a = function() {
|
|
529
|
-
|
|
530
|
+
var m, d;
|
|
531
|
+
return "hide" in o() ? !o().hide : "show" in o() ? o().show : !((m = e.block.repeat) != null && m.collection && !((d = n()) != null && d.length));
|
|
530
532
|
}, r = function() {
|
|
531
533
|
var d;
|
|
532
534
|
return !((d = t()) != null && d.component) && !n() ? o().children ?? [] : [];
|
|
533
535
|
}, s = function() {
|
|
534
|
-
var
|
|
536
|
+
var m, d, v, S, p;
|
|
535
537
|
return {
|
|
536
538
|
blockChildren: o().children ?? [],
|
|
537
|
-
componentRef: (
|
|
539
|
+
componentRef: (m = t()) == null ? void 0 : m.component,
|
|
538
540
|
componentOptions: {
|
|
539
541
|
...Ke(o()),
|
|
540
542
|
builderContext: e.context,
|
|
@@ -549,7 +551,7 @@ function W(e) {
|
|
|
549
551
|
isInteractive: !((p = t()) != null && p.isRSC)
|
|
550
552
|
};
|
|
551
553
|
}, c = e.context;
|
|
552
|
-
return /* @__PURE__ */ l(b, { children: a() ? /* @__PURE__ */ l(b, { children: (
|
|
554
|
+
return /* @__PURE__ */ l(b, { children: a() ? /* @__PURE__ */ l(b, { children: (f = t()) != null && f.noWrap ? /* @__PURE__ */ l(b, { children: /* @__PURE__ */ l(
|
|
553
555
|
X,
|
|
554
556
|
{
|
|
555
557
|
componentRef: s().componentRef,
|
|
@@ -571,14 +573,14 @@ function W(e) {
|
|
|
571
573
|
hasChildren: !1
|
|
572
574
|
}
|
|
573
575
|
) }) : null,
|
|
574
|
-
!N(i()) && n() ? /* @__PURE__ */ l(b, { children: (
|
|
576
|
+
!N(i()) && n() ? /* @__PURE__ */ l(b, { children: (h = n()) == null ? void 0 : h.map((u, m) => /* @__PURE__ */ l(
|
|
575
577
|
ht,
|
|
576
578
|
{
|
|
577
|
-
repeatContext:
|
|
578
|
-
block:
|
|
579
|
+
repeatContext: u.context,
|
|
580
|
+
block: u.block,
|
|
579
581
|
registeredComponents: e.registeredComponents
|
|
580
582
|
},
|
|
581
|
-
|
|
583
|
+
m
|
|
582
584
|
)) }) : null,
|
|
583
585
|
!N(i()) && !n() ? /* @__PURE__ */ l(b, { children: /* @__PURE__ */ w(
|
|
584
586
|
Y,
|
|
@@ -601,22 +603,22 @@ function W(e) {
|
|
|
601
603
|
isInteractive: s().isInteractive
|
|
602
604
|
}
|
|
603
605
|
),
|
|
604
|
-
(g = r()) == null ? void 0 : g.map((
|
|
606
|
+
(g = r()) == null ? void 0 : g.map((u) => /* @__PURE__ */ l(
|
|
605
607
|
W,
|
|
606
608
|
{
|
|
607
|
-
block:
|
|
609
|
+
block: u,
|
|
608
610
|
context: c,
|
|
609
611
|
registeredComponents: e.registeredComponents
|
|
610
612
|
},
|
|
611
|
-
"block-" +
|
|
613
|
+
"block-" + u.id
|
|
612
614
|
)),
|
|
613
|
-
(y = r()) == null ? void 0 : y.map((
|
|
615
|
+
(y = r()) == null ? void 0 : y.map((u) => /* @__PURE__ */ l(
|
|
614
616
|
K,
|
|
615
617
|
{
|
|
616
|
-
block:
|
|
618
|
+
block: u,
|
|
617
619
|
context: c
|
|
618
620
|
},
|
|
619
|
-
"block-style-" +
|
|
621
|
+
"block-style-" + u.id
|
|
620
622
|
))
|
|
621
623
|
]
|
|
622
624
|
}
|
|
@@ -655,7 +657,7 @@ function H(e) {
|
|
|
655
657
|
);
|
|
656
658
|
}
|
|
657
659
|
function gt(e) {
|
|
658
|
-
var
|
|
660
|
+
var u;
|
|
659
661
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
|
|
660
662
|
var v;
|
|
661
663
|
return ((v = n[d]) == null ? void 0 : v.width) || 100 / n.length;
|
|
@@ -672,7 +674,7 @@ function gt(e) {
|
|
|
672
674
|
desktopStyle: v
|
|
673
675
|
}) {
|
|
674
676
|
return o === "never" ? v : d;
|
|
675
|
-
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
677
|
+
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", f = function() {
|
|
676
678
|
return {
|
|
677
679
|
"--flex-dir": c,
|
|
678
680
|
"--flex-dir-tablet": r({
|
|
@@ -680,7 +682,7 @@ function gt(e) {
|
|
|
680
682
|
desktopStyle: "row"
|
|
681
683
|
})
|
|
682
684
|
};
|
|
683
|
-
},
|
|
685
|
+
}, h = function(d) {
|
|
684
686
|
const v = d === 0 ? 0 : t, S = a(d), p = `${v}px`, A = "100%", E = 0;
|
|
685
687
|
return {
|
|
686
688
|
width: S,
|
|
@@ -739,14 +741,14 @@ function gt(e) {
|
|
|
739
741
|
"div",
|
|
740
742
|
{
|
|
741
743
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-0d69fe26`,
|
|
742
|
-
style:
|
|
744
|
+
style: f(),
|
|
743
745
|
children: [
|
|
744
746
|
/* @__PURE__ */ l(b, { children: /* @__PURE__ */ l(F, { styles: y() }) }),
|
|
745
|
-
(
|
|
747
|
+
(u = e.columns) == null ? void 0 : u.map((m, d) => /* @__PURE__ */ Pe(
|
|
746
748
|
"div",
|
|
747
749
|
{
|
|
748
750
|
className: "builder-column div-0d69fe26-2",
|
|
749
|
-
style:
|
|
751
|
+
style: h(d),
|
|
750
752
|
key: d
|
|
751
753
|
},
|
|
752
754
|
/* @__PURE__ */ l(
|
|
@@ -759,7 +761,7 @@ function gt(e) {
|
|
|
759
761
|
},
|
|
760
762
|
context: e.builderContext,
|
|
761
763
|
registeredComponents: e.builderComponents,
|
|
762
|
-
blocks:
|
|
764
|
+
blocks: m.blocks
|
|
763
765
|
}
|
|
764
766
|
)
|
|
765
767
|
))
|
|
@@ -1249,15 +1251,15 @@ const yt = (e) => {
|
|
|
1249
1251
|
onChange: (e) => {
|
|
1250
1252
|
e.delete("srcset"), e.delete("noWebp");
|
|
1251
1253
|
function n(r, s = 6e4) {
|
|
1252
|
-
return new Promise((c,
|
|
1253
|
-
const
|
|
1254
|
+
return new Promise((c, f) => {
|
|
1255
|
+
const h = document.createElement("img");
|
|
1254
1256
|
let g = !1;
|
|
1255
|
-
|
|
1256
|
-
g = !0, c(
|
|
1257
|
-
},
|
|
1258
|
-
console.warn("Image load failed", y.error),
|
|
1259
|
-
}),
|
|
1260
|
-
g ||
|
|
1257
|
+
h.onload = () => {
|
|
1258
|
+
g = !0, c(h);
|
|
1259
|
+
}, h.addEventListener("error", (y) => {
|
|
1260
|
+
console.warn("Image load failed", y.error), f(y.error);
|
|
1261
|
+
}), h.src = r, setTimeout(() => {
|
|
1262
|
+
g || f(new Error("Image load timed out"));
|
|
1261
1263
|
}, s);
|
|
1262
1264
|
});
|
|
1263
1265
|
}
|
|
@@ -1764,23 +1766,23 @@ const on = "v3", ne = "builder.", an = "options.", rn = (e) => {
|
|
|
1764
1766
|
apiKey: r,
|
|
1765
1767
|
includeRefs: s = !0,
|
|
1766
1768
|
enrich: c,
|
|
1767
|
-
locale:
|
|
1768
|
-
apiVersion:
|
|
1769
|
+
locale: f,
|
|
1770
|
+
apiVersion: h = on,
|
|
1769
1771
|
fields: g,
|
|
1770
1772
|
omit: y,
|
|
1771
|
-
offset:
|
|
1772
|
-
cacheSeconds:
|
|
1773
|
+
offset: u,
|
|
1774
|
+
cacheSeconds: m,
|
|
1773
1775
|
staleCacheSeconds: d,
|
|
1774
1776
|
sort: v,
|
|
1775
1777
|
includeUnpublished: S
|
|
1776
1778
|
} = e;
|
|
1777
1779
|
if (!r)
|
|
1778
1780
|
throw new Error("Missing API key");
|
|
1779
|
-
if (!["v2", "v3"].includes(
|
|
1780
|
-
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
1781
|
+
if (!["v2", "v3"].includes(h))
|
|
1782
|
+
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${h}'`);
|
|
1781
1783
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1782
|
-
const p = new URL(`https://cdn.builder.io/api/${
|
|
1783
|
-
if (p.searchParams.set("omit", y || "meta.componentsUsed"), g && p.searchParams.set("fields", g), Number.isFinite(
|
|
1784
|
+
const p = new URL(`https://cdn.builder.io/api/${h}/content/${a}?apiKey=${r}&limit=${n}&noTraverse=${t}&includeRefs=${s}${f ? `&locale=${f}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1785
|
+
if (p.searchParams.set("omit", y || "meta.componentsUsed"), g && p.searchParams.set("fields", g), Number.isFinite(u) && u > -1 && p.searchParams.set("offset", String(Math.floor(u))), typeof S == "boolean" && p.searchParams.set("includeUnpublished", String(S)), m && oe(m) && p.searchParams.set("cacheSeconds", String(m)), d && oe(d) && p.searchParams.set("staleCacheSeconds", String(d)), v) {
|
|
1784
1786
|
const C = P({
|
|
1785
1787
|
sort: v
|
|
1786
1788
|
});
|
|
@@ -2037,7 +2039,7 @@ const Cn = (e, t, n = !0) => {
|
|
|
2037
2039
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2038
2040
|
}
|
|
2039
2041
|
};
|
|
2040
|
-
}, In = "0.7.
|
|
2042
|
+
}, In = "0.7.5", re = {};
|
|
2041
2043
|
function Tn(e, t) {
|
|
2042
2044
|
let n = re[e];
|
|
2043
2045
|
if (n || (n = re[e] = []), n.push(t), x()) {
|
|
@@ -2104,10 +2106,10 @@ const Jn = (e = {}) => {
|
|
|
2104
2106
|
if (o != null && o.type)
|
|
2105
2107
|
switch (o.type) {
|
|
2106
2108
|
case "builder.evaluate": {
|
|
2107
|
-
const r = o.data.text, s = o.data.arguments || [], c = o.data.id,
|
|
2108
|
-
let
|
|
2109
|
+
const r = o.data.text, s = o.data.arguments || [], c = o.data.id, f = new Function(r);
|
|
2110
|
+
let h, g = null;
|
|
2109
2111
|
try {
|
|
2110
|
-
|
|
2112
|
+
h = f.apply(null, s);
|
|
2111
2113
|
} catch (y) {
|
|
2112
2114
|
g = y;
|
|
2113
2115
|
}
|
|
@@ -2117,9 +2119,9 @@ const Jn = (e = {}) => {
|
|
|
2117
2119
|
id: c,
|
|
2118
2120
|
error: g.message
|
|
2119
2121
|
}
|
|
2120
|
-
}, "*") :
|
|
2121
|
-
var
|
|
2122
|
-
(
|
|
2122
|
+
}, "*") : h && typeof h.then == "function" ? h.then((y) => {
|
|
2123
|
+
var u;
|
|
2124
|
+
(u = window.parent) == null || u.postMessage({
|
|
2123
2125
|
type: "builder.evaluateResult",
|
|
2124
2126
|
data: {
|
|
2125
2127
|
id: c,
|
|
@@ -2129,7 +2131,7 @@ const Jn = (e = {}) => {
|
|
|
2129
2131
|
}).catch(console.error) : (a = window.parent) == null || a.postMessage({
|
|
2130
2132
|
type: "builder.evaluateResult",
|
|
2131
2133
|
data: {
|
|
2132
|
-
result:
|
|
2134
|
+
result: h,
|
|
2133
2135
|
id: c
|
|
2134
2136
|
}
|
|
2135
2137
|
}, "*");
|
|
@@ -2203,22 +2205,17 @@ const Bn = ({
|
|
|
2203
2205
|
locale: n
|
|
2204
2206
|
}) => {
|
|
2205
2207
|
var a, r, s;
|
|
2206
|
-
const o = {};
|
|
2207
|
-
(
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
...(s = e == null ? void 0 : e.data) == null ? void 0 : s.state,
|
|
2208
|
+
const o = {}, i = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
|
|
2209
|
+
return (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || s.forEach((c) => {
|
|
2210
|
+
c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
|
|
2211
|
+
}), {
|
|
2212
|
+
...o,
|
|
2213
|
+
...i,
|
|
2213
2214
|
...t,
|
|
2214
2215
|
...n ? {
|
|
2215
2216
|
locale: n
|
|
2216
2217
|
} : {}
|
|
2217
2218
|
};
|
|
2218
|
-
return {
|
|
2219
|
-
...o,
|
|
2220
|
-
...i
|
|
2221
|
-
};
|
|
2222
2219
|
}, Pn = ({
|
|
2223
2220
|
content: e,
|
|
2224
2221
|
data: t
|
|
@@ -2231,7 +2228,7 @@ const Bn = ({
|
|
|
2231
2228
|
meta: e == null ? void 0 : e.meta
|
|
2232
2229
|
} : void 0;
|
|
2233
2230
|
function ce(e) {
|
|
2234
|
-
var i, a, r, s, c,
|
|
2231
|
+
var i, a, r, s, c, f, h, g, y;
|
|
2235
2232
|
const t = Jt({
|
|
2236
2233
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2237
2234
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
@@ -2247,10 +2244,10 @@ function ce(e) {
|
|
|
2247
2244
|
...te,
|
|
2248
2245
|
...e.customComponents || []
|
|
2249
2246
|
].reduce(
|
|
2250
|
-
(
|
|
2251
|
-
...
|
|
2247
|
+
(u, { component: m, ...d }) => ({
|
|
2248
|
+
...u,
|
|
2252
2249
|
[d.name]: {
|
|
2253
|
-
component:
|
|
2250
|
+
component: m,
|
|
2254
2251
|
...U(d)
|
|
2255
2252
|
}
|
|
2256
2253
|
}),
|
|
@@ -2280,8 +2277,8 @@ function ce(e) {
|
|
|
2280
2277
|
...te,
|
|
2281
2278
|
...e.customComponents || []
|
|
2282
2279
|
].reduce(
|
|
2283
|
-
(
|
|
2284
|
-
...
|
|
2280
|
+
(u, { component: m, ...d }) => ({
|
|
2281
|
+
...u,
|
|
2285
2282
|
[d.name]: U(d)
|
|
2286
2283
|
}),
|
|
2287
2284
|
{}
|
|
@@ -2308,7 +2305,7 @@ function ce(e) {
|
|
|
2308
2305
|
{
|
|
2309
2306
|
contentId: (r = o.content) == null ? void 0 : r.id,
|
|
2310
2307
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2311
|
-
customFonts: (
|
|
2308
|
+
customFonts: (h = (f = o.content) == null ? void 0 : f.data) == null ? void 0 : h.customFonts
|
|
2312
2309
|
}
|
|
2313
2310
|
) }),
|
|
2314
2311
|
/* @__PURE__ */ l(
|
|
@@ -2331,9 +2328,9 @@ function Ve(e) {
|
|
|
2331
2328
|
}), n = function() {
|
|
2332
2329
|
var c;
|
|
2333
2330
|
return Yt(
|
|
2334
|
-
B(e.content).map((
|
|
2335
|
-
id:
|
|
2336
|
-
testRatio:
|
|
2331
|
+
B(e.content).map((f) => ({
|
|
2332
|
+
id: f.testVariationId,
|
|
2333
|
+
testRatio: f.testRatio
|
|
2337
2334
|
})),
|
|
2338
2335
|
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2339
2336
|
);
|
|
@@ -2422,12 +2419,12 @@ const $n = async ({
|
|
|
2422
2419
|
async function On(e) {
|
|
2423
2420
|
var o, i, a, r;
|
|
2424
2421
|
const t = function() {
|
|
2425
|
-
var c,
|
|
2422
|
+
var c, f;
|
|
2426
2423
|
return [
|
|
2427
2424
|
e.attributes.className,
|
|
2428
2425
|
"builder-symbol",
|
|
2429
2426
|
(c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
|
|
2430
|
-
(
|
|
2427
|
+
(f = e.symbol) != null && f.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2431
2428
|
].filter(Boolean).join(" ");
|
|
2432
2429
|
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await $n({
|
|
2433
2430
|
symbol: e.symbol,
|
package/lib/browser/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-cf866f2c.cjs"),t=require("./USE_CLIENT_BUNDLE-19024ae3.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-99af92f3.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
|
package/lib/browser/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as i, t as m, C as c, R as g, q as p, S as l, T as C, w as d, m as f, E as u, x as B, n as S, y as E, A as R, z as h, i as x, f as k, u as y, v as P, D as b } from "./bundle-
|
|
2
|
-
import { b as w, F as A, c as F, S as T, V } from "./USE_CLIENT_BUNDLE-
|
|
1
|
+
import { B as i, t as m, C as c, R as g, q as p, S as l, T as C, w as d, m as f, E as u, x as B, n as S, y as E, A as R, z as h, i as x, f as k, u as y, v as P, D as b } from "./bundle-ed21dd97.js";
|
|
2
|
+
import { b as w, F as A, c as F, S as T, V } from "./USE_CLIENT_BUNDLE-02851f5b.js";
|
|
3
3
|
import "lru-cache";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "next/navigation";
|
|
7
|
-
import "./USE_SERVER_BUNDLE-
|
|
7
|
+
import "./USE_SERVER_BUNDLE-0dbfec06.js";
|
|
8
8
|
export {
|
|
9
9
|
i as Blocks,
|
|
10
10
|
w as Button,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-97130d9a.cjs"),l=require("react"),M=require("./USE_SERVER_BUNDLE-949923da.cjs"),V=require("next/navigation");function W(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"button",children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-5294b10c",children:e.text})}),t.jsx("style",{children:`.button-5294b10c {
|
|
2
2
|
all: unset;
|
|
3
3
|
}`})]})}function A(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:[" ",e.children," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function D(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})},children:e.children})}function U(e){function a(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:a()+" div-02c7a115","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>S(),onKeyPress:o=>g(),children:e.children}),t.jsx("style",{children:`.div-02c7a115 {
|
|
4
4
|
display: flex;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as C, Fragment as h, jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { g as T, a as N, i as E, b as R, c as Q, d as P, e as D, _ as U, f as X, l as Y, h as H, j as Z, k as p, r as ee, s as te, m as ne, n as ie, o as ae } from "./bundle-
|
|
3
|
+
import { g as T, a as N, i as E, b as R, c as Q, d as P, e as D, _ as U, f as X, l as Y, h as H, j as Z, k as p, r as ee, s as te, m as ne, n as ie, o as ae } from "./bundle-48628d9c.js";
|
|
4
4
|
import { useRef as B, useState as k, useEffect as v, createContext as ce, createElement as le } from "react";
|
|
5
|
-
import { p as oe } from "./USE_SERVER_BUNDLE-
|
|
5
|
+
import { p as oe } from "./USE_SERVER_BUNDLE-f8e4c4d9.js";
|
|
6
6
|
import { useRouter as re } from "next/navigation";
|
|
7
7
|
function ge(e) {
|
|
8
8
|
return /* @__PURE__ */ C(h, { children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-
|
|
1
|
+
"use server";"use strict";const n=require("./bundle-97130d9a.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|