@builder.io/sdk-react-nextjs 0.13.1 → 0.13.3

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.
Files changed (79) hide show
  1. package/lib/browser/{USE_CLIENT_BUNDLE-0e2e786f.js → USE_CLIENT_BUNDLE-04cd188b.js} +7 -7
  2. package/lib/{node/USE_CLIENT_BUNDLE-d6e6f95b.cjs → browser/USE_CLIENT_BUNDLE-dcad73d0.cjs} +1 -1
  3. package/lib/{edge/USE_SERVER_BUNDLE-2f4d4c84.js → browser/USE_SERVER_BUNDLE-498895bc.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-eebc5fb9.cjs → browser/USE_SERVER_BUNDLE-f6de6931.cjs} +1 -1
  5. package/lib/browser/{bundle-8768227a.cjs → bundle-09521c43.cjs} +17 -17
  6. package/lib/browser/{bundle-a759c640.js → bundle-16af19fc.js} +270 -270
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +8 -8
  9. package/lib/{browser/USE_CLIENT_BUNDLE-1c19fc49.cjs → edge/USE_CLIENT_BUNDLE-403b6348.cjs} +1 -1
  10. package/lib/{node/USE_CLIENT_BUNDLE-ea8e582d.js → edge/USE_CLIENT_BUNDLE-5b75ae27.js} +7 -7
  11. package/lib/{node/USE_SERVER_BUNDLE-18bb0dcb.js → edge/USE_SERVER_BUNDLE-1f2bfec0.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-78694df8.cjs → edge/USE_SERVER_BUNDLE-c05264ac.cjs} +1 -1
  13. package/lib/edge/{bundle-67a092ad.cjs → bundle-10fb1352.cjs} +23 -23
  14. package/lib/edge/{bundle-117e4014.js → bundle-32e28c53.js} +298 -298
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +8 -8
  17. package/lib/{edge/USE_CLIENT_BUNDLE-d79f63a1.cjs → node/USE_CLIENT_BUNDLE-85cf7e92.cjs} +1 -1
  18. package/lib/{edge/USE_CLIENT_BUNDLE-3b67982b.js → node/USE_CLIENT_BUNDLE-d1e6dcd3.js} +7 -7
  19. package/lib/{browser/USE_SERVER_BUNDLE-eda321c7.cjs → node/USE_SERVER_BUNDLE-1aafe1f0.cjs} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-c5bf5f08.js → node/USE_SERVER_BUNDLE-601fafbe.js} +1 -1
  21. package/lib/node/{bundle-1f2f3033.cjs → bundle-3f825965.cjs} +5 -5
  22. package/lib/node/{bundle-457b4e1d.js → bundle-42fea3bc.js} +108 -108
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +8 -8
  25. package/package.json +1 -1
  26. package/types/cjs/blocks/columns/columns.d.ts +1 -2
  27. package/types/cjs/blocks/columns/columns.types.d.ts +2 -2
  28. package/types/cjs/blocks/form/form/component-info.d.ts +2 -0
  29. package/types/cjs/blocks/form/form/form.d.ts +33 -0
  30. package/types/cjs/blocks/form/input/component-info.d.ts +2 -0
  31. package/types/cjs/blocks/form/input/input.d.ts +15 -0
  32. package/types/cjs/blocks/form/select/component-info.d.ts +2 -0
  33. package/types/cjs/blocks/form/select/select.d.ts +16 -0
  34. package/types/cjs/blocks/form/submit-button/component-info.d.ts +2 -0
  35. package/types/cjs/blocks/form/submit-button/submit-button.d.ts +10 -0
  36. package/types/cjs/blocks/slot/slot.d.ts +3 -6
  37. package/types/cjs/blocks/symbol/symbol.d.ts +1 -2
  38. package/types/cjs/blocks/symbol/symbol.types.d.ts +2 -2
  39. package/types/cjs/components/block/components/block-wrapper.d.ts +2 -2
  40. package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
  41. package/types/cjs/components/block/components/interactive-element.d.ts +3 -2
  42. package/types/cjs/components/blocks/blocks-wrapper.d.ts +2 -2
  43. package/types/cjs/components/content/content.types.d.ts +1 -8
  44. package/types/cjs/components/content/contentProps.types.d.ts +12 -0
  45. package/types/cjs/components/dynamic-renderer/dynamic-renderer.d.ts +4 -3
  46. package/types/cjs/constants/extra-components.d.ts +7 -0
  47. package/types/cjs/constants/sdk-version.d.ts +1 -1
  48. package/types/cjs/functions/get-env.d.ts +2 -0
  49. package/types/cjs/functions/get.d.ts +1 -0
  50. package/types/cjs/types/builder-props.d.ts +1 -1
  51. package/types/cjs/types/input.d.ts +1 -0
  52. package/types/cjs/types/typescript.d.ts +0 -3
  53. package/types/esm/blocks/columns/columns.d.ts +1 -2
  54. package/types/esm/blocks/columns/columns.types.d.ts +2 -2
  55. package/types/esm/blocks/form/form/component-info.d.ts +2 -0
  56. package/types/esm/blocks/form/form/form.d.ts +33 -0
  57. package/types/esm/blocks/form/input/component-info.d.ts +2 -0
  58. package/types/esm/blocks/form/input/input.d.ts +15 -0
  59. package/types/esm/blocks/form/select/component-info.d.ts +2 -0
  60. package/types/esm/blocks/form/select/select.d.ts +16 -0
  61. package/types/esm/blocks/form/submit-button/component-info.d.ts +2 -0
  62. package/types/esm/blocks/form/submit-button/submit-button.d.ts +10 -0
  63. package/types/esm/blocks/slot/slot.d.ts +3 -6
  64. package/types/esm/blocks/symbol/symbol.d.ts +1 -2
  65. package/types/esm/blocks/symbol/symbol.types.d.ts +2 -2
  66. package/types/esm/components/block/components/block-wrapper.d.ts +2 -2
  67. package/types/esm/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
  68. package/types/esm/components/block/components/interactive-element.d.ts +3 -2
  69. package/types/esm/components/blocks/blocks-wrapper.d.ts +2 -2
  70. package/types/esm/components/content/content.types.d.ts +1 -8
  71. package/types/esm/components/content/contentProps.types.d.ts +12 -0
  72. package/types/esm/components/dynamic-renderer/dynamic-renderer.d.ts +4 -3
  73. package/types/esm/constants/extra-components.d.ts +7 -0
  74. package/types/esm/constants/sdk-version.d.ts +1 -1
  75. package/types/esm/functions/get-env.d.ts +2 -0
  76. package/types/esm/functions/get.d.ts +1 -0
  77. package/types/esm/types/builder-props.d.ts +1 -1
  78. package/types/esm/types/input.d.ts +1 -0
  79. package/types/esm/types/typescript.d.ts +0 -3
