@builder.io/sdk-react 1.0.23 → 1.0.24
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 +31 -31
- package/lib/browser/blocks-exports.mjs +1036 -820
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-4ca9f249.js → server-entry-85d7f359.js} +1 -1
- package/lib/browser/{server-entry-f69e2b2a.cjs → server-entry-a540d463.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/blocks-59950370.cjs +32 -0
- package/lib/edge/{blocks-93608689.js → blocks-e6873db2.js} +614 -617
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/button-8a6ae666.js +31 -0
- package/lib/edge/button-aff4f652.cjs +1 -0
- package/lib/edge/columns-0768e506.js +163 -0
- package/lib/edge/columns-8dca796d.cjs +28 -0
- package/lib/edge/{content-variants-f416bff5.js → content-variants-c8061bc0.js} +404 -262
- package/lib/edge/content-variants-e79859ac.cjs +134 -0
- package/lib/edge/{form-8526db32.js → form-c3d12c27.js} +3 -3
- package/lib/edge/{form-44ceed15.cjs → form-e6847833.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-e85bf7a3.js → get-class-prop-name-a023381f.js} +2 -1
- package/lib/edge/get-class-prop-name-a966a097.cjs +1 -0
- package/lib/edge/image-764070f8.cjs +17 -0
- package/lib/edge/{image-0008c792.js → image-9d24a962.js} +24 -24
- package/lib/edge/{img-5ef224a8.js → img-03949fec.js} +1 -1
- package/lib/edge/{img-a5802e2b.cjs → img-1431a6ab.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-f1aa0191.cjs → input-f420d17a.cjs} +1 -1
- package/lib/edge/{input-3f85283b.js → input-f611f26d.js} +1 -1
- package/lib/edge/{select-d4c018c0.cjs → select-aadf10db.cjs} +1 -1
- package/lib/edge/{select-4fe889b6.js → select-e056d1d3.js} +1 -1
- package/lib/edge/{server-entry-c4b7844d.cjs → server-entry-95f97e05.cjs} +1 -1
- package/lib/edge/{server-entry-e1e18fd2.js → server-entry-bbf65248.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-97599025.js → slot-2f6f1817.js} +3 -3
- package/lib/edge/{slot-2a11e808.cjs → slot-3ed45869.cjs} +1 -1
- package/lib/edge/{symbol-a90a41a3.js → symbol-853c210f.js} +32 -26
- package/lib/edge/symbol-c9d45cc8.cjs +1 -0
- package/lib/edge/tabs-28d0f021.js +69 -0
- package/lib/edge/tabs-34a12e52.cjs +1 -0
- package/lib/node/blocks-exports.cjs +32 -32
- package/lib/node/blocks-exports.mjs +1141 -925
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{node-runtime-8062cfb8.js → node-runtime-071b85f9.js} +1 -1
- package/lib/node/{node-runtime-11a8cdfe.cjs → node-runtime-41e3da8e.cjs} +1 -1
- package/lib/node/{server-entry-461bfaf9.cjs → server-entry-b5031981.cjs} +1 -1
- package/lib/node/{server-entry-3e54c767.js → server-entry-fd29e8b4.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/blocks/columns/columns.types.d.ts +1 -1
- package/types/blocks/columns/helpers.d.ts +1 -0
- package/types/blocks/tabs/component-info.d.ts +2 -0
- package/types/blocks/tabs/index.d.ts +1 -0
- package/types/blocks/tabs/tabs.d.ts +4 -0
- package/types/blocks/tabs/tabs.types.d.ts +13 -0
- package/types/blocks/text/text.types.d.ts +2 -1
- package/types/components/block/block.helpers.d.ts +2 -0
- package/types/components/content/components/styles.helpers.d.ts +1 -0
- package/types/components/dynamic-div.d.ts +15 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/types/targets.d.ts +1 -1
- package/lib/edge/blocks-5539f58f.cjs +0 -32
- package/lib/edge/button-7e98d8f3.cjs +0 -1
- package/lib/edge/button-8816ab35.js +0 -28
- package/lib/edge/columns-8db639b5.cjs +0 -28
- package/lib/edge/columns-d065e3c4.js +0 -156
- package/lib/edge/content-variants-44d061f2.cjs +0 -134
- package/lib/edge/get-class-prop-name-7b951501.cjs +0 -1
- package/lib/edge/image-ee3dd857.cjs +0 -17
- package/lib/edge/symbol-dbb5c95e.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");require("./server-entry-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");require("./server-entry-95f97e05.cjs");const t=e.lazy(()=>Promise.resolve().then(()=>require("./button-aff4f652.cjs"))),r=e.lazy(()=>Promise.resolve().then(()=>require("./columns-8dca796d.cjs"))),n=e.lazy(()=>Promise.resolve().then(()=>require("./fragment-b6e3a326.cjs"))),s=e.lazy(()=>Promise.resolve().then(()=>require("./image-764070f8.cjs"))),i=e.lazy(()=>Promise.resolve().then(()=>require("./section-d655ea14.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./symbol-c9d45cc8.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./text-e6dbb721.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./video-e20dcbbc.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./blocks-59950370.cjs")).then(o=>o.blocks)),m=e.lazy(()=>Promise.resolve().then(()=>require("./content-variants-e79859ac.cjs"))),y=e.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});exports.Blocks=u;exports.BuilderContext=y;exports.Button=t;exports.Columns=r;exports.Content=m;exports.Fragment=n;exports.Image=s;exports.Section=i;exports.Symbol=l;exports.Text=c;exports.Video=a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { lazy as t, createContext as n } from "react";
|
|
3
|
-
import "./server-entry-
|
|
4
|
-
const i = t(() => import("./button-
|
|
3
|
+
import "./server-entry-bbf65248.js";
|
|
4
|
+
const i = t(() => import("./button-8a6ae666.js")), r = t(() => import("./columns-0768e506.js")), a = t(() => import("./fragment-1492bc7f.js")), c = t(() => import("./image-9d24a962.js")), m = t(() => import("./section-d83e2dd3.js")), p = t(() => import("./symbol-853c210f.js")), l = t(() => import("./text-5915f038.js")), u = t(() => import("./video-58c2cc8d.js")), d = t(() => import("./blocks-e6873db2.js").then((o) => o.blocks)), x = t(() => import("./content-variants-c8061bc0.js")), S = n({
|
|
5
5
|
content: null,
|
|
6
6
|
context: {},
|
|
7
7
|
localState: void 0,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { DynamicRenderer as r } from "./dynamic-renderer-8b343325.js";
|
|
3
|
+
import { getClassPropName as n } from "./get-class-prop-name-a023381f.js";
|
|
4
|
+
import "./server-entry-bbf65248.js";
|
|
5
|
+
function b(t) {
|
|
6
|
+
function e() {
|
|
7
|
+
return {
|
|
8
|
+
...t.attributes,
|
|
9
|
+
[n()]: `${t.link ? "" : "builder-button"} ${t.attributes[n()] || ""}`,
|
|
10
|
+
...t.link ? {
|
|
11
|
+
href: t.link,
|
|
12
|
+
target: t.openLinkInNewTab ? "_blank" : void 0,
|
|
13
|
+
role: "link"
|
|
14
|
+
} : {
|
|
15
|
+
role: "button"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return /* @__PURE__ */ i(
|
|
20
|
+
r,
|
|
21
|
+
{
|
|
22
|
+
attributes: e(),
|
|
23
|
+
TagName: t.link ? t.builderLinkComponent || "a" : "button",
|
|
24
|
+
actionAttributes: {},
|
|
25
|
+
children: t.text
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
b as default
|
|
31
|
+
};
|
|
@@ -0,0 +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-a966a097.cjs");require("./server-entry-95f97e05.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;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { jsxs as y, Fragment as B, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as s } from "react";
|
|
3
|
+
import { InlinedStyles as z, Blocks as A, mapStyleObjToStrIfNeeded as L, getSizesForBreakpoints as W } from "./blocks-e6873db2.js";
|
|
4
|
+
import { DynamicRenderer as N } from "./dynamic-renderer-8b343325.js";
|
|
5
|
+
import { getClassPropName as D } from "./get-class-prop-name-a023381f.js";
|
|
6
|
+
import "./blocks-exports.mjs";
|
|
7
|
+
import "./server-entry-bbf65248.js";
|
|
8
|
+
const F = (e) => `builder-columns ${e}-breakpoints`;
|
|
9
|
+
function J(e) {
|
|
10
|
+
var f, k;
|
|
11
|
+
const [c, T] = s(
|
|
12
|
+
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
13
|
+
), [o, j] = s(() => e.columns || []), [m, I] = s(
|
|
14
|
+
() => e.stackColumnsAt || "tablet"
|
|
15
|
+
);
|
|
16
|
+
function S(t) {
|
|
17
|
+
return t.link ? e.builderLinkComponent || "a" : "div";
|
|
18
|
+
}
|
|
19
|
+
function x(t) {
|
|
20
|
+
var n;
|
|
21
|
+
return ((n = o[t]) == null ? void 0 : n.width) || 100 / o.length;
|
|
22
|
+
}
|
|
23
|
+
function C(t) {
|
|
24
|
+
const n = c * (o.length - 1) / o.length;
|
|
25
|
+
return `calc(${x(t)}% - ${n}px)`;
|
|
26
|
+
}
|
|
27
|
+
function a({
|
|
28
|
+
stackedStyle: t,
|
|
29
|
+
desktopStyle: n
|
|
30
|
+
}) {
|
|
31
|
+
return m === "tablet" ? t : n;
|
|
32
|
+
}
|
|
33
|
+
function u({
|
|
34
|
+
stackedStyle: t,
|
|
35
|
+
desktopStyle: n
|
|
36
|
+
}) {
|
|
37
|
+
return m === "never" ? n : t;
|
|
38
|
+
}
|
|
39
|
+
const [d, P] = s(
|
|
40
|
+
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
41
|
+
);
|
|
42
|
+
function p() {
|
|
43
|
+
return {
|
|
44
|
+
"--flex-dir": d,
|
|
45
|
+
"--flex-dir-tablet": a({
|
|
46
|
+
stackedStyle: d,
|
|
47
|
+
desktopStyle: "row"
|
|
48
|
+
})
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function v(t) {
|
|
52
|
+
const n = t === 0 ? 0 : c, i = C(t), l = `${n}px`, g = "100%", h = 0;
|
|
53
|
+
return {
|
|
54
|
+
...{
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexDirection: "column",
|
|
57
|
+
alignItems: "stretch"
|
|
58
|
+
},
|
|
59
|
+
width: i,
|
|
60
|
+
["marginLeft"]: l,
|
|
61
|
+
"--column-width-mobile": u({
|
|
62
|
+
stackedStyle: g,
|
|
63
|
+
desktopStyle: i
|
|
64
|
+
}),
|
|
65
|
+
"--column-margin-left-mobile": u({
|
|
66
|
+
stackedStyle: h,
|
|
67
|
+
desktopStyle: l
|
|
68
|
+
}),
|
|
69
|
+
"--column-width-tablet": a({
|
|
70
|
+
stackedStyle: g,
|
|
71
|
+
desktopStyle: i
|
|
72
|
+
}),
|
|
73
|
+
"--column-margin-left-tablet": a({
|
|
74
|
+
stackedStyle: h,
|
|
75
|
+
desktopStyle: l
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function b(t) {
|
|
80
|
+
var i, l;
|
|
81
|
+
return W(
|
|
82
|
+
((l = (i = e.builderContext.content) == null ? void 0 : i.meta) == null ? void 0 : l.breakpoints) || {}
|
|
83
|
+
)[t].max;
|
|
84
|
+
}
|
|
85
|
+
function w() {
|
|
86
|
+
return `
|
|
87
|
+
@media (max-width: ${b("medium")}px) {
|
|
88
|
+
.${e.builderBlock.id}-breakpoints {
|
|
89
|
+
flex-direction: var(--flex-dir-tablet);
|
|
90
|
+
align-items: stretch;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
94
|
+
width: var(--column-width-tablet) !important;
|
|
95
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (max-width: ${b("small")}px) {
|
|
100
|
+
.${e.builderBlock.id}-breakpoints {
|
|
101
|
+
flex-direction: var(--flex-dir);
|
|
102
|
+
align-items: stretch;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
106
|
+
width: var(--column-width-mobile) !important;
|
|
107
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
`;
|
|
111
|
+
}
|
|
112
|
+
function $(t, n) {
|
|
113
|
+
return {
|
|
114
|
+
...t.link ? {
|
|
115
|
+
href: t.link
|
|
116
|
+
} : {},
|
|
117
|
+
[D()]: "builder-column",
|
|
118
|
+
style: L(v(n))
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return /* @__PURE__ */ y(B, { children: [
|
|
122
|
+
/* @__PURE__ */ y(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
className: F((f = e.builderBlock) == null ? void 0 : f.id) + " div-00cb97e2",
|
|
126
|
+
style: p(),
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ r(z, { id: "builderio-columns", styles: w() }),
|
|
129
|
+
(k = e.columns) == null ? void 0 : k.map((t, n) => /* @__PURE__ */ r(
|
|
130
|
+
N,
|
|
131
|
+
{
|
|
132
|
+
TagName: S(t),
|
|
133
|
+
actionAttributes: {},
|
|
134
|
+
attributes: $(t, n),
|
|
135
|
+
children: /* @__PURE__ */ r(
|
|
136
|
+
A,
|
|
137
|
+
{
|
|
138
|
+
path: `component.options.columns.${n}.blocks`,
|
|
139
|
+
parent: e.builderBlock.id,
|
|
140
|
+
styleProp: {
|
|
141
|
+
flexGrow: "1"
|
|
142
|
+
},
|
|
143
|
+
context: e.builderContext,
|
|
144
|
+
registeredComponents: e.builderComponents,
|
|
145
|
+
linkComponent: e.builderLinkComponent,
|
|
146
|
+
blocks: t.blocks
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
},
|
|
150
|
+
n
|
|
151
|
+
))
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ r("style", { children: `.div-00cb97e2 {
|
|
156
|
+
display: flex;
|
|
157
|
+
line-height: normal;
|
|
158
|
+
}` })
|
|
159
|
+
] });
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
J as default
|
|
163
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),a=require("./blocks-59950370.cjs"),p=require("./dynamic-renderer-b29b45ca.cjs"),B=require("./get-class-prop-name-a966a097.cjs");require("./blocks-exports.cjs");require("./server-entry-95f97e05.cjs");const q=t=>`builder-columns ${t}-breakpoints`;function z(t){var f,g;const[u,A]=s.useState(()=>typeof t.space=="number"?t.space||0:20),[o,L]=s.useState(()=>t.columns||[]),[d,N]=s.useState(()=>t.stackColumnsAt||"tablet");function y(e){return e.link?t.builderLinkComponent||"a":"div"}function x(e){var n;return((n=o[e])==null?void 0:n.width)||100/o.length}function C(e){const n=u*(o.length-1)/o.length;return`calc(${x(e)}% - ${n}px)`}function c({stackedStyle:e,desktopStyle:n}){return d==="tablet"?e:n}function m({stackedStyle:e,desktopStyle:n}){return d==="never"?n:e}const[b,W]=s.useState(()=>t.stackColumnsAt==="never"?"row":t.reverseColumnsWhenStacked?"column-reverse":"column");function v(){return{"--flex-dir":b,"--flex-dir-tablet":c({stackedStyle:b,desktopStyle:"row"})}}function w(e){const n=e===0?0:u,l=C(e),r=`${n}px`,h="100%",S=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:l,["marginLeft"]:r,"--column-width-mobile":m({stackedStyle:h,desktopStyle:l}),"--column-margin-left-mobile":m({stackedStyle:S,desktopStyle:r}),"--column-width-tablet":c({stackedStyle:h,desktopStyle:l}),"--column-margin-left-tablet":c({stackedStyle:S,desktopStyle:r})}}function k(e){var l,r;return a.getSizesForBreakpoints(((r=(l=t.builderContext.content)==null?void 0:l.meta)==null?void 0:r.breakpoints)||{})[e].max}function $(){return`
|
|
2
|
+
@media (max-width: ${k("medium")}px) {
|
|
3
|
+
.${t.builderBlock.id}-breakpoints {
|
|
4
|
+
flex-direction: var(--flex-dir-tablet);
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.${t.builderBlock.id}-breakpoints > .builder-column {
|
|
9
|
+
width: var(--column-width-tablet) !important;
|
|
10
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (max-width: ${k("small")}px) {
|
|
15
|
+
.${t.builderBlock.id}-breakpoints {
|
|
16
|
+
flex-direction: var(--flex-dir);
|
|
17
|
+
align-items: stretch;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.${t.builderBlock.id}-breakpoints > .builder-column {
|
|
21
|
+
width: var(--column-width-mobile) !important;
|
|
22
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
`}function j(e,n){return{...e.link?{href:e.link}:{},[B.getClassPropName()]:"builder-column",style:a.mapStyleObjToStrIfNeeded(w(n))}}return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:q((f=t.builderBlock)==null?void 0:f.id)+" div-00cb97e2",style:v(),children:[i.jsx(a.InlinedStyles,{id:"builderio-columns",styles:$()}),(g=t.columns)==null?void 0:g.map((e,n)=>i.jsx(p.DynamicRenderer,{TagName:y(e),actionAttributes:{},attributes:j(e,n),children:i.jsx(a.Blocks,{path:`component.options.columns.${n}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent,blocks:e.blocks})},n))]}),i.jsx("style",{children:`.div-00cb97e2 {
|
|
26
|
+
display: flex;
|
|
27
|
+
line-height: normal;
|
|
28
|
+
}`})]})}exports.default=z;
|