@builder.io/sdk-react-nextjs 0.17.7 → 0.17.8

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.
Files changed (33) hide show
  1. package/lib/browser/components/block/components/block-styles.cjs +1 -1
  2. package/lib/browser/components/block/components/block-styles.mjs +50 -42
  3. package/lib/browser/constants/device-sizes.cjs +1 -1
  4. package/lib/browser/constants/device-sizes.mjs +37 -20
  5. package/lib/browser/constants/sdk-version.cjs +1 -1
  6. package/lib/browser/constants/sdk-version.mjs +1 -1
  7. package/lib/browser/scripts/init-editing.cjs +1 -1
  8. package/lib/browser/scripts/init-editing.mjs +9 -8
  9. package/lib/edge/components/block/components/block-styles.cjs +1 -1
  10. package/lib/edge/components/block/components/block-styles.mjs +50 -42
  11. package/lib/edge/constants/device-sizes.cjs +1 -1
  12. package/lib/edge/constants/device-sizes.mjs +37 -20
  13. package/lib/edge/constants/sdk-version.cjs +1 -1
  14. package/lib/edge/constants/sdk-version.mjs +1 -1
  15. package/lib/edge/scripts/init-editing.cjs +1 -1
  16. package/lib/edge/scripts/init-editing.mjs +9 -8
  17. package/lib/node/components/block/components/block-styles.cjs +1 -1
  18. package/lib/node/components/block/components/block-styles.mjs +50 -42
  19. package/lib/node/constants/device-sizes.cjs +1 -1
  20. package/lib/node/constants/device-sizes.mjs +37 -20
  21. package/lib/node/constants/sdk-version.cjs +1 -1
  22. package/lib/node/constants/sdk-version.mjs +1 -1
  23. package/lib/node/scripts/init-editing.cjs +1 -1
  24. package/lib/node/scripts/init-editing.mjs +9 -8
  25. package/package.json +1 -1
  26. package/types/cjs/constants/device-sizes.d.ts +3 -2
  27. package/types/cjs/constants/sdk-version.d.ts +1 -1
  28. package/types/cjs/types/builder-block.d.ts +0 -1
  29. package/types/cjs/types/builder-content.d.ts +1 -0
  30. package/types/esm/constants/device-sizes.d.ts +3 -2
  31. package/types/esm/constants/sdk-version.d.ts +1 -1
  32. package/types/esm/types/builder-block.d.ts +0 -1
  33. package/types/esm/types/builder-content.d.ts +1 -0
@@ -1 +1 @@
1
- "use strict";const o=require("react/jsx-runtime"),a=require("../../../constants/device-sizes.cjs"),j=require("../../../functions/camel-to-kebab-case.cjs"),c=require("../../../helpers/css.cjs"),b=require("../../../helpers/nullable.cjs"),z=require("../../inlined-styles.cjs");function F(i){const f=function(){const e=i.block;return b.checkIsDefined(e.hide)?!e.hide:b.checkIsDefined(e.show)?e.show:!0},u=function(){var C,k,g;const e=i.block,s=e.responsiveStyles,r=i.context.content,d=a.getSizesForBreakpoints(((C=r==null?void 0:r.meta)==null?void 0:C.breakpoints)||{}),m=s==null?void 0:s.large,y=s==null?void 0:s.medium,h=s==null?void 0:s.small,n=e.id;if(!n)return"";const v=m?c.createCssClass({className:n,styles:m}):"",B=y?c.createCssClass({className:n,styles:y,mediaQuery:a.getMaxWidthQueryForSize("medium",d)}):"",q=h?c.createCssClass({className:n,styles:h,mediaQuery:a.getMaxWidthQueryForSize("small",d)}):"",t=e.animations&&e.animations.find(l=>l.trigger==="hover");let S="";if(t){const l=((g=(k=t.steps)==null?void 0:k[1])==null?void 0:g.styles)||{};S=c.createCssClass({className:`${n}:hover`,styles:{...l,transition:`all ${t.duration}s ${j.camelToKebabCase(t.easing)}`,transitionDelay:t.delay?`${t.delay}s`:"0s"}})||""}return[v,B,q,S].join(" ")};return o.jsx(o.Fragment,{children:u()&&f()?o.jsx(o.Fragment,{children:o.jsx(z,{id:"builderio-block",styles:u(),nonce:i.context.nonce})}):null})}module.exports=F;
1
+ "use strict";const a=require("react/jsx-runtime"),r=require("../../../constants/device-sizes.cjs"),$=require("../../../functions/camel-to-kebab-case.cjs"),o=require("../../../helpers/css.cjs"),B=require("../../../helpers/nullable.cjs"),w=require("../../inlined-styles.cjs");function W(i){const v=function(){const s=i.block;return B.checkIsDefined(s.hide)?!s.hide:B.checkIsDefined(s.show)?s.show:!0},u=function(){var k,x,g,b,f;const s=i.block,e=s.responsiveStyles,t=i.context.content,c=r.getSizesForBreakpoints(((k=t==null?void 0:t.meta)==null?void 0:k.breakpoints)||{}),z=!!((g=(x=t==null?void 0:t.meta)==null?void 0:x.breakpoints)!=null&&g.xsmall),d=e==null?void 0:e.large,y=e==null?void 0:e.medium,S=e==null?void 0:e.small,h=e==null?void 0:e.xsmall,n=s.id;if(!n)return"";const F=d?o.createCssClass({className:n,styles:d}):"",Q=y?o.createCssClass({className:n,styles:y,mediaQuery:r.getMaxWidthQueryForSize("medium",c)}):"",j=S?o.createCssClass({className:n,styles:S,mediaQuery:r.getMaxWidthQueryForSize("small",c)}):"",p=h&&z?o.createCssClass({className:n,styles:h,mediaQuery:r.getMaxWidthQueryForSize("xsmall",c)}):"",l=s.animations&&s.animations.find(m=>m.trigger==="hover");let C="";if(l){const m=((f=(b=l.steps)==null?void 0:b[1])==null?void 0:f.styles)||{};C=o.createCssClass({className:`${n}:hover`,styles:{...m,transition:`all ${l.duration}s ${$.camelToKebabCase(l.easing)}`,transitionDelay:l.delay?`${l.delay}s`:"0s"}})||""}return[F,Q,j,p,C].join(" ")};return a.jsx(a.Fragment,{children:u()&&v()?a.jsx(a.Fragment,{children:a.jsx(w,{id:"builderio-block",styles:u(),nonce:i.context.nonce})}):null})}module.exports=W;
@@ -1,68 +1,76 @@
1
- import { jsx as a, Fragment as g } from "react/jsx-runtime";
2
- import { getSizesForBreakpoints as $, getMaxWidthQueryForSize as p } from "../../../constants/device-sizes.mjs";
3
- import { camelToKebabCase as z } from "../../../functions/camel-to-kebab-case.mjs";
4
- import { createCssClass as i } from "../../../helpers/css.mjs";
5
- import { checkIsDefined as b } from "../../../helpers/nullable.mjs";
6
- import F from "../../inlined-styles.mjs";
7
- function A(n) {
8
- const B = function() {
9
- const e = n.block;
10
- return b(e.hide) ? !e.hide : b(e.show) ? e.show : !0;
11
- }, c = function() {
12
- var h, S, k;
13
- const e = n.block, s = e.responsiveStyles, l = n.context.content, m = $(
14
- ((h = l == null ? void 0 : l.meta) == null ? void 0 : h.breakpoints) || {}
15
- ), d = s == null ? void 0 : s.large, u = s == null ? void 0 : s.medium, y = s == null ? void 0 : s.small, o = e.id;
1
+ import { jsx as c, Fragment as b } from "react/jsx-runtime";
2
+ import { getSizesForBreakpoints as D, getMaxWidthQueryForSize as m } from "../../../constants/device-sizes.mjs";
3
+ import { camelToKebabCase as I } from "../../../functions/camel-to-kebab-case.mjs";
4
+ import { createCssClass as n } from "../../../helpers/css.mjs";
5
+ import { checkIsDefined as C } from "../../../helpers/nullable.mjs";
6
+ import N from "../../inlined-styles.mjs";
7
+ function U(a) {
8
+ const v = function() {
9
+ const e = a.block;
10
+ return C(e.hide) ? !e.hide : C(e.show) ? e.show : !0;
11
+ }, d = function() {
12
+ var k, p, x, g, B;
13
+ const e = a.block, s = e.responsiveStyles, t = a.context.content, i = D(
14
+ ((k = t == null ? void 0 : t.meta) == null ? void 0 : k.breakpoints) || {}
15
+ ), Q = !!((x = (p = t == null ? void 0 : t.meta) == null ? void 0 : p.breakpoints) != null && x.xsmall), u = s == null ? void 0 : s.large, y = s == null ? void 0 : s.medium, S = s == null ? void 0 : s.small, f = s == null ? void 0 : s.xsmall, o = e.id;
16
16
  if (!o)
17
17
  return "";
18
- const v = d ? i({
18
+ const $ = u ? n({
19
19
  className: o,
20
- styles: d
21
- }) : "", x = u ? i({
20
+ styles: u
21
+ }) : "", z = y ? n({
22
22
  className: o,
23
- styles: u,
24
- mediaQuery: p(
23
+ styles: y,
24
+ mediaQuery: m(
25
25
  "medium",
26
- m
26
+ i
27
27
  )
28
- }) : "", w = y ? i({
28
+ }) : "", F = S ? n({
29
29
  className: o,
30
- styles: y,
31
- mediaQuery: p(
30
+ styles: S,
31
+ mediaQuery: m(
32
32
  "small",
33
- m
33
+ i
34
+ )
35
+ }) : "", j = f && Q ? n({
36
+ className: o,
37
+ styles: f,
38
+ mediaQuery: m(
39
+ "xsmall",
40
+ i
34
41
  )
35
- }) : "", t = e.animations && e.animations.find((r) => r.trigger === "hover");
36
- let f = "";
37
- if (t) {
38
- const r = ((k = (S = t.steps) == null ? void 0 : S[1]) == null ? void 0 : k.styles) || {};
39
- f = i({
42
+ }) : "", l = e.animations && e.animations.find((r) => r.trigger === "hover");
43
+ let h = "";
44
+ if (l) {
45
+ const r = ((B = (g = l.steps) == null ? void 0 : g[1]) == null ? void 0 : B.styles) || {};
46
+ h = n({
40
47
  className: `${o}:hover`,
41
48
  styles: {
42
49
  ...r,
43
- transition: `all ${t.duration}s ${z(
44
- t.easing
50
+ transition: `all ${l.duration}s ${I(
51
+ l.easing
45
52
  )}`,
46
- transitionDelay: t.delay ? `${t.delay}s` : "0s"
53
+ transitionDelay: l.delay ? `${l.delay}s` : "0s"
47
54
  }
48
55
  }) || "";
49
56
  }
50
57
  return [
51
- v,
52
- x,
53
- w,
54
- f
58
+ $,
59
+ z,
60
+ F,
61
+ j,
62
+ h
55
63
  ].join(" ");
56
64
  };
57
- return /* @__PURE__ */ a(g, { children: c() && B() ? /* @__PURE__ */ a(g, { children: /* @__PURE__ */ a(
58
- F,
65
+ return /* @__PURE__ */ c(b, { children: d() && v() ? /* @__PURE__ */ c(b, { children: /* @__PURE__ */ c(
66
+ N,
59
67
  {
60
68
  id: "builderio-block",
61
- styles: c(),
62
- nonce: n.context.nonce
69
+ styles: d(),
70
+ nonce: a.context.nonce
63
71
  }
64
72
  ) }) : null });
65
73
  }
66
74
  export {
67
- A as default
75
+ U as default
68
76
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../functions/fast-clone.cjs"),o={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},l=(t,a=o)=>`@media (max-width: ${a[t].max}px)`,s=({small:t,medium:a})=>{const e=r.fastClone(o);if(!t||!a)return e;const i=Math.floor(t/2);e.small={max:t,min:i,default:i+1};const m=e.small.max+1;e.medium={max:a,min:m,default:m+1};const n=e.medium.max+1;return e.large={max:2e3,min:n,default:n+1},e};exports.getMaxWidthQueryForSize=l;exports.getSizesForBreakpoints=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../functions/fast-clone.cjs"),r={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},x=(a,e=r)=>`@media (max-width: ${e[a].max}px)`,d=a=>{const e=u.fastClone(r);if(!a)return e;const{xsmall:m,small:t,medium:l}=a;if(m){const o=Math.floor(m/2);e.xsmall={max:m,min:o,default:o+1}}if(!t||!l)return e;const i=m?e.xsmall.max+1:Math.floor(t/2);e.small={max:t,min:i,default:i+1};const n=e.small.max+1;e.medium={max:l,min:n,default:n+1};const s=e.medium.max+1;return e.large={max:2e3,min:s,default:s+1},e};exports.getMaxWidthQueryForSize=x;exports.getSizesForBreakpoints=d;
@@ -1,7 +1,12 @@
1
- import { fastClone as l } from "../functions/fast-clone.mjs";
1
+ import { fastClone as r } from "../functions/fast-clone.mjs";
2
2
  const o = {
3
+ xsmall: {
4
+ min: 0,
5
+ default: 160,
6
+ max: 320
7
+ },
3
8
  small: {
4
- min: 320,
9
+ min: 321,
5
10
  default: 321,
6
11
  max: 640
7
12
  },
@@ -15,34 +20,46 @@ const o = {
15
20
  default: 991,
16
21
  max: 1200
17
22
  }
18
- }, s = (a, e = o) => `@media (max-width: ${e[a].max}px)`, x = ({
19
- small: a,
20
- medium: e
21
- }) => {
22
- const m = l(o);
23
- if (!a || !e)
23
+ }, d = (a, m = o) => `@media (max-width: ${m[a].max}px)`, f = (a) => {
24
+ const m = r(o);
25
+ if (!a)
26
+ return m;
27
+ const {
28
+ xsmall: l,
29
+ small: e,
30
+ medium: t
31
+ } = a;
32
+ if (l) {
33
+ const x = Math.floor(l / 2);
34
+ m.xsmall = {
35
+ max: l,
36
+ min: x,
37
+ default: x + 1
38
+ };
39
+ }
40
+ if (!e || !t)
24
41
  return m;
25
- const t = Math.floor(a / 2);
42
+ const i = l ? m.xsmall.max + 1 : Math.floor(e / 2);
26
43
  m.small = {
27
- max: a,
28
- min: t,
29
- default: t + 1
30
- };
31
- const i = m.small.max + 1;
32
- m.medium = {
33
44
  max: e,
34
45
  min: i,
35
46
  default: i + 1
36
47
  };
37
- const n = m.medium.max + 1;
48
+ const n = m.small.max + 1;
49
+ m.medium = {
50
+ max: t,
51
+ min: n,
52
+ default: n + 1
53
+ };
54
+ const s = m.medium.max + 1;
38
55
  return m.large = {
39
56
  max: 2e3,
40
57
  // TODO: decide upper limit
41
- min: n,
42
- default: n + 1
58
+ min: s,
59
+ default: s + 1
43
60
  }, m;
44
61
  };
45
62
  export {
46
- s as getMaxWidthQueryForSize,
47
- x as getSizesForBreakpoints
63
+ d as getMaxWidthQueryForSize,
64
+ f as getSizesForBreakpoints
48
65
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.17.7";exports.SDK_VERSION=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.17.8";exports.SDK_VERSION=e;
@@ -1,4 +1,4 @@
1
- const o = "0.17.7";
1
+ const o = "0.17.8";
2
2
  export {
3
3
  o as SDK_VERSION
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../constants/sdk-version.cjs"),y=require("../constants/target.cjs"),b=require("../functions/is-browser.cjs"),M=require("../functions/is-from-trusted-host.cjs"),B=require("../functions/register.cjs"),E=()=>{B.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let c=!1;const v=(o={})=>{var a,i;c||(c=!0,b.isBrowser()&&((a=window.parent)==null||a.postMessage({type:"builder.sdkInfo",data:{target:y.TARGET,version:f.SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0,blockLevelPersonalization:!0}},"*"),(i=window.parent)==null||i.postMessage({type:"builder.updateContent",data:{options:o}},"*"),window.addEventListener("message",u=>{var d,l;if(!M.isFromTrustedHost(o.trustedHosts,u))return;const{data:e}=u;if(e!=null&&e.type)switch(e.type){case"builder.evaluate":{const g=e.data.text,m=e.data.arguments||[],r=e.data.id,w=new Function(g);let t,s=null;try{t=w.apply(null,m)}catch(n){s=n}s?(d=window.parent)==null||d.postMessage({type:"builder.evaluateError",data:{id:r,error:s.message}},"*"):t&&typeof t.then=="function"?t.then(n=>{var p;(p=window.parent)==null||p.postMessage({type:"builder.evaluateResult",data:{id:r,result:n}},"*")}).catch(console.error):(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{result:t,id:r}},"*");break}}})))};exports.registerInsertMenu=E;exports.setupBrowserForEditing=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../constants/sdk-version.cjs"),y=require("../constants/target.cjs"),b=require("../functions/is-browser.cjs"),B=require("../functions/is-from-trusted-host.cjs"),M=require("../functions/register.cjs"),E=()=>{M.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let c=!1;const S=(o={})=>{var a,i;c||(c=!0,b.isBrowser()&&((a=window.parent)==null||a.postMessage({type:"builder.sdkInfo",data:{target:y.TARGET,version:f.SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0,supportsXSmallBreakpoint:!0,blockLevelPersonalization:!0}},"*"),(i=window.parent)==null||i.postMessage({type:"builder.updateContent",data:{options:o}},"*"),window.addEventListener("message",u=>{var d,l;if(!B.isFromTrustedHost(o.trustedHosts,u))return;const{data:e}=u;if(e!=null&&e.type)switch(e.type){case"builder.evaluate":{const g=e.data.text,m=e.data.arguments||[],r=e.data.id,w=new Function(g);let t,s=null;try{t=w.apply(null,m)}catch(n){s=n}s?(d=window.parent)==null||d.postMessage({type:"builder.evaluateError",data:{id:r,error:s.message}},"*"):t&&typeof t.then=="function"?t.then(n=>{var p;(p=window.parent)==null||p.postMessage({type:"builder.evaluateResult",data:{id:r,result:n}},"*")}).catch(console.error):(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{result:t,id:r}},"*");break}}})))};exports.registerInsertMenu=E;exports.setupBrowserForEditing=S;
@@ -1,10 +1,10 @@
1
1
  import { SDK_VERSION as w } from "../constants/sdk-version.mjs";
2
2
  import { TARGET as y } from "../constants/target.mjs";
3
3
  import { isBrowser as b } from "../functions/is-browser.mjs";
4
- import { isFromTrustedHost as C } from "../functions/is-from-trusted-host.mjs";
5
- import { register as E } from "../functions/register.mjs";
6
- const x = () => {
7
- E("insertMenu", {
4
+ import { isFromTrustedHost as B } from "../functions/is-from-trusted-host.mjs";
5
+ import { register as C } from "../functions/register.mjs";
6
+ const S = () => {
7
+ C("insertMenu", {
8
8
  name: "_default",
9
9
  default: !0,
10
10
  items: [{
@@ -27,7 +27,7 @@ const x = () => {
27
27
  });
28
28
  };
29
29
  let m = !1;
30
- const S = (a = {}) => {
30
+ const x = (a = {}) => {
31
31
  var n, i;
32
32
  m || (m = !0, b() && ((n = window.parent) == null || n.postMessage({
33
33
  type: "builder.sdkInfo",
@@ -39,6 +39,7 @@ const S = (a = {}) => {
39
39
  // scope our '+ add block' button styling
40
40
  supportsAddBlockScoping: !0,
41
41
  supportsCustomBreakpoints: !0,
42
+ supportsXSmallBreakpoint: !0,
42
43
  blockLevelPersonalization: !0
43
44
  }
44
45
  }, "*"), (i = window.parent) == null || i.postMessage({
@@ -48,7 +49,7 @@ const S = (a = {}) => {
48
49
  }
49
50
  }, "*"), window.addEventListener("message", (u) => {
50
51
  var p, d;
51
- if (!C(a.trustedHosts, u))
52
+ if (!B(a.trustedHosts, u))
52
53
  return;
53
54
  const {
54
55
  data: e
@@ -91,6 +92,6 @@ const S = (a = {}) => {
91
92
  })));
92
93
  };
93
94
  export {
94
- x as registerInsertMenu,
95
- S as setupBrowserForEditing
95
+ S as registerInsertMenu,
96
+ x as setupBrowserForEditing
96
97
  };
@@ -1 +1 @@
1
- "use strict";const o=require("react/jsx-runtime"),a=require("../../../constants/device-sizes.cjs"),j=require("../../../functions/camel-to-kebab-case.cjs"),c=require("../../../helpers/css.cjs"),b=require("../../../helpers/nullable.cjs"),z=require("../../inlined-styles.cjs");function F(i){const f=function(){const e=i.block;return b.checkIsDefined(e.hide)?!e.hide:b.checkIsDefined(e.show)?e.show:!0},u=function(){var C,k,g;const e=i.block,s=e.responsiveStyles,r=i.context.content,d=a.getSizesForBreakpoints(((C=r==null?void 0:r.meta)==null?void 0:C.breakpoints)||{}),m=s==null?void 0:s.large,y=s==null?void 0:s.medium,h=s==null?void 0:s.small,n=e.id;if(!n)return"";const v=m?c.createCssClass({className:n,styles:m}):"",B=y?c.createCssClass({className:n,styles:y,mediaQuery:a.getMaxWidthQueryForSize("medium",d)}):"",q=h?c.createCssClass({className:n,styles:h,mediaQuery:a.getMaxWidthQueryForSize("small",d)}):"",t=e.animations&&e.animations.find(l=>l.trigger==="hover");let S="";if(t){const l=((g=(k=t.steps)==null?void 0:k[1])==null?void 0:g.styles)||{};S=c.createCssClass({className:`${n}:hover`,styles:{...l,transition:`all ${t.duration}s ${j.camelToKebabCase(t.easing)}`,transitionDelay:t.delay?`${t.delay}s`:"0s"}})||""}return[v,B,q,S].join(" ")};return o.jsx(o.Fragment,{children:u()&&f()?o.jsx(o.Fragment,{children:o.jsx(z,{id:"builderio-block",styles:u(),nonce:i.context.nonce})}):null})}module.exports=F;
1
+ "use strict";const a=require("react/jsx-runtime"),r=require("../../../constants/device-sizes.cjs"),$=require("../../../functions/camel-to-kebab-case.cjs"),o=require("../../../helpers/css.cjs"),B=require("../../../helpers/nullable.cjs"),w=require("../../inlined-styles.cjs");function W(i){const v=function(){const s=i.block;return B.checkIsDefined(s.hide)?!s.hide:B.checkIsDefined(s.show)?s.show:!0},u=function(){var k,x,g,b,f;const s=i.block,e=s.responsiveStyles,t=i.context.content,c=r.getSizesForBreakpoints(((k=t==null?void 0:t.meta)==null?void 0:k.breakpoints)||{}),z=!!((g=(x=t==null?void 0:t.meta)==null?void 0:x.breakpoints)!=null&&g.xsmall),d=e==null?void 0:e.large,y=e==null?void 0:e.medium,S=e==null?void 0:e.small,h=e==null?void 0:e.xsmall,n=s.id;if(!n)return"";const F=d?o.createCssClass({className:n,styles:d}):"",Q=y?o.createCssClass({className:n,styles:y,mediaQuery:r.getMaxWidthQueryForSize("medium",c)}):"",j=S?o.createCssClass({className:n,styles:S,mediaQuery:r.getMaxWidthQueryForSize("small",c)}):"",p=h&&z?o.createCssClass({className:n,styles:h,mediaQuery:r.getMaxWidthQueryForSize("xsmall",c)}):"",l=s.animations&&s.animations.find(m=>m.trigger==="hover");let C="";if(l){const m=((f=(b=l.steps)==null?void 0:b[1])==null?void 0:f.styles)||{};C=o.createCssClass({className:`${n}:hover`,styles:{...m,transition:`all ${l.duration}s ${$.camelToKebabCase(l.easing)}`,transitionDelay:l.delay?`${l.delay}s`:"0s"}})||""}return[F,Q,j,p,C].join(" ")};return a.jsx(a.Fragment,{children:u()&&v()?a.jsx(a.Fragment,{children:a.jsx(w,{id:"builderio-block",styles:u(),nonce:i.context.nonce})}):null})}module.exports=W;
@@ -1,68 +1,76 @@
1
- import { jsx as a, Fragment as g } from "react/jsx-runtime";
2
- import { getSizesForBreakpoints as $, getMaxWidthQueryForSize as p } from "../../../constants/device-sizes.mjs";
3
- import { camelToKebabCase as z } from "../../../functions/camel-to-kebab-case.mjs";
4
- import { createCssClass as i } from "../../../helpers/css.mjs";
5
- import { checkIsDefined as b } from "../../../helpers/nullable.mjs";
6
- import F from "../../inlined-styles.mjs";
7
- function A(n) {
8
- const B = function() {
9
- const e = n.block;
10
- return b(e.hide) ? !e.hide : b(e.show) ? e.show : !0;
11
- }, c = function() {
12
- var h, S, k;
13
- const e = n.block, s = e.responsiveStyles, l = n.context.content, m = $(
14
- ((h = l == null ? void 0 : l.meta) == null ? void 0 : h.breakpoints) || {}
15
- ), d = s == null ? void 0 : s.large, u = s == null ? void 0 : s.medium, y = s == null ? void 0 : s.small, o = e.id;
1
+ import { jsx as c, Fragment as b } from "react/jsx-runtime";
2
+ import { getSizesForBreakpoints as D, getMaxWidthQueryForSize as m } from "../../../constants/device-sizes.mjs";
3
+ import { camelToKebabCase as I } from "../../../functions/camel-to-kebab-case.mjs";
4
+ import { createCssClass as n } from "../../../helpers/css.mjs";
5
+ import { checkIsDefined as C } from "../../../helpers/nullable.mjs";
6
+ import N from "../../inlined-styles.mjs";
7
+ function U(a) {
8
+ const v = function() {
9
+ const e = a.block;
10
+ return C(e.hide) ? !e.hide : C(e.show) ? e.show : !0;
11
+ }, d = function() {
12
+ var k, p, x, g, B;
13
+ const e = a.block, s = e.responsiveStyles, t = a.context.content, i = D(
14
+ ((k = t == null ? void 0 : t.meta) == null ? void 0 : k.breakpoints) || {}
15
+ ), Q = !!((x = (p = t == null ? void 0 : t.meta) == null ? void 0 : p.breakpoints) != null && x.xsmall), u = s == null ? void 0 : s.large, y = s == null ? void 0 : s.medium, S = s == null ? void 0 : s.small, f = s == null ? void 0 : s.xsmall, o = e.id;
16
16
  if (!o)
17
17
  return "";
18
- const v = d ? i({
18
+ const $ = u ? n({
19
19
  className: o,
20
- styles: d
21
- }) : "", x = u ? i({
20
+ styles: u
21
+ }) : "", z = y ? n({
22
22
  className: o,
23
- styles: u,
24
- mediaQuery: p(
23
+ styles: y,
24
+ mediaQuery: m(
25
25
  "medium",
26
- m
26
+ i
27
27
  )
28
- }) : "", w = y ? i({
28
+ }) : "", F = S ? n({
29
29
  className: o,
30
- styles: y,
31
- mediaQuery: p(
30
+ styles: S,
31
+ mediaQuery: m(
32
32
  "small",
33
- m
33
+ i
34
+ )
35
+ }) : "", j = f && Q ? n({
36
+ className: o,
37
+ styles: f,
38
+ mediaQuery: m(
39
+ "xsmall",
40
+ i
34
41
  )
35
- }) : "", t = e.animations && e.animations.find((r) => r.trigger === "hover");
36
- let f = "";
37
- if (t) {
38
- const r = ((k = (S = t.steps) == null ? void 0 : S[1]) == null ? void 0 : k.styles) || {};
39
- f = i({
42
+ }) : "", l = e.animations && e.animations.find((r) => r.trigger === "hover");
43
+ let h = "";
44
+ if (l) {
45
+ const r = ((B = (g = l.steps) == null ? void 0 : g[1]) == null ? void 0 : B.styles) || {};
46
+ h = n({
40
47
  className: `${o}:hover`,
41
48
  styles: {
42
49
  ...r,
43
- transition: `all ${t.duration}s ${z(
44
- t.easing
50
+ transition: `all ${l.duration}s ${I(
51
+ l.easing
45
52
  )}`,
46
- transitionDelay: t.delay ? `${t.delay}s` : "0s"
53
+ transitionDelay: l.delay ? `${l.delay}s` : "0s"
47
54
  }
48
55
  }) || "";
49
56
  }
50
57
  return [
51
- v,
52
- x,
53
- w,
54
- f
58
+ $,
59
+ z,
60
+ F,
61
+ j,
62
+ h
55
63
  ].join(" ");
56
64
  };
57
- return /* @__PURE__ */ a(g, { children: c() && B() ? /* @__PURE__ */ a(g, { children: /* @__PURE__ */ a(
58
- F,
65
+ return /* @__PURE__ */ c(b, { children: d() && v() ? /* @__PURE__ */ c(b, { children: /* @__PURE__ */ c(
66
+ N,
59
67
  {
60
68
  id: "builderio-block",
61
- styles: c(),
62
- nonce: n.context.nonce
69
+ styles: d(),
70
+ nonce: a.context.nonce
63
71
  }
64
72
  ) }) : null });
65
73
  }
66
74
  export {
67
- A as default
75
+ U as default
68
76
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../functions/fast-clone.cjs"),o={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},l=(t,a=o)=>`@media (max-width: ${a[t].max}px)`,s=({small:t,medium:a})=>{const e=r.fastClone(o);if(!t||!a)return e;const i=Math.floor(t/2);e.small={max:t,min:i,default:i+1};const m=e.small.max+1;e.medium={max:a,min:m,default:m+1};const n=e.medium.max+1;return e.large={max:2e3,min:n,default:n+1},e};exports.getMaxWidthQueryForSize=l;exports.getSizesForBreakpoints=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../functions/fast-clone.cjs"),r={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},x=(a,e=r)=>`@media (max-width: ${e[a].max}px)`,d=a=>{const e=u.fastClone(r);if(!a)return e;const{xsmall:m,small:t,medium:l}=a;if(m){const o=Math.floor(m/2);e.xsmall={max:m,min:o,default:o+1}}if(!t||!l)return e;const i=m?e.xsmall.max+1:Math.floor(t/2);e.small={max:t,min:i,default:i+1};const n=e.small.max+1;e.medium={max:l,min:n,default:n+1};const s=e.medium.max+1;return e.large={max:2e3,min:s,default:s+1},e};exports.getMaxWidthQueryForSize=x;exports.getSizesForBreakpoints=d;
@@ -1,7 +1,12 @@
1
- import { fastClone as l } from "../functions/fast-clone.mjs";
1
+ import { fastClone as r } from "../functions/fast-clone.mjs";
2
2
  const o = {
3
+ xsmall: {
4
+ min: 0,
5
+ default: 160,
6
+ max: 320
7
+ },
3
8
  small: {
4
- min: 320,
9
+ min: 321,
5
10
  default: 321,
6
11
  max: 640
7
12
  },
@@ -15,34 +20,46 @@ const o = {
15
20
  default: 991,
16
21
  max: 1200
17
22
  }
18
- }, s = (a, e = o) => `@media (max-width: ${e[a].max}px)`, x = ({
19
- small: a,
20
- medium: e
21
- }) => {
22
- const m = l(o);
23
- if (!a || !e)
23
+ }, d = (a, m = o) => `@media (max-width: ${m[a].max}px)`, f = (a) => {
24
+ const m = r(o);
25
+ if (!a)
26
+ return m;
27
+ const {
28
+ xsmall: l,
29
+ small: e,
30
+ medium: t
31
+ } = a;
32
+ if (l) {
33
+ const x = Math.floor(l / 2);
34
+ m.xsmall = {
35
+ max: l,
36
+ min: x,
37
+ default: x + 1
38
+ };
39
+ }
40
+ if (!e || !t)
24
41
  return m;
25
- const t = Math.floor(a / 2);
42
+ const i = l ? m.xsmall.max + 1 : Math.floor(e / 2);
26
43
  m.small = {
27
- max: a,
28
- min: t,
29
- default: t + 1
30
- };
31
- const i = m.small.max + 1;
32
- m.medium = {
33
44
  max: e,
34
45
  min: i,
35
46
  default: i + 1
36
47
  };
37
- const n = m.medium.max + 1;
48
+ const n = m.small.max + 1;
49
+ m.medium = {
50
+ max: t,
51
+ min: n,
52
+ default: n + 1
53
+ };
54
+ const s = m.medium.max + 1;
38
55
  return m.large = {
39
56
  max: 2e3,
40
57
  // TODO: decide upper limit
41
- min: n,
42
- default: n + 1
58
+ min: s,
59
+ default: s + 1
43
60
  }, m;
44
61
  };
45
62
  export {
46
- s as getMaxWidthQueryForSize,
47
- x as getSizesForBreakpoints
63
+ d as getMaxWidthQueryForSize,
64
+ f as getSizesForBreakpoints
48
65
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.17.7";exports.SDK_VERSION=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.17.8";exports.SDK_VERSION=e;
@@ -1,4 +1,4 @@
1
- const o = "0.17.7";
1
+ const o = "0.17.8";
2
2
  export {
3
3
  o as SDK_VERSION
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../constants/sdk-version.cjs"),y=require("../constants/target.cjs"),b=require("../functions/is-browser.cjs"),M=require("../functions/is-from-trusted-host.cjs"),B=require("../functions/register.cjs"),E=()=>{B.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let c=!1;const v=(o={})=>{var a,i;c||(c=!0,b.isBrowser()&&((a=window.parent)==null||a.postMessage({type:"builder.sdkInfo",data:{target:y.TARGET,version:f.SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0,blockLevelPersonalization:!0}},"*"),(i=window.parent)==null||i.postMessage({type:"builder.updateContent",data:{options:o}},"*"),window.addEventListener("message",u=>{var d,l;if(!M.isFromTrustedHost(o.trustedHosts,u))return;const{data:e}=u;if(e!=null&&e.type)switch(e.type){case"builder.evaluate":{const g=e.data.text,m=e.data.arguments||[],r=e.data.id,w=new Function(g);let t,s=null;try{t=w.apply(null,m)}catch(n){s=n}s?(d=window.parent)==null||d.postMessage({type:"builder.evaluateError",data:{id:r,error:s.message}},"*"):t&&typeof t.then=="function"?t.then(n=>{var p;(p=window.parent)==null||p.postMessage({type:"builder.evaluateResult",data:{id:r,result:n}},"*")}).catch(console.error):(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{result:t,id:r}},"*");break}}})))};exports.registerInsertMenu=E;exports.setupBrowserForEditing=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../constants/sdk-version.cjs"),y=require("../constants/target.cjs"),b=require("../functions/is-browser.cjs"),B=require("../functions/is-from-trusted-host.cjs"),M=require("../functions/register.cjs"),E=()=>{M.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let c=!1;const S=(o={})=>{var a,i;c||(c=!0,b.isBrowser()&&((a=window.parent)==null||a.postMessage({type:"builder.sdkInfo",data:{target:y.TARGET,version:f.SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0,supportsXSmallBreakpoint:!0,blockLevelPersonalization:!0}},"*"),(i=window.parent)==null||i.postMessage({type:"builder.updateContent",data:{options:o}},"*"),window.addEventListener("message",u=>{var d,l;if(!B.isFromTrustedHost(o.trustedHosts,u))return;const{data:e}=u;if(e!=null&&e.type)switch(e.type){case"builder.evaluate":{const g=e.data.text,m=e.data.arguments||[],r=e.data.id,w=new Function(g);let t,s=null;try{t=w.apply(null,m)}catch(n){s=n}s?(d=window.parent)==null||d.postMessage({type:"builder.evaluateError",data:{id:r,error:s.message}},"*"):t&&typeof t.then=="function"?t.then(n=>{var p;(p=window.parent)==null||p.postMessage({type:"builder.evaluateResult",data:{id:r,result:n}},"*")}).catch(console.error):(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{result:t,id:r}},"*");break}}})))};exports.registerInsertMenu=E;exports.setupBrowserForEditing=S;
@@ -1,10 +1,10 @@
1
1
  import { SDK_VERSION as w } from "../constants/sdk-version.mjs";
2
2
  import { TARGET as y } from "../constants/target.mjs";
3
3
  import { isBrowser as b } from "../functions/is-browser.mjs";
4
- import { isFromTrustedHost as C } from "../functions/is-from-trusted-host.mjs";
5
- import { register as E } from "../functions/register.mjs";
6
- const x = () => {
7
- E("insertMenu", {
4
+ import { isFromTrustedHost as B } from "../functions/is-from-trusted-host.mjs";
5
+ import { register as C } from "../functions/register.mjs";
6
+ const S = () => {
7
+ C("insertMenu", {
8
8
  name: "_default",
9
9
  default: !0,
10
10
  items: [{
@@ -27,7 +27,7 @@ const x = () => {
27
27
  });
28
28
  };
29
29
  let m = !1;
30
- const S = (a = {}) => {
30
+ const x = (a = {}) => {
31
31
  var n, i;
32
32
  m || (m = !0, b() && ((n = window.parent) == null || n.postMessage({
33
33
  type: "builder.sdkInfo",
@@ -39,6 +39,7 @@ const S = (a = {}) => {
39
39
  // scope our '+ add block' button styling
40
40
  supportsAddBlockScoping: !0,
41
41
  supportsCustomBreakpoints: !0,
42
+ supportsXSmallBreakpoint: !0,
42
43
  blockLevelPersonalization: !0
43
44
  }
44
45
  }, "*"), (i = window.parent) == null || i.postMessage({
@@ -48,7 +49,7 @@ const S = (a = {}) => {
48
49
  }
49
50
  }, "*"), window.addEventListener("message", (u) => {
50
51
  var p, d;
51
- if (!C(a.trustedHosts, u))
52
+ if (!B(a.trustedHosts, u))
52
53
  return;
53
54
  const {
54
55
  data: e
@@ -91,6 +92,6 @@ const S = (a = {}) => {
91
92
  })));
92
93
  };
93
94
  export {
94
- x as registerInsertMenu,
95
- S as setupBrowserForEditing
95
+ S as registerInsertMenu,
96
+ x as setupBrowserForEditing
96
97
  };
@@ -1 +1 @@
1
- "use strict";const o=require("react/jsx-runtime"),a=require("../../../constants/device-sizes.cjs"),j=require("../../../functions/camel-to-kebab-case.cjs"),c=require("../../../helpers/css.cjs"),b=require("../../../helpers/nullable.cjs"),z=require("../../inlined-styles.cjs");function F(i){const f=function(){const e=i.block;return b.checkIsDefined(e.hide)?!e.hide:b.checkIsDefined(e.show)?e.show:!0},u=function(){var C,k,g;const e=i.block,s=e.responsiveStyles,r=i.context.content,d=a.getSizesForBreakpoints(((C=r==null?void 0:r.meta)==null?void 0:C.breakpoints)||{}),m=s==null?void 0:s.large,y=s==null?void 0:s.medium,h=s==null?void 0:s.small,n=e.id;if(!n)return"";const v=m?c.createCssClass({className:n,styles:m}):"",B=y?c.createCssClass({className:n,styles:y,mediaQuery:a.getMaxWidthQueryForSize("medium",d)}):"",q=h?c.createCssClass({className:n,styles:h,mediaQuery:a.getMaxWidthQueryForSize("small",d)}):"",t=e.animations&&e.animations.find(l=>l.trigger==="hover");let S="";if(t){const l=((g=(k=t.steps)==null?void 0:k[1])==null?void 0:g.styles)||{};S=c.createCssClass({className:`${n}:hover`,styles:{...l,transition:`all ${t.duration}s ${j.camelToKebabCase(t.easing)}`,transitionDelay:t.delay?`${t.delay}s`:"0s"}})||""}return[v,B,q,S].join(" ")};return o.jsx(o.Fragment,{children:u()&&f()?o.jsx(o.Fragment,{children:o.jsx(z,{id:"builderio-block",styles:u(),nonce:i.context.nonce})}):null})}module.exports=F;
1
+ "use strict";const a=require("react/jsx-runtime"),r=require("../../../constants/device-sizes.cjs"),$=require("../../../functions/camel-to-kebab-case.cjs"),o=require("../../../helpers/css.cjs"),B=require("../../../helpers/nullable.cjs"),w=require("../../inlined-styles.cjs");function W(i){const v=function(){const s=i.block;return B.checkIsDefined(s.hide)?!s.hide:B.checkIsDefined(s.show)?s.show:!0},u=function(){var k,x,g,b,f;const s=i.block,e=s.responsiveStyles,t=i.context.content,c=r.getSizesForBreakpoints(((k=t==null?void 0:t.meta)==null?void 0:k.breakpoints)||{}),z=!!((g=(x=t==null?void 0:t.meta)==null?void 0:x.breakpoints)!=null&&g.xsmall),d=e==null?void 0:e.large,y=e==null?void 0:e.medium,S=e==null?void 0:e.small,h=e==null?void 0:e.xsmall,n=s.id;if(!n)return"";const F=d?o.createCssClass({className:n,styles:d}):"",Q=y?o.createCssClass({className:n,styles:y,mediaQuery:r.getMaxWidthQueryForSize("medium",c)}):"",j=S?o.createCssClass({className:n,styles:S,mediaQuery:r.getMaxWidthQueryForSize("small",c)}):"",p=h&&z?o.createCssClass({className:n,styles:h,mediaQuery:r.getMaxWidthQueryForSize("xsmall",c)}):"",l=s.animations&&s.animations.find(m=>m.trigger==="hover");let C="";if(l){const m=((f=(b=l.steps)==null?void 0:b[1])==null?void 0:f.styles)||{};C=o.createCssClass({className:`${n}:hover`,styles:{...m,transition:`all ${l.duration}s ${$.camelToKebabCase(l.easing)}`,transitionDelay:l.delay?`${l.delay}s`:"0s"}})||""}return[F,Q,j,p,C].join(" ")};return a.jsx(a.Fragment,{children:u()&&v()?a.jsx(a.Fragment,{children:a.jsx(w,{id:"builderio-block",styles:u(),nonce:i.context.nonce})}):null})}module.exports=W;
@@ -1,68 +1,76 @@
1
- import { jsx as a, Fragment as g } from "react/jsx-runtime";
2
- import { getSizesForBreakpoints as $, getMaxWidthQueryForSize as p } from "../../../constants/device-sizes.mjs";
3
- import { camelToKebabCase as z } from "../../../functions/camel-to-kebab-case.mjs";
4
- import { createCssClass as i } from "../../../helpers/css.mjs";
5
- import { checkIsDefined as b } from "../../../helpers/nullable.mjs";
6
- import F from "../../inlined-styles.mjs";
7
- function A(n) {
8
- const B = function() {
9
- const e = n.block;
10
- return b(e.hide) ? !e.hide : b(e.show) ? e.show : !0;
11
- }, c = function() {
12
- var h, S, k;
13
- const e = n.block, s = e.responsiveStyles, l = n.context.content, m = $(
14
- ((h = l == null ? void 0 : l.meta) == null ? void 0 : h.breakpoints) || {}
15
- ), d = s == null ? void 0 : s.large, u = s == null ? void 0 : s.medium, y = s == null ? void 0 : s.small, o = e.id;
1
+ import { jsx as c, Fragment as b } from "react/jsx-runtime";
2
+ import { getSizesForBreakpoints as D, getMaxWidthQueryForSize as m } from "../../../constants/device-sizes.mjs";
3
+ import { camelToKebabCase as I } from "../../../functions/camel-to-kebab-case.mjs";
4
+ import { createCssClass as n } from "../../../helpers/css.mjs";
5
+ import { checkIsDefined as C } from "../../../helpers/nullable.mjs";
6
+ import N from "../../inlined-styles.mjs";
7
+ function U(a) {
8
+ const v = function() {
9
+ const e = a.block;
10
+ return C(e.hide) ? !e.hide : C(e.show) ? e.show : !0;
11
+ }, d = function() {
12
+ var k, p, x, g, B;
13
+ const e = a.block, s = e.responsiveStyles, t = a.context.content, i = D(
14
+ ((k = t == null ? void 0 : t.meta) == null ? void 0 : k.breakpoints) || {}
15
+ ), Q = !!((x = (p = t == null ? void 0 : t.meta) == null ? void 0 : p.breakpoints) != null && x.xsmall), u = s == null ? void 0 : s.large, y = s == null ? void 0 : s.medium, S = s == null ? void 0 : s.small, f = s == null ? void 0 : s.xsmall, o = e.id;
16
16
  if (!o)
17
17
  return "";
18
- const v = d ? i({
18
+ const $ = u ? n({
19
19
  className: o,
20
- styles: d
21
- }) : "", x = u ? i({
20
+ styles: u
21
+ }) : "", z = y ? n({
22
22
  className: o,
23
- styles: u,
24
- mediaQuery: p(
23
+ styles: y,
24
+ mediaQuery: m(
25
25
  "medium",
26
- m
26
+ i
27
27
  )
28
- }) : "", w = y ? i({
28
+ }) : "", F = S ? n({
29
29
  className: o,
30
- styles: y,
31
- mediaQuery: p(
30
+ styles: S,
31
+ mediaQuery: m(
32
32
  "small",
33
- m
33
+ i
34
+ )
35
+ }) : "", j = f && Q ? n({
36
+ className: o,
37
+ styles: f,
38
+ mediaQuery: m(
39
+ "xsmall",
40
+ i
34
41
  )
35
- }) : "", t = e.animations && e.animations.find((r) => r.trigger === "hover");
36
- let f = "";
37
- if (t) {
38
- const r = ((k = (S = t.steps) == null ? void 0 : S[1]) == null ? void 0 : k.styles) || {};
39
- f = i({
42
+ }) : "", l = e.animations && e.animations.find((r) => r.trigger === "hover");
43
+ let h = "";
44
+ if (l) {
45
+ const r = ((B = (g = l.steps) == null ? void 0 : g[1]) == null ? void 0 : B.styles) || {};
46
+ h = n({
40
47
  className: `${o}:hover`,
41
48
  styles: {
42
49
  ...r,
43
- transition: `all ${t.duration}s ${z(
44
- t.easing
50
+ transition: `all ${l.duration}s ${I(
51
+ l.easing
45
52
  )}`,
46
- transitionDelay: t.delay ? `${t.delay}s` : "0s"
53
+ transitionDelay: l.delay ? `${l.delay}s` : "0s"
47
54
  }
48
55
  }) || "";
49
56
  }
50
57
  return [
51
- v,
52
- x,
53
- w,
54
- f
58
+ $,
59
+ z,
60
+ F,
61
+ j,
62
+ h
55
63
  ].join(" ");
56
64
  };
57
- return /* @__PURE__ */ a(g, { children: c() && B() ? /* @__PURE__ */ a(g, { children: /* @__PURE__ */ a(
58
- F,
65
+ return /* @__PURE__ */ c(b, { children: d() && v() ? /* @__PURE__ */ c(b, { children: /* @__PURE__ */ c(
66
+ N,
59
67
  {
60
68
  id: "builderio-block",
61
- styles: c(),
62
- nonce: n.context.nonce
69
+ styles: d(),
70
+ nonce: a.context.nonce
63
71
  }
64
72
  ) }) : null });
65
73
  }
66
74
  export {
67
- A as default
75
+ U as default
68
76
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../functions/fast-clone.cjs"),o={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},l=(t,a=o)=>`@media (max-width: ${a[t].max}px)`,s=({small:t,medium:a})=>{const e=r.fastClone(o);if(!t||!a)return e;const i=Math.floor(t/2);e.small={max:t,min:i,default:i+1};const m=e.small.max+1;e.medium={max:a,min:m,default:m+1};const n=e.medium.max+1;return e.large={max:2e3,min:n,default:n+1},e};exports.getMaxWidthQueryForSize=l;exports.getSizesForBreakpoints=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../functions/fast-clone.cjs"),r={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},x=(a,e=r)=>`@media (max-width: ${e[a].max}px)`,d=a=>{const e=u.fastClone(r);if(!a)return e;const{xsmall:m,small:t,medium:l}=a;if(m){const o=Math.floor(m/2);e.xsmall={max:m,min:o,default:o+1}}if(!t||!l)return e;const i=m?e.xsmall.max+1:Math.floor(t/2);e.small={max:t,min:i,default:i+1};const n=e.small.max+1;e.medium={max:l,min:n,default:n+1};const s=e.medium.max+1;return e.large={max:2e3,min:s,default:s+1},e};exports.getMaxWidthQueryForSize=x;exports.getSizesForBreakpoints=d;
@@ -1,7 +1,12 @@
1
- import { fastClone as l } from "../functions/fast-clone.mjs";
1
+ import { fastClone as r } from "../functions/fast-clone.mjs";
2
2
  const o = {
3
+ xsmall: {
4
+ min: 0,
5
+ default: 160,
6
+ max: 320
7
+ },
3
8
  small: {
4
- min: 320,
9
+ min: 321,
5
10
  default: 321,
6
11
  max: 640
7
12
  },
@@ -15,34 +20,46 @@ const o = {
15
20
  default: 991,
16
21
  max: 1200
17
22
  }
18
- }, s = (a, e = o) => `@media (max-width: ${e[a].max}px)`, x = ({
19
- small: a,
20
- medium: e
21
- }) => {
22
- const m = l(o);
23
- if (!a || !e)
23
+ }, d = (a, m = o) => `@media (max-width: ${m[a].max}px)`, f = (a) => {
24
+ const m = r(o);
25
+ if (!a)
26
+ return m;
27
+ const {
28
+ xsmall: l,
29
+ small: e,
30
+ medium: t
31
+ } = a;
32
+ if (l) {
33
+ const x = Math.floor(l / 2);
34
+ m.xsmall = {
35
+ max: l,
36
+ min: x,
37
+ default: x + 1
38
+ };
39
+ }
40
+ if (!e || !t)
24
41
  return m;
25
- const t = Math.floor(a / 2);
42
+ const i = l ? m.xsmall.max + 1 : Math.floor(e / 2);
26
43
  m.small = {
27
- max: a,
28
- min: t,
29
- default: t + 1
30
- };
31
- const i = m.small.max + 1;
32
- m.medium = {
33
44
  max: e,
34
45
  min: i,
35
46
  default: i + 1
36
47
  };
37
- const n = m.medium.max + 1;
48
+ const n = m.small.max + 1;
49
+ m.medium = {
50
+ max: t,
51
+ min: n,
52
+ default: n + 1
53
+ };
54
+ const s = m.medium.max + 1;
38
55
  return m.large = {
39
56
  max: 2e3,
40
57
  // TODO: decide upper limit
41
- min: n,
42
- default: n + 1
58
+ min: s,
59
+ default: s + 1
43
60
  }, m;
44
61
  };
45
62
  export {
46
- s as getMaxWidthQueryForSize,
47
- x as getSizesForBreakpoints
63
+ d as getMaxWidthQueryForSize,
64
+ f as getSizesForBreakpoints
48
65
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.17.7";exports.SDK_VERSION=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.17.8";exports.SDK_VERSION=e;
@@ -1,4 +1,4 @@
1
- const o = "0.17.7";
1
+ const o = "0.17.8";
2
2
  export {
3
3
  o as SDK_VERSION
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../constants/sdk-version.cjs"),y=require("../constants/target.cjs"),b=require("../functions/is-browser.cjs"),M=require("../functions/is-from-trusted-host.cjs"),B=require("../functions/register.cjs"),E=()=>{B.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let c=!1;const v=(o={})=>{var a,i;c||(c=!0,b.isBrowser()&&((a=window.parent)==null||a.postMessage({type:"builder.sdkInfo",data:{target:y.TARGET,version:f.SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0,blockLevelPersonalization:!0}},"*"),(i=window.parent)==null||i.postMessage({type:"builder.updateContent",data:{options:o}},"*"),window.addEventListener("message",u=>{var d,l;if(!M.isFromTrustedHost(o.trustedHosts,u))return;const{data:e}=u;if(e!=null&&e.type)switch(e.type){case"builder.evaluate":{const g=e.data.text,m=e.data.arguments||[],r=e.data.id,w=new Function(g);let t,s=null;try{t=w.apply(null,m)}catch(n){s=n}s?(d=window.parent)==null||d.postMessage({type:"builder.evaluateError",data:{id:r,error:s.message}},"*"):t&&typeof t.then=="function"?t.then(n=>{var p;(p=window.parent)==null||p.postMessage({type:"builder.evaluateResult",data:{id:r,result:n}},"*")}).catch(console.error):(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{result:t,id:r}},"*");break}}})))};exports.registerInsertMenu=E;exports.setupBrowserForEditing=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../constants/sdk-version.cjs"),y=require("../constants/target.cjs"),b=require("../functions/is-browser.cjs"),B=require("../functions/is-from-trusted-host.cjs"),M=require("../functions/register.cjs"),E=()=>{M.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let c=!1;const S=(o={})=>{var a,i;c||(c=!0,b.isBrowser()&&((a=window.parent)==null||a.postMessage({type:"builder.sdkInfo",data:{target:y.TARGET,version:f.SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0,supportsXSmallBreakpoint:!0,blockLevelPersonalization:!0}},"*"),(i=window.parent)==null||i.postMessage({type:"builder.updateContent",data:{options:o}},"*"),window.addEventListener("message",u=>{var d,l;if(!B.isFromTrustedHost(o.trustedHosts,u))return;const{data:e}=u;if(e!=null&&e.type)switch(e.type){case"builder.evaluate":{const g=e.data.text,m=e.data.arguments||[],r=e.data.id,w=new Function(g);let t,s=null;try{t=w.apply(null,m)}catch(n){s=n}s?(d=window.parent)==null||d.postMessage({type:"builder.evaluateError",data:{id:r,error:s.message}},"*"):t&&typeof t.then=="function"?t.then(n=>{var p;(p=window.parent)==null||p.postMessage({type:"builder.evaluateResult",data:{id:r,result:n}},"*")}).catch(console.error):(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{result:t,id:r}},"*");break}}})))};exports.registerInsertMenu=E;exports.setupBrowserForEditing=S;
@@ -1,10 +1,10 @@
1
1
  import { SDK_VERSION as w } from "../constants/sdk-version.mjs";
2
2
  import { TARGET as y } from "../constants/target.mjs";
3
3
  import { isBrowser as b } from "../functions/is-browser.mjs";
4
- import { isFromTrustedHost as C } from "../functions/is-from-trusted-host.mjs";
5
- import { register as E } from "../functions/register.mjs";
6
- const x = () => {
7
- E("insertMenu", {
4
+ import { isFromTrustedHost as B } from "../functions/is-from-trusted-host.mjs";
5
+ import { register as C } from "../functions/register.mjs";
6
+ const S = () => {
7
+ C("insertMenu", {
8
8
  name: "_default",
9
9
  default: !0,
10
10
  items: [{
@@ -27,7 +27,7 @@ const x = () => {
27
27
  });
28
28
  };
29
29
  let m = !1;
30
- const S = (a = {}) => {
30
+ const x = (a = {}) => {
31
31
  var n, i;
32
32
  m || (m = !0, b() && ((n = window.parent) == null || n.postMessage({
33
33
  type: "builder.sdkInfo",
@@ -39,6 +39,7 @@ const S = (a = {}) => {
39
39
  // scope our '+ add block' button styling
40
40
  supportsAddBlockScoping: !0,
41
41
  supportsCustomBreakpoints: !0,
42
+ supportsXSmallBreakpoint: !0,
42
43
  blockLevelPersonalization: !0
43
44
  }
44
45
  }, "*"), (i = window.parent) == null || i.postMessage({
@@ -48,7 +49,7 @@ const S = (a = {}) => {
48
49
  }
49
50
  }, "*"), window.addEventListener("message", (u) => {
50
51
  var p, d;
51
- if (!C(a.trustedHosts, u))
52
+ if (!B(a.trustedHosts, u))
52
53
  return;
53
54
  const {
54
55
  data: e
@@ -91,6 +92,6 @@ const S = (a = {}) => {
91
92
  })));
92
93
  };
93
94
  export {
94
- x as registerInsertMenu,
95
- S as setupBrowserForEditing
95
+ S as registerInsertMenu,
96
+ x as setupBrowserForEditing
96
97
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react-nextjs",
3
3
  "description": "Builder.io RSC SDK for NextJS App Directory",
4
- "version": "0.17.7",
4
+ "version": "0.17.8",
5
5
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,4 +1,4 @@
1
- export type SizeName = 'large' | 'medium' | 'small';
1
+ export type SizeName = 'large' | 'medium' | 'small' | 'xsmall';
2
2
  interface Size {
3
3
  min: number;
4
4
  default: number;
@@ -6,8 +6,9 @@ interface Size {
6
6
  }
7
7
  export declare const getMaxWidthQueryForSize: (size: SizeName, sizeValues?: Record<SizeName, Size>) => string;
8
8
  interface Breakpoints {
9
+ xsmall?: number;
9
10
  small?: number;
10
11
  medium?: number;
11
12
  }
12
- export declare const getSizesForBreakpoints: ({ small, medium }: Breakpoints) => Record<SizeName, Size>;
13
+ export declare const getSizesForBreakpoints: (breakpoints: Breakpoints) => Record<SizeName, Size>;
13
14
  export {};
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.17.7";
1
+ export declare const SDK_VERSION = "0.17.8";
@@ -37,7 +37,6 @@ export interface BuilderBlock {
37
37
  large?: Partial<CSSStyleDeclaration>;
38
38
  medium?: Partial<CSSStyleDeclaration>;
39
39
  small?: Partial<CSSStyleDeclaration>;
40
- /** @deprecated */
41
40
  xsmall?: Partial<CSSStyleDeclaration>;
42
41
  };
43
42
  component?: {
@@ -2,6 +2,7 @@ import type { BuilderBlock } from './builder-block.js';
2
2
  import type { Input } from './input.js';
3
3
  import type { Nullable } from './typescript.js';
4
4
  export interface Breakpoints {
5
+ xsmall?: number;
5
6
  small: number;
6
7
  medium: number;
7
8
  }
@@ -1,4 +1,4 @@
1
- export type SizeName = 'large' | 'medium' | 'small';
1
+ export type SizeName = 'large' | 'medium' | 'small' | 'xsmall';
2
2
  interface Size {
3
3
  min: number;
4
4
  default: number;
@@ -6,8 +6,9 @@ interface Size {
6
6
  }
7
7
  export declare const getMaxWidthQueryForSize: (size: SizeName, sizeValues?: Record<SizeName, Size>) => string;
8
8
  interface Breakpoints {
9
+ xsmall?: number;
9
10
  small?: number;
10
11
  medium?: number;
11
12
  }
12
- export declare const getSizesForBreakpoints: ({ small, medium }: Breakpoints) => Record<SizeName, Size>;
13
+ export declare const getSizesForBreakpoints: (breakpoints: Breakpoints) => Record<SizeName, Size>;
13
14
  export {};
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.17.7";
1
+ export declare const SDK_VERSION = "0.17.8";
@@ -37,7 +37,6 @@ export interface BuilderBlock {
37
37
  large?: Partial<CSSStyleDeclaration>;
38
38
  medium?: Partial<CSSStyleDeclaration>;
39
39
  small?: Partial<CSSStyleDeclaration>;
40
- /** @deprecated */
41
40
  xsmall?: Partial<CSSStyleDeclaration>;
42
41
  };
43
42
  component?: {
@@ -2,6 +2,7 @@ import type { BuilderBlock } from './builder-block.js';
2
2
  import type { Input } from './input.js';
3
3
  import type { Nullable } from './typescript.js';
4
4
  export interface Breakpoints {
5
+ xsmall?: number;
5
6
  small: number;
6
7
  medium: number;
7
8
  }