@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,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as g, Fragment as R, jsxs as U } from "react/jsx-runtime";
|
|
2
2
|
import { lazy as C, useRef as ne, useState as I, useEffect as S } from "react";
|
|
3
|
-
import { isBrowser as
|
|
4
|
-
import { Video as pe, Button as ge, Columns as fe, Fragment as he, Image as be, Section as ye, Symbol as xe, Text as ve } from "./blocks-exports.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import "./get-class-prop-name-
|
|
7
|
-
import "./dynamic-renderer-
|
|
3
|
+
import { isBrowser as $, TARGET as Q, isEditing as P, registerInsertMenu as ae, setupBrowserForEditing as ie, createRegisterComponentMessage as oe, getDefaultCanTrack as A, _track as B, isPreviewing as re, fetchOneEntry as se, logger as le, createEditorListener as de, fetch as ce, fastClone as ue, serializeComponentInfo as _, handleABTestingSync as me } from "./server-entry-d46a218d.js";
|
|
4
|
+
import { Video as pe, Button as ge, Columns as fe, Fragment as he, Image as be, Section as ye, Symbol as xe, Text as ve, BuilderContext as Se } from "./blocks-exports.mjs";
|
|
5
|
+
import { triggerAnimation as Ie, evaluate as M, InlinedStyles as G, ComponentsContext as ke, Blocks as Te } from "./blocks-03aafa4f.js";
|
|
6
|
+
import "./get-class-prop-name-859a7f60.js";
|
|
7
|
+
import "./dynamic-renderer-96ba4e48.js";
|
|
8
8
|
const Ce = {
|
|
9
9
|
name: "Core:Button",
|
|
10
10
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -397,7 +397,7 @@ const Ce = {
|
|
|
397
397
|
required: !0,
|
|
398
398
|
defaultValue: "children"
|
|
399
399
|
}]
|
|
400
|
-
}, We = C(() => import("./slot-
|
|
400
|
+
}, We = C(() => import("./slot-8fa7f242.js")), Ae = {
|
|
401
401
|
name: "Symbol",
|
|
402
402
|
noWrap: !0,
|
|
403
403
|
static: !0,
|
|
@@ -726,7 +726,7 @@ const Ce = {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}]
|
|
729
|
-
}, qe = C(() => import("./form-
|
|
729
|
+
}, qe = C(() => import("./form-04cf10db.js")), Ne = {
|
|
730
730
|
name: "Form:Input",
|
|
731
731
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
732
732
|
inputs: [
|
|
@@ -777,7 +777,7 @@ const Ce = {
|
|
|
777
777
|
borderStyle: "solid",
|
|
778
778
|
borderColor: "#ccc"
|
|
779
779
|
}
|
|
780
|
-
}, je = C(() => import("./input-
|
|
780
|
+
}, je = C(() => import("./input-c6fee09c.js")), Ke = {
|
|
781
781
|
name: "Form:Select",
|
|
782
782
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
783
783
|
defaultStyles: {
|
|
@@ -819,7 +819,7 @@ const Ce = {
|
|
|
819
819
|
}],
|
|
820
820
|
static: !0,
|
|
821
821
|
noWrap: !0
|
|
822
|
-
},
|
|
822
|
+
}, Be = C(() => import("./select-f260d051.js")), _e = {
|
|
823
823
|
name: "Form:SubmitButton",
|
|
824
824
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
825
825
|
defaultStyles: {
|
|
@@ -858,7 +858,7 @@ const Ce = {
|
|
|
858
858
|
}],
|
|
859
859
|
noWrap: !0,
|
|
860
860
|
static: !0
|
|
861
|
-
}, ze = C(() => import("./img-
|
|
861
|
+
}, ze = C(() => import("./img-b4ff1bef.js")), Je = {
|
|
862
862
|
name: "Video",
|
|
863
863
|
canHaveChildren: !0,
|
|
864
864
|
defaultStyles: {
|
|
@@ -953,9 +953,9 @@ const Ce = {
|
|
|
953
953
|
...Ne
|
|
954
954
|
}, {
|
|
955
955
|
component: Me,
|
|
956
|
-
...
|
|
956
|
+
..._e
|
|
957
957
|
}, {
|
|
958
|
-
component:
|
|
958
|
+
component: Be,
|
|
959
959
|
...Ke
|
|
960
960
|
}, {
|
|
961
961
|
component: ze,
|
|
@@ -1077,14 +1077,14 @@ const Ce = {
|
|
|
1077
1077
|
thisScriptEl?.remove();
|
|
1078
1078
|
}
|
|
1079
1079
|
return;
|
|
1080
|
-
}`, X = "builderIoAbTest", Z = "builderIoRenderContent",
|
|
1080
|
+
}`, X = "builderIoAbTest", Z = "builderIoRenderContent", W = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1081
1081
|
...t,
|
|
1082
1082
|
testVariationId: t.id,
|
|
1083
1083
|
id: e == null ? void 0 : e.id
|
|
1084
1084
|
})), Xe = ({
|
|
1085
1085
|
canTrack: e,
|
|
1086
1086
|
content: t
|
|
1087
|
-
}) => !(!(
|
|
1087
|
+
}) => !(!(W(t).length > 0) || !e || $()), Ze = (e) => e === "react" || e === "reactNative", ee = Ze(Q), et = () => `
|
|
1088
1088
|
window.${X} = ${Qe}
|
|
1089
1089
|
window.${Z} = ${Ge}
|
|
1090
1090
|
`, tt = (e, t) => `
|
|
@@ -1096,8 +1096,8 @@ const Ce = {
|
|
|
1096
1096
|
}) => `window.${Z}(
|
|
1097
1097
|
"${t}", "${e}", ${ee}
|
|
1098
1098
|
)`;
|
|
1099
|
-
function
|
|
1100
|
-
return /* @__PURE__ */
|
|
1099
|
+
function H(e) {
|
|
1100
|
+
return /* @__PURE__ */ g(
|
|
1101
1101
|
"script",
|
|
1102
1102
|
{
|
|
1103
1103
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1149,7 +1149,7 @@ const at = (e, t, n = !0) => {
|
|
|
1149
1149
|
};
|
|
1150
1150
|
};
|
|
1151
1151
|
function rt(e) {
|
|
1152
|
-
var T,
|
|
1152
|
+
var T, D, L, q, N, j, K;
|
|
1153
1153
|
const t = ne(null);
|
|
1154
1154
|
function n(r) {
|
|
1155
1155
|
var m, l;
|
|
@@ -1163,7 +1163,7 @@ function rt(e) {
|
|
|
1163
1163
|
}));
|
|
1164
1164
|
}
|
|
1165
1165
|
function a(r) {
|
|
1166
|
-
var m, l, s,
|
|
1166
|
+
var m, l, s, f, V;
|
|
1167
1167
|
const c = {
|
|
1168
1168
|
...e.builderContextSignal.content,
|
|
1169
1169
|
...r,
|
|
@@ -1174,7 +1174,7 @@ function rt(e) {
|
|
|
1174
1174
|
meta: {
|
|
1175
1175
|
...(l = e.builderContextSignal.content) == null ? void 0 : l.meta,
|
|
1176
1176
|
...r == null ? void 0 : r.meta,
|
|
1177
|
-
breakpoints: ((s = r == null ? void 0 : r.meta) == null ? void 0 : s.breakpoints) || ((V = (
|
|
1177
|
+
breakpoints: ((s = r == null ? void 0 : r.meta) == null ? void 0 : s.breakpoints) || ((V = (f = e.builderContextSignal.content) == null ? void 0 : f.meta) == null ? void 0 : V.breakpoints)
|
|
1178
1178
|
}
|
|
1179
1179
|
};
|
|
1180
1180
|
e.setBuilderContextSignal((x) => ({
|
|
@@ -1223,14 +1223,14 @@ function rt(e) {
|
|
|
1223
1223
|
enableCache: !1
|
|
1224
1224
|
});
|
|
1225
1225
|
}
|
|
1226
|
-
const [u, v] = I(() => ({})), [b, w] = I(() => ({})), [k,
|
|
1227
|
-
function
|
|
1226
|
+
const [u, v] = I(() => ({})), [b, w] = I(() => ({})), [k, E] = I(() => !1);
|
|
1227
|
+
function F(r) {
|
|
1228
1228
|
var c, m;
|
|
1229
1229
|
if (e.builderContextSignal.content) {
|
|
1230
1230
|
const l = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, s = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
|
|
1231
|
-
|
|
1231
|
+
B({
|
|
1232
1232
|
type: "click",
|
|
1233
|
-
canTrack:
|
|
1233
|
+
canTrack: A(e.canTrack),
|
|
1234
1234
|
contentId: s,
|
|
1235
1235
|
apiKey: e.apiKey,
|
|
1236
1236
|
variationId: l !== s ? l : void 0,
|
|
@@ -1238,16 +1238,16 @@ function rt(e) {
|
|
|
1238
1238
|
unique: !k
|
|
1239
1239
|
});
|
|
1240
1240
|
}
|
|
1241
|
-
k ||
|
|
1241
|
+
k || E(!0);
|
|
1242
1242
|
}
|
|
1243
1243
|
function y() {
|
|
1244
1244
|
var c, m, l;
|
|
1245
1245
|
const r = (l = (m = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : m.httpRequests) != null ? l : {};
|
|
1246
|
-
Object.entries(r).forEach(([s,
|
|
1247
|
-
if (!
|
|
1246
|
+
Object.entries(r).forEach(([s, f]) => {
|
|
1247
|
+
if (!f || b[s] || u[s] && !P())
|
|
1248
1248
|
return;
|
|
1249
1249
|
b[s] = !0;
|
|
1250
|
-
const V =
|
|
1250
|
+
const V = f.replace(
|
|
1251
1251
|
/{{([^}]+)}}/g,
|
|
1252
1252
|
(x, te) => String(
|
|
1253
1253
|
M({
|
|
@@ -1265,14 +1265,14 @@ function rt(e) {
|
|
|
1265
1265
|
[s]: x
|
|
1266
1266
|
}), u[s] = !0;
|
|
1267
1267
|
}).catch((x) => {
|
|
1268
|
-
console.error("error fetching dynamic data",
|
|
1268
|
+
console.error("error fetching dynamic data", f, x);
|
|
1269
1269
|
}).finally(() => {
|
|
1270
1270
|
b[s] = !1;
|
|
1271
1271
|
});
|
|
1272
1272
|
});
|
|
1273
1273
|
}
|
|
1274
1274
|
function h() {
|
|
1275
|
-
|
|
1275
|
+
P() && window.dispatchEvent(
|
|
1276
1276
|
new CustomEvent(
|
|
1277
1277
|
"builder:component:stateChange",
|
|
1278
1278
|
{
|
|
@@ -1288,8 +1288,8 @@ function rt(e) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
return S(() => {
|
|
1290
1290
|
var r, c;
|
|
1291
|
-
if (
|
|
1292
|
-
if (
|
|
1291
|
+
if ($()) {
|
|
1292
|
+
if (P() && (window.addEventListener("message", i), ae(), ie({
|
|
1293
1293
|
...e.locale ? {
|
|
1294
1294
|
locale: e.locale
|
|
1295
1295
|
} : {},
|
|
@@ -1302,27 +1302,27 @@ function rt(e) {
|
|
|
1302
1302
|
}), Object.values(
|
|
1303
1303
|
e.builderContextSignal.componentInfos
|
|
1304
1304
|
).forEach((l) => {
|
|
1305
|
-
var
|
|
1305
|
+
var f;
|
|
1306
1306
|
const s = oe(l);
|
|
1307
|
-
(
|
|
1307
|
+
(f = window.parent) == null || f.postMessage(s, "*");
|
|
1308
1308
|
}), window.addEventListener(
|
|
1309
1309
|
"builder:component:stateChangeListenerActivated",
|
|
1310
1310
|
h
|
|
1311
|
-
)), e.builderContextSignal.content &&
|
|
1312
|
-
const l = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, s = (c = e.builderContextSignal.content) == null ? void 0 : c.id,
|
|
1313
|
-
|
|
1311
|
+
)), e.builderContextSignal.content && A(e.canTrack)) {
|
|
1312
|
+
const l = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, s = (c = e.builderContextSignal.content) == null ? void 0 : c.id, f = e.apiKey;
|
|
1313
|
+
B({
|
|
1314
1314
|
type: "impression",
|
|
1315
1315
|
canTrack: !0,
|
|
1316
1316
|
contentId: s,
|
|
1317
|
-
apiKey:
|
|
1317
|
+
apiKey: f,
|
|
1318
1318
|
variationId: l !== s ? l : void 0
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
1321
|
if (re()) {
|
|
1322
|
-
const l = new URL(location.href).searchParams, s = l.get("builder.preview"),
|
|
1322
|
+
const l = new URL(location.href).searchParams, s = l.get("builder.preview"), f = l.get(
|
|
1323
1323
|
`builder.preview.${s}`
|
|
1324
1324
|
), V = l.get("apiKey") || l.get("builder.space");
|
|
1325
|
-
s === e.model && V === e.apiKey && (!e.content ||
|
|
1325
|
+
s === e.model && V === e.apiKey && (!e.content || f === e.content.id) && se({
|
|
1326
1326
|
model: e.model,
|
|
1327
1327
|
apiKey: e.apiKey,
|
|
1328
1328
|
apiVersion: e.builderContextSignal.apiVersion
|
|
@@ -1339,9 +1339,9 @@ function rt(e) {
|
|
|
1339
1339
|
e.content && a(e.content);
|
|
1340
1340
|
}, [e.content]), S(() => {
|
|
1341
1341
|
o();
|
|
1342
|
-
}, [(
|
|
1342
|
+
}, [(D = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : D.jsCode]), S(() => {
|
|
1343
1343
|
y();
|
|
1344
|
-
}, [(
|
|
1344
|
+
}, [(q = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : q.httpRequests]), S(() => {
|
|
1345
1345
|
h();
|
|
1346
1346
|
}, [e.builderContextSignal.rootState]), S(() => {
|
|
1347
1347
|
e.data && n(e.data);
|
|
@@ -1350,26 +1350,26 @@ function rt(e) {
|
|
|
1350
1350
|
locale: e.locale
|
|
1351
1351
|
});
|
|
1352
1352
|
}, [e.locale]), S(() => () => {
|
|
1353
|
-
|
|
1353
|
+
$() && (window.removeEventListener("message", i), window.removeEventListener(
|
|
1354
1354
|
"builder:component:stateChangeListenerActivated",
|
|
1355
1355
|
h
|
|
1356
1356
|
));
|
|
1357
|
-
}, []), /* @__PURE__ */
|
|
1357
|
+
}, []), /* @__PURE__ */ g(Se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ g(R, { children: /* @__PURE__ */ g(
|
|
1358
1358
|
d,
|
|
1359
1359
|
{
|
|
1360
1360
|
ref: t,
|
|
1361
|
-
onClick: (r) =>
|
|
1362
|
-
"builder-content-id": (
|
|
1361
|
+
onClick: (r) => F(r),
|
|
1362
|
+
"builder-content-id": (N = e.builderContextSignal.content) == null ? void 0 : N.id,
|
|
1363
1363
|
"builder-model": e.model,
|
|
1364
1364
|
...e.showContent ? {} : {
|
|
1365
1365
|
hidden: !0,
|
|
1366
1366
|
"aria-hidden": !0
|
|
1367
1367
|
},
|
|
1368
1368
|
...e.contentWrapperProps,
|
|
1369
|
-
className: `variant-${((
|
|
1369
|
+
className: `variant-${((j = e.content) == null ? void 0 : j.testVariationId) || ((K = e.content) == null ? void 0 : K.id)}`,
|
|
1370
1370
|
children: e.children
|
|
1371
1371
|
}
|
|
1372
|
-
) : null });
|
|
1372
|
+
) }) : null });
|
|
1373
1373
|
}
|
|
1374
1374
|
const st = (e) => {
|
|
1375
1375
|
var p, i;
|
|
@@ -1436,7 +1436,7 @@ ${lt({
|
|
|
1436
1436
|
${ut(e.isNestedRender)}
|
|
1437
1437
|
`.trim()
|
|
1438
1438
|
);
|
|
1439
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ g(G, { id: "builderio-content", styles: t });
|
|
1440
1440
|
}
|
|
1441
1441
|
const pt = ({
|
|
1442
1442
|
content: e,
|
|
@@ -1467,7 +1467,7 @@ const pt = ({
|
|
|
1467
1467
|
meta: e == null ? void 0 : e.meta
|
|
1468
1468
|
} : void 0;
|
|
1469
1469
|
function Y(e) {
|
|
1470
|
-
var u, v, b, w, k,
|
|
1470
|
+
var u, v, b, w, k, E, F;
|
|
1471
1471
|
const [t, n] = I(
|
|
1472
1472
|
() => {
|
|
1473
1473
|
var y, h;
|
|
@@ -1494,7 +1494,7 @@ function Y(e) {
|
|
|
1494
1494
|
...y,
|
|
1495
1495
|
[T.name]: {
|
|
1496
1496
|
component: h,
|
|
1497
|
-
...
|
|
1497
|
+
..._(T)
|
|
1498
1498
|
}
|
|
1499
1499
|
}),
|
|
1500
1500
|
{}
|
|
@@ -1520,7 +1520,7 @@ function Y(e) {
|
|
|
1520
1520
|
].reduce(
|
|
1521
1521
|
(y, { component: h, ...T }) => ({
|
|
1522
1522
|
...y,
|
|
1523
|
-
[T.name]:
|
|
1523
|
+
[T.name]: _(T)
|
|
1524
1524
|
}),
|
|
1525
1525
|
{}
|
|
1526
1526
|
),
|
|
@@ -1528,13 +1528,13 @@ function Y(e) {
|
|
|
1528
1528
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
1529
1529
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
1530
1530
|
}));
|
|
1531
|
-
return /* @__PURE__ */
|
|
1531
|
+
return /* @__PURE__ */ g(
|
|
1532
1532
|
ke.Provider,
|
|
1533
1533
|
{
|
|
1534
1534
|
value: {
|
|
1535
1535
|
registeredComponents: d
|
|
1536
1536
|
},
|
|
1537
|
-
children: /* @__PURE__ */
|
|
1537
|
+
children: /* @__PURE__ */ U(
|
|
1538
1538
|
rt,
|
|
1539
1539
|
{
|
|
1540
1540
|
content: e.content,
|
|
@@ -1553,14 +1553,14 @@ function Y(e) {
|
|
|
1553
1553
|
trustedHosts: e.trustedHosts,
|
|
1554
1554
|
setBuilderContextSignal: o,
|
|
1555
1555
|
children: [
|
|
1556
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1557
|
-
|
|
1556
|
+
e.isSsrAbTest ? /* @__PURE__ */ g(R, { children: /* @__PURE__ */ g(
|
|
1557
|
+
H,
|
|
1558
1558
|
{
|
|
1559
1559
|
id: "builderio-variant-visibility",
|
|
1560
1560
|
scriptStr: t
|
|
1561
1561
|
}
|
|
1562
|
-
) : null,
|
|
1563
|
-
/* @__PURE__ */
|
|
1562
|
+
) }) : null,
|
|
1563
|
+
/* @__PURE__ */ g(R, { children: /* @__PURE__ */ g(
|
|
1564
1564
|
mt,
|
|
1565
1565
|
{
|
|
1566
1566
|
isNestedRender: e.isNestedRender,
|
|
@@ -1568,11 +1568,11 @@ function Y(e) {
|
|
|
1568
1568
|
cssCode: (b = (v = i.content) == null ? void 0 : v.data) == null ? void 0 : b.cssCode,
|
|
1569
1569
|
customFonts: (k = (w = i.content) == null ? void 0 : w.data) == null ? void 0 : k.customFonts
|
|
1570
1570
|
}
|
|
1571
|
-
),
|
|
1572
|
-
/* @__PURE__ */
|
|
1571
|
+
) }),
|
|
1572
|
+
/* @__PURE__ */ g(
|
|
1573
1573
|
Te,
|
|
1574
1574
|
{
|
|
1575
|
-
blocks: (
|
|
1575
|
+
blocks: (F = (E = i.content) == null ? void 0 : E.data) == null ? void 0 : F.blocks,
|
|
1576
1576
|
context: i,
|
|
1577
1577
|
registeredComponents: d,
|
|
1578
1578
|
linkComponent: e.linkComponent
|
|
@@ -1588,14 +1588,14 @@ function It(e) {
|
|
|
1588
1588
|
var i;
|
|
1589
1589
|
const [t, n] = I(
|
|
1590
1590
|
() => Xe({
|
|
1591
|
-
canTrack:
|
|
1591
|
+
canTrack: A(e.canTrack),
|
|
1592
1592
|
content: e.content
|
|
1593
1593
|
})
|
|
1594
1594
|
);
|
|
1595
1595
|
function a() {
|
|
1596
1596
|
var o;
|
|
1597
1597
|
return tt(
|
|
1598
|
-
|
|
1598
|
+
W(e.content).map((u) => ({
|
|
1599
1599
|
id: u.testVariationId,
|
|
1600
1600
|
testRatio: u.testRatio
|
|
1601
1601
|
})),
|
|
@@ -1603,7 +1603,7 @@ function It(e) {
|
|
|
1603
1603
|
);
|
|
1604
1604
|
}
|
|
1605
1605
|
function d() {
|
|
1606
|
-
return
|
|
1606
|
+
return W(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
1607
1607
|
}
|
|
1608
1608
|
function p() {
|
|
1609
1609
|
var o;
|
|
@@ -1612,34 +1612,34 @@ function It(e) {
|
|
|
1612
1612
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
1613
1613
|
} : me({
|
|
1614
1614
|
item: e.content,
|
|
1615
|
-
canTrack:
|
|
1615
|
+
canTrack: A(e.canTrack)
|
|
1616
1616
|
});
|
|
1617
1617
|
}
|
|
1618
1618
|
return S(() => {
|
|
1619
|
-
}, []), /* @__PURE__ */
|
|
1620
|
-
!e.isNestedRender && Q !== "reactNative" ? /* @__PURE__ */
|
|
1621
|
-
|
|
1619
|
+
}, []), /* @__PURE__ */ U(R, { children: [
|
|
1620
|
+
!e.isNestedRender && Q !== "reactNative" ? /* @__PURE__ */ g(R, { children: /* @__PURE__ */ g(
|
|
1621
|
+
H,
|
|
1622
1622
|
{
|
|
1623
1623
|
id: "builderio-init-variants-fns",
|
|
1624
1624
|
scriptStr: et()
|
|
1625
1625
|
}
|
|
1626
|
-
) : null,
|
|
1627
|
-
t ? /* @__PURE__ */
|
|
1628
|
-
/* @__PURE__ */
|
|
1626
|
+
) }) : null,
|
|
1627
|
+
t ? /* @__PURE__ */ U(R, { children: [
|
|
1628
|
+
/* @__PURE__ */ g(
|
|
1629
1629
|
G,
|
|
1630
1630
|
{
|
|
1631
1631
|
id: "builderio-variants",
|
|
1632
1632
|
styles: d()
|
|
1633
1633
|
}
|
|
1634
1634
|
),
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
|
|
1635
|
+
/* @__PURE__ */ g(
|
|
1636
|
+
H,
|
|
1637
1637
|
{
|
|
1638
1638
|
id: "builderio-variants-visibility",
|
|
1639
1639
|
scriptStr: a()
|
|
1640
1640
|
}
|
|
1641
1641
|
),
|
|
1642
|
-
(i =
|
|
1642
|
+
(i = W(e.content)) == null ? void 0 : i.map((o) => /* @__PURE__ */ g(
|
|
1643
1643
|
Y,
|
|
1644
1644
|
{
|
|
1645
1645
|
isNestedRender: e.isNestedRender,
|
|
@@ -1665,7 +1665,7 @@ function It(e) {
|
|
|
1665
1665
|
o.testVariationId
|
|
1666
1666
|
))
|
|
1667
1667
|
] }) : null,
|
|
1668
|
-
/* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ g(
|
|
1669
1669
|
Y,
|
|
1670
1670
|
{
|
|
1671
1671
|
isNestedRender: e.isNestedRender,
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var stdin_exports = {};
|
|
30
30
|
__export(stdin_exports, {
|
|
31
31
|
Blocks: () => Blocks,
|
|
32
|
+
BuilderContext: () => BuilderContext,
|
|
32
33
|
Button: () => Button,
|
|
33
34
|
Columns: () => Columns,
|
|
34
35
|
Content: () => Content,
|
|
@@ -56,3 +57,4 @@ const Text = import_blocks_exports.Text;
|
|
|
56
57
|
const Video = import_blocks_exports.Video;
|
|
57
58
|
const Blocks = (props) => isBrowser() ? /* @__PURE__ */ import_react.default.createElement(BrowserSdk.Blocks, { ...props }) : /* @__PURE__ */ import_react.default.createElement(import_blocks_exports.Blocks, { ...props });
|
|
58
59
|
const Content = (props) => isBrowser() ? /* @__PURE__ */ import_react.default.createElement(BrowserSdk.Content, { ...props }) : /* @__PURE__ */ import_react.default.createElement(import_blocks_exports.Content, { ...props });
|
|
60
|
+
const BuilderContext = import_blocks_exports.BuilderContext;
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
Text as EdgeSdkText,
|
|
15
15
|
Video as EdgeSdkVideo,
|
|
16
16
|
Blocks as EdgeSdkBlocks,
|
|
17
|
-
Content as EdgeSdkContent
|
|
17
|
+
Content as EdgeSdkContent,
|
|
18
|
+
BuilderContext as EdgeSdkBuilderContext
|
|
18
19
|
} from "./blocks-exports.mjs";
|
|
19
20
|
const Button = EdgeSdkButton;
|
|
20
21
|
const Columns = EdgeSdkColumns;
|
|
@@ -26,8 +27,10 @@ const Text = EdgeSdkText;
|
|
|
26
27
|
const Video = EdgeSdkVideo;
|
|
27
28
|
const Blocks = (props) => isBrowser() ? /* @__PURE__ */ React.createElement(BrowserSdk.Blocks, { ...props }) : /* @__PURE__ */ React.createElement(EdgeSdkBlocks, { ...props });
|
|
28
29
|
const Content = (props) => isBrowser() ? /* @__PURE__ */ React.createElement(BrowserSdk.Content, { ...props }) : /* @__PURE__ */ React.createElement(EdgeSdkContent, { ...props });
|
|
30
|
+
const BuilderContext = EdgeSdkBuilderContext;
|
|
29
31
|
export {
|
|
30
32
|
Blocks,
|
|
33
|
+
BuilderContext,
|
|
31
34
|
Button,
|
|
32
35
|
Columns,
|
|
33
36
|
Content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),n=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),a=e=>typeof e=="string"&&n.has(e.toLowerCase());function i(e){return t.jsx(t.Fragment,{children:a(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}exports.DynamicRenderer=i;
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),n=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),a=e=>typeof e=="string"&&n.has(e.toLowerCase());function i(e){return t.jsx(t.Fragment,{children:a(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}exports.DynamicRenderer=i;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as t, Fragment as n } from "react/jsx-runtime";
|
|
2
|
+
const i = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), a = (e) => typeof e == "string" && i.has(e.toLowerCase());
|
|
3
|
+
function c(e) {
|
|
4
|
+
return /* @__PURE__ */ t(n, { children: a(e.TagName) ? /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ t(n, { children: typeof e.TagName == "string" ? /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
c as DynamicRenderer
|
|
8
|
+
};
|