@builder.io/sdk-react 3.0.2 → 3.0.3-0

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 (88) hide show
  1. package/lib/browser/blocks-exports.cjs +169 -32
  2. package/lib/browser/blocks-exports.mjs +1297 -887
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +17 -16
  5. package/lib/browser/server-entry-c7bda8b5.cjs +2 -0
  6. package/lib/browser/{server-entry-a2495a20.js → server-entry-da1754bd.js} +279 -237
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/accordion-388f5e60.cjs +1 -0
  10. package/lib/edge/{accordion-c020e15b.js → accordion-50de133c.js} +17 -16
  11. package/lib/edge/{blocks-27ac5b23.js → blocks-5e476ddc.js} +4 -4
  12. package/lib/edge/{blocks-cd946d16.cjs → blocks-a5193d52.cjs} +8 -8
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +13 -12
  15. package/lib/edge/{button-5cdb4f26.js → button-4261ae64.js} +2 -2
  16. package/lib/edge/{button-8572fca5.cjs → button-c6ec3aea.cjs} +1 -1
  17. package/lib/edge/{columns-3ac1fa96.js → columns-28e9fb0a.js} +12 -12
  18. package/lib/edge/{columns-c8a9cb89.cjs → columns-8c831c02.cjs} +2 -2
  19. package/lib/edge/{content-variants-23c8eec6.js → content-variants-36ca4fe5.js} +165 -124
  20. package/lib/edge/content-variants-81713434.cjs +134 -0
  21. package/lib/edge/{custom-code-6d9730ff.cjs → custom-code-8119ea3f.cjs} +1 -1
  22. package/lib/edge/dynamic-blocks-exports.cjs +3 -1
  23. package/lib/edge/dynamic-blocks-exports.mjs +5 -2
  24. package/lib/edge/{form-7fc5691b.js → form-039fb5ff.js} +13 -13
  25. package/lib/edge/{form-3d9bf265.cjs → form-e7a1dec9.cjs} +1 -1
  26. package/lib/edge/{get-class-prop-name-a4845b04.js → get-class-prop-name-65d6824c.js} +1 -1
  27. package/lib/edge/{get-class-prop-name-29fd576a.cjs → get-class-prop-name-a86a3e60.cjs} +1 -1
  28. package/lib/edge/{image-5c9e156f.js → image-2a2b26d2.js} +6 -6
  29. package/lib/edge/{image-94922c87.cjs → image-4db81d72.cjs} +3 -3
  30. package/lib/edge/{img-388698cb.js → img-61d29fb3.js} +1 -1
  31. package/lib/edge/{img-102acaa2.cjs → img-7de3a3de.cjs} +1 -1
  32. package/lib/edge/index.cjs +1 -1
  33. package/lib/edge/index.mjs +18 -17
  34. package/lib/edge/{input-10e350a9.cjs → input-bd5387a6.cjs} +1 -1
  35. package/lib/edge/{input-5484e9e7.js → input-c8539054.js} +1 -1
  36. package/lib/edge/personalization-container-3fda6014.cjs +138 -0
  37. package/lib/edge/personalization-container-c76e4fef.js +379 -0
  38. package/lib/edge/{select-b8406bcf.js → select-6b5cda00.js} +1 -1
  39. package/lib/edge/{select-f11be7a7.cjs → select-73accaf4.cjs} +1 -1
  40. package/lib/edge/{server-entry-7ce03a4e.js → server-entry-838c1f06.js} +322 -280
  41. package/lib/edge/server-entry-ea2a8b0e.cjs +2 -0
  42. package/lib/edge/server-entry.cjs +1 -1
  43. package/lib/edge/server-entry.mjs +1 -1
  44. package/lib/edge/{slot-4ab390ec.cjs → slot-099112f1.cjs} +1 -1
  45. package/lib/edge/{slot-23f75377.js → slot-403c77da.js} +3 -3
  46. package/lib/edge/{symbol-2eafb4e0.js → symbol-97f456f4.js} +2 -2
  47. package/lib/edge/{symbol-fa343d77.cjs → symbol-ffa6e6cd.cjs} +1 -1
  48. package/lib/edge/{tabs-4c9c64f6.js → tabs-a7c94ead.js} +3 -3
  49. package/lib/edge/{tabs-7d258d82.cjs → tabs-ad55c6a7.cjs} +1 -1
  50. package/lib/node/blocks-exports.cjs +168 -31
  51. package/lib/node/blocks-exports.mjs +1403 -993
  52. package/lib/node/index.cjs +1 -1
  53. package/lib/node/index.mjs +17 -16
  54. package/lib/node/init.cjs +1 -1
  55. package/lib/node/init.mjs +3 -3
  56. package/lib/node/{server-entry-2b263dde.js → server-entry-51bc0b1d.js} +279 -237
  57. package/lib/node/server-entry-d7316893.cjs +2 -0
  58. package/lib/node/server-entry.cjs +1 -1
  59. package/lib/node/server-entry.mjs +1 -1
  60. package/lib/node/{setIvm-7eb67cd6.js → setIvm-575cf1f1.js} +1 -1
  61. package/lib/node/{setIvm-1e6f0b60.cjs → setIvm-d912cf4d.cjs} +1 -1
  62. package/lib/node/setIvm.cjs +1 -1
  63. package/lib/node/setIvm.mjs +2 -2
  64. package/lib/node/{should-force-browser-runtime-in-node-23218b19.cjs → should-force-browser-runtime-in-node-23225980.cjs} +1 -1
  65. package/lib/node/{should-force-browser-runtime-in-node-cdae9360.js → should-force-browser-runtime-in-node-66df4856.js} +1 -1
  66. package/package.json +1 -1
  67. package/types/blocks/index.d.ts +4 -0
  68. package/types/blocks/personalization-container/component-info.d.ts +2 -0
  69. package/types/blocks/personalization-container/helpers/index.d.ts +15 -0
  70. package/types/blocks/personalization-container/helpers/inlined-fns.d.ts +8 -0
  71. package/types/blocks/personalization-container/helpers.d.ts +27 -0
  72. package/types/blocks/personalization-container/index.d.ts +1 -0
  73. package/types/blocks/personalization-container/personalization-container.d.ts +4 -0
  74. package/types/blocks/personalization-container/personalization-container.types.d.ts +14 -0
  75. package/types/blocks/textarea/component-info.d.ts +2 -0
  76. package/types/blocks/textarea/index.d.ts +1 -0
  77. package/types/blocks/textarea/textarea.d.ts +14 -0
  78. package/types/constants/sdk-version.d.ts +1 -1
  79. package/types/functions/filter-with-custom-targeting.d.ts +15 -0
  80. package/types/helpers/user-attributes.d.ts +17 -0
  81. package/types/index-helpers/blocks-exports.d.ts +1 -0
  82. package/types/types/builder-content.d.ts +1 -0
  83. package/types/types/input.d.ts +11 -0
  84. package/lib/browser/server-entry-75ce8600.cjs +0 -2
  85. package/lib/edge/accordion-1c16f65e.cjs +0 -1
  86. package/lib/edge/content-variants-caa23bf7.cjs +0 -134
  87. package/lib/edge/server-entry-1879cbc4.cjs +0 -2
  88. package/lib/node/server-entry-ec330556.cjs +0 -2
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { DynamicRenderer as r } from "./dynamic-renderer-8b343325.js";
3
- import { getClassPropName as n } from "./get-class-prop-name-a4845b04.js";
4
- import "./server-entry-7ce03a4e.js";
3
+ import { getClassPropName as n } from "./get-class-prop-name-65d6824c.js";
4
+ import "./server-entry-838c1f06.js";
5
5
  function b(t) {
6
6
  function e() {
7
7
  return {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("./dynamic-renderer-b29b45ca.cjs"),t=require("./get-class-prop-name-29fd576a.cjs");require("./server-entry-1879cbc4.cjs");function u(e){function n(){return{...e.attributes,[t.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[t.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return i.jsx(r.DynamicRenderer,{attributes:n(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}exports.default=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("./dynamic-renderer-b29b45ca.cjs"),t=require("./get-class-prop-name-a86a3e60.cjs");require("./server-entry-ea2a8b0e.cjs");function u(e){function n(){return{...e.attributes,[t.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[t.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return i.jsx(r.DynamicRenderer,{attributes:n(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}exports.default=u;
@@ -1,14 +1,14 @@
1
1
  import { jsxs as h, Fragment as $, jsx as r } from "react/jsx-runtime";
2
- import { InlinedStyles as B, Blocks as L, mapStyleObjToStrIfNeeded as W, getSizesForBreakpoints as z } from "./blocks-27ac5b23.js";
2
+ import { InlinedStyles as B, Blocks as L, mapStyleObjToStrIfNeeded as W, getSizesForBreakpoints as z } from "./blocks-5e476ddc.js";
3
3
  import { DynamicRenderer as A } from "./dynamic-renderer-8b343325.js";
4
- import { getClassPropName as N } from "./get-class-prop-name-a4845b04.js";
4
+ import { getClassPropName as N } from "./get-class-prop-name-65d6824c.js";
5
5
  import "react";
6
6
  import "./blocks-exports.mjs";
7
- import "./server-entry-7ce03a4e.js";
7
+ import "./server-entry-838c1f06.js";
8
8
  const D = (e) => `builder-columns ${e}-breakpoints`;
9
9
  function O(e) {
10
10
  var b, f;
11
- function c() {
11
+ function a() {
12
12
  return typeof e.space == "number" ? e.space || 0 : 20;
13
13
  }
14
14
  function o() {
@@ -25,10 +25,10 @@ function O(e) {
25
25
  return ((n = o()[t]) == null ? void 0 : n.width) || 100 / o().length;
26
26
  }
27
27
  function x(t) {
28
- const n = S(t), i = c() * (o().length - 1) * (n / 100);
28
+ const n = S(t), i = a() * (o().length - 1) * (n / 100);
29
29
  return `calc(${n}% - ${i}px)`;
30
30
  }
31
- function a({
31
+ function c({
32
32
  stackedStyle: t,
33
33
  desktopStyle: n
34
34
  }) {
@@ -46,14 +46,14 @@ function O(e) {
46
46
  function C() {
47
47
  return {
48
48
  "--flex-dir": u(),
49
- "--flex-dir-tablet": a({
49
+ "--flex-dir-tablet": c({
50
50
  stackedStyle: u(),
51
51
  desktopStyle: "row"
52
52
  })
53
53
  };
54
54
  }
55
55
  function v(t) {
56
- const n = t === 0 ? 0 : c(), i = x(t), l = `${n}px`, k = "100%", g = 0;
56
+ const n = t === 0 ? 0 : a(), i = x(t), l = `${n}px`, k = "100%", g = 0;
57
57
  return {
58
58
  ...{
59
59
  display: "flex",
@@ -70,11 +70,11 @@ function O(e) {
70
70
  stackedStyle: g,
71
71
  desktopStyle: l
72
72
  }),
73
- "--column-width-tablet": a({
73
+ "--column-width-tablet": c({
74
74
  stackedStyle: k,
75
75
  desktopStyle: i
76
76
  }),
77
- "--column-margin-left-tablet": a({
77
+ "--column-margin-left-tablet": c({
78
78
  stackedStyle: g,
79
79
  desktopStyle: l
80
80
  })
@@ -127,7 +127,7 @@ function O(e) {
127
127
  /* @__PURE__ */ h(
128
128
  "div",
129
129
  {
130
- className: D((b = e.builderBlock) == null ? void 0 : b.id) + " div-49f40bae",
130
+ className: D((b = e.builderBlock) == null ? void 0 : b.id) + " div-d55bdf5c",
131
131
  style: C(),
132
132
  children: [
133
133
  /* @__PURE__ */ r(
@@ -164,7 +164,7 @@ function O(e) {
164
164
  ]
165
165
  }
166
166
  ),
167
- /* @__PURE__ */ r("style", { children: `.div-49f40bae {
167
+ /* @__PURE__ */ r("style", { children: `.div-d55bdf5c {
168
168
  display: flex;
169
169
  line-height: normal;
170
170
  }` })
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("./blocks-cd946d16.cjs"),j=require("./dynamic-renderer-b29b45ca.cjs"),B=require("./get-class-prop-name-29fd576a.cjs");require("react");require("./blocks-exports.cjs");require("./server-entry-1879cbc4.cjs");const q=t=>`builder-columns ${t}-breakpoints`;function p(t){var f,k;function a(){return typeof t.space=="number"?t.space||0:20}function s(){return t.columns||[]}function u(){return t.stackColumnsAt||"tablet"}function y(e){return e.link?t.builderLinkComponent||"a":"div"}function x(e){var n;return((n=s()[e])==null?void 0:n.width)||100/s().length}function S(e){const n=x(e),i=a()*(s().length-1)*(n/100);return`calc(${n}% - ${i}px)`}function c({stackedStyle:e,desktopStyle:n}){return u()==="tablet"?e:n}function d({stackedStyle:e,desktopStyle:n}){return u()==="never"?n:e}function m(){return t.stackColumnsAt==="never"?"row":t.reverseColumnsWhenStacked?"column-reverse":"column"}function C(){return{"--flex-dir":m(),"--flex-dir-tablet":c({stackedStyle:m(),desktopStyle:"row"})}}function v(e){const n=e===0?0:a(),i=S(e),r=`${n}px`,g="100%",h=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:i,["marginLeft"]:r,"--column-width-mobile":d({stackedStyle:g,desktopStyle:i}),"--column-margin-left-mobile":d({stackedStyle:h,desktopStyle:r}),"--column-width-tablet":c({stackedStyle:g,desktopStyle:i}),"--column-margin-left-tablet":c({stackedStyle:h,desktopStyle:r})}}function b(e){var i,r;return o.getSizesForBreakpoints(((r=(i=t.builderContext.content)==null?void 0:i.meta)==null?void 0:r.breakpoints)||{})[e].max}function w(){const e=`.${t.builderBlock.id}-breakpoints > .builder-column`;return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("./blocks-a5193d52.cjs"),j=require("./dynamic-renderer-b29b45ca.cjs"),B=require("./get-class-prop-name-a86a3e60.cjs");require("react");require("./blocks-exports.cjs");require("./server-entry-ea2a8b0e.cjs");const q=t=>`builder-columns ${t}-breakpoints`;function p(t){var f,k;function a(){return typeof t.space=="number"?t.space||0:20}function s(){return t.columns||[]}function u(){return t.stackColumnsAt||"tablet"}function y(e){return e.link?t.builderLinkComponent||"a":"div"}function x(e){var n;return((n=s()[e])==null?void 0:n.width)||100/s().length}function S(e){const n=x(e),i=a()*(s().length-1)*(n/100);return`calc(${n}% - ${i}px)`}function c({stackedStyle:e,desktopStyle:n}){return u()==="tablet"?e:n}function d({stackedStyle:e,desktopStyle:n}){return u()==="never"?n:e}function m(){return t.stackColumnsAt==="never"?"row":t.reverseColumnsWhenStacked?"column-reverse":"column"}function C(){return{"--flex-dir":m(),"--flex-dir-tablet":c({stackedStyle:m(),desktopStyle:"row"})}}function v(e){const n=e===0?0:a(),i=S(e),r=`${n}px`,g="100%",h=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:i,["marginLeft"]:r,"--column-width-mobile":d({stackedStyle:g,desktopStyle:i}),"--column-margin-left-mobile":d({stackedStyle:h,desktopStyle:r}),"--column-width-tablet":c({stackedStyle:g,desktopStyle:i}),"--column-margin-left-tablet":c({stackedStyle:h,desktopStyle:r})}}function b(e){var i,r;return o.getSizesForBreakpoints(((r=(i=t.builderContext.content)==null?void 0:i.meta)==null?void 0:r.breakpoints)||{})[e].max}function w(){const e=`.${t.builderBlock.id}-breakpoints > .builder-column`;return`
2
2
  @media (max-width: ${b("medium")}px) {
3
3
  .${t.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 $(e,n){return{...e.link?{href:e.link}:{},[B.getClassPropName()]:"builder-column",style:o.mapStyleObjToStrIfNeeded(v(n))}}return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:q((f=t.builderBlock)==null?void 0:f.id)+" div-49f40bae",style:C(),children:[l.jsx(o.InlinedStyles,{id:"builderio-columns",styles:w(),nonce:t.builderContext.nonce}),(k=t.columns)==null?void 0:k.map((e,n)=>l.jsx(j.DynamicRenderer,{TagName:y(e),actionAttributes:{},attributes:$(e,n),children:l.jsx(o.Blocks,{path:`columns.${n}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent,blocks:e.blocks})},n))]}),l.jsx("style",{children:`.div-49f40bae {
25
+ `}function $(e,n){return{...e.link?{href:e.link}:{},[B.getClassPropName()]:"builder-column",style:o.mapStyleObjToStrIfNeeded(v(n))}}return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:q((f=t.builderBlock)==null?void 0:f.id)+" div-d55bdf5c",style:C(),children:[l.jsx(o.InlinedStyles,{id:"builderio-columns",styles:w(),nonce:t.builderContext.nonce}),(k=t.columns)==null?void 0:k.map((e,n)=>l.jsx(j.DynamicRenderer,{TagName:y(e),actionAttributes:{},attributes:$(e,n),children:l.jsx(o.Blocks,{path:`columns.${n}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent,blocks:e.blocks})},n))]}),l.jsx("style",{children:`.div-d55bdf5c {
26
26
  display: flex;
27
27
  line-height: normal;
28
28
  }`})]})}exports.default=p;