@builder.io/sdk-react 2.0.0 → 2.0.2
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 +17 -17
- package/lib/browser/blocks-exports.mjs +268 -227
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +1 -1
- package/lib/browser/{server-entry-e0454364.cjs → server-entry-419c051e.cjs} +1 -1
- package/lib/browser/{server-entry-709e09e3.js → server-entry-825b4408.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-12c2d408.cjs → accordion-4f96554c.cjs} +1 -1
- package/lib/edge/{accordion-bd80745a.js → accordion-ca081054.js} +1 -1
- package/lib/edge/{blocks-ac8970f1.cjs → blocks-078044bc.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +4 -3
- package/lib/edge/{blocks-6d6258ba.js → blocks-f55c7d3e.js} +12 -4
- package/lib/edge/{button-4e842584.js → button-41169061.js} +2 -2
- package/lib/edge/{button-c2e45e64.cjs → button-5d140f8e.cjs} +1 -1
- package/lib/edge/columns-354bf349.cjs +28 -0
- package/lib/edge/{columns-a51238cc.js → columns-f8916a18.js} +53 -46
- package/lib/edge/{content-variants-f3c6baad.js → content-variants-71ee0c76.js} +239 -217
- package/lib/edge/{content-variants-3fe9b1c0.cjs → content-variants-89a9389a.cjs} +8 -8
- package/lib/edge/{form-00c8cc55.js → form-ac2f2a0e.js} +3 -3
- package/lib/edge/{form-b4cdf7cd.cjs → form-f2d2c2bf.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-1bbed5bf.js → get-class-prop-name-a677d7a5.js} +1 -1
- package/lib/edge/{get-class-prop-name-3c5f7a7d.cjs → get-class-prop-name-a9b4959e.cjs} +1 -1
- package/lib/edge/image-344ddbb0.cjs +17 -0
- package/lib/edge/{image-68451fc8.js → image-e3fcd611.js} +24 -22
- package/lib/edge/{img-e7db1475.js → img-8fc26395.js} +1 -1
- package/lib/edge/{img-6671da9a.cjs → img-b91cb4fd.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +1 -1
- package/lib/edge/{input-2db47a83.js → input-549f090e.js} +1 -1
- package/lib/edge/{input-0f7a9f1c.cjs → input-ec7c695a.cjs} +1 -1
- package/lib/edge/{select-f0859c5f.cjs → select-3ffa9294.cjs} +1 -1
- package/lib/edge/{select-2facacf2.js → select-6a5a28ac.js} +1 -1
- package/lib/edge/{server-entry-ff6a2e2d.cjs → server-entry-966ac144.cjs} +1 -1
- package/lib/edge/{server-entry-75aa714e.js → server-entry-d2020acf.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-8159ca1d.js → slot-40de071b.js} +3 -3
- package/lib/edge/{slot-aee43b86.cjs → slot-8b27e15e.cjs} +1 -1
- package/lib/edge/symbol-76e76298.cjs +1 -0
- package/lib/edge/symbol-e6515a5f.js +85 -0
- package/lib/edge/{tabs-4112a80e.cjs → tabs-9c5af0ec.cjs} +1 -1
- package/lib/edge/{tabs-f5357a4e.js → tabs-b75be82d.js} +3 -3
- package/lib/node/blocks-exports.cjs +15 -15
- package/lib/node/blocks-exports.mjs +269 -228
- 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-eb72e084.cjs → node-runtime-0e37d6f7.cjs} +1 -1
- package/lib/node/{node-runtime-80c4bfc8.js → node-runtime-0f3a5df1.js} +1 -1
- package/lib/node/{server-entry-e8ac67b5.js → server-entry-5ebd1c9b.js} +1 -1
- package/lib/node/{server-entry-b2103255.cjs → server-entry-8002325b.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +15 -15
- package/types/components/content/components/styles.d.ts +2 -1
- package/types/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/components/inlined-script.d.ts +2 -1
- package/types/components/inlined-styles.d.ts +2 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/types.d.ts +1 -0
- package/types/types/builder-props.d.ts +3 -0
- package/lib/edge/columns-bc2b0674.cjs +0 -28
- package/lib/edge/image-ea37781b.cjs +0 -17
- package/lib/edge/symbol-36a155f3.js +0 -84
- package/lib/edge/symbol-a244cc31.cjs +0 -1
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { jsxs as y, Fragment as B, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as r } from "react";
|
|
3
|
-
import { InlinedStyles as z, Blocks as A, mapStyleObjToStrIfNeeded as L, getSizesForBreakpoints as W } from "./blocks-
|
|
3
|
+
import { InlinedStyles as z, Blocks as A, mapStyleObjToStrIfNeeded as L, getSizesForBreakpoints as W } from "./blocks-f55c7d3e.js";
|
|
4
4
|
import { DynamicRenderer as N } from "./dynamic-renderer-8b343325.js";
|
|
5
|
-
import { getClassPropName as D } from "./get-class-prop-name-
|
|
5
|
+
import { getClassPropName as D } from "./get-class-prop-name-a677d7a5.js";
|
|
6
6
|
import "./blocks-exports.mjs";
|
|
7
|
-
import "./server-entry-
|
|
8
|
-
const F = (
|
|
9
|
-
function J(
|
|
7
|
+
import "./server-entry-d2020acf.js";
|
|
8
|
+
const F = (t) => `builder-columns ${t}-breakpoints`;
|
|
9
|
+
function J(t) {
|
|
10
10
|
var f, k;
|
|
11
11
|
const [c, T] = r(
|
|
12
|
-
() => typeof
|
|
13
|
-
), [s, j] = r(() =>
|
|
14
|
-
() =>
|
|
12
|
+
() => typeof t.space == "number" ? t.space || 0 : 20
|
|
13
|
+
), [s, j] = r(() => t.columns || []), [m, I] = r(
|
|
14
|
+
() => t.stackColumnsAt || "tablet"
|
|
15
15
|
);
|
|
16
|
-
function S(
|
|
17
|
-
return
|
|
16
|
+
function S(e) {
|
|
17
|
+
return e.link ? t.builderLinkComponent || "a" : "div";
|
|
18
18
|
}
|
|
19
|
-
function x(
|
|
19
|
+
function x(e) {
|
|
20
20
|
var n;
|
|
21
|
-
return ((n = s[
|
|
21
|
+
return ((n = s[e]) == null ? void 0 : n.width) || 100 / s.length;
|
|
22
22
|
}
|
|
23
|
-
function C(
|
|
24
|
-
const n = x(
|
|
23
|
+
function C(e) {
|
|
24
|
+
const n = x(e), i = c * (s.length - 1) * (n / 100);
|
|
25
25
|
return `calc(${n}% - ${i}px)`;
|
|
26
26
|
}
|
|
27
27
|
function a({
|
|
28
|
-
stackedStyle:
|
|
28
|
+
stackedStyle: e,
|
|
29
29
|
desktopStyle: n
|
|
30
30
|
}) {
|
|
31
|
-
return m === "tablet" ?
|
|
31
|
+
return m === "tablet" ? e : n;
|
|
32
32
|
}
|
|
33
33
|
function u({
|
|
34
|
-
stackedStyle:
|
|
34
|
+
stackedStyle: e,
|
|
35
35
|
desktopStyle: n
|
|
36
36
|
}) {
|
|
37
|
-
return m === "never" ? n :
|
|
37
|
+
return m === "never" ? n : e;
|
|
38
38
|
}
|
|
39
39
|
const [d, P] = r(
|
|
40
|
-
() =>
|
|
40
|
+
() => t.stackColumnsAt === "never" ? "row" : t.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
41
41
|
);
|
|
42
|
-
function
|
|
42
|
+
function v() {
|
|
43
43
|
return {
|
|
44
44
|
"--flex-dir": d,
|
|
45
45
|
"--flex-dir-tablet": a({
|
|
@@ -48,8 +48,8 @@ function J(e) {
|
|
|
48
48
|
})
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const n =
|
|
51
|
+
function w(e) {
|
|
52
|
+
const n = e === 0 ? 0 : c, i = C(e), l = `${n}px`, g = "100%", h = 0;
|
|
53
53
|
return {
|
|
54
54
|
...{
|
|
55
55
|
display: "flex",
|
|
@@ -76,74 +76,81 @@ function J(e) {
|
|
|
76
76
|
})
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function b(
|
|
79
|
+
function b(e) {
|
|
80
80
|
var i, l;
|
|
81
81
|
return W(
|
|
82
|
-
((l = (i =
|
|
83
|
-
)[
|
|
82
|
+
((l = (i = t.builderContext.content) == null ? void 0 : i.meta) == null ? void 0 : l.breakpoints) || {}
|
|
83
|
+
)[e].max;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function p() {
|
|
86
86
|
return `
|
|
87
87
|
@media (max-width: ${b("medium")}px) {
|
|
88
|
-
.${
|
|
88
|
+
.${t.builderBlock.id}-breakpoints {
|
|
89
89
|
flex-direction: var(--flex-dir-tablet);
|
|
90
90
|
align-items: stretch;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.${
|
|
93
|
+
.${t.builderBlock.id}-breakpoints > .builder-column {
|
|
94
94
|
width: var(--column-width-tablet) !important;
|
|
95
95
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
@media (max-width: ${b("small")}px) {
|
|
100
|
-
.${
|
|
100
|
+
.${t.builderBlock.id}-breakpoints {
|
|
101
101
|
flex-direction: var(--flex-dir);
|
|
102
102
|
align-items: stretch;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
.${
|
|
105
|
+
.${t.builderBlock.id}-breakpoints > .builder-column {
|
|
106
106
|
width: var(--column-width-mobile) !important;
|
|
107
107
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
`;
|
|
111
111
|
}
|
|
112
|
-
function $(
|
|
112
|
+
function $(e, n) {
|
|
113
113
|
return {
|
|
114
|
-
...
|
|
115
|
-
href:
|
|
114
|
+
...e.link ? {
|
|
115
|
+
href: e.link
|
|
116
116
|
} : {},
|
|
117
117
|
[D()]: "builder-column",
|
|
118
|
-
style: L(
|
|
118
|
+
style: L(w(n))
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
return /* @__PURE__ */ y(B, { children: [
|
|
122
122
|
/* @__PURE__ */ y(
|
|
123
123
|
"div",
|
|
124
124
|
{
|
|
125
|
-
className: F((f =
|
|
126
|
-
style:
|
|
125
|
+
className: F((f = t.builderBlock) == null ? void 0 : f.id) + " div-fe220f58",
|
|
126
|
+
style: v(),
|
|
127
127
|
children: [
|
|
128
|
-
/* @__PURE__ */ o(
|
|
129
|
-
|
|
128
|
+
/* @__PURE__ */ o(
|
|
129
|
+
z,
|
|
130
|
+
{
|
|
131
|
+
id: "builderio-columns",
|
|
132
|
+
styles: p(),
|
|
133
|
+
nonce: t.builderContext.nonce
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
(k = t.columns) == null ? void 0 : k.map((e, n) => /* @__PURE__ */ o(
|
|
130
137
|
N,
|
|
131
138
|
{
|
|
132
|
-
TagName: S(
|
|
139
|
+
TagName: S(e),
|
|
133
140
|
actionAttributes: {},
|
|
134
|
-
attributes: $(
|
|
141
|
+
attributes: $(e, n),
|
|
135
142
|
children: /* @__PURE__ */ o(
|
|
136
143
|
A,
|
|
137
144
|
{
|
|
138
145
|
path: `component.options.columns.${n}.blocks`,
|
|
139
|
-
parent:
|
|
146
|
+
parent: t.builderBlock.id,
|
|
140
147
|
styleProp: {
|
|
141
148
|
flexGrow: "1"
|
|
142
149
|
},
|
|
143
|
-
context:
|
|
144
|
-
registeredComponents:
|
|
145
|
-
linkComponent:
|
|
146
|
-
blocks:
|
|
150
|
+
context: t.builderContext,
|
|
151
|
+
registeredComponents: t.builderComponents,
|
|
152
|
+
linkComponent: t.builderLinkComponent,
|
|
153
|
+
blocks: e.blocks
|
|
147
154
|
}
|
|
148
155
|
)
|
|
149
156
|
},
|
|
@@ -152,7 +159,7 @@ function J(e) {
|
|
|
152
159
|
]
|
|
153
160
|
}
|
|
154
161
|
),
|
|
155
|
-
/* @__PURE__ */ o("style", { children: `.div-
|
|
162
|
+
/* @__PURE__ */ o("style", { children: `.div-fe220f58 {
|
|
156
163
|
display: flex;
|
|
157
164
|
line-height: normal;
|
|
158
165
|
}` })
|