@builder.io/sdk-react 1.0.17 → 1.0.19-dev-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.
- package/lib/browser/blocks-exports.cjs +14 -14
- package/lib/browser/blocks-exports.mjs +350 -339
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +22 -21
- package/lib/browser/{server-entry-a7b75909.cjs → server-entry-1a86f409.cjs} +1 -1
- package/lib/browser/{server-entry-064a8b7f.js → server-entry-cfff49d1.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{blocks-fe027bf7.js → blocks-03aafa4f.js} +196 -209
- package/lib/edge/{blocks-1f59d1c0.cjs → blocks-87a3568e.cjs} +9 -9
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +27 -13
- package/lib/edge/{button-8fdd068a.js → button-14d13356.js} +3 -3
- package/lib/edge/{button-36ac5d97.cjs → button-58695538.cjs} +1 -1
- package/lib/edge/{columns-4f789807.js → columns-d2f7e212.js} +48 -47
- package/lib/edge/columns-f98bd830.cjs +28 -0
- package/lib/edge/{content-variants-87f99284.cjs → content-variants-7e661199.cjs} +5 -5
- package/lib/edge/{content-variants-a26825d5.js → content-variants-ad9f707f.js} +75 -75
- package/lib/edge/dynamic-blocks-exports.cjs +2 -0
- package/lib/edge/dynamic-blocks-exports.mjs +4 -1
- package/lib/edge/{dynamic-renderer-b29b45ca.cjs → dynamic-renderer-1c9f24c0.cjs} +1 -1
- package/lib/edge/dynamic-renderer-96ba4e48.js +8 -0
- package/lib/edge/{form-004ab04e.js → form-04cf10db.js} +69 -58
- package/lib/edge/form-e83f7b7a.cjs +1 -0
- package/lib/edge/{get-class-prop-name-ee5eac9d.js → get-class-prop-name-859a7f60.js} +1 -1
- package/lib/edge/{get-class-prop-name-522545c4.cjs → get-class-prop-name-f1301669.cjs} +1 -1
- package/lib/edge/{image-0008c792.js → image-2cc909d9.js} +25 -25
- package/lib/edge/image-7e1361ce.cjs +17 -0
- package/lib/edge/{img-d311451e.cjs → img-0c1e53c0.cjs} +1 -1
- package/lib/edge/{img-5d36c59d.js → img-b4ff1bef.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +22 -21
- package/lib/edge/{input-34a4e538.cjs → input-2103da14.cjs} +1 -1
- package/lib/edge/{input-211240f4.js → input-c6fee09c.js} +1 -1
- package/lib/edge/{select-a425b313.cjs → select-b8ad0a4c.cjs} +1 -1
- package/lib/edge/{select-e592f42a.js → select-f260d051.js} +1 -1
- package/lib/edge/{server-entry-04a076eb.cjs → server-entry-00891f33.cjs} +1 -1
- package/lib/edge/{server-entry-633c4fab.js → server-entry-d46a218d.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-20e9bd0c.js → slot-8fa7f242.js} +7 -6
- package/lib/edge/slot-bb84f342.cjs +1 -0
- package/lib/edge/{symbol-8aa6a69b.js → symbol-324dadc8.js} +2 -2
- package/lib/edge/{symbol-441a42f8.cjs → symbol-636383eb.cjs} +1 -1
- package/lib/edge/video-64014cc4.cjs +1 -0
- package/lib/edge/{video-58c2cc8d.js → video-d02ff89b.js} +15 -15
- package/lib/node/blocks-exports.cjs +32 -72
- package/lib/node/blocks-exports.mjs +902 -1017
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +24 -22
- package/lib/node/init.cjs +1 -0
- package/lib/node/init.mjs +8 -0
- package/lib/node/node-runtime-1ca09d03.js +137 -0
- package/lib/node/node-runtime-56212f7c.cjs +41 -0
- package/lib/node/{server-entry-a2617044.js → server-entry-8c84ddbd.js} +1 -1
- package/lib/node/{server-entry-e66a06c7.cjs → server-entry-ff6fc2b4.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +6 -1
- package/types/blocks/form/component-info.d.ts +2 -0
- package/types/blocks/form/form.d.ts +3 -0
- package/types/blocks/input/component-info.d.ts +2 -0
- package/types/blocks/input/input.d.ts +15 -0
- package/types/blocks/select/component-info.d.ts +2 -0
- package/types/blocks/select/select.d.ts +16 -0
- package/types/blocks/submit-button/component-info.d.ts +2 -0
- package/types/blocks/submit-button/submit-button.d.ts +10 -0
- package/types/components/content/components/context-updater.d.ts +5 -0
- package/types/components/dynamic-renderer.d.ts +3 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/index.d.ts +1 -0
- package/types/functions/evaluate/node-runtime/init.d.ts +2 -0
- package/types/functions/evaluate/node-runtime/node-runtime.d.ts +1 -0
- package/types/functions/get-react-native-block-styles.d.ts +15 -0
- package/types/functions/sanitize-react-native-block-styles.d.ts +3 -0
- package/types/functions/sanitize-rn-allowed-css.d.ts +8 -0
- package/types/index-helpers/blocks-exports.d.ts +4 -0
- package/types/node-runtime/index.d.ts +1 -0
- package/types/node-runtime/node-runtime.d.ts +9 -0
- package/types/node-runtime.d.ts +1 -0
- package/lib/edge/columns-36bdc015.cjs +0 -28
- package/lib/edge/dynamic-renderer-8b343325.js +0 -8
- package/lib/edge/form-6b599bb9.cjs +0 -1
- package/lib/edge/image-ee3dd857.cjs +0 -17
- package/lib/edge/slot-1547b467.cjs +0 -1
- package/lib/edge/video-e20dcbbc.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),o=require("react"),b=require("./blocks-exports.cjs"),f=require("./get-class-prop-name-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),o=require("react"),b=require("./blocks-exports.cjs"),f=require("./get-class-prop-name-f1301669.cjs"),s=require("./server-entry-00891f33.cjs"),v=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return s.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(i=>{s.logger.error("Could not fetch symbol content: ",i)})};function C(e){var r,c,a,d;function t(){var n,l;return[e.attributes[f.getClassPropName()],"builder-symbol",(n=e.symbol)!=null&&n.inline?"builder-inline-symbol":void 0,(l=e.symbol)!=null&&l.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[i,m]=o.useState(()=>{var n;return(n=e.symbol)==null?void 0:n.content});function y(){i||v({symbol:e.symbol,builderContextValue:e.builderContext}).then(n=>{n&&m(n)})}return o.useEffect(()=>{},[]),o.useEffect(()=>{y()},[e.symbol]),u.jsx("div",{...e.attributes,className:t(),children:u.jsx(b.Content,{isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(c=e.symbol)==null?void 0:c.data,...e.builderContext.localState,...(a=i==null?void 0:i.data)==null?void 0:a.state},model:(d=e.symbol)==null?void 0:d.model,content:i,linkComponent:e.builderLinkComponent,blocksWrapper:"div",contentWrapper:"div"})})}exports.default=C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");function s(e){var i,n,l,d,o,u,r;function a(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function c(){return{...a()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...c(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:t.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((l=(n=e.builderBlock)==null?void 0:n.children)!=null&&l.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(o=(d=e.builderBlock)==null?void 0:d.children)!=null&&o.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(r=(u=e.builderBlock)==null?void 0:u.children)!=null&&r.length&&!e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}exports.default=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
function
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
import { jsxs as s, jsx as t, Fragment as i } from "react/jsx-runtime";
|
|
2
|
+
function y(e) {
|
|
3
|
+
var l, n, d, o, u, a, c;
|
|
4
|
+
function r() {
|
|
5
5
|
return {
|
|
6
6
|
...e.autoPlay === !0 ? {
|
|
7
7
|
autoPlay: !0
|
|
@@ -20,9 +20,9 @@ function f(e) {
|
|
|
20
20
|
} : {}
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function h() {
|
|
24
24
|
return {
|
|
25
|
-
...
|
|
25
|
+
...r()
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
return /* @__PURE__ */ s(
|
|
@@ -36,12 +36,12 @@ function f(e) {
|
|
|
36
36
|
"video",
|
|
37
37
|
{
|
|
38
38
|
className: "builder-video",
|
|
39
|
-
...
|
|
39
|
+
...h(),
|
|
40
40
|
preload: e.preload || "metadata",
|
|
41
41
|
style: {
|
|
42
42
|
width: "100%",
|
|
43
43
|
height: "100%",
|
|
44
|
-
...(
|
|
44
|
+
...(l = e.attributes) == null ? void 0 : l.style,
|
|
45
45
|
objectFit: e.fit,
|
|
46
46
|
objectPosition: e.position,
|
|
47
47
|
// Hack to get object fit to work as expected and
|
|
@@ -57,7 +57,7 @@ function f(e) {
|
|
|
57
57
|
children: e.lazyLoad ? null : /* @__PURE__ */ t("source", { type: "video/mp4", src: e.video })
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
e.aspectRatio && !(e.fitContent && ((
|
|
60
|
+
e.aspectRatio && !(e.fitContent && ((d = (n = e.builderBlock) == null ? void 0 : n.children) != null && d.length)) ? /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
style: {
|
|
@@ -67,8 +67,8 @@ function f(e) {
|
|
|
67
67
|
fontSize: "0px"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
) : null,
|
|
71
|
-
(
|
|
70
|
+
) }) : null,
|
|
71
|
+
(u = (o = e.builderBlock) == null ? void 0 : o.children) != null && u.length && e.fitContent ? /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
74
|
style: {
|
|
@@ -78,8 +78,8 @@ function f(e) {
|
|
|
78
78
|
},
|
|
79
79
|
children: e.children
|
|
80
80
|
}
|
|
81
|
-
) : null,
|
|
82
|
-
(
|
|
81
|
+
) }) : null,
|
|
82
|
+
(c = (a = e.builderBlock) == null ? void 0 : a.children) != null && c.length && !e.fitContent ? /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
85
|
style: {
|
|
@@ -95,11 +95,11 @@ function f(e) {
|
|
|
95
95
|
},
|
|
96
96
|
children: e.children
|
|
97
97
|
}
|
|
98
|
-
) : null
|
|
98
|
+
) }) : null
|
|
99
99
|
]
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
export {
|
|
104
|
-
|
|
104
|
+
y as default
|
|
105
105
|
};
|