@builder.io/sdk-react-nextjs 0.17.1 → 0.17.3
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/blocks/columns/columns.cjs +2 -2
- package/lib/browser/blocks/columns/columns.mjs +2 -2
- package/lib/browser/blocks/image/image.cjs +3 -3
- package/lib/browser/blocks/image/image.mjs +8 -8
- package/lib/browser/blocks/text/text.cjs +1 -1
- package/lib/browser/blocks/text/text.mjs +6 -24
- package/lib/browser/components/awaiter.cjs +1 -1
- package/lib/browser/components/block/block.cjs +1 -1
- package/lib/browser/components/block/block.mjs +27 -28
- package/lib/browser/components/blocks/blocks-wrapper.cjs +1 -1
- package/lib/browser/components/blocks/blocks-wrapper.mjs +2 -2
- package/lib/browser/components/content/components/enable-editor.cjs +1 -1
- package/lib/browser/components/content/components/enable-editor.mjs +102 -96
- package/lib/browser/constants/sdk-version.cjs +1 -1
- package/lib/browser/constants/sdk-version.mjs +1 -1
- package/lib/browser/functions/get-block-component-options.cjs +1 -1
- package/lib/browser/functions/get-block-component-options.mjs +21 -5
- package/lib/browser/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/browser/functions/get-content/generate-content-url.mjs +60 -40
- package/lib/browser/functions/get-processed-block.cjs +1 -1
- package/lib/browser/functions/get-processed-block.mjs +18 -19
- package/lib/browser/helpers/flatten.cjs +1 -1
- package/lib/browser/helpers/flatten.mjs +28 -15
- package/lib/edge/blocks/columns/columns.cjs +2 -2
- package/lib/edge/blocks/columns/columns.mjs +2 -2
- package/lib/edge/blocks/image/image.cjs +3 -3
- package/lib/edge/blocks/image/image.mjs +8 -8
- package/lib/edge/blocks/text/text.cjs +1 -1
- package/lib/edge/blocks/text/text.mjs +6 -24
- package/lib/edge/components/awaiter.cjs +1 -1
- package/lib/edge/components/block/block.cjs +1 -1
- package/lib/edge/components/block/block.mjs +27 -28
- package/lib/edge/components/blocks/blocks-wrapper.cjs +1 -1
- package/lib/edge/components/blocks/blocks-wrapper.mjs +2 -2
- package/lib/edge/components/content/components/enable-editor.cjs +1 -1
- package/lib/edge/components/content/components/enable-editor.mjs +102 -96
- package/lib/edge/constants/sdk-version.cjs +1 -1
- package/lib/edge/constants/sdk-version.mjs +1 -1
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.cjs +5 -5
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.mjs +25 -28
- package/lib/edge/functions/get-block-component-options.cjs +1 -1
- package/lib/edge/functions/get-block-component-options.mjs +21 -5
- package/lib/edge/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/edge/functions/get-content/generate-content-url.mjs +60 -40
- package/lib/edge/functions/get-processed-block.cjs +1 -1
- package/lib/edge/functions/get-processed-block.mjs +18 -19
- package/lib/edge/helpers/flatten.cjs +1 -1
- package/lib/edge/helpers/flatten.mjs +28 -15
- package/lib/node/blocks/columns/columns.cjs +2 -2
- package/lib/node/blocks/columns/columns.mjs +2 -2
- package/lib/node/blocks/image/image.cjs +3 -3
- package/lib/node/blocks/image/image.mjs +8 -8
- package/lib/node/blocks/text/text.cjs +1 -1
- package/lib/node/blocks/text/text.mjs +6 -24
- package/lib/node/components/awaiter.cjs +1 -1
- package/lib/node/components/block/block.cjs +1 -1
- package/lib/node/components/block/block.mjs +27 -28
- package/lib/node/components/blocks/blocks-wrapper.cjs +1 -1
- package/lib/node/components/blocks/blocks-wrapper.mjs +2 -2
- package/lib/node/components/content/components/enable-editor.cjs +1 -1
- package/lib/node/components/content/components/enable-editor.mjs +102 -96
- package/lib/node/constants/sdk-version.cjs +1 -1
- package/lib/node/constants/sdk-version.mjs +1 -1
- package/lib/node/functions/get-block-component-options.cjs +1 -1
- package/lib/node/functions/get-block-component-options.mjs +21 -5
- package/lib/node/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/node/functions/get-content/generate-content-url.mjs +60 -40
- package/lib/node/functions/get-processed-block.cjs +1 -1
- package/lib/node/functions/get-processed-block.mjs +18 -19
- package/lib/node/helpers/flatten.cjs +1 -1
- package/lib/node/helpers/flatten.mjs +28 -15
- package/package.json +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/get-block-component-options.d.ts +2 -1
- package/types/cjs/functions/get-processed-block.d.ts +1 -6
- package/types/cjs/helpers/flatten.d.ts +6 -0
- package/types/cjs/server-index.d.ts +1 -1
- package/types/cjs/types/builder-content.d.ts +1 -0
- package/types/cjs/types/input.d.ts +10 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/get-block-component-options.d.ts +2 -1
- package/types/esm/functions/get-processed-block.d.ts +1 -6
- package/types/esm/helpers/flatten.d.ts +6 -0
- package/types/esm/server-index.d.ts +1 -1
- package/types/esm/types/builder-content.d.ts +1 -0
- package/types/esm/types/input.d.ts +10 -0
|
@@ -1,59 +1,79 @@
|
|
|
1
|
-
import { flatten as
|
|
2
|
-
import { normalizeSearchParams as
|
|
3
|
-
import { DEFAULT_API_VERSION as
|
|
4
|
-
import { getBuilderSearchParamsFromWindow as
|
|
5
|
-
|
|
1
|
+
import { flatten as U, flattenMongoQuery as E, unflatten as F } from "../../helpers/flatten.mjs";
|
|
2
|
+
import { normalizeSearchParams as O } from "../../helpers/search/search.mjs";
|
|
3
|
+
import { DEFAULT_API_VERSION as J } from "../../types/api-version.mjs";
|
|
4
|
+
import { getBuilderSearchParamsFromWindow as L } from "../get-builder-search-params/index.mjs";
|
|
5
|
+
import { isBrowser as R } from "../is-browser.mjs";
|
|
6
|
+
const w = (t) => typeof t == "number" && !isNaN(t) && t >= 0, _ = (t) => {
|
|
6
7
|
const {
|
|
7
|
-
limit:
|
|
8
|
-
userAttributes:
|
|
8
|
+
limit: a = 30,
|
|
9
|
+
userAttributes: r,
|
|
9
10
|
query: h,
|
|
10
|
-
model:
|
|
11
|
-
apiKey:
|
|
12
|
-
enrich:
|
|
13
|
-
locale:
|
|
14
|
-
apiVersion:
|
|
15
|
-
fields:
|
|
16
|
-
omit:
|
|
17
|
-
offset:
|
|
18
|
-
cacheSeconds:
|
|
11
|
+
model: y,
|
|
12
|
+
apiKey: u,
|
|
13
|
+
enrich: d,
|
|
14
|
+
locale: A,
|
|
15
|
+
apiVersion: o = J,
|
|
16
|
+
fields: P,
|
|
17
|
+
omit: N,
|
|
18
|
+
offset: c,
|
|
19
|
+
cacheSeconds: l,
|
|
19
20
|
staleCacheSeconds: f,
|
|
20
21
|
sort: S,
|
|
21
|
-
includeUnpublished:
|
|
22
|
-
apiHost:
|
|
23
|
-
} =
|
|
24
|
-
if (!
|
|
22
|
+
includeUnpublished: p,
|
|
23
|
+
apiHost: v
|
|
24
|
+
} = t;
|
|
25
|
+
if (!u)
|
|
25
26
|
throw new Error("Missing API key");
|
|
26
|
-
if (!["v3"].includes(
|
|
27
|
-
throw new Error(`Invalid apiVersion: expected 'v3', received '${
|
|
28
|
-
const
|
|
29
|
-
e.searchParams.set("apiKey",
|
|
30
|
-
const
|
|
31
|
-
let i =
|
|
32
|
-
if (
|
|
33
|
-
locale:
|
|
27
|
+
if (!["v3"].includes(o))
|
|
28
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${o}'`);
|
|
29
|
+
const k = a !== 1, I = v || "https://cdn.builder.io", e = new URL(`${I}/api/${o}/content/${y}`);
|
|
30
|
+
e.searchParams.set("apiKey", u), e.searchParams.set("limit", String(a)), e.searchParams.set("noTraverse", String(k)), e.searchParams.set("includeRefs", String(!0));
|
|
31
|
+
const m = A || (r == null ? void 0 : r.locale);
|
|
32
|
+
let i = r || {};
|
|
33
|
+
if (m && (e.searchParams.set("locale", m), i = {
|
|
34
|
+
locale: m,
|
|
34
35
|
...i
|
|
35
|
-
}),
|
|
36
|
-
const s =
|
|
36
|
+
}), d && e.searchParams.set("enrich", String(d)), e.searchParams.set("omit", N || "meta.componentsUsed"), P && e.searchParams.set("fields", P), Number.isFinite(c) && c > -1 && e.searchParams.set("offset", String(Math.floor(c))), typeof p == "boolean" && e.searchParams.set("includeUnpublished", String(p)), l && w(l) && e.searchParams.set("cacheSeconds", String(l)), f && w(f) && e.searchParams.set("staleCacheSeconds", String(f)), S) {
|
|
37
|
+
const s = U({
|
|
37
38
|
sort: S
|
|
38
39
|
});
|
|
39
|
-
for (const
|
|
40
|
-
e.searchParams.set(
|
|
40
|
+
for (const n in s)
|
|
41
|
+
e.searchParams.set(n, JSON.stringify(s[n]));
|
|
41
42
|
}
|
|
42
|
-
const
|
|
43
|
-
...
|
|
44
|
-
...
|
|
45
|
-
}
|
|
43
|
+
const b = {
|
|
44
|
+
...L(),
|
|
45
|
+
...O(t.options || {})
|
|
46
|
+
};
|
|
47
|
+
i = {
|
|
48
|
+
...i,
|
|
49
|
+
...$(b)
|
|
50
|
+
};
|
|
51
|
+
const g = U(b);
|
|
46
52
|
for (const s in g)
|
|
47
53
|
e.searchParams.set(s, String(g[s]));
|
|
48
|
-
if (i && e.searchParams.set("userAttributes", JSON.stringify(i)), h) {
|
|
54
|
+
if (Object.keys(i).length > 0 && e.searchParams.set("userAttributes", JSON.stringify(i)), h) {
|
|
49
55
|
const s = E({
|
|
50
56
|
query: h
|
|
51
57
|
});
|
|
52
|
-
for (const
|
|
53
|
-
e.searchParams.set(
|
|
58
|
+
for (const n in s)
|
|
59
|
+
e.searchParams.set(n, JSON.stringify(s[n]));
|
|
54
60
|
}
|
|
55
61
|
return e;
|
|
62
|
+
}, T = (t) => {
|
|
63
|
+
const a = {};
|
|
64
|
+
for (const r in t)
|
|
65
|
+
r.startsWith("userAttributes.") && (a[r] = t[r], delete t[r]);
|
|
66
|
+
return a;
|
|
67
|
+
}, $ = (t) => {
|
|
68
|
+
if (R() && t.preview === "BUILDER_STUDIO") {
|
|
69
|
+
t["userAttributes.urlPath"] = window.location.pathname, t["userAttributes.host"] = window.location.host;
|
|
70
|
+
const a = T(t), {
|
|
71
|
+
userAttributes: r
|
|
72
|
+
} = F(a);
|
|
73
|
+
return r;
|
|
74
|
+
}
|
|
75
|
+
return {};
|
|
56
76
|
};
|
|
57
77
|
export {
|
|
58
|
-
|
|
78
|
+
_ as generateContentUrl
|
|
59
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../constants/target.cjs"),d=require("../helpers/omit.cjs"),p=require("./evaluate/evaluate.cjs"),f=require("./extract-localized-values.cjs"),g=require("./fast-clone.cjs"),m=require("./set.cjs"),y=require("./transform-block.cjs");function o(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>o(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=o(e[n]));return t}const C=["svelte","vue","angular","qwik","solid"].includes(u.TARGET),q=e=>{if(C){const t=g.fastClone(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=o(d.omit(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},v=({block:e,context:t,localState:n,rootState:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../constants/target.cjs"),d=require("../helpers/omit.cjs"),p=require("./evaluate/evaluate.cjs"),f=require("./extract-localized-values.cjs"),g=require("./fast-clone.cjs"),m=require("./set.cjs"),y=require("./transform-block.cjs");function o(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>o(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=o(e[n]));return t}const C=["svelte","vue","angular","qwik","solid"].includes(u.TARGET),q=e=>{if(C){const t=g.fastClone(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=o(d.omit(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},v=({block:e,context:t,localState:n,rootState:i,rootSetState:s})=>{if(!e.bindings)return e;const r=q(e);for(const c in e.bindings){const a=e.bindings[c],l=p.evaluate({code:a,localState:n,rootState:i,rootSetState:s,context:t});m.set(r,c,l)}return r};function B({block:e,context:t,localState:n,rootState:i,rootSetState:s}){let r=f.resolveLocalizedValues(e,i.locale);return r=y.transformBlock(r),v({block:r,localState:n,rootState:i,rootSetState:s,context:t})}exports.deepCloneWithConditions=o;exports.getProcessedBlock=B;
|
|
@@ -5,16 +5,16 @@ import { resolveLocalizedValues as f } from "./extract-localized-values.mjs";
|
|
|
5
5
|
import { fastClone as u } from "./fast-clone.mjs";
|
|
6
6
|
import { set as y } from "./set.mjs";
|
|
7
7
|
import { transformBlock as g } from "./transform-block.mjs";
|
|
8
|
-
function
|
|
8
|
+
function s(e) {
|
|
9
9
|
if (e === null || typeof e != "object")
|
|
10
10
|
return e;
|
|
11
11
|
if (Array.isArray(e))
|
|
12
|
-
return e.map((t) =>
|
|
12
|
+
return e.map((t) => s(t));
|
|
13
13
|
if (e["@type"] === "@builder.io/sdk:Element")
|
|
14
14
|
return e;
|
|
15
15
|
const r = {};
|
|
16
16
|
for (const t in e)
|
|
17
|
-
t !== "meta" && Object.prototype.hasOwnProperty.call(e, t) && (r[t] =
|
|
17
|
+
t !== "meta" && Object.prototype.hasOwnProperty.call(e, t) && (r[t] = s(e[t]));
|
|
18
18
|
return r;
|
|
19
19
|
}
|
|
20
20
|
const C = ["svelte", "vue", "angular", "qwik", "solid"].includes(l), v = (e) => {
|
|
@@ -30,7 +30,7 @@ const C = ["svelte", "vue", "angular", "qwik", "solid"].includes(l), v = (e) =>
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
} else {
|
|
33
|
-
const r =
|
|
33
|
+
const r = s(m(e, "children", "meta"));
|
|
34
34
|
return {
|
|
35
35
|
...r,
|
|
36
36
|
properties: {
|
|
@@ -47,42 +47,41 @@ const C = ["svelte", "vue", "angular", "qwik", "solid"].includes(l), v = (e) =>
|
|
|
47
47
|
block: e,
|
|
48
48
|
context: r,
|
|
49
49
|
localState: t,
|
|
50
|
-
rootState:
|
|
51
|
-
rootSetState:
|
|
50
|
+
rootState: i,
|
|
51
|
+
rootSetState: o
|
|
52
52
|
}) => {
|
|
53
53
|
if (!e.bindings)
|
|
54
54
|
return e;
|
|
55
|
-
const
|
|
56
|
-
for (const
|
|
57
|
-
const p = e.bindings[
|
|
55
|
+
const n = v(e);
|
|
56
|
+
for (const c in e.bindings) {
|
|
57
|
+
const p = e.bindings[c], a = d({
|
|
58
58
|
code: p,
|
|
59
59
|
localState: t,
|
|
60
|
-
rootState:
|
|
61
|
-
rootSetState:
|
|
60
|
+
rootState: i,
|
|
61
|
+
rootSetState: o,
|
|
62
62
|
context: r
|
|
63
63
|
});
|
|
64
|
-
y(
|
|
64
|
+
y(n, c, a);
|
|
65
65
|
}
|
|
66
|
-
return
|
|
66
|
+
return n;
|
|
67
67
|
};
|
|
68
68
|
function P({
|
|
69
69
|
block: e,
|
|
70
70
|
context: r,
|
|
71
|
-
|
|
72
|
-
localState: s,
|
|
71
|
+
localState: t,
|
|
73
72
|
rootState: i,
|
|
74
73
|
rootSetState: o
|
|
75
74
|
}) {
|
|
76
75
|
let n = f(e, i.locale);
|
|
77
|
-
return n = g(n),
|
|
76
|
+
return n = g(n), O({
|
|
78
77
|
block: n,
|
|
79
|
-
localState:
|
|
78
|
+
localState: t,
|
|
80
79
|
rootState: i,
|
|
81
80
|
rootSetState: o,
|
|
82
81
|
context: r
|
|
83
|
-
})
|
|
82
|
+
});
|
|
84
83
|
}
|
|
85
84
|
export {
|
|
86
|
-
|
|
85
|
+
s as deepCloneWithConditions,
|
|
87
86
|
P as getProcessedBlock
|
|
88
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(l,s=null,o="."){return Object.keys(l).reduce((n,t)=>{const e=l[t],r=[s,t].filter(Boolean).join(o);return[typeof e=="object",e!==null,!(Array.isArray(e)&&e.length===0)].every(Boolean)?{...n,...i(e,r,o)}:{...n,[r]:e}},{})}function u(l,s,o={}){for(const n in l){const t=l[n],e=s?s+"."+n:n;t&&typeof t=="object"&&!Array.isArray(t)&&!Object.keys(t).find(r=>r.startsWith("$"))?u(t,e,o):o[e]=t}return o}function c(l){const s={};for(const o in l){const n=o.split(".");let t=s;for(let e=0;e<n.length;e++){const r=n[e];e===n.length-1?t[r]=l[o]:(t[r]=t[r]||{},t=t[r])}}return s}exports.flatten=i;exports.flattenMongoQuery=u;exports.unflatten=c;
|
|
@@ -1,23 +1,36 @@
|
|
|
1
|
-
function
|
|
2
|
-
return Object.keys(
|
|
3
|
-
const
|
|
4
|
-
return [typeof
|
|
5
|
-
...
|
|
6
|
-
...
|
|
1
|
+
function c(l, s = null, o = ".") {
|
|
2
|
+
return Object.keys(l).reduce((n, t) => {
|
|
3
|
+
const e = l[t], r = [s, t].filter(Boolean).join(o);
|
|
4
|
+
return [typeof e == "object", e !== null, !(Array.isArray(e) && e.length === 0)].every(Boolean) ? {
|
|
5
|
+
...n,
|
|
6
|
+
...c(e, r, o)
|
|
7
7
|
} : {
|
|
8
|
-
...
|
|
9
|
-
[
|
|
8
|
+
...n,
|
|
9
|
+
[r]: e
|
|
10
10
|
};
|
|
11
11
|
}, {});
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
for (const
|
|
15
|
-
const
|
|
16
|
-
|
|
13
|
+
function i(l, s, o = {}) {
|
|
14
|
+
for (const n in l) {
|
|
15
|
+
const t = l[n], e = s ? s + "." + n : n;
|
|
16
|
+
t && typeof t == "object" && !Array.isArray(t) && !Object.keys(t).find((r) => r.startsWith("$")) ? i(t, e, o) : o[e] = t;
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return o;
|
|
19
|
+
}
|
|
20
|
+
function u(l) {
|
|
21
|
+
const s = {};
|
|
22
|
+
for (const o in l) {
|
|
23
|
+
const n = o.split(".");
|
|
24
|
+
let t = s;
|
|
25
|
+
for (let e = 0; e < n.length; e++) {
|
|
26
|
+
const r = n[e];
|
|
27
|
+
e === n.length - 1 ? t[r] = l[o] : (t[r] = t[r] || {}, t = t[r]);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return s;
|
|
19
31
|
}
|
|
20
32
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
c as flatten,
|
|
34
|
+
i as flattenMongoQuery,
|
|
35
|
+
u as unflatten
|
|
23
36
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),W=require("../../components/blocks/blocks.cjs"),j=require("../../components/dynamic-renderer/dynamic-renderer.cjs"),q=require("../../components/inlined-styles.cjs"),z=require("../../constants/device-sizes.cjs"),B=require("../../functions/get-class-prop-name.cjs"),p=require("../../functions/get-style.cjs"),A=require("./helpers.cjs");function N(e){var g,f;const a=function(){return typeof e.space=="number"?e.space||0:20},s=function(){return e.columns||[]},u=function(){return e.stackColumnsAt||"tablet"},y=function(t){return t.link?e.builderLinkComponent||"a":"div"},S=function(t){var i;return((i=s()[t])==null?void 0:i.width)||100/s().length},x=function(t){const i=S(t),l=a()*(s().length-1)*(i/100);return`calc(${i}% - ${l}px)`},c=function({stackedStyle:t,desktopStyle:i}){return u()==="tablet"?t:i},
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),W=require("../../components/blocks/blocks.cjs"),j=require("../../components/dynamic-renderer/dynamic-renderer.cjs"),q=require("../../components/inlined-styles.cjs"),z=require("../../constants/device-sizes.cjs"),B=require("../../functions/get-class-prop-name.cjs"),p=require("../../functions/get-style.cjs"),A=require("./helpers.cjs");function N(e){var g,f;const a=function(){return typeof e.space=="number"?e.space||0:20},s=function(){return e.columns||[]},u=function(){return e.stackColumnsAt||"tablet"},y=function(t){return t.link?e.builderLinkComponent||"a":"div"},S=function(t){var i;return((i=s()[t])==null?void 0:i.width)||100/s().length},x=function(t){const i=S(t),l=a()*(s().length-1)*(i/100);return`calc(${i}% - ${l}px)`},c=function({stackedStyle:t,desktopStyle:i}){return u()==="tablet"?t:i},d=function({stackedStyle:t,desktopStyle:i}){return u()==="never"?i:t},m=function(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"},C=function(){return{"--flex-dir":m(),"--flex-dir-tablet":c({stackedStyle:m(),desktopStyle:"row"})}},v=function(t){const i=t===0?0:a(),l=x(t),r=`${i}px`,k="100%",h=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:l,["marginLeft"]:r,"--column-width-mobile":d({stackedStyle:k,desktopStyle:l}),"--column-margin-left-mobile":d({stackedStyle:h,desktopStyle:r}),"--column-width-tablet":c({stackedStyle:k,desktopStyle:l}),"--column-margin-left-tablet":c({stackedStyle:h,desktopStyle:r})}},b=function(t){var l,r;return z.getSizesForBreakpoints(((r=(l=e.builderContext.content)==null?void 0:l.meta)==null?void 0:r.breakpoints)||{})[t].max},w=function(){const t=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
2
2
|
@media (max-width: ${b("medium")}px) {
|
|
3
3
|
.${e.builderBlock.id}-breakpoints {
|
|
4
4
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
`},$=function(t,i){return{...t.link?{href:t.link}:{},[B.getClassPropName()]:"builder-column",style:p.mapStyleObjToStrIfNeeded(v(i))}};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:A.getColumnsClass((g=e.builderBlock)==null?void 0:g.id)+" div-
|
|
25
|
+
`},$=function(t,i){return{...t.link?{href:t.link}:{},[B.getClassPropName()]:"builder-column",style:p.mapStyleObjToStrIfNeeded(v(i))}};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:A.getColumnsClass((g=e.builderBlock)==null?void 0:g.id)+" div-035056da",style:C(),children:[o.jsx(q,{id:"builderio-columns",styles:w(),nonce:e.builderContext.nonce}),(f=e.columns)==null?void 0:f.map((n,t)=>o.jsx(j,{TagName:y(n),actionAttributes:{},attributes:$(n,t),children:o.jsx(W,{path:`columns.${t}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:n.blocks})},t))]}),o.jsx("style",{children:`.div-035056da {
|
|
26
26
|
display: flex;
|
|
27
27
|
line-height: normal;
|
|
28
28
|
}`})]})}module.exports=N;
|
|
@@ -114,7 +114,7 @@ function q(e) {
|
|
|
114
114
|
/* @__PURE__ */ y(
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
|
-
className: D((b = e.builderBlock) == null ? void 0 : b.id) + " div-
|
|
117
|
+
className: D((b = e.builderBlock) == null ? void 0 : b.id) + " div-035056da",
|
|
118
118
|
style: v(),
|
|
119
119
|
children: [
|
|
120
120
|
/* @__PURE__ */ r(
|
|
@@ -151,7 +151,7 @@ function q(e) {
|
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
/* @__PURE__ */ r("style", { children: `.div-
|
|
154
|
+
/* @__PURE__ */ r("style", { children: `.div-035056da {
|
|
155
155
|
display: flex;
|
|
156
156
|
line-height: normal;
|
|
157
157
|
}` })
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),f=require("react"),l=require("./image.helpers.cjs");function b(e){var s,r,u,o,d,g;function n(){var h;const i=e.image||e.src;if(!i||!(typeof i=="string"&&(i.match(/builder\.io/)||i.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){if(e.srcset&&((h=e.image)!=null&&h.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),l.getSrcSet(i)}else if(e.image&&!e.srcset)return l.getSrcSet(i);return l.getSrcSet(i)}}function a(){var c;return(c=n==null?void 0:n())!=null&&c.match(/builder\.io/)&&!e.noWebp?n().replace(/\?/g,"?format=webp&"):""}function m(){const c={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?c:void 0}return f.useEffect(()=>{},[]),t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[a()?t.jsx("source",{type:"image/webp",srcSet:a()}):null,t.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...m()},className:"builder-image"+(e.className?" "+e.className:"")+" img-5e5f3633",src:e.image,srcSet:n(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(s=e.builderBlock)==null?void 0:s.children)!=null&&r.length&&e.fitContent)?t.jsx("div",{className:"builder-image-sizer div-5e5f3633",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(o=(u=e.builderBlock)==null?void 0:u.children)!=null&&o.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&((g=(d=e.builderBlock)==null?void 0:d.children)!=null&&g.length)?t.jsx("div",{className:"div-5e5f3633-2",children:e.children}):null]}),t.jsx("style",{children:`.img-5e5f3633 {
|
|
2
2
|
opacity: 1;
|
|
3
3
|
transition: opacity 0.2s ease-in-out;
|
|
4
|
-
}.div-
|
|
4
|
+
}.div-5e5f3633 {
|
|
5
5
|
width: 100%;
|
|
6
6
|
pointer-events: none;
|
|
7
7
|
font-size: 0;
|
|
8
|
-
}.div-
|
|
8
|
+
}.div-5e5f3633-2 {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
@@ -3,7 +3,7 @@ import { jsxs as l, Fragment as a, jsx as t } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect as v } from "react";
|
|
4
4
|
import { getSrcSet as o } from "./image.helpers.mjs";
|
|
5
5
|
function w(e) {
|
|
6
|
-
var d, s, u,
|
|
6
|
+
var d, s, u, g, m, f;
|
|
7
7
|
function n() {
|
|
8
8
|
var h;
|
|
9
9
|
const i = e.image || e.src;
|
|
@@ -51,7 +51,7 @@ function w(e) {
|
|
|
51
51
|
objectFit: e.backgroundSize || "cover",
|
|
52
52
|
...b()
|
|
53
53
|
},
|
|
54
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
54
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-5e5f3633",
|
|
55
55
|
src: e.image,
|
|
56
56
|
srcSet: n(),
|
|
57
57
|
sizes: e.sizes
|
|
@@ -61,23 +61,23 @@ function w(e) {
|
|
|
61
61
|
e.aspectRatio && !((s = (d = e.builderBlock) == null ? void 0 : d.children) != null && s.length && e.fitContent) ? /* @__PURE__ */ t(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
className: "builder-image-sizer div-
|
|
64
|
+
className: "builder-image-sizer div-5e5f3633",
|
|
65
65
|
style: {
|
|
66
66
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
) : null,
|
|
70
|
-
(
|
|
71
|
-
!e.fitContent && ((
|
|
70
|
+
(g = (u = e.builderBlock) == null ? void 0 : u.children) != null && g.length && e.fitContent ? /* @__PURE__ */ t(a, { children: e.children }) : null,
|
|
71
|
+
!e.fitContent && ((f = (m = e.builderBlock) == null ? void 0 : m.children) != null && f.length) ? /* @__PURE__ */ t("div", { className: "div-5e5f3633-2", children: e.children }) : null
|
|
72
72
|
] }),
|
|
73
|
-
/* @__PURE__ */ t("style", { children: `.img-
|
|
73
|
+
/* @__PURE__ */ t("style", { children: `.img-5e5f3633 {
|
|
74
74
|
opacity: 1;
|
|
75
75
|
transition: opacity 0.2s ease-in-out;
|
|
76
|
-
}.div-
|
|
76
|
+
}.div-5e5f3633 {
|
|
77
77
|
width: 100%;
|
|
78
78
|
pointer-events: none;
|
|
79
79
|
font-size: 0;
|
|
80
|
-
}.div-
|
|
80
|
+
}.div-5e5f3633-2 {
|
|
81
81
|
display: flex;
|
|
82
82
|
flex-direction: column;
|
|
83
83
|
align-items: stretch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime");function r(e){var t;return n.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}module.exports=r;
|
|
@@ -1,29 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
function o(e) {
|
|
3
|
+
var t;
|
|
4
|
+
return /* @__PURE__ */ n(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
className: "builder-text",
|
|
8
|
-
dangerouslySetInnerHTML: { __html:
|
|
9
|
-
var e;
|
|
10
|
-
const o = t.builderContext, {
|
|
11
|
-
context: n,
|
|
12
|
-
localState: r,
|
|
13
|
-
rootState: c,
|
|
14
|
-
rootSetState: s
|
|
15
|
-
} = o;
|
|
16
|
-
return String(((e = t.text) == null ? void 0 : e.toString()) || "").replace(
|
|
17
|
-
/{{([^}]+)}}/g,
|
|
18
|
-
(d, x) => l({
|
|
19
|
-
code: x,
|
|
20
|
-
context: n,
|
|
21
|
-
localState: r,
|
|
22
|
-
rootState: c,
|
|
23
|
-
rootSetState: s
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
}() },
|
|
8
|
+
dangerouslySetInnerHTML: { __html: ((t = e.text) == null ? void 0 : t.toString()) || "" },
|
|
27
9
|
style: {
|
|
28
10
|
outline: "none"
|
|
29
11
|
}
|
|
@@ -31,5 +13,5 @@ function f(t) {
|
|
|
31
13
|
);
|
|
32
14
|
}
|
|
33
15
|
export {
|
|
34
|
-
|
|
16
|
+
o as default
|
|
35
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";const e=require("react/jsx-runtime"),r=require("react");function n(t){return r.useEffect(()=>{},[]),e.jsx(e.Fragment,{children:t.children})}module.exports=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),v=require("../../constants/target.cjs"),S=require("../../functions/get-block-component-options.cjs"),j=require("../../functions/get-processed-block.cjs"),P=require("../../functions/is-previewing.cjs");require("../../functions/get-fetch.cjs");const m=require("./block.helpers.cjs"),q=require("./components/block-styles.cjs"),O=require("./components/block-wrapper.cjs"),p=require("./components/component-ref/component-ref.cjs"),g=require("./components/repeated-block.cjs");function b(e){var a,C,x,h;const d=function(){return m.getRepeatItemData({block:e.block,context:e.context})},u={value:null,update:!1},c=function(){var i;if(u.value&&!u.update&&!P.isPreviewing())return u.value;const r=(i=e.block.repeat)!=null&&i.collection?e.block:j.getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return u.value=r,u.update=!1,r},l=function(){return m.getComponent({block:c(),registeredComponents:e.registeredComponents,model:e.context.model})},f=function(){var i;return e.block.tagName==="a"||((i=c().properties)==null?void 0:i.href)||c().href?e.linkComponent||"a":e.block.tagName||"div"},B=function(){var s,k;if((s=e.block.repeat)!=null&&s.collection)return!!((k=d())!=null&&k.length);const r="hide"in c()?c().hide:!1;return("show"in c()?c().show:!0)&&!r},R=function(){var i,s;return!((i=l())!=null&&i.component)&&!d()?(s=c().children)!=null?s:[]:[]},n=function(){var r,i,s,k;return{blockChildren:(r=c().children)!=null?r:[],componentRef:(i=l())==null?void 0:i.component,componentOptions:{...S.getBlockComponentOptions(c(),e.context),...m.provideBuilderBlock(l(),c()),...m.provideBuilderContext(l(),e.context),...m.provideLinkComponent(l(),e.linkComponent),...m.provideRegisteredComponents(l(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:c(),includeBlockProps:((s=l())==null?void 0:s.noWrap)===!0,isInteractive:!((k=l())!=null&&k.isRSC&&v.TARGET==="rsc")}};return t.jsx(t.Fragment,{children:B()?t.jsxs(t.Fragment,{children:[t.jsx(q,{block:c(),context:e.context}),(a=l())!=null&&a.noWrap?d()?t.jsx(t.Fragment,{children:(h=d())==null?void 0:h.map((o,r)=>t.jsx(g,{repeatContext:o.context,block:o.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},r))}):t.jsx(p,{componentRef:n().componentRef,componentOptions:n().componentOptions,blockChildren:n().blockChildren,context:n().context,registeredComponents:n().registeredComponents,linkComponent:n().linkComponent,builderBlock:n().builderBlock,includeBlockProps:n().includeBlockProps,isInteractive:n().isInteractive}):t.jsx(t.Fragment,{children:d()?t.jsx(t.Fragment,{children:(x=d())==null?void 0:x.map((o,r)=>t.jsx(g,{repeatContext:o.context,block:o.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},r))}):t.jsxs(O,{Wrapper:f(),block:c(),context:e.context,children:[t.jsx(p,{componentRef:n().componentRef,componentOptions:n().componentOptions,blockChildren:n().blockChildren,context:n().context,registeredComponents:n().registeredComponents,linkComponent:n().linkComponent,builderBlock:n().builderBlock,includeBlockProps:n().includeBlockProps,isInteractive:n().isInteractive}),(C=R())==null?void 0:C.map(o=>t.jsx(b,{block:o,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},o.id))]})})]}):null})}module.exports=b;
|
|
@@ -6,10 +6,10 @@ import { isPreviewing as I } from "../../functions/is-previewing.mjs";
|
|
|
6
6
|
import "../../functions/get-fetch.mjs";
|
|
7
7
|
import { getRepeatItemData as O, getComponent as w, provideBuilderBlock as W, provideBuilderContext as T, provideLinkComponent as L, provideRegisteredComponents as U } from "./block.helpers.mjs";
|
|
8
8
|
import j from "./components/block-styles.mjs";
|
|
9
|
-
import
|
|
9
|
+
import N from "./components/block-wrapper.mjs";
|
|
10
10
|
import x from "./components/component-ref/component-ref.mjs";
|
|
11
11
|
import b from "./components/repeated-block.mjs";
|
|
12
|
-
function
|
|
12
|
+
function y(e) {
|
|
13
13
|
var a, C, p, f;
|
|
14
14
|
const d = function() {
|
|
15
15
|
return O({
|
|
@@ -19,7 +19,7 @@ function N(e) {
|
|
|
19
19
|
}, s = {
|
|
20
20
|
value: null,
|
|
21
21
|
update: !1
|
|
22
|
-
},
|
|
22
|
+
}, n = function() {
|
|
23
23
|
var i;
|
|
24
24
|
if (s.value && !s.update && !I())
|
|
25
25
|
return s.value;
|
|
@@ -28,36 +28,35 @@ function N(e) {
|
|
|
28
28
|
localState: e.context.localState,
|
|
29
29
|
rootState: e.context.rootState,
|
|
30
30
|
rootSetState: e.context.rootSetState,
|
|
31
|
-
context: e.context.context
|
|
32
|
-
shouldEvaluateBindings: !0
|
|
31
|
+
context: e.context.context
|
|
33
32
|
});
|
|
34
33
|
return s.value = c, s.update = !1, c;
|
|
35
34
|
}, r = function() {
|
|
36
35
|
return w({
|
|
37
|
-
block:
|
|
36
|
+
block: n(),
|
|
38
37
|
registeredComponents: e.registeredComponents,
|
|
39
38
|
model: e.context.model
|
|
40
39
|
});
|
|
41
40
|
}, g = function() {
|
|
42
41
|
var i;
|
|
43
|
-
return e.block.tagName === "a" || ((i =
|
|
42
|
+
return e.block.tagName === "a" || ((i = n().properties) == null ? void 0 : i.href) || n().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
44
43
|
}, B = function() {
|
|
45
44
|
var m, k;
|
|
46
45
|
if ((m = e.block.repeat) != null && m.collection)
|
|
47
46
|
return !!((k = d()) != null && k.length);
|
|
48
|
-
const c = "hide" in
|
|
49
|
-
return ("show" in
|
|
47
|
+
const c = "hide" in n() ? n().hide : !1;
|
|
48
|
+
return ("show" in n() ? n().show : !0) && !c;
|
|
50
49
|
}, R = function() {
|
|
51
50
|
var i, m;
|
|
52
|
-
return !((i = r()) != null && i.component) && !d() ? (m =
|
|
51
|
+
return !((i = r()) != null && i.component) && !d() ? (m = n().children) != null ? m : [] : [];
|
|
53
52
|
}, o = function() {
|
|
54
53
|
var c, i, m, k;
|
|
55
54
|
return {
|
|
56
|
-
blockChildren: (c =
|
|
55
|
+
blockChildren: (c = n().children) != null ? c : [],
|
|
57
56
|
componentRef: (i = r()) == null ? void 0 : i.component,
|
|
58
57
|
componentOptions: {
|
|
59
|
-
...S(
|
|
60
|
-
...W(r(),
|
|
58
|
+
...S(n(), e.context),
|
|
59
|
+
...W(r(), n()),
|
|
61
60
|
...T(r(), e.context),
|
|
62
61
|
...L(r(), e.linkComponent),
|
|
63
62
|
...U(
|
|
@@ -69,18 +68,18 @@ function N(e) {
|
|
|
69
68
|
context: e.context,
|
|
70
69
|
linkComponent: e.linkComponent,
|
|
71
70
|
registeredComponents: e.registeredComponents,
|
|
72
|
-
builderBlock:
|
|
71
|
+
builderBlock: n(),
|
|
73
72
|
includeBlockProps: ((m = r()) == null ? void 0 : m.noWrap) === !0,
|
|
74
73
|
isInteractive: !((k = r()) != null && k.isRSC && v === "rsc")
|
|
75
74
|
};
|
|
76
75
|
};
|
|
77
76
|
return /* @__PURE__ */ l(u, { children: B() ? /* @__PURE__ */ h(u, { children: [
|
|
78
|
-
/* @__PURE__ */ l(j, { block:
|
|
79
|
-
(a = r()) != null && a.noWrap ? d() ? /* @__PURE__ */ l(u, { children: (f = d()) == null ? void 0 : f.map((
|
|
77
|
+
/* @__PURE__ */ l(j, { block: n(), context: e.context }),
|
|
78
|
+
(a = r()) != null && a.noWrap ? d() ? /* @__PURE__ */ l(u, { children: (f = d()) == null ? void 0 : f.map((t, c) => /* @__PURE__ */ l(
|
|
80
79
|
b,
|
|
81
80
|
{
|
|
82
|
-
repeatContext:
|
|
83
|
-
block:
|
|
81
|
+
repeatContext: t.context,
|
|
82
|
+
block: t.block,
|
|
84
83
|
registeredComponents: e.registeredComponents,
|
|
85
84
|
linkComponent: e.linkComponent
|
|
86
85
|
},
|
|
@@ -98,20 +97,20 @@ function N(e) {
|
|
|
98
97
|
includeBlockProps: o().includeBlockProps,
|
|
99
98
|
isInteractive: o().isInteractive
|
|
100
99
|
}
|
|
101
|
-
) : /* @__PURE__ */ l(u, { children: d() ? /* @__PURE__ */ l(u, { children: (p = d()) == null ? void 0 : p.map((
|
|
100
|
+
) : /* @__PURE__ */ l(u, { children: d() ? /* @__PURE__ */ l(u, { children: (p = d()) == null ? void 0 : p.map((t, c) => /* @__PURE__ */ l(
|
|
102
101
|
b,
|
|
103
102
|
{
|
|
104
|
-
repeatContext:
|
|
105
|
-
block:
|
|
103
|
+
repeatContext: t.context,
|
|
104
|
+
block: t.block,
|
|
106
105
|
registeredComponents: e.registeredComponents,
|
|
107
106
|
linkComponent: e.linkComponent
|
|
108
107
|
},
|
|
109
108
|
c
|
|
110
109
|
)) }) : /* @__PURE__ */ h(
|
|
111
|
-
|
|
110
|
+
N,
|
|
112
111
|
{
|
|
113
112
|
Wrapper: g(),
|
|
114
|
-
block:
|
|
113
|
+
block: n(),
|
|
115
114
|
context: e.context,
|
|
116
115
|
children: [
|
|
117
116
|
/* @__PURE__ */ l(
|
|
@@ -128,15 +127,15 @@ function N(e) {
|
|
|
128
127
|
isInteractive: o().isInteractive
|
|
129
128
|
}
|
|
130
129
|
),
|
|
131
|
-
(C = R()) == null ? void 0 : C.map((
|
|
132
|
-
|
|
130
|
+
(C = R()) == null ? void 0 : C.map((t) => /* @__PURE__ */ l(
|
|
131
|
+
y,
|
|
133
132
|
{
|
|
134
|
-
block:
|
|
133
|
+
block: t,
|
|
135
134
|
registeredComponents: e.registeredComponents,
|
|
136
135
|
linkComponent: e.linkComponent,
|
|
137
136
|
context: e.context
|
|
138
137
|
},
|
|
139
|
-
|
|
138
|
+
t.id
|
|
140
139
|
))
|
|
141
140
|
]
|
|
142
141
|
}
|
|
@@ -144,5 +143,5 @@ function N(e) {
|
|
|
144
143
|
] }) : null });
|
|
145
144
|
}
|
|
146
145
|
export {
|
|
147
|
-
|
|
146
|
+
y as default
|
|
148
147
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const i=require("react/jsx-runtime"),l=require("react"),s=require("../../functions/is-editing.cjs");function d(e){const c=l.useRef(null);function o(){var t;return["builder-blocks",(t=e.blocks)!=null&&t.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function a(){if(!e.path)return;const t="component.options.";return e.path.startsWith(t)?e.path:`${t}${e.path||""}`}function r(){var t,n;s.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:a()}},"*"))}function u(){var t,n;s.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:a()}},"*"))}return l.useEffect(()=>{},[]),i.jsxs(i.Fragment,{children:[i.jsx(e.BlocksWrapper,{ref:c,className:o()+" props-blocks-wrapper-754e6138","builder-path":a(),"builder-parent-id":e.parent,style:e.styleProp,onClick:t=>r(),onMouseEnter:t=>u(),onKeyPress:t=>r(),...e.BlocksWrapperProps,children:e.children}),i.jsx("style",{children:`.props-blocks-wrapper-754e6138 {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: stretch;
|