@@ -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, b as Button, C as CustomCode, E as Embed, F as FragmentComponent, c as Image, d as ImgComponent, S as SectionComponent, V as Video, e as EnableEditor } from "./USE_CLIENT_BUNDLE-ea8e582d.js";
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-d1e6dcd3.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
- ...((y = t()) == null ? void 0 : y.name) === "Symbol" || ((h = t()) == null ? void 0 : h.name) === "Columns" ? {
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: ((k = t()) == null ? void 0 : k.noWrap) === !0,
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`, k = "100%", C = 0;
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: k,
839
+ stackedStyle: x,
840
840
  desktopStyle: y
841
841
  }),
842
842
  "--column-margin-left-mobile": s({
843
- stackedStyle: C,
843
+ stackedStyle: k,
844
844
  desktopStyle: h
845
845
  }),
846
846
  "--column-width-tablet": a({
847
- stackedStyle: k,
847
+ stackedStyle: x,
848
848
  desktopStyle: y
849
849
  }),
850
850
  "--column-margin-left-tablet": a({
851
- stackedStyle: C,
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-febc5ea6`,
891
+ className: `builder-columns ${e.builderBlock.id}-breakpoints div-65bb9135`,
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-febc5ea6 {
927
+ /* @__PURE__ */ jsx("style", { children: `.div-65bb9135 {
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$6 = {
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$5 = {
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$3 = {
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$2 = {
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$1 = {
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
- }, getDefaultRegisteredComponents = () => [{
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: CustomCode,
1740
+ component: FragmentComponent,
1729
1741
  ...componentInfo$9
1730
1742
  }, {
1731
- component: Embed,
1743
+ component: Image,
1732
1744
  ...componentInfo$8
1733
1745
  }, {
1734
- component: FragmentComponent,
1746
+ component: SectionComponent,
1735
1747
  ...componentInfo$7
1736
1748
  }, {
1737
- component: Image,
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$2
1753
+ ...componentInfo$5
1748
1754
  }, {
1749
1755
  component: Text,
1750
- ...componentInfo$1
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 x in S)
1982
- h.searchParams.set(x, JSON.stringify(S[x]));
1981
+ for (const C in S)
1982
+ h.searchParams.set(C, JSON.stringify(S[C]));
1983
1983
  }
1984
- const k = {
1984
+ const x = {
1985
1985
  ...getBuilderSearchParamsFromWindow(),
1986
1986
  ...normalizeSearchParams(e.options || {})
1987
- }, C = flatten(k);
1988
- for (const S in C)
1989
- h.searchParams.set(S, String(C[S]));
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 x in S)
1995
- h.searchParams.set(x, JSON.stringify(S[x]));
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.1", registry = {};
2239
+ const SDK_VERSION = "0.13.3", registry = {};
2240
2240
  function register(e, t) {
2241
2241
  let n = registry[e];
2242
2242
  if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-1f2f3033.cjs"),t=require("./USE_CLIENT_BUNDLE-d6e6f95b.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-78694df8.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-3f825965.cjs"),t=require("./USE_CLIENT_BUNDLE-85cf7e92.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-1aafe1f0.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;
@@ -1,10 +1,10 @@
1
- import { B as i, x as c, C as m, R as g, w as p, S as l, T as d, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as b, c as h, j as x, y as k, z as y, E as F, D as P } from "./bundle-457b4e1d.js";
2
- import { b as w, F as A, c as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-ea8e582d.js";
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-42fea3bc.js";
2
+ import { c as w, F as A, d as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-d1e6dcd3.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-18bb0dcb.js";
7
+ import "./USE_SERVER_BUNDLE-601fafbe.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
- l as Symbol,
19
- d as Text,
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
- b as getContent,
29
- h as isEditing,
30
- x as isPreviewing,
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.1",
4
+ "version": "0.13.3",
5
5
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- import type { PropsWithBuilderData } from "../../types/builder-props.js";
3
2
  import type { ColumnProps } from "./columns.types.js";
4
- declare function Columns(props: PropsWithBuilderData<ColumnProps>): React.JSX.Element;
3
+ declare function Columns(props: ColumnProps): React.JSX.Element;
5
4
  export default Columns;
@@ -1,12 +1,12 @@
1
1
  import type { BuilderBlock } from '../../types/builder-block.js';
2
- import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
2
+ import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props.js';
3
3
  type Column = {
4
4
  blocks: BuilderBlock[];
5
5
  width?: number;
6
6
  link?: string;
7
7
  };
8
8
  type StackColumnsAt = 'tablet' | 'mobile' | 'never';
9
- export interface ColumnProps extends BuilderComponentsProp, BuilderLinkComponentProp {
9
+ export interface ColumnProps extends BuilderComponentsProp, BuilderLinkComponentProp, BuilderDataProps {
10
10
  columns?: Column[];
11
11
  space?: number;
12
12
  stackColumnsAt?: StackColumnsAt;
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -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 = BuilderDataProps & 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, BuilderDataProps, BuilderLinkComponentProp } from "../../../types/builder-props.js";
32
+ declare function FormComponent(props: FormProps): React.JSX.Element;
33
+ export default FormComponent;
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -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,2 @@
1
+ import type { ComponentInfo } from '../../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -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,2 @@
1
+ import type { ComponentInfo } from '../../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -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 interface DropzoneProps {
2
+ export type DropzoneProps = BuilderDataProps & {
3
3
  name: string;
4
- builderBlock: BuilderBlock;
5
- builderContext: BuilderContextInterface;
6
4
  attributes: any;
7
- }
8
- import type { BuilderContextInterface } from "../../context/types.js";
9
- import type { BuilderBlock } from "../../types/builder-block.js";
5
+ };
6
+ import type { BuilderDataProps } from "../../types/builder-props.js";
10
7
  declare function Slot(props: DropzoneProps): React.JSX.Element;
11
8
  export default Slot;
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- import type { PropsWithBuilderData } from "../../types/builder-props.js";
3
2
  import type { SymbolProps } from "./symbol.types.js";
4
- declare function Symbol(props: PropsWithBuilderData<SymbolProps>): Promise<React.JSX.Element>;
3
+ declare function Symbol(props: SymbolProps): Promise<React.JSX.Element>;
5
4
  export default Symbol;
@@ -1,5 +1,5 @@
1
1
  import type { BuilderContent } from '../../types/builder-content.js';
2
- import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
2
+ import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props.js';
3
3
  interface SymbolInfo {
4
4
  model?: string;
5
5
  entry?: string;
@@ -8,7 +8,7 @@ interface SymbolInfo {
8
8
  inline?: boolean;
9
9
  dynamic?: boolean;
10
10
  }
11
- export interface SymbolProps extends BuilderComponentsProp, BuilderLinkComponentProp {
11
+ export interface SymbolProps extends BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp {
12
12
  symbol?: SymbolInfo;
13
13
  dataOnly?: boolean;
14
14
  dynamic?: boolean;
@@ -4,12 +4,12 @@ type BlockWrapperProps = {
4
4
  block: BuilderBlock;
5
5
  context: BuilderContextInterface;
6
6
  linkComponent: any;
7
+ children?: any;
7
8
  };
8
9
  /**
9
10
  * This component renders a block's wrapper HTML element (from the block's `tagName` property).
10
11
  */
11
12
  import type { BuilderContextInterface } from "../../../context/types.js";
12
13
  import type { BuilderBlock } from "../../../types/builder-block.js";
13
- import type { PropsWithChildren } from "../../../types/typescript.js";
14
- declare function BlockWrapper(props: PropsWithChildren<BlockWrapperProps>): React.JSX.Element;
14
+ declare function BlockWrapper(props: BlockWrapperProps): React.JSX.Element;
15
15
  export default BlockWrapper;
@@ -1,13 +1,13 @@
1
1
  import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
2
2
  import type { BuilderBlock } from '../../../../types/builder-block.js';
3
- import type { PropsWithBuilderData } from '../../../../types/builder-props.js';
3
+ import type { BuilderDataProps } from '../../../../types/builder-props.js';
4
4
  import type { InteractiveElementProps } from '../interactive-element.js';
5
- type ComponentOptions = PropsWithBuilderData<{
5
+ type ComponentOptions = BuilderDataProps & {
6
6
  [index: string]: any;
7
7
  attributes?: {
8
8
  [index: string]: any;
9
9
  };
10
- }>;
10
+ };
11
11
  export interface ComponentProps {
12
12
  componentRef: any;
13
13
  componentOptions: ComponentOptions;
@@ -5,9 +5,10 @@ export type InteractiveElementProps = {
5
5
  context: BuilderContextInterface;
6
6
  wrapperProps: Dictionary<any>;
7
7
  includeBlockProps: boolean;
8
+ children?: any;
8
9
  };
9
10
  import type { BuilderContextInterface } from "../../../context/types.js";
10
11
  import type { BuilderBlock } from "../../../types/builder-block.js";
11
- import type { Dictionary, PropsWithChildren } from "../../../types/typescript.js";
12
- declare function InteractiveElement(props: PropsWithChildren<InteractiveElementProps>): React.JSX.Element;
12
+ import type { Dictionary } from "../../../types/typescript.js";
13
+ declare function InteractiveElement(props: InteractiveElementProps): React.JSX.Element;
13
14
  export default InteractiveElement;
@@ -12,8 +12,8 @@ export type BlocksWrapperProps = {
12
12
  * Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
13
13
  */
14
14
  BlocksWrapperProps: any;
15
+ children?: any;
15
16
  };
16
17
  import type { BuilderBlock } from "../../types/builder-block.js";
17
- import type { PropsWithChildren } from "../../types/typescript.js";
18
- declare function BlocksWrapper(props: PropsWithChildren<BlocksWrapperProps>): React.JSX.Element;
18
+ declare function BlocksWrapper(props: BlocksWrapperProps): React.JSX.Element;
19
19
  export default BlocksWrapper;