@builder.io/sdk-react-nextjs 0.16.19 → 0.16.20

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.
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("react/jsx-runtime"),p=require("../../components/blocks/blocks.cjs"),W=require("../../components/dynamic-renderer/dynamic-renderer.cjs"),j=require("../../components/inlined-styles.cjs"),q=require("../../constants/device-sizes.cjs"),B=require("../../functions/get-class-prop-name.cjs"),z=require("../../functions/get-style.cjs"),N=require("./helpers.cjs");function A(e){var g,k;const a=typeof e.space=="number"?e.space||0:20,r=e.columns||[],u=e.stackColumnsAt||"tablet",y=function(t){return t.link?e.builderLinkComponent||"a":"div"},S=function(t){var n;return((n=r[t])==null?void 0:n.width)||100/r.length},x=function(t){const n=S(t),l=a*(r.length-1)*(n/100);return`calc(${n}% - ${l}px)`},c=function({stackedStyle:t,desktopStyle:n}){return u==="tablet"?t:n},m=function({stackedStyle:t,desktopStyle:n}){return u==="never"?n:t},d=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",C=function(){return{"--flex-dir":d,"--flex-dir-tablet":c({stackedStyle:d,desktopStyle:"row"})}},v=function(t){const n=t===0?0:a,l=x(t),s=`${n}px`,h="100%",f=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:l,["marginLeft"]:s,"--column-width-mobile":m({stackedStyle:h,desktopStyle:l}),"--column-margin-left-mobile":m({stackedStyle:f,desktopStyle:s}),"--column-width-tablet":c({stackedStyle:h,desktopStyle:l}),"--column-margin-left-tablet":c({stackedStyle:f,desktopStyle:s})}},b=function(t){var l,s;return q.getSizesForBreakpoints(((s=(l=e.builderContext.content)==null?void 0:l.meta)==null?void 0:s.breakpoints)||{})[t].max},w=function(){const t=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
1
+ "use strict";const o=require("react/jsx-runtime"),p=require("../../components/blocks/blocks.cjs"),W=require("../../components/dynamic-renderer/dynamic-renderer.cjs"),j=require("../../components/inlined-styles.cjs"),q=require("../../constants/device-sizes.cjs"),z=require("../../functions/get-class-prop-name.cjs"),B=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},m=function({stackedStyle:t,desktopStyle:i}){return u()==="never"?i:t},d=function(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"},C=function(){return{"--flex-dir":d(),"--flex-dir-tablet":c({stackedStyle:d(),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":m({stackedStyle:k,desktopStyle:l}),"--column-margin-left-mobile":m({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 q.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,n){return{...t.link?{href:t.link}:{},[B.getClassPropName()]:"builder-column",style:z.mapStyleObjToStrIfNeeded(v(n))}};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:N.getColumnsClass((g=e.builderBlock)==null?void 0:g.id)+" div-153273e4",style:C(),children:[o.jsx(j,{id:"builderio-columns",styles:w(),nonce:e.builderContext.nonce}),(k=e.columns)==null?void 0:k.map((i,t)=>o.jsx(W,{TagName:y(i),actionAttributes:{},attributes:$(i,t),children:o.jsx(p,{path:`component.options.columns.${t}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:i.blocks})},t))]}),o.jsx("style",{children:`.div-153273e4 {
25
+ `},$=function(t,i){return{...t.link?{href:t.link}:{},[z.getClassPropName()]:"builder-column",style:B.mapStyleObjToStrIfNeeded(v(i))}};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:A.getColumnsClass((g=e.builderBlock)==null?void 0:g.id)+" div-0e218b6c",style:C(),children:[o.jsx(j,{id:"builderio-columns",styles:w(),nonce:e.builderContext.nonce}),(f=e.columns)==null?void 0:f.map((n,t)=>o.jsx(W,{TagName:y(n),actionAttributes:{},attributes:$(n,t),children:o.jsx(p,{path:`component.options.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-0e218b6c {
26
26
  display: flex;
27
27
  line-height: normal;
28
- }`})]})}module.exports=A;
28
+ }`})]})}module.exports=N;
@@ -8,63 +8,71 @@ import { mapStyleObjToStrIfNeeded as T } from "../../functions/get-style.mjs";
8
8
  import { getColumnsClass as D } from "./helpers.mjs";
9
9
  function q(e) {
10
10
  var f, g;
11
- const a = typeof e.space == "number" ? e.space || 0 : 20, s = e.columns || [], m = e.stackColumnsAt || "tablet", S = function(t) {
11
+ const a = function() {
12
+ return typeof e.space == "number" ? e.space || 0 : 20;
13
+ }, s = function() {
14
+ return e.columns || [];
15
+ }, m = function() {
16
+ return e.stackColumnsAt || "tablet";
17
+ }, S = function(t) {
12
18
  return t.link ? e.builderLinkComponent || "a" : "div";
13
- }, C = function(t) {
14
- var n;
15
- return ((n = s[t]) == null ? void 0 : n.width) || 100 / s.length;
16
19
  }, x = function(t) {
17
- const n = C(t), l = a * (s.length - 1) * (n / 100);
18
- return `calc(${n}% - ${l}px)`;
20
+ var i;
21
+ return ((i = s()[t]) == null ? void 0 : i.width) || 100 / s().length;
22
+ }, C = function(t) {
23
+ const i = x(t), o = a() * (s().length - 1) * (i / 100);
24
+ return `calc(${i}% - ${o}px)`;
19
25
  }, c = function({
20
26
  stackedStyle: t,
21
- desktopStyle: n
27
+ desktopStyle: i
22
28
  }) {
23
- return m === "tablet" ? t : n;
24
- }, d = function({
29
+ return m() === "tablet" ? t : i;
30
+ }, u = function({
25
31
  stackedStyle: t,
26
- desktopStyle: n
32
+ desktopStyle: i
27
33
  }) {
28
- return m === "never" ? n : t;
29
- }, u = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", p = function() {
34
+ return m() === "never" ? i : t;
35
+ }, d = function() {
36
+ return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
37
+ }, p = function() {
30
38
  return {
31
- "--flex-dir": u,
39
+ "--flex-dir": d(),
32
40
  "--flex-dir-tablet": c({
33
- stackedStyle: u,
41
+ stackedStyle: d(),
34
42
  desktopStyle: "row"
35
43
  })
36
44
  };
37
45
  }, v = function(t) {
38
- const n = t === 0 ? 0 : a, l = x(t), o = `${n}px`, k = "100%", h = 0;
46
+ const i = t === 0 ? 0 : a(), o = C(t), l = `${i}px`, k = "100%", h = 0;
39
47
  return {
40
48
  ...{
41
49
  display: "flex",
42
50
  flexDirection: "column",
43
51
  alignItems: "stretch"
44
52
  },
45
- width: l,
46
- ["marginLeft"]: o,
47
- "--column-width-mobile": d({
53
+ width: o,
54
+ ["marginLeft"]: l,
55
+ "--column-width-mobile": u({
48
56
  stackedStyle: k,
49
- desktopStyle: l
57
+ desktopStyle: o
50
58
  }),
51
- "--column-margin-left-mobile": d({
59
+ "--column-margin-left-mobile": u({
52
60
  stackedStyle: h,
53
- desktopStyle: o
61
+ desktopStyle: l
54
62
  }),
55
63
  "--column-width-tablet": c({
56
64
  stackedStyle: k,
57
- desktopStyle: l
65
+ desktopStyle: o
58
66
  }),
59
67
  "--column-margin-left-tablet": c({
60
68
  stackedStyle: h,
61
- desktopStyle: o
69
+ desktopStyle: l
62
70
  })
63
71
  };
64
72
  }, b = function(t) {
65
- var l, o;
73
+ var o, l;
66
74
  return L(
67
- ((o = (l = e.builderContext.content) == null ? void 0 : l.meta) == null ? void 0 : o.breakpoints) || {}
75
+ ((l = (o = e.builderContext.content) == null ? void 0 : o.meta) == null ? void 0 : l.breakpoints) || {}
68
76
  )[t].max;
69
77
  }, w = function() {
70
78
  const t = `.${e.builderBlock.id}-breakpoints > .builder-column`;
@@ -93,20 +101,20 @@ function q(e) {
93
101
  }
94
102
  },
95
103
  `;
96
- }, $ = function(t, n) {
104
+ }, $ = function(t, i) {
97
105
  return {
98
106
  ...t.link ? {
99
107
  href: t.link
100
108
  } : {},
101
109
  [N()]: "builder-column",
102
- style: T(v(n))
110
+ style: T(v(i))
103
111
  };
104
112
  };
105
113
  return /* @__PURE__ */ y(B, { children: [
106
114
  /* @__PURE__ */ y(
107
115
  "div",
108
116
  {
109
- className: D((f = e.builderBlock) == null ? void 0 : f.id) + " div-153273e4",
117
+ className: D((f = e.builderBlock) == null ? void 0 : f.id) + " div-0e218b6c",
110
118
  style: p(),
111
119
  children: [
112
120
  /* @__PURE__ */ r(
@@ -117,12 +125,12 @@ function q(e) {
117
125
  nonce: e.builderContext.nonce
118
126
  }
119
127
  ),
120
- (g = e.columns) == null ? void 0 : g.map((i, t) => /* @__PURE__ */ r(
128
+ (g = e.columns) == null ? void 0 : g.map((n, t) => /* @__PURE__ */ r(
121
129
  z,
122
130
  {
123
- TagName: S(i),
131
+ TagName: S(n),
124
132
  actionAttributes: {},
125
- attributes: $(i, t),
133
+ attributes: $(n, t),
126
134
  children: /* @__PURE__ */ r(
127
135
  W,
128
136
  {
@@ -134,7 +142,7 @@ function q(e) {
134
142
  context: e.builderContext,
135
143
  registeredComponents: e.builderComponents,
136
144
  linkComponent: e.builderLinkComponent,
137
- blocks: i.blocks
145
+ blocks: n.blocks
138
146
  }
139
147
  )
140
148
  },
@@ -143,7 +151,7 @@ function q(e) {
143
151
  ]
144
152
  }
145
153
  ),
146
- /* @__PURE__ */ r("style", { children: `.div-153273e4 {
154
+ /* @__PURE__ */ r("style", { children: `.div-0e218b6c {
147
155
  display: flex;
148
156
  line-height: normal;
149
157
  }` })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.19";exports.SDK_VERSION=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.20";exports.SDK_VERSION=e;
@@ -1,4 +1,4 @@
1
- const o = "0.16.19";
1
+ const o = "0.16.20";
2
2
  export {
3
3
  o as SDK_VERSION
4
4
  };
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../constants/sdk-name.cjs"),s=require("../../../helpers/logger.cjs"),a=require("./safeDynamicRequire.cjs"),c="BUILDER_IVM";let n=null;const d=(o,e={})=>{n=o,I(e)},m=t.SDK_NAME==="@builder.io/sdk-react-nextjs"||t.SDK_NAME==="@builder.io/sdk-react"||t.SDK_NAME==="@builder.io/sdk-qwik"||t.SDK_NAME==="@builder.io/sdk-vue",u=()=>{try{if(n)return n;const e=a.safeDynamicRequire("isolated-vm");if(e)return e}catch(e){s.logger.error("isolated-vm import error.",e)}const o=`${s.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../constants/sdk-name.cjs"),l=require("../../../helpers/logger.cjs"),c=require("./safeDynamicRequire.cjs"),d="BUILDER_IVM";let n=null,s=null;const u=(t,e={})=>{n||(n=t,S(e))},m=o.SDK_NAME==="@builder.io/sdk-react-nextjs"||o.SDK_NAME==="@builder.io/sdk-react"||o.SDK_NAME==="@builder.io/sdk-qwik"||o.SDK_NAME==="@builder.io/sdk-vue",I=()=>{try{if(n)return n;const e=c.safeDynamicRequire("isolated-vm");if(e)return e}catch(e){l.logger.error("isolated-vm import error.",e)}const t=`${l.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
2
2
 
3
3
  SOLUTION: In a server-only execution path within your application, do one of the following:
4
4
 
5
- ${m?`- import and call \`initializeNodeRuntime()\` from "${t.SDK_NAME}/node/init".`:""}
5
+ ${m?`- import and call \`initializeNodeRuntime()\` from "${o.SDK_NAME}/node/init".`:""}
6
6
  - add the following import: \`await import('isolated-vm')\`.
7
7
 
8
- For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;throw new Error(o)};function I(o={memoryLimit:128}){const e=u(),r=new e.Isolate(o).createContextSync(),i=r.global;return i.setSync("global",i.derefInto()),i.setSync("log",function(...l){console.log(...l)}),i.setSync(c,e),r}exports.setIvm=d;
8
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;throw new Error(t)};function S(t={memoryLimit:128}){if(s)return s;const e=I(),r=new e.Isolate(t).createContextSync(),i=r.global;return i.setSync("global",i.derefInto()),i.setSync("log",function(...a){console.log(...a)}),i.setSync(d,e),s=r,r}exports.setIvm=u;
@@ -1,38 +1,40 @@
1
1
  import { SDK_NAME as e } from "../../../constants/sdk-name.mjs";
2
- import { logger as l, MSG_PREFIX as a } from "../../../helpers/logger.mjs";
3
- import { safeDynamicRequire as c } from "./safeDynamicRequire.mjs";
4
- const d = "BUILDER_IVM";
5
- let n = null;
6
- const E = (t, o = {}) => {
7
- n = t, u(o);
8
- }, m = e === "@builder.io/sdk-react-nextjs" || e === "@builder.io/sdk-react" || e === "@builder.io/sdk-qwik" || e === "@builder.io/sdk-vue", I = () => {
2
+ import { logger as a, MSG_PREFIX as c } from "../../../helpers/logger.mjs";
3
+ import { safeDynamicRequire as d } from "./safeDynamicRequire.mjs";
4
+ const m = "BUILDER_IVM";
5
+ let n = null, l = null;
6
+ const S = (t, o = {}) => {
7
+ n || (n = t, f(o));
8
+ }, u = e === "@builder.io/sdk-react-nextjs" || e === "@builder.io/sdk-react" || e === "@builder.io/sdk-qwik" || e === "@builder.io/sdk-vue", I = () => {
9
9
  try {
10
10
  if (n)
11
11
  return n;
12
- const o = c("isolated-vm");
12
+ const o = d("isolated-vm");
13
13
  if (o)
14
14
  return o;
15
15
  } catch (o) {
16
- l.error("isolated-vm import error.", o);
16
+ a.error("isolated-vm import error.", o);
17
17
  }
18
- const t = `${a}could not import \`isolated-vm\` module for safe script execution on a Node server.
18
+ const t = `${c}could not import \`isolated-vm\` module for safe script execution on a Node server.
19
19
 
20
20
  SOLUTION: In a server-only execution path within your application, do one of the following:
21
21
 
22
- ${m ? `- import and call \`initializeNodeRuntime()\` from "${e}/node/init".` : ""}
22
+ ${u ? `- import and call \`initializeNodeRuntime()\` from "${e}/node/init".` : ""}
23
23
  - add the following import: \`await import('isolated-vm')\`.
24
24
 
25
25
  For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
26
26
  throw new Error(t);
27
27
  };
28
- function u(t = {
28
+ function f(t = {
29
29
  memoryLimit: 128
30
30
  }) {
31
+ if (l)
32
+ return l;
31
33
  const o = I(), r = new o.Isolate(t).createContextSync(), i = r.global;
32
34
  return i.setSync("global", i.derefInto()), i.setSync("log", function(...s) {
33
35
  console.log(...s);
34
- }), i.setSync(d, o), r;
36
+ }), i.setSync(m, o), l = r, r;
35
37
  }
36
38
  export {
37
- E as setIvm
39
+ S as setIvm
38
40
  };
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("react/jsx-runtime"),p=require("../../components/blocks/blocks.cjs"),W=require("../../components/dynamic-renderer/dynamic-renderer.cjs"),j=require("../../components/inlined-styles.cjs"),q=require("../../constants/device-sizes.cjs"),B=require("../../functions/get-class-prop-name.cjs"),z=require("../../functions/get-style.cjs"),N=require("./helpers.cjs");function A(e){var g,k;const a=typeof e.space=="number"?e.space||0:20,r=e.columns||[],u=e.stackColumnsAt||"tablet",y=function(t){return t.link?e.builderLinkComponent||"a":"div"},S=function(t){var n;return((n=r[t])==null?void 0:n.width)||100/r.length},x=function(t){const n=S(t),l=a*(r.length-1)*(n/100);return`calc(${n}% - ${l}px)`},c=function({stackedStyle:t,desktopStyle:n}){return u==="tablet"?t:n},m=function({stackedStyle:t,desktopStyle:n}){return u==="never"?n:t},d=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",C=function(){return{"--flex-dir":d,"--flex-dir-tablet":c({stackedStyle:d,desktopStyle:"row"})}},v=function(t){const n=t===0?0:a,l=x(t),s=`${n}px`,h="100%",f=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:l,["marginLeft"]:s,"--column-width-mobile":m({stackedStyle:h,desktopStyle:l}),"--column-margin-left-mobile":m({stackedStyle:f,desktopStyle:s}),"--column-width-tablet":c({stackedStyle:h,desktopStyle:l}),"--column-margin-left-tablet":c({stackedStyle:f,desktopStyle:s})}},b=function(t){var l,s;return q.getSizesForBreakpoints(((s=(l=e.builderContext.content)==null?void 0:l.meta)==null?void 0:s.breakpoints)||{})[t].max},w=function(){const t=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
1
+ "use strict";const o=require("react/jsx-runtime"),p=require("../../components/blocks/blocks.cjs"),W=require("../../components/dynamic-renderer/dynamic-renderer.cjs"),j=require("../../components/inlined-styles.cjs"),q=require("../../constants/device-sizes.cjs"),z=require("../../functions/get-class-prop-name.cjs"),B=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},m=function({stackedStyle:t,desktopStyle:i}){return u()==="never"?i:t},d=function(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"},C=function(){return{"--flex-dir":d(),"--flex-dir-tablet":c({stackedStyle:d(),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":m({stackedStyle:k,desktopStyle:l}),"--column-margin-left-mobile":m({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 q.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,n){return{...t.link?{href:t.link}:{},[B.getClassPropName()]:"builder-column",style:z.mapStyleObjToStrIfNeeded(v(n))}};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:N.getColumnsClass((g=e.builderBlock)==null?void 0:g.id)+" div-153273e4",style:C(),children:[o.jsx(j,{id:"builderio-columns",styles:w(),nonce:e.builderContext.nonce}),(k=e.columns)==null?void 0:k.map((i,t)=>o.jsx(W,{TagName:y(i),actionAttributes:{},attributes:$(i,t),children:o.jsx(p,{path:`component.options.columns.${t}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:i.blocks})},t))]}),o.jsx("style",{children:`.div-153273e4 {
25
+ `},$=function(t,i){return{...t.link?{href:t.link}:{},[z.getClassPropName()]:"builder-column",style:B.mapStyleObjToStrIfNeeded(v(i))}};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:A.getColumnsClass((g=e.builderBlock)==null?void 0:g.id)+" div-0e218b6c",style:C(),children:[o.jsx(j,{id:"builderio-columns",styles:w(),nonce:e.builderContext.nonce}),(f=e.columns)==null?void 0:f.map((n,t)=>o.jsx(W,{TagName:y(n),actionAttributes:{},attributes:$(n,t),children:o.jsx(p,{path:`component.options.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-0e218b6c {
26
26
  display: flex;
27
27
  line-height: normal;
28
- }`})]})}module.exports=A;
28
+ }`})]})}module.exports=N;
@@ -8,63 +8,71 @@ import { mapStyleObjToStrIfNeeded as T } from "../../functions/get-style.mjs";
8
8
  import { getColumnsClass as D } from "./helpers.mjs";
9
9
  function q(e) {
10
10
  var f, g;
11
- const a = typeof e.space == "number" ? e.space || 0 : 20, s = e.columns || [], m = e.stackColumnsAt || "tablet", S = function(t) {
11
+ const a = function() {
12
+ return typeof e.space == "number" ? e.space || 0 : 20;
13
+ }, s = function() {
14
+ return e.columns || [];
15
+ }, m = function() {
16
+ return e.stackColumnsAt || "tablet";
17
+ }, S = function(t) {
12
18
  return t.link ? e.builderLinkComponent || "a" : "div";
13
- }, C = function(t) {
14
- var n;
15
- return ((n = s[t]) == null ? void 0 : n.width) || 100 / s.length;
16
19
  }, x = function(t) {
17
- const n = C(t), l = a * (s.length - 1) * (n / 100);
18
- return `calc(${n}% - ${l}px)`;
20
+ var i;
21
+ return ((i = s()[t]) == null ? void 0 : i.width) || 100 / s().length;
22
+ }, C = function(t) {
23
+ const i = x(t), o = a() * (s().length - 1) * (i / 100);
24
+ return `calc(${i}% - ${o}px)`;
19
25
  }, c = function({
20
26
  stackedStyle: t,
21
- desktopStyle: n
27
+ desktopStyle: i
22
28
  }) {
23
- return m === "tablet" ? t : n;
24
- }, d = function({
29
+ return m() === "tablet" ? t : i;
30
+ }, u = function({
25
31
  stackedStyle: t,
26
- desktopStyle: n
32
+ desktopStyle: i
27
33
  }) {
28
- return m === "never" ? n : t;
29
- }, u = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", p = function() {
34
+ return m() === "never" ? i : t;
35
+ }, d = function() {
36
+ return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
37
+ }, p = function() {
30
38
  return {
31
- "--flex-dir": u,
39
+ "--flex-dir": d(),
32
40
  "--flex-dir-tablet": c({
33
- stackedStyle: u,
41
+ stackedStyle: d(),
34
42
  desktopStyle: "row"
35
43
  })
36
44
  };
37
45
  }, v = function(t) {
38
- const n = t === 0 ? 0 : a, l = x(t), o = `${n}px`, k = "100%", h = 0;
46
+ const i = t === 0 ? 0 : a(), o = C(t), l = `${i}px`, k = "100%", h = 0;
39
47
  return {
40
48
  ...{
41
49
  display: "flex",
42
50
  flexDirection: "column",
43
51
  alignItems: "stretch"
44
52
  },
45
- width: l,
46
- ["marginLeft"]: o,
47
- "--column-width-mobile": d({
53
+ width: o,
54
+ ["marginLeft"]: l,
55
+ "--column-width-mobile": u({
48
56
  stackedStyle: k,
49
- desktopStyle: l
57
+ desktopStyle: o
50
58
  }),
51
- "--column-margin-left-mobile": d({
59
+ "--column-margin-left-mobile": u({
52
60
  stackedStyle: h,
53
- desktopStyle: o
61
+ desktopStyle: l
54
62
  }),
55
63
  "--column-width-tablet": c({
56
64
  stackedStyle: k,
57
- desktopStyle: l
65
+ desktopStyle: o
58
66
  }),
59
67
  "--column-margin-left-tablet": c({
60
68
  stackedStyle: h,
61
- desktopStyle: o
69
+ desktopStyle: l
62
70
  })
63
71
  };
64
72
  }, b = function(t) {
65
- var l, o;
73
+ var o, l;
66
74
  return L(
67
- ((o = (l = e.builderContext.content) == null ? void 0 : l.meta) == null ? void 0 : o.breakpoints) || {}
75
+ ((l = (o = e.builderContext.content) == null ? void 0 : o.meta) == null ? void 0 : l.breakpoints) || {}
68
76
  )[t].max;
69
77
  }, w = function() {
70
78
  const t = `.${e.builderBlock.id}-breakpoints > .builder-column`;
@@ -93,20 +101,20 @@ function q(e) {
93
101
  }
94
102
  },
95
103
  `;
96
- }, $ = function(t, n) {
104
+ }, $ = function(t, i) {
97
105
  return {
98
106
  ...t.link ? {
99
107
  href: t.link
100
108
  } : {},
101
109
  [N()]: "builder-column",
102
- style: T(v(n))
110
+ style: T(v(i))
103
111
  };
104
112
  };
105
113
  return /* @__PURE__ */ y(B, { children: [
106
114
  /* @__PURE__ */ y(
107
115
  "div",
108
116
  {
109
- className: D((f = e.builderBlock) == null ? void 0 : f.id) + " div-153273e4",
117
+ className: D((f = e.builderBlock) == null ? void 0 : f.id) + " div-0e218b6c",
110
118
  style: p(),
111
119
  children: [
112
120
  /* @__PURE__ */ r(
@@ -117,12 +125,12 @@ function q(e) {
117
125
  nonce: e.builderContext.nonce
118
126
  }
119
127
  ),
120
- (g = e.columns) == null ? void 0 : g.map((i, t) => /* @__PURE__ */ r(
128
+ (g = e.columns) == null ? void 0 : g.map((n, t) => /* @__PURE__ */ r(
121
129
  z,
122
130
  {
123
- TagName: S(i),
131
+ TagName: S(n),
124
132
  actionAttributes: {},
125
- attributes: $(i, t),
133
+ attributes: $(n, t),
126
134
  children: /* @__PURE__ */ r(
127
135
  W,
128
136
  {
@@ -134,7 +142,7 @@ function q(e) {
134
142
  context: e.builderContext,
135
143
  registeredComponents: e.builderComponents,
136
144
  linkComponent: e.builderLinkComponent,
137
- blocks: i.blocks
145
+ blocks: n.blocks
138
146
  }
139
147
  )
140
148
  },
@@ -143,7 +151,7 @@ function q(e) {
143
151
  ]
144
152
  }
145
153
  ),
146
- /* @__PURE__ */ r("style", { children: `.div-153273e4 {
154
+ /* @__PURE__ */ r("style", { children: `.div-0e218b6c {
147
155
  display: flex;
148
156
  line-height: normal;
149
157
  }` })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.19";exports.SDK_VERSION=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.20";exports.SDK_VERSION=e;
@@ -1,4 +1,4 @@
1
- const o = "0.16.19";
1
+ const o = "0.16.20";
2
2
  export {
3
3
  o as SDK_VERSION
4
4
  };
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../constants/sdk-name.cjs"),s=require("../../../helpers/logger.cjs"),a=require("./safeDynamicRequire.cjs"),c="BUILDER_IVM";let n=null;const d=(o,e={})=>{n=o,I(e)},m=t.SDK_NAME==="@builder.io/sdk-react-nextjs"||t.SDK_NAME==="@builder.io/sdk-react"||t.SDK_NAME==="@builder.io/sdk-qwik"||t.SDK_NAME==="@builder.io/sdk-vue",u=()=>{try{if(n)return n;const e=a.safeDynamicRequire("isolated-vm");if(e)return e}catch(e){s.logger.error("isolated-vm import error.",e)}const o=`${s.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../constants/sdk-name.cjs"),l=require("../../../helpers/logger.cjs"),c=require("./safeDynamicRequire.cjs"),d="BUILDER_IVM";let n=null,s=null;const u=(t,e={})=>{n||(n=t,S(e))},m=o.SDK_NAME==="@builder.io/sdk-react-nextjs"||o.SDK_NAME==="@builder.io/sdk-react"||o.SDK_NAME==="@builder.io/sdk-qwik"||o.SDK_NAME==="@builder.io/sdk-vue",I=()=>{try{if(n)return n;const e=c.safeDynamicRequire("isolated-vm");if(e)return e}catch(e){l.logger.error("isolated-vm import error.",e)}const t=`${l.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
2
2
 
3
3
  SOLUTION: In a server-only execution path within your application, do one of the following:
4
4
 
5
- ${m?`- import and call \`initializeNodeRuntime()\` from "${t.SDK_NAME}/node/init".`:""}
5
+ ${m?`- import and call \`initializeNodeRuntime()\` from "${o.SDK_NAME}/node/init".`:""}
6
6
  - add the following import: \`await import('isolated-vm')\`.
7
7
 
8
- For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;throw new Error(o)};function I(o={memoryLimit:128}){const e=u(),r=new e.Isolate(o).createContextSync(),i=r.global;return i.setSync("global",i.derefInto()),i.setSync("log",function(...l){console.log(...l)}),i.setSync(c,e),r}exports.setIvm=d;
8
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;throw new Error(t)};function S(t={memoryLimit:128}){if(s)return s;const e=I(),r=new e.Isolate(t).createContextSync(),i=r.global;return i.setSync("global",i.derefInto()),i.setSync("log",function(...a){console.log(...a)}),i.setSync(d,e),s=r,r}exports.setIvm=u;
@@ -1,38 +1,40 @@
1
1
  import { SDK_NAME as e } from "../../../constants/sdk-name.mjs";
2
- import { logger as l, MSG_PREFIX as a } from "../../../helpers/logger.mjs";
3
- import { safeDynamicRequire as c } from "./safeDynamicRequire.mjs";
4
- const d = "BUILDER_IVM";
5
- let n = null;
6
- const E = (t, o = {}) => {
7
- n = t, u(o);
8
- }, m = e === "@builder.io/sdk-react-nextjs" || e === "@builder.io/sdk-react" || e === "@builder.io/sdk-qwik" || e === "@builder.io/sdk-vue", I = () => {
2
+ import { logger as a, MSG_PREFIX as c } from "../../../helpers/logger.mjs";
3
+ import { safeDynamicRequire as d } from "./safeDynamicRequire.mjs";
4
+ const m = "BUILDER_IVM";
5
+ let n = null, l = null;
6
+ const S = (t, o = {}) => {
7
+ n || (n = t, f(o));
8
+ }, u = e === "@builder.io/sdk-react-nextjs" || e === "@builder.io/sdk-react" || e === "@builder.io/sdk-qwik" || e === "@builder.io/sdk-vue", I = () => {
9
9
  try {
10
10
  if (n)
11
11
  return n;
12
- const o = c("isolated-vm");
12
+ const o = d("isolated-vm");
13
13
  if (o)
14
14
  return o;
15
15
  } catch (o) {
16
- l.error("isolated-vm import error.", o);
16
+ a.error("isolated-vm import error.", o);
17
17
  }
18
- const t = `${a}could not import \`isolated-vm\` module for safe script execution on a Node server.
18
+ const t = `${c}could not import \`isolated-vm\` module for safe script execution on a Node server.
19
19
 
20
20
  SOLUTION: In a server-only execution path within your application, do one of the following:
21
21
 
22
- ${m ? `- import and call \`initializeNodeRuntime()\` from "${e}/node/init".` : ""}
22
+ ${u ? `- import and call \`initializeNodeRuntime()\` from "${e}/node/init".` : ""}
23
23
  - add the following import: \`await import('isolated-vm')\`.
24
24
 
25
25
  For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
26
26
  throw new Error(t);
27
27
  };
28
- function u(t = {
28
+ function f(t = {
29
29
  memoryLimit: 128
30
30
  }) {
31
+ if (l)
32
+ return l;
31
33
  const o = I(), r = new o.Isolate(t).createContextSync(), i = r.global;
32
34
  return i.setSync("global", i.derefInto()), i.setSync("log", function(...s) {
33
35
  console.log(...s);
34
- }), i.setSync(d, o), r;
36
+ }), i.setSync(m, o), l = r, r;
35
37
  }
36
38
  export {
37
- E as setIvm
39
+ S as setIvm
38
40
  };
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("react/jsx-runtime"),p=require("../../components/blocks/blocks.cjs"),W=require("../../components/dynamic-renderer/dynamic-renderer.cjs"),j=require("../../components/inlined-styles.cjs"),q=require("../../constants/device-sizes.cjs"),B=require("../../functions/get-class-prop-name.cjs"),z=require("../../functions/get-style.cjs"),N=require("./helpers.cjs");function A(e){var g,k;const a=typeof e.space=="number"?e.space||0:20,r=e.columns||[],u=e.stackColumnsAt||"tablet",y=function(t){return t.link?e.builderLinkComponent||"a":"div"},S=function(t){var n;return((n=r[t])==null?void 0:n.width)||100/r.length},x=function(t){const n=S(t),l=a*(r.length-1)*(n/100);return`calc(${n}% - ${l}px)`},c=function({stackedStyle:t,desktopStyle:n}){return u==="tablet"?t:n},m=function({stackedStyle:t,desktopStyle:n}){return u==="never"?n:t},d=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",C=function(){return{"--flex-dir":d,"--flex-dir-tablet":c({stackedStyle:d,desktopStyle:"row"})}},v=function(t){const n=t===0?0:a,l=x(t),s=`${n}px`,h="100%",f=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:l,["marginLeft"]:s,"--column-width-mobile":m({stackedStyle:h,desktopStyle:l}),"--column-margin-left-mobile":m({stackedStyle:f,desktopStyle:s}),"--column-width-tablet":c({stackedStyle:h,desktopStyle:l}),"--column-margin-left-tablet":c({stackedStyle:f,desktopStyle:s})}},b=function(t){var l,s;return q.getSizesForBreakpoints(((s=(l=e.builderContext.content)==null?void 0:l.meta)==null?void 0:s.breakpoints)||{})[t].max},w=function(){const t=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
1
+ "use strict";const o=require("react/jsx-runtime"),p=require("../../components/blocks/blocks.cjs"),W=require("../../components/dynamic-renderer/dynamic-renderer.cjs"),j=require("../../components/inlined-styles.cjs"),q=require("../../constants/device-sizes.cjs"),z=require("../../functions/get-class-prop-name.cjs"),B=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},m=function({stackedStyle:t,desktopStyle:i}){return u()==="never"?i:t},d=function(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"},C=function(){return{"--flex-dir":d(),"--flex-dir-tablet":c({stackedStyle:d(),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":m({stackedStyle:k,desktopStyle:l}),"--column-margin-left-mobile":m({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 q.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,n){return{...t.link?{href:t.link}:{},[B.getClassPropName()]:"builder-column",style:z.mapStyleObjToStrIfNeeded(v(n))}};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:N.getColumnsClass((g=e.builderBlock)==null?void 0:g.id)+" div-153273e4",style:C(),children:[o.jsx(j,{id:"builderio-columns",styles:w(),nonce:e.builderContext.nonce}),(k=e.columns)==null?void 0:k.map((i,t)=>o.jsx(W,{TagName:y(i),actionAttributes:{},attributes:$(i,t),children:o.jsx(p,{path:`component.options.columns.${t}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:i.blocks})},t))]}),o.jsx("style",{children:`.div-153273e4 {
25
+ `},$=function(t,i){return{...t.link?{href:t.link}:{},[z.getClassPropName()]:"builder-column",style:B.mapStyleObjToStrIfNeeded(v(i))}};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:A.getColumnsClass((g=e.builderBlock)==null?void 0:g.id)+" div-0e218b6c",style:C(),children:[o.jsx(j,{id:"builderio-columns",styles:w(),nonce:e.builderContext.nonce}),(f=e.columns)==null?void 0:f.map((n,t)=>o.jsx(W,{TagName:y(n),actionAttributes:{},attributes:$(n,t),children:o.jsx(p,{path:`component.options.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-0e218b6c {
26
26
  display: flex;
27
27
  line-height: normal;
28
- }`})]})}module.exports=A;
28
+ }`})]})}module.exports=N;
@@ -8,63 +8,71 @@ import { mapStyleObjToStrIfNeeded as T } from "../../functions/get-style.mjs";
8
8
  import { getColumnsClass as D } from "./helpers.mjs";
9
9
  function q(e) {
10
10
  var f, g;
11
- const a = typeof e.space == "number" ? e.space || 0 : 20, s = e.columns || [], m = e.stackColumnsAt || "tablet", S = function(t) {
11
+ const a = function() {
12
+ return typeof e.space == "number" ? e.space || 0 : 20;
13
+ }, s = function() {
14
+ return e.columns || [];
15
+ }, m = function() {
16
+ return e.stackColumnsAt || "tablet";
17
+ }, S = function(t) {
12
18
  return t.link ? e.builderLinkComponent || "a" : "div";
13
- }, C = function(t) {
14
- var n;
15
- return ((n = s[t]) == null ? void 0 : n.width) || 100 / s.length;
16
19
  }, x = function(t) {
17
- const n = C(t), l = a * (s.length - 1) * (n / 100);
18
- return `calc(${n}% - ${l}px)`;
20
+ var i;
21
+ return ((i = s()[t]) == null ? void 0 : i.width) || 100 / s().length;
22
+ }, C = function(t) {
23
+ const i = x(t), o = a() * (s().length - 1) * (i / 100);
24
+ return `calc(${i}% - ${o}px)`;
19
25
  }, c = function({
20
26
  stackedStyle: t,
21
- desktopStyle: n
27
+ desktopStyle: i
22
28
  }) {
23
- return m === "tablet" ? t : n;
24
- }, d = function({
29
+ return m() === "tablet" ? t : i;
30
+ }, u = function({
25
31
  stackedStyle: t,
26
- desktopStyle: n
32
+ desktopStyle: i
27
33
  }) {
28
- return m === "never" ? n : t;
29
- }, u = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", p = function() {
34
+ return m() === "never" ? i : t;
35
+ }, d = function() {
36
+ return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
37
+ }, p = function() {
30
38
  return {
31
- "--flex-dir": u,
39
+ "--flex-dir": d(),
32
40
  "--flex-dir-tablet": c({
33
- stackedStyle: u,
41
+ stackedStyle: d(),
34
42
  desktopStyle: "row"
35
43
  })
36
44
  };
37
45
  }, v = function(t) {
38
- const n = t === 0 ? 0 : a, l = x(t), o = `${n}px`, k = "100%", h = 0;
46
+ const i = t === 0 ? 0 : a(), o = C(t), l = `${i}px`, k = "100%", h = 0;
39
47
  return {
40
48
  ...{
41
49
  display: "flex",
42
50
  flexDirection: "column",
43
51
  alignItems: "stretch"
44
52
  },
45
- width: l,
46
- ["marginLeft"]: o,
47
- "--column-width-mobile": d({
53
+ width: o,
54
+ ["marginLeft"]: l,
55
+ "--column-width-mobile": u({
48
56
  stackedStyle: k,
49
- desktopStyle: l
57
+ desktopStyle: o
50
58
  }),
51
- "--column-margin-left-mobile": d({
59
+ "--column-margin-left-mobile": u({
52
60
  stackedStyle: h,
53
- desktopStyle: o
61
+ desktopStyle: l
54
62
  }),
55
63
  "--column-width-tablet": c({
56
64
  stackedStyle: k,
57
- desktopStyle: l
65
+ desktopStyle: o
58
66
  }),
59
67
  "--column-margin-left-tablet": c({
60
68
  stackedStyle: h,
61
- desktopStyle: o
69
+ desktopStyle: l
62
70
  })
63
71
  };
64
72
  }, b = function(t) {
65
- var l, o;
73
+ var o, l;
66
74
  return L(
67
- ((o = (l = e.builderContext.content) == null ? void 0 : l.meta) == null ? void 0 : o.breakpoints) || {}
75
+ ((l = (o = e.builderContext.content) == null ? void 0 : o.meta) == null ? void 0 : l.breakpoints) || {}
68
76
  )[t].max;
69
77
  }, w = function() {
70
78
  const t = `.${e.builderBlock.id}-breakpoints > .builder-column`;
@@ -93,20 +101,20 @@ function q(e) {
93
101
  }
94
102
  },
95
103
  `;
96
- }, $ = function(t, n) {
104
+ }, $ = function(t, i) {
97
105
  return {
98
106
  ...t.link ? {
99
107
  href: t.link
100
108
  } : {},
101
109
  [N()]: "builder-column",
102
- style: T(v(n))
110
+ style: T(v(i))
103
111
  };
104
112
  };
105
113
  return /* @__PURE__ */ y(B, { children: [
106
114
  /* @__PURE__ */ y(
107
115
  "div",
108
116
  {
109
- className: D((f = e.builderBlock) == null ? void 0 : f.id) + " div-153273e4",
117
+ className: D((f = e.builderBlock) == null ? void 0 : f.id) + " div-0e218b6c",
110
118
  style: p(),
111
119
  children: [
112
120
  /* @__PURE__ */ r(
@@ -117,12 +125,12 @@ function q(e) {
117
125
  nonce: e.builderContext.nonce
118
126
  }
119
127
  ),
120
- (g = e.columns) == null ? void 0 : g.map((i, t) => /* @__PURE__ */ r(
128
+ (g = e.columns) == null ? void 0 : g.map((n, t) => /* @__PURE__ */ r(
121
129
  z,
122
130
  {
123
- TagName: S(i),
131
+ TagName: S(n),
124
132
  actionAttributes: {},
125
- attributes: $(i, t),
133
+ attributes: $(n, t),
126
134
  children: /* @__PURE__ */ r(
127
135
  W,
128
136
  {
@@ -134,7 +142,7 @@ function q(e) {
134
142
  context: e.builderContext,
135
143
  registeredComponents: e.builderComponents,
136
144
  linkComponent: e.builderLinkComponent,
137
- blocks: i.blocks
145
+ blocks: n.blocks
138
146
  }
139
147
  )
140
148
  },
@@ -143,7 +151,7 @@ function q(e) {
143
151
  ]
144
152
  }
145
153
  ),
146
- /* @__PURE__ */ r("style", { children: `.div-153273e4 {
154
+ /* @__PURE__ */ r("style", { children: `.div-0e218b6c {
147
155
  display: flex;
148
156
  line-height: normal;
149
157
  }` })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.19";exports.SDK_VERSION=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.20";exports.SDK_VERSION=e;
@@ -1,4 +1,4 @@
1
- const o = "0.16.19";
1
+ const o = "0.16.20";
2
2
  export {
3
3
  o as SDK_VERSION
4
4
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../constants/sdk-name.cjs"),m=require("../../../helpers/logger.cjs"),A=require("../../fast-clone.cjs"),R=require("../../set.cjs"),x=require("../helpers.cjs"),M=require("./safeDynamicRequire.cjs"),g=t=>`bldr_${t}_sync`,b="BUILDER_SET_STATE",I="BUILDER_IVM",k=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../constants/sdk-name.cjs"),m=require("../../../helpers/logger.cjs"),A=require("../../fast-clone.cjs"),R=require("../../set.cjs"),M=require("../helpers.cjs"),k=require("./safeDynamicRequire.cjs"),g=t=>`bldr_${t}_sync`,b="BUILDER_SET_STATE",I="BUILDER_IVM",h=`
2
2
  var refToProxy = (obj) => {
3
3
  if (typeof obj !== 'object' || obj === null) {
4
4
  return obj;
@@ -24,8 +24,8 @@ var refToProxy = (obj) => {
24
24
  }
25
25
  })
26
26
  }
27
- `,h=({code:t,args:e})=>{const u=e.map(([o])=>`var ${o} = refToProxy(${g(o)}); `).join("");return`
28
- ${k}
27
+ `,x=({code:t,args:e})=>{const u=e.map(([o])=>`var ${o} = refToProxy(${g(o)}); `).join("");return`
28
+ ${h}
29
29
  ${u}
30
30
  function theFunction() {
31
31
  ${t}
@@ -38,11 +38,11 @@ if (typeof output === 'object' && output !== null) {
38
38
  } else {
39
39
  return output;
40
40
  }
41
- `};let a=null,y=null;const C=(t,e={})=>{a=t,E(e)},D=i.SDK_NAME==="@builder.io/sdk-react-nextjs"||i.SDK_NAME==="@builder.io/sdk-react"||i.SDK_NAME==="@builder.io/sdk-qwik"||i.SDK_NAME==="@builder.io/sdk-vue",S=()=>{try{if(a)return a;const e=M.safeDynamicRequire("isolated-vm");if(e)return e}catch(e){m.logger.error("isolated-vm import error.",e)}const t=`${m.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
41
+ `};let l=null,y=null;const C=(t,e={})=>{l||(l=t,E(e))},D=c.SDK_NAME==="@builder.io/sdk-react-nextjs"||c.SDK_NAME==="@builder.io/sdk-react"||c.SDK_NAME==="@builder.io/sdk-qwik"||c.SDK_NAME==="@builder.io/sdk-vue",S=()=>{try{if(l)return l;const e=k.safeDynamicRequire("isolated-vm");if(e)return e}catch(e){m.logger.error("isolated-vm import error.",e)}const t=`${m.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
42
42
 
43
43
  SOLUTION: In a server-only execution path within your application, do one of the following:
44
44
 
45
- ${D?`- import and call \`initializeNodeRuntime()\` from "${i.SDK_NAME}/node/init".`:""}
45
+ ${D?`- import and call \`initializeNodeRuntime()\` from "${c.SDK_NAME}/node/init".`:""}
46
46
  - add the following import: \`await import('isolated-vm')\`.
47
47
 
48
- For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;throw new Error(t)};function E(t={memoryLimit:128}){const e=S(),o=new e.Isolate(t).createContextSync(),n=o.global;return n.setSync("global",n.derefInto()),n.setSync("log",function(...c){console.log(...c)}),n.setSync(I,e),y=o,o}const O=()=>y||E(),w=({code:t,builder:e,context:u,event:o,localState:n,rootSetState:c,rootState:l})=>{const _=S(),N=A.fastClone({...l,...n}),d=x.getFunctionArguments({builder:e,context:u,event:o,state:N}),f=O(),p=f.global;p.setSync(b,function(r,s){R.set(l,r,s),c==null||c(l)}),d.forEach(([r,s])=>{const j=typeof s=="object"?new _.Reference(r==="builder"?{...s,getUserAttributes:()=>s.getUserAttributes()}:s):null;p.setSync(g(r),j)});const T=h({code:t,args:d}),v=f.evalClosureSync(T);try{return JSON.parse(v)}catch{return v}};exports.runInNode=w;exports.setIvm=C;
48
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;throw new Error(t)};function E(t={memoryLimit:128}){if(y)return y;const e=S(),o=new e.Isolate(t).createContextSync(),n=o.global;return n.setSync("global",n.derefInto()),n.setSync("log",function(...i){console.log(...i)}),n.setSync(I,e),y=o,o}const O=()=>E(),w=({code:t,builder:e,context:u,event:o,localState:n,rootSetState:i,rootState:a})=>{const _=S(),N=A.fastClone({...a,...n}),d=M.getFunctionArguments({builder:e,context:u,event:o,state:N}),f=O(),p=f.global;p.setSync(b,function(r,s){R.set(a,r,s),i==null||i(a)}),d.forEach(([r,s])=>{const j=typeof s=="object"?new _.Reference(r==="builder"?{...s,getUserAttributes:()=>s.getUserAttributes()}:s):null;p.setSync(g(r),j)});const T=x({code:t,args:d}),v=f.evalClosureSync(T);try{return JSON.parse(v)}catch{return v}};exports.runInNode=w;exports.setIvm=C;
@@ -1,6 +1,6 @@
1
- import { SDK_NAME as s } from "../../../constants/sdk-name.mjs";
2
- import { logger as j, MSG_PREFIX as x } from "../../../helpers/logger.mjs";
3
- import { fastClone as R } from "../../fast-clone.mjs";
1
+ import { SDK_NAME as c } from "../../../constants/sdk-name.mjs";
2
+ import { logger as j, MSG_PREFIX as R } from "../../../helpers/logger.mjs";
3
+ import { fastClone as x } from "../../fast-clone.mjs";
4
4
  import { set as k } from "../../set.mjs";
5
5
  import { getFunctionArguments as A } from "../helpers.mjs";
6
6
  import { safeDynamicRequire as h } from "./safeDynamicRequire.mjs";
@@ -51,24 +51,24 @@ if (typeof output === 'object' && output !== null) {
51
51
  }
52
52
  `;
53
53
  };
54
- let a = null, y = null;
54
+ let u = null, y = null;
55
55
  const V = (e, t = {}) => {
56
- a = e, E(t);
57
- }, O = s === "@builder.io/sdk-react-nextjs" || s === "@builder.io/sdk-react" || s === "@builder.io/sdk-qwik" || s === "@builder.io/sdk-vue", g = () => {
56
+ u || (u = e, E(t));
57
+ }, O = c === "@builder.io/sdk-react-nextjs" || c === "@builder.io/sdk-react" || c === "@builder.io/sdk-qwik" || c === "@builder.io/sdk-vue", g = () => {
58
58
  try {
59
- if (a)
60
- return a;
59
+ if (u)
60
+ return u;
61
61
  const t = h("isolated-vm");
62
62
  if (t)
63
63
  return t;
64
64
  } catch (t) {
65
65
  j.error("isolated-vm import error.", t);
66
66
  }
67
- const e = `${x}could not import \`isolated-vm\` module for safe script execution on a Node server.
67
+ const e = `${R}could not import \`isolated-vm\` module for safe script execution on a Node server.
68
68
 
69
69
  SOLUTION: In a server-only execution path within your application, do one of the following:
70
70
 
71
- ${O ? `- import and call \`initializeNodeRuntime()\` from "${s}/node/init".` : ""}
71
+ ${O ? `- import and call \`initializeNodeRuntime()\` from "${c}/node/init".` : ""}
72
72
  - add the following import: \`await import('isolated-vm')\`.
73
73
 
74
74
  For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
@@ -77,22 +77,24 @@ const V = (e, t = {}) => {
77
77
  function E(e = {
78
78
  memoryLimit: 128
79
79
  }) {
80
+ if (y)
81
+ return y;
80
82
  const t = g(), o = new t.Isolate(e).createContextSync(), n = o.global;
81
- return n.setSync("global", n.derefInto()), n.setSync("log", function(...c) {
82
- console.log(...c);
83
+ return n.setSync("global", n.derefInto()), n.setSync("log", function(...s) {
84
+ console.log(...s);
83
85
  }), n.setSync(I, t), y = o, o;
84
86
  }
85
- const $ = () => y || E(), B = ({
87
+ const $ = () => E(), B = ({
86
88
  code: e,
87
89
  builder: t,
88
90
  context: l,
89
91
  event: o,
90
92
  localState: n,
91
- rootSetState: c,
92
- rootState: u
93
+ rootSetState: s,
94
+ rootState: a
93
95
  }) => {
94
- const S = g(), _ = R({
95
- ...u,
96
+ const S = g(), _ = x({
97
+ ...a,
96
98
  ...n
97
99
  }), f = A({
98
100
  builder: t,
@@ -101,7 +103,7 @@ const $ = () => y || E(), B = ({
101
103
  state: _
102
104
  }), m = $(), p = m.global;
103
105
  p.setSync(b, function(r, i) {
104
- k(u, r, i), c == null || c(u);
106
+ k(a, r, i), s == null || s(a);
105
107
  }), f.forEach(([r, i]) => {
106
108
  const N = typeof i == "object" ? new S.Reference(
107
109
  // workaround: methods with default values for arguments is not being cloned over
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.16.19",
4
+ "version": "0.16.20",
5
5
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.16.19";
1
+ export declare const SDK_VERSION = "0.16.20";
@@ -0,0 +1 @@
1
+ export { setIvm } from './node-runtime.js';
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.16.19";
1
+ export declare const SDK_VERSION = "0.16.20";
@@ -0,0 +1 @@
1
+ export { setIvm } from './node-runtime.js';