@builder.io/sdk-react 3.0.3 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +169 -32
- package/lib/browser/blocks-exports.mjs +1286 -884
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +17 -16
- package/lib/browser/server-entry-a1c64831.cjs +2 -0
- package/lib/browser/{server-entry-c904f136.js → server-entry-df5e89e5.js} +279 -237
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-c786f197.js → accordion-289f3464.js} +1 -1
- package/lib/edge/{accordion-032726a7.cjs → accordion-fbfb71f4.cjs} +1 -1
- package/lib/edge/{blocks-827b0a87.cjs → blocks-459a090b.cjs} +11 -11
- package/lib/edge/{blocks-105e50e5.js → blocks-582a7fd7.js} +87 -88
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +13 -12
- package/lib/edge/{button-f0e0ea72.js → button-9b112da6.js} +2 -2
- package/lib/edge/{button-5cbfe22c.cjs → button-da357144.cjs} +1 -1
- package/lib/edge/{columns-d07da61d.cjs → columns-a211113f.cjs} +2 -2
- package/lib/edge/{columns-9e187314.js → columns-aba58dda.js} +18 -18
- package/lib/edge/{content-variants-59dc0824.js → content-variants-08f4371c.js} +165 -124
- package/lib/edge/content-variants-4b5899b5.cjs +134 -0
- package/lib/edge/dynamic-blocks-exports.cjs +3 -1
- package/lib/edge/dynamic-blocks-exports.mjs +5 -2
- package/lib/edge/form-4d4553c2.js +166 -0
- package/lib/edge/form-e3a3afd4.cjs +1 -0
- package/lib/edge/{get-class-prop-name-6b143ec7.js → get-class-prop-name-38c2baca.js} +1 -1
- package/lib/edge/{get-class-prop-name-8fb0e5ad.cjs → get-class-prop-name-fbe244e3.cjs} +1 -1
- package/lib/edge/{image-2a2b26d2.js → image-38917f45.js} +22 -24
- package/lib/edge/image-590e36ae.cjs +17 -0
- package/lib/edge/{img-72bf9d21.cjs → img-8d549af8.cjs} +1 -1
- package/lib/edge/{img-2c4c6b78.js → img-c49066fa.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +18 -17
- package/lib/edge/{input-6eca8427.cjs → input-1ae3842f.cjs} +1 -1
- package/lib/edge/{input-752f3ce9.js → input-e7301f4e.js} +1 -1
- package/lib/edge/personalization-container-035be6ba.js +384 -0
- package/lib/edge/personalization-container-25cd8b5e.cjs +138 -0
- package/lib/edge/{select-a1d6e80e.js → select-4187b229.js} +1 -1
- package/lib/edge/{select-49a73a0b.cjs → select-64fdaa79.cjs} +1 -1
- package/lib/edge/server-entry-2ef4e66a.cjs +2 -0
- package/lib/edge/{server-entry-35f12729.js → server-entry-61fca4f7.js} +322 -280
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-2327e009.cjs → slot-995f63c2.cjs} +1 -1
- package/lib/edge/{slot-b9bcbd41.js → slot-d6c46a42.js} +3 -3
- package/lib/edge/{symbol-3527699b.cjs → symbol-498daa97.cjs} +1 -1
- package/lib/edge/{symbol-33e7736f.js → symbol-623dc717.js} +2 -2
- package/lib/edge/{tabs-bc422e4c.js → tabs-12ba41b1.js} +3 -3
- package/lib/edge/{tabs-2df0eaa2.cjs → tabs-d39499cd.cjs} +1 -1
- package/lib/edge/video-4ecfd08b.cjs +1 -0
- package/lib/edge/{video-58c2cc8d.js → video-a3f10439.js} +0 -1
- package/lib/node/blocks-exports.cjs +170 -33
- package/lib/node/blocks-exports.mjs +1372 -970
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +17 -16
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-d1ed35c5.js → server-entry-27d9d31e.js} +279 -237
- package/lib/node/server-entry-98ebff74.cjs +2 -0
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-6675714a.js → setIvm-2dde9074.js} +1 -1
- package/lib/node/{setIvm-e4deba11.cjs → setIvm-784fe19f.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-75b2b3a0.js → should-force-browser-runtime-in-node-80f081c8.js} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-03adae17.cjs → should-force-browser-runtime-in-node-cd6baa94.cjs} +1 -1
- package/package.json +2 -2
- package/types/blocks/form/form/form.d.ts +1 -0
- package/types/blocks/personalization-container/component-info.d.ts +2 -0
- package/types/blocks/personalization-container/helpers/inlined-fns.d.ts +8 -0
- package/types/blocks/personalization-container/helpers.d.ts +27 -0
- package/types/blocks/personalization-container/index.d.ts +1 -0
- package/types/blocks/personalization-container/personalization-container.d.ts +4 -0
- package/types/blocks/personalization-container/personalization-container.types.d.ts +14 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/helpers/user-attributes.d.ts +17 -0
- package/types/index-helpers/blocks-exports.d.ts +1 -0
- package/types/types/components.d.ts +2 -2
- package/types/types/input.d.ts +1 -0
- package/lib/browser/server-entry-5eafc5bd.cjs +0 -2
- package/lib/edge/content-variants-0db90715.cjs +0 -134
- package/lib/edge/form-79639135.cjs +0 -1
- package/lib/edge/form-7a7b98cf.js +0 -176
- package/lib/edge/image-4db81d72.cjs +0 -17
- package/lib/edge/server-entry-6b2058e2.cjs +0 -2
- package/lib/edge/video-e20dcbbc.cjs +0 -1
- package/lib/node/server-entry-606ce65a.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-
|
|
4
|
-
import "./server-entry-
|
|
3
|
+
import { getClassPropName as n } from "./get-class-prop-name-38c2baca.js";
|
|
4
|
+
import "./server-entry-61fca4f7.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-
|
|
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-fbe244e3.cjs");require("./server-entry-2ef4e66a.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,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("./blocks-459a090b.cjs"),j=require("./dynamic-renderer-b29b45ca.cjs"),B=require("./get-class-prop-name-fbe244e3.cjs");require("react");require("./blocks-exports.cjs");require("./server-entry-2ef4e66a.cjs");const q=t=>`builder-columns ${t}-breakpoints`;function p(t){var f,k;function c(){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=c()*(s().length-1)*(n/100);return`calc(${n}% - ${i}px)`}function a({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":a({stackedStyle:m(),desktopStyle:"row"})}}function v(e){const n=e===0?0:c(),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":a({stackedStyle:g,desktopStyle:i}),"--column-margin-left-tablet":a({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-
|
|
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-a6f3faac",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,context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent,blocks:e.blocks,styleProp:{flexGrow:"1"}})},n))]}),l.jsx("style",{children:`.div-a6f3faac {
|
|
26
26
|
display: flex;
|
|
27
27
|
line-height: normal;
|
|
28
28
|
}`})]})}exports.default=p;
|
|
@@ -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-
|
|
2
|
+
import { InlinedStyles as B, Blocks as L, mapStyleObjToStrIfNeeded as W, getSizesForBreakpoints as z } from "./blocks-582a7fd7.js";
|
|
3
3
|
import { DynamicRenderer as A } from "./dynamic-renderer-8b343325.js";
|
|
4
|
-
import { getClassPropName as N } from "./get-class-prop-name-
|
|
4
|
+
import { getClassPropName as N } from "./get-class-prop-name-38c2baca.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./blocks-exports.mjs";
|
|
7
|
-
import "./server-entry-
|
|
7
|
+
import "./server-entry-61fca4f7.js";
|
|
8
8
|
const D = (e) => `builder-columns ${e}-breakpoints`;
|
|
9
9
|
function O(e) {
|
|
10
|
-
var
|
|
11
|
-
function
|
|
10
|
+
var f, b;
|
|
11
|
+
function c() {
|
|
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 =
|
|
28
|
+
const n = S(t), i = c() * (o().length - 1) * (n / 100);
|
|
29
29
|
return `calc(${n}% - ${i}px)`;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function a({
|
|
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":
|
|
49
|
+
"--flex-dir-tablet": a({
|
|
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 :
|
|
56
|
+
const n = t === 0 ? 0 : c(), 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":
|
|
73
|
+
"--column-width-tablet": a({
|
|
74
74
|
stackedStyle: k,
|
|
75
75
|
desktopStyle: i
|
|
76
76
|
}),
|
|
77
|
-
"--column-margin-left-tablet":
|
|
77
|
+
"--column-margin-left-tablet": a({
|
|
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((
|
|
130
|
+
className: D((f = e.builderBlock) == null ? void 0 : f.id) + " div-a6f3faac",
|
|
131
131
|
style: C(),
|
|
132
132
|
children: [
|
|
133
133
|
/* @__PURE__ */ r(
|
|
@@ -138,7 +138,7 @@ function O(e) {
|
|
|
138
138
|
nonce: e.builderContext.nonce
|
|
139
139
|
}
|
|
140
140
|
),
|
|
141
|
-
(
|
|
141
|
+
(b = e.columns) == null ? void 0 : b.map((t, n) => /* @__PURE__ */ r(
|
|
142
142
|
A,
|
|
143
143
|
{
|
|
144
144
|
TagName: y(t),
|
|
@@ -149,13 +149,13 @@ function O(e) {
|
|
|
149
149
|
{
|
|
150
150
|
path: `columns.${n}.blocks`,
|
|
151
151
|
parent: e.builderBlock.id,
|
|
152
|
-
styleProp: {
|
|
153
|
-
flexGrow: "1"
|
|
154
|
-
},
|
|
155
152
|
context: e.builderContext,
|
|
156
153
|
registeredComponents: e.builderComponents,
|
|
157
154
|
linkComponent: e.builderLinkComponent,
|
|
158
|
-
blocks: t.blocks
|
|
155
|
+
blocks: t.blocks,
|
|
156
|
+
styleProp: {
|
|
157
|
+
flexGrow: "1"
|
|
158
|
+
}
|
|
159
159
|
}
|
|
160
160
|
)
|
|
161
161
|
},
|
|
@@ -164,7 +164,7 @@ function O(e) {
|
|
|
164
164
|
]
|
|
165
165
|
}
|
|
166
166
|
),
|
|
167
|
-
/* @__PURE__ */ r("style", { children: `.div-
|
|
167
|
+
/* @__PURE__ */ r("style", { children: `.div-a6f3faac {
|
|
168
168
|
display: flex;
|
|
169
169
|
line-height: normal;
|
|
170
170
|
}` })
|