@builder.io/sdk-react-nextjs 0.13.0 → 0.13.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/{USE_CLIENT_BUNDLE-159cd63c.cjs → USE_CLIENT_BUNDLE-65d8df10.cjs} +1 -1
- package/lib/{node/USE_CLIENT_BUNDLE-354a3b9c.js → browser/USE_CLIENT_BUNDLE-660c05f1.js} +5 -5
- package/lib/{edge/USE_SERVER_BUNDLE-b7a4b5c9.cjs → browser/USE_SERVER_BUNDLE-2e3b6eff.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-e82f4d04.js → browser/USE_SERVER_BUNDLE-7204eec6.js} +1 -1
- package/lib/browser/{bundle-2b431a2f.js → bundle-0a12b387.js} +270 -270
- package/lib/browser/{bundle-f3f9789e.cjs → bundle-af821e69.cjs} +17 -17
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +8 -8
- package/lib/{node/USE_CLIENT_BUNDLE-79508098.cjs → edge/USE_CLIENT_BUNDLE-4ecfa86c.cjs} +1 -1
- package/lib/{browser/USE_CLIENT_BUNDLE-21701cae.js → edge/USE_CLIENT_BUNDLE-a2d2d15f.js} +5 -5
- package/lib/{node/USE_SERVER_BUNDLE-81b76cf3.js → edge/USE_SERVER_BUNDLE-1a4a2318.js} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-2d5ccb94.cjs → edge/USE_SERVER_BUNDLE-7fb84390.cjs} +1 -1
- package/lib/edge/{bundle-27694b25.cjs → bundle-ab7ced06.cjs} +20 -20
- package/lib/edge/{bundle-85928e24.js → bundle-d76f7298.js} +298 -298
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +8 -8
- package/lib/{edge/USE_CLIENT_BUNDLE-45eaf3a0.js → node/USE_CLIENT_BUNDLE-2b075311.js} +5 -5
- package/lib/{edge/USE_CLIENT_BUNDLE-4cfda43e.cjs → node/USE_CLIENT_BUNDLE-902511d8.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-37ad955b.js → node/USE_SERVER_BUNDLE-2a94723d.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-316838af.cjs → node/USE_SERVER_BUNDLE-c44d2651.cjs} +1 -1
- package/lib/node/{bundle-48c4d422.cjs → bundle-2f991b0d.cjs} +5 -5
- package/lib/node/{bundle-7efdf8b6.js → bundle-903b1df4.js} +108 -108
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +8 -8
- package/package.json +1 -1
- package/types/cjs/blocks/form/form/component-info.d.ts +2 -0
- package/types/cjs/blocks/form/form/form.d.ts +33 -0
- package/types/cjs/blocks/form/input/component-info.d.ts +2 -0
- package/types/cjs/blocks/form/input/input.d.ts +15 -0
- package/types/cjs/blocks/form/select/component-info.d.ts +2 -0
- package/types/cjs/blocks/form/select/select.d.ts +16 -0
- package/types/cjs/blocks/form/submit-button/component-info.d.ts +2 -0
- package/types/cjs/blocks/form/submit-button/submit-button.d.ts +10 -0
- package/types/cjs/blocks/slot/slot.d.ts +3 -6
- package/types/cjs/constants/extra-components.d.ts +7 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/get-env.d.ts +2 -0
- package/types/cjs/functions/get.d.ts +1 -0
- package/types/esm/blocks/form/form/component-info.d.ts +2 -0
- package/types/esm/blocks/form/form/form.d.ts +33 -0
- package/types/esm/blocks/form/input/component-info.d.ts +2 -0
- package/types/esm/blocks/form/input/input.d.ts +15 -0
- package/types/esm/blocks/form/select/component-info.d.ts +2 -0
- package/types/esm/blocks/form/select/select.d.ts +16 -0
- package/types/esm/blocks/form/submit-button/component-info.d.ts +2 -0
- package/types/esm/blocks/form/submit-button/submit-button.d.ts +10 -0
- package/types/esm/blocks/slot/slot.d.ts +3 -6
- package/types/esm/constants/extra-components.d.ts +7 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/get-env.d.ts +2 -0
- package/types/esm/functions/get.d.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LRUCache } from "lru-cache";
|
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer,
|
|
3
|
+
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-2b075311.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase()), TARGET = "rsc", getClassPropName = () => {
|
|
@@ -692,17 +692,17 @@ function Block(e) {
|
|
|
692
692
|
var l;
|
|
693
693
|
return !((l = t()) != null && l.component) && !n() ? o().children ?? [] : [];
|
|
694
694
|
}, s = function() {
|
|
695
|
-
var d, l, u, b, y, h, k, C;
|
|
695
|
+
var d, l, u, b, y, h, x, k, S, C;
|
|
696
696
|
return {
|
|
697
697
|
blockChildren: o().children ?? [],
|
|
698
698
|
componentRef: (d = t()) == null ? void 0 : d.component,
|
|
699
699
|
componentOptions: {
|
|
700
700
|
...getBlockComponentOptions(o()),
|
|
701
701
|
builderContext: e.context,
|
|
702
|
-
...((l = t()) == null ? void 0 : l.name) === "Core:Button" || ((u = t()) == null ? void 0 : u.name) === "Symbol" || ((b = t()) == null ? void 0 : b.name) === "Columns" ? {
|
|
702
|
+
...((l = t()) == null ? void 0 : l.name) === "Core:Button" || ((u = t()) == null ? void 0 : u.name) === "Symbol" || ((b = t()) == null ? void 0 : b.name) === "Columns" || ((y = t()) == null ? void 0 : y.name) === "Form:Form" ? {
|
|
703
703
|
builderLinkComponent: e.linkComponent
|
|
704
704
|
} : {},
|
|
705
|
-
...((
|
|
705
|
+
...((h = t()) == null ? void 0 : h.name) === "Symbol" || ((x = t()) == null ? void 0 : x.name) === "Columns" || ((k = t()) == null ? void 0 : k.name) === "Form:Form" ? {
|
|
706
706
|
builderComponents: e.registeredComponents
|
|
707
707
|
} : {}
|
|
708
708
|
},
|
|
@@ -710,7 +710,7 @@ function Block(e) {
|
|
|
710
710
|
linkComponent: e.linkComponent,
|
|
711
711
|
registeredComponents: e.registeredComponents,
|
|
712
712
|
builderBlock: o(),
|
|
713
|
-
includeBlockProps: ((
|
|
713
|
+
includeBlockProps: ((S = t()) == null ? void 0 : S.noWrap) === !0,
|
|
714
714
|
isInteractive: !((C = t()) != null && C.isRSC)
|
|
715
715
|
};
|
|
716
716
|
}, c = e.context;
|
|
@@ -826,7 +826,7 @@ function Columns(e) {
|
|
|
826
826
|
})
|
|
827
827
|
};
|
|
828
828
|
}, f = function(u) {
|
|
829
|
-
const b = u === 0 ? 0 : t, y = i(u), h = `${b}px`,
|
|
829
|
+
const b = u === 0 ? 0 : t, y = i(u), h = `${b}px`, x = "100%", k = 0;
|
|
830
830
|
return {
|
|
831
831
|
...{
|
|
832
832
|
display: "flex",
|
|
@@ -836,19 +836,19 @@ function Columns(e) {
|
|
|
836
836
|
width: y,
|
|
837
837
|
["marginLeft"]: h,
|
|
838
838
|
"--column-width-mobile": s({
|
|
839
|
-
stackedStyle:
|
|
839
|
+
stackedStyle: x,
|
|
840
840
|
desktopStyle: y
|
|
841
841
|
}),
|
|
842
842
|
"--column-margin-left-mobile": s({
|
|
843
|
-
stackedStyle:
|
|
843
|
+
stackedStyle: k,
|
|
844
844
|
desktopStyle: h
|
|
845
845
|
}),
|
|
846
846
|
"--column-width-tablet": a({
|
|
847
|
-
stackedStyle:
|
|
847
|
+
stackedStyle: x,
|
|
848
848
|
desktopStyle: y
|
|
849
849
|
}),
|
|
850
850
|
"--column-margin-left-tablet": a({
|
|
851
|
-
stackedStyle:
|
|
851
|
+
stackedStyle: k,
|
|
852
852
|
desktopStyle: h
|
|
853
853
|
})
|
|
854
854
|
};
|
|
@@ -888,7 +888,7 @@ function Columns(e) {
|
|
|
888
888
|
/* @__PURE__ */ jsxs(
|
|
889
889
|
"div",
|
|
890
890
|
{
|
|
891
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
891
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-febc5ea6`,
|
|
892
892
|
style: m(),
|
|
893
893
|
children: [
|
|
894
894
|
/* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: g() }) }),
|
|
@@ -924,7 +924,7 @@ function Columns(e) {
|
|
|
924
924
|
]
|
|
925
925
|
}
|
|
926
926
|
),
|
|
927
|
-
/* @__PURE__ */ jsx("style", { children: `.div-
|
|
927
|
+
/* @__PURE__ */ jsx("style", { children: `.div-febc5ea6 {
|
|
928
928
|
display: flex;
|
|
929
929
|
line-height: normal;
|
|
930
930
|
}` })
|
|
@@ -1330,59 +1330,12 @@ const getTopLevelDomain = (e) => {
|
|
|
1330
1330
|
advanced: !0
|
|
1331
1331
|
}]
|
|
1332
1332
|
}, componentInfo$9 = {
|
|
1333
|
-
name: "Custom Code",
|
|
1334
|
-
static: !0,
|
|
1335
|
-
requiredPermissions: ["editCode"],
|
|
1336
|
-
inputs: [{
|
|
1337
|
-
name: "code",
|
|
1338
|
-
type: "html",
|
|
1339
|
-
required: !0,
|
|
1340
|
-
defaultValue: "<p>Hello there, I am custom HTML code!</p>",
|
|
1341
|
-
code: !0
|
|
1342
|
-
}, {
|
|
1343
|
-
name: "replaceNodes",
|
|
1344
|
-
type: "boolean",
|
|
1345
|
-
helperText: "Preserve server rendered dom nodes",
|
|
1346
|
-
advanced: !0
|
|
1347
|
-
}, {
|
|
1348
|
-
name: "scriptsClientOnly",
|
|
1349
|
-
type: "boolean",
|
|
1350
|
-
defaultValue: !1,
|
|
1351
|
-
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1352
|
-
advanced: !0
|
|
1353
|
-
}]
|
|
1354
|
-
}, componentInfo$8 = {
|
|
1355
|
-
name: "Embed",
|
|
1356
|
-
static: !0,
|
|
1357
|
-
inputs: [{
|
|
1358
|
-
name: "url",
|
|
1359
|
-
type: "url",
|
|
1360
|
-
required: !0,
|
|
1361
|
-
defaultValue: "",
|
|
1362
|
-
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1363
|
-
onChange: (e) => {
|
|
1364
|
-
const t = e.get("url");
|
|
1365
|
-
if (t)
|
|
1366
|
-
return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((o) => o.json()).then((o) => {
|
|
1367
|
-
e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
|
|
1368
|
-
}).catch((o) => {
|
|
1369
|
-
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
1370
|
-
});
|
|
1371
|
-
e.delete("content");
|
|
1372
|
-
}
|
|
1373
|
-
}, {
|
|
1374
|
-
name: "content",
|
|
1375
|
-
type: "html",
|
|
1376
|
-
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1377
|
-
hideFromUI: !0
|
|
1378
|
-
}]
|
|
1379
|
-
}, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type), componentInfo$7 = {
|
|
1380
1333
|
name: "Fragment",
|
|
1381
1334
|
static: !0,
|
|
1382
1335
|
hidden: !0,
|
|
1383
1336
|
canHaveChildren: !0,
|
|
1384
1337
|
noWrap: !0
|
|
1385
|
-
}, componentInfo$
|
|
1338
|
+
}, componentInfo$8 = {
|
|
1386
1339
|
name: "Image",
|
|
1387
1340
|
static: !0,
|
|
1388
1341
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -1482,21 +1435,7 @@ const getTopLevelDomain = (e) => {
|
|
|
1482
1435
|
advanced: !0,
|
|
1483
1436
|
defaultValue: 0.7041
|
|
1484
1437
|
}]
|
|
1485
|
-
}, componentInfo$
|
|
1486
|
-
// friendlyName?
|
|
1487
|
-
name: "Raw:Img",
|
|
1488
|
-
hideFromInsertMenu: !0,
|
|
1489
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
1490
|
-
inputs: [{
|
|
1491
|
-
name: "image",
|
|
1492
|
-
bubble: !0,
|
|
1493
|
-
type: "file",
|
|
1494
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
|
|
1495
|
-
required: !0
|
|
1496
|
-
}],
|
|
1497
|
-
noWrap: !0,
|
|
1498
|
-
static: !0
|
|
1499
|
-
}, componentInfo$4 = {
|
|
1438
|
+
}, componentInfo$7 = {
|
|
1500
1439
|
name: "Core:Section",
|
|
1501
1440
|
static: !0,
|
|
1502
1441
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1535,7 +1474,7 @@ const getTopLevelDomain = (e) => {
|
|
|
1535
1474
|
}
|
|
1536
1475
|
}
|
|
1537
1476
|
}]
|
|
1538
|
-
}, componentInfo$
|
|
1477
|
+
}, componentInfo$6 = {
|
|
1539
1478
|
name: "Slot",
|
|
1540
1479
|
isRSC: !0,
|
|
1541
1480
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1572,7 +1511,7 @@ function Slot(e) {
|
|
|
1572
1511
|
}
|
|
1573
1512
|
);
|
|
1574
1513
|
}
|
|
1575
|
-
const componentInfo$
|
|
1514
|
+
const componentInfo$5 = {
|
|
1576
1515
|
name: "Symbol",
|
|
1577
1516
|
noWrap: !0,
|
|
1578
1517
|
static: !0,
|
|
@@ -1605,7 +1544,7 @@ const componentInfo$2 = {
|
|
|
1605
1544
|
hideFromUI: !0,
|
|
1606
1545
|
type: "boolean"
|
|
1607
1546
|
}]
|
|
1608
|
-
}, componentInfo$
|
|
1547
|
+
}, componentInfo$4 = {
|
|
1609
1548
|
name: "Text",
|
|
1610
1549
|
static: !0,
|
|
1611
1550
|
isRSC: !0,
|
|
@@ -1637,7 +1576,68 @@ function Text(e) {
|
|
|
1637
1576
|
}
|
|
1638
1577
|
);
|
|
1639
1578
|
}
|
|
1640
|
-
const componentInfo = {
|
|
1579
|
+
const componentInfo$3 = {
|
|
1580
|
+
name: "Custom Code",
|
|
1581
|
+
static: !0,
|
|
1582
|
+
requiredPermissions: ["editCode"],
|
|
1583
|
+
inputs: [{
|
|
1584
|
+
name: "code",
|
|
1585
|
+
type: "html",
|
|
1586
|
+
required: !0,
|
|
1587
|
+
defaultValue: "<p>Hello there, I am custom HTML code!</p>",
|
|
1588
|
+
code: !0
|
|
1589
|
+
}, {
|
|
1590
|
+
name: "replaceNodes",
|
|
1591
|
+
type: "boolean",
|
|
1592
|
+
helperText: "Preserve server rendered dom nodes",
|
|
1593
|
+
advanced: !0
|
|
1594
|
+
}, {
|
|
1595
|
+
name: "scriptsClientOnly",
|
|
1596
|
+
type: "boolean",
|
|
1597
|
+
defaultValue: !1,
|
|
1598
|
+
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1599
|
+
advanced: !0
|
|
1600
|
+
}]
|
|
1601
|
+
}, componentInfo$2 = {
|
|
1602
|
+
name: "Embed",
|
|
1603
|
+
static: !0,
|
|
1604
|
+
inputs: [{
|
|
1605
|
+
name: "url",
|
|
1606
|
+
type: "url",
|
|
1607
|
+
required: !0,
|
|
1608
|
+
defaultValue: "",
|
|
1609
|
+
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1610
|
+
onChange: (e) => {
|
|
1611
|
+
const t = e.get("url");
|
|
1612
|
+
if (t)
|
|
1613
|
+
return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((o) => o.json()).then((o) => {
|
|
1614
|
+
e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
|
|
1615
|
+
}).catch((o) => {
|
|
1616
|
+
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
1617
|
+
});
|
|
1618
|
+
e.delete("content");
|
|
1619
|
+
}
|
|
1620
|
+
}, {
|
|
1621
|
+
name: "content",
|
|
1622
|
+
type: "html",
|
|
1623
|
+
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1624
|
+
hideFromUI: !0
|
|
1625
|
+
}]
|
|
1626
|
+
}, SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"], isJsScript = (e) => SCRIPT_MIME_TYPES.includes(e.type), componentInfo$1 = {
|
|
1627
|
+
// friendlyName?
|
|
1628
|
+
name: "Raw:Img",
|
|
1629
|
+
hideFromInsertMenu: !0,
|
|
1630
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
1631
|
+
inputs: [{
|
|
1632
|
+
name: "image",
|
|
1633
|
+
bubble: !0,
|
|
1634
|
+
type: "file",
|
|
1635
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
|
|
1636
|
+
required: !0
|
|
1637
|
+
}],
|
|
1638
|
+
noWrap: !0,
|
|
1639
|
+
static: !0
|
|
1640
|
+
}, componentInfo = {
|
|
1641
1641
|
name: "Video",
|
|
1642
1642
|
canHaveChildren: !0,
|
|
1643
1643
|
defaultStyles: {
|
|
@@ -1718,43 +1718,43 @@ const componentInfo = {
|
|
|
1718
1718
|
defaultValue: !0,
|
|
1719
1719
|
advanced: !0
|
|
1720
1720
|
}]
|
|
1721
|
-
},
|
|
1721
|
+
}, getExtraComponents = () => [{
|
|
1722
|
+
component: CustomCode,
|
|
1723
|
+
...componentInfo$3
|
|
1724
|
+
}, {
|
|
1725
|
+
component: Embed,
|
|
1726
|
+
...componentInfo$2
|
|
1727
|
+
}, {
|
|
1728
|
+
component: ImgComponent,
|
|
1729
|
+
...componentInfo$1
|
|
1730
|
+
}, {
|
|
1731
|
+
component: Video,
|
|
1732
|
+
...componentInfo
|
|
1733
|
+
}], getDefaultRegisteredComponents = () => [{
|
|
1722
1734
|
component: Button,
|
|
1723
1735
|
...componentInfo$b
|
|
1724
1736
|
}, {
|
|
1725
1737
|
component: Columns,
|
|
1726
1738
|
...componentInfo$a
|
|
1727
1739
|
}, {
|
|
1728
|
-
component:
|
|
1740
|
+
component: FragmentComponent,
|
|
1729
1741
|
...componentInfo$9
|
|
1730
1742
|
}, {
|
|
1731
|
-
component:
|
|
1743
|
+
component: Image,
|
|
1732
1744
|
...componentInfo$8
|
|
1733
1745
|
}, {
|
|
1734
|
-
component:
|
|
1746
|
+
component: SectionComponent,
|
|
1735
1747
|
...componentInfo$7
|
|
1736
1748
|
}, {
|
|
1737
|
-
component:
|
|
1749
|
+
component: Slot,
|
|
1738
1750
|
...componentInfo$6
|
|
1739
|
-
}, {
|
|
1740
|
-
component: ImgComponent,
|
|
1741
|
-
...componentInfo$5
|
|
1742
|
-
}, {
|
|
1743
|
-
component: SectionComponent,
|
|
1744
|
-
...componentInfo$4
|
|
1745
1751
|
}, {
|
|
1746
1752
|
component: Symbol$1,
|
|
1747
|
-
...componentInfo$
|
|
1753
|
+
...componentInfo$5
|
|
1748
1754
|
}, {
|
|
1749
1755
|
component: Text,
|
|
1750
|
-
...componentInfo$
|
|
1751
|
-
}, {
|
|
1752
|
-
component: Video,
|
|
1753
|
-
...componentInfo
|
|
1754
|
-
}, {
|
|
1755
|
-
component: Slot,
|
|
1756
|
-
...componentInfo$3
|
|
1757
|
-
}], components = [], createRegisterComponentMessage = (e) => ({
|
|
1756
|
+
...componentInfo$4
|
|
1757
|
+
}, ...getExtraComponents()], components = [], createRegisterComponentMessage = (e) => ({
|
|
1758
1758
|
type: "builder.registerComponent",
|
|
1759
1759
|
data: serializeComponentInfo(e)
|
|
1760
1760
|
}), serializeFn = (e) => {
|
|
@@ -1978,21 +1978,21 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
1978
1978
|
const S = flatten({
|
|
1979
1979
|
sort: b
|
|
1980
1980
|
});
|
|
1981
|
-
for (const
|
|
1982
|
-
h.searchParams.set(
|
|
1981
|
+
for (const C in S)
|
|
1982
|
+
h.searchParams.set(C, JSON.stringify(S[C]));
|
|
1983
1983
|
}
|
|
1984
|
-
const
|
|
1984
|
+
const x = {
|
|
1985
1985
|
...getBuilderSearchParamsFromWindow(),
|
|
1986
1986
|
...normalizeSearchParams(e.options || {})
|
|
1987
|
-
},
|
|
1988
|
-
for (const S in
|
|
1989
|
-
h.searchParams.set(S, String(
|
|
1987
|
+
}, k = flatten(x);
|
|
1988
|
+
for (const S in k)
|
|
1989
|
+
h.searchParams.set(S, String(k[S]));
|
|
1990
1990
|
if (o && h.searchParams.set("userAttributes", JSON.stringify(o)), r) {
|
|
1991
1991
|
const S = flatten({
|
|
1992
1992
|
query: r
|
|
1993
1993
|
});
|
|
1994
|
-
for (const
|
|
1995
|
-
h.searchParams.set(
|
|
1994
|
+
for (const C in S)
|
|
1995
|
+
h.searchParams.set(C, JSON.stringify(S[C]));
|
|
1996
1996
|
}
|
|
1997
1997
|
return h;
|
|
1998
1998
|
}, checkContentHasResults = (e) => "results" in e;
|
|
@@ -2236,7 +2236,7 @@ function isFromTrustedHost(e, t) {
|
|
|
2236
2236
|
const n = new URL(t.origin), o = n.hostname;
|
|
2237
2237
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
2238
2238
|
}
|
|
2239
|
-
const SDK_VERSION = "0.13.
|
|
2239
|
+
const SDK_VERSION = "0.13.2", registry = {};
|
|
2240
2240
|
function register(e, t) {
|
|
2241
2241
|
let n = registry[e];
|
|
2242
2242
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
package/lib/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-2f991b0d.cjs"),t=require("./USE_CLIENT_BUNDLE-902511d8.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-c44d2651.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
|
package/lib/node/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as i, x as c, C as m, R as g, w as p, S as
|
|
2
|
-
import {
|
|
1
|
+
import { B as i, x as c, C as m, R as g, w as p, S as d, T as l, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as h, c as x, j as b, y as k, z as y, E as F, D as P } from "./bundle-903b1df4.js";
|
|
2
|
+
import { c as w, F as A, d as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-2b075311.js";
|
|
3
3
|
import "lru-cache";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "next/navigation";
|
|
7
|
-
import "./USE_SERVER_BUNDLE-
|
|
7
|
+
import "./USE_SERVER_BUNDLE-2a94723d.js";
|
|
8
8
|
export {
|
|
9
9
|
i as Blocks,
|
|
10
10
|
w as Button,
|
|
@@ -15,8 +15,8 @@ export {
|
|
|
15
15
|
g as RenderBlocks,
|
|
16
16
|
p as RenderContent,
|
|
17
17
|
V as Section,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
d as Symbol,
|
|
19
|
+
l as Text,
|
|
20
20
|
j as Video,
|
|
21
21
|
C as _processContentResult,
|
|
22
22
|
u as createRegisterComponentMessage,
|
|
@@ -25,9 +25,9 @@ export {
|
|
|
25
25
|
S as fetchOneEntry,
|
|
26
26
|
f as getAllContent,
|
|
27
27
|
R as getBuilderSearchParams,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
h as getContent,
|
|
29
|
+
x as isEditing,
|
|
30
|
+
b as isPreviewing,
|
|
31
31
|
k as register,
|
|
32
32
|
y as setEditorSettings,
|
|
33
33
|
F as subscribeToEditor,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react-nextjs",
|
|
3
3
|
"description": "Builder.io RSC SDK for NextJS App Directory",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.2",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export type FormProps = PropsWithBuilderData<BuilderComponentsProp & BuilderLinkComponentProp & {
|
|
6
|
+
attributes?: any;
|
|
7
|
+
name?: string;
|
|
8
|
+
action?: string;
|
|
9
|
+
validate?: boolean;
|
|
10
|
+
method?: string;
|
|
11
|
+
sendSubmissionsTo?: string;
|
|
12
|
+
sendSubmissionsToEmail?: string;
|
|
13
|
+
sendWithJs?: boolean;
|
|
14
|
+
contentType?: string;
|
|
15
|
+
customHeaders?: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
successUrl?: string;
|
|
19
|
+
previewState?: FormState;
|
|
20
|
+
successMessage?: BuilderBlock[];
|
|
21
|
+
errorMessage?: BuilderBlock[];
|
|
22
|
+
sendingMessage?: BuilderBlock[];
|
|
23
|
+
resetFormOnSubmit?: boolean;
|
|
24
|
+
errorMessagePath?: string;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
28
|
+
*/
|
|
29
|
+
export type FormState = "unsubmitted" | "sending" | "success" | "error";
|
|
30
|
+
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
31
|
+
import type { BuilderComponentsProp, BuilderLinkComponentProp, PropsWithBuilderData } from "../../../types/builder-props.js";
|
|
32
|
+
declare function FormComponent(props: FormProps): React.JSX.Element;
|
|
33
|
+
export default FormComponent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export interface FormInputProps {
|
|
6
|
+
type?: string;
|
|
7
|
+
attributes?: any;
|
|
8
|
+
name?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare function FormInputComponent(props: FormInputProps): React.JSX.Element;
|
|
15
|
+
export default FormInputComponent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export interface FormSelectProps {
|
|
6
|
+
options?: {
|
|
7
|
+
name?: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}[];
|
|
10
|
+
attributes?: any;
|
|
11
|
+
name?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function SelectComponent(props: FormSelectProps): React.JSX.Element;
|
|
16
|
+
export default SelectComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export interface ButtonProps {
|
|
6
|
+
attributes?: any;
|
|
7
|
+
text?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function SubmitButton(props: ButtonProps): React.JSX.Element;
|
|
10
|
+
export default SubmitButton;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export
|
|
2
|
+
export type DropzoneProps = PropsWithBuilderData<{
|
|
3
3
|
name: string;
|
|
4
|
-
builderBlock: BuilderBlock;
|
|
5
|
-
builderContext: BuilderContextInterface;
|
|
6
4
|
attributes: any;
|
|
7
|
-
}
|
|
8
|
-
import type {
|
|
9
|
-
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
5
|
+
}>;
|
|
6
|
+
import type { PropsWithBuilderData } from "../../types/builder-props.js";
|
|
10
7
|
declare function Slot(props: DropzoneProps): React.JSX.Element;
|
|
11
8
|
export default Slot;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These are in a separate file because React Native does not support them (yet).
|
|
3
|
+
* Having them in a separate file allows us to override it to be empty in the
|
|
4
|
+
* React Native SDK.
|
|
5
|
+
*/
|
|
6
|
+
import type { RegisteredComponent } from '../context/types.js';
|
|
7
|
+
export declare const getExtraComponents: () => RegisteredComponent[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.13.
|
|
1
|
+
export declare const SDK_VERSION = "0.13.2";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const get: (obj: any, path: string, defaultValue?: any) => any;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export type FormProps = PropsWithBuilderData<BuilderComponentsProp & BuilderLinkComponentProp & {
|
|
6
|
+
attributes?: any;
|
|
7
|
+
name?: string;
|
|
8
|
+
action?: string;
|
|
9
|
+
validate?: boolean;
|
|
10
|
+
method?: string;
|
|
11
|
+
sendSubmissionsTo?: string;
|
|
12
|
+
sendSubmissionsToEmail?: string;
|
|
13
|
+
sendWithJs?: boolean;
|
|
14
|
+
contentType?: string;
|
|
15
|
+
customHeaders?: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
successUrl?: string;
|
|
19
|
+
previewState?: FormState;
|
|
20
|
+
successMessage?: BuilderBlock[];
|
|
21
|
+
errorMessage?: BuilderBlock[];
|
|
22
|
+
sendingMessage?: BuilderBlock[];
|
|
23
|
+
resetFormOnSubmit?: boolean;
|
|
24
|
+
errorMessagePath?: string;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
28
|
+
*/
|
|
29
|
+
export type FormState = "unsubmitted" | "sending" | "success" | "error";
|
|
30
|
+
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
31
|
+
import type { BuilderComponentsProp, BuilderLinkComponentProp, PropsWithBuilderData } from "../../../types/builder-props.js";
|
|
32
|
+
declare function FormComponent(props: FormProps): React.JSX.Element;
|
|
33
|
+
export default FormComponent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export interface FormInputProps {
|
|
6
|
+
type?: string;
|
|
7
|
+
attributes?: any;
|
|
8
|
+
name?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare function FormInputComponent(props: FormInputProps): React.JSX.Element;
|
|
15
|
+
export default FormInputComponent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export interface FormSelectProps {
|
|
6
|
+
options?: {
|
|
7
|
+
name?: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}[];
|
|
10
|
+
attributes?: any;
|
|
11
|
+
name?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function SelectComponent(props: FormSelectProps): React.JSX.Element;
|
|
16
|
+
export default SelectComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export interface ButtonProps {
|
|
6
|
+
attributes?: any;
|
|
7
|
+
text?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function SubmitButton(props: ButtonProps): React.JSX.Element;
|
|
10
|
+
export default SubmitButton;
|