@builder.io/sdk-solid 1.0.33 → 1.0.36

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/node/dev.jsx CHANGED
@@ -10,7 +10,7 @@ var isEmptyElement = (tagName) => {
10
10
 
11
11
  // src/components/dynamic-renderer/dynamic-renderer.tsx
12
12
  function DynamicRenderer(props) {
13
- return <Show
13
+ return <><Show
14
14
  fallback={<Dynamic
15
15
  {...props.attributes}
16
16
  {...props.actionAttributes}
@@ -28,7 +28,7 @@ function DynamicRenderer(props) {
28
28
  {...props.attributes}
29
29
  {...props.actionAttributes}
30
30
  component={props.TagName}
31
- >{props.children}</Dynamic></Show></Show>;
31
+ >{props.children}</Dynamic></Show></Show></>;
32
32
  }
33
33
  var Dynamic_renderer_default = DynamicRenderer;
34
34
 
@@ -66,17 +66,16 @@ function Button(props) {
66
66
  }
67
67
  };
68
68
  }
69
- return <Dynamic_renderer_default
69
+ return <><Dynamic_renderer_default
70
70
  attributes={attrs()}
71
71
  TagName={props.link ? props.builderLinkComponent || "a" : "button"}
72
72
  actionAttributes={{}}
73
- >{props.text}</Dynamic_renderer_default>;
73
+ >{props.text}</Dynamic_renderer_default></>;
74
74
  }
75
75
  var button_default = Button;
76
76
 
77
77
  // src/blocks/columns/columns.tsx
78
78
  import { Show as Show6, For as For4, createSignal as createSignal7 } from "solid-js";
79
- import { css as css2 } from "solid-styled-components";
80
79
 
81
80
  // src/components/blocks/blocks.tsx
82
81
  import { useContext, Show as Show5, For as For3 } from "solid-js";
@@ -292,6 +291,19 @@ function flattenState({
292
291
  });
293
292
  }
294
293
 
294
+ // src/constants/sdk-name.ts
295
+ var SDK_NAME_FOR_TARGET = (() => {
296
+ switch (TARGET) {
297
+ case "rsc":
298
+ return "react-nextjs";
299
+ case "reactNative":
300
+ return "react-native";
301
+ default:
302
+ return TARGET;
303
+ }
304
+ })();
305
+ var SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`;
306
+
295
307
  // src/functions/fast-clone.ts
296
308
  var fastClone = (obj) => JSON.parse(JSON.stringify(obj));
297
309
 
@@ -373,6 +385,7 @@ if (typeof output === 'object' && output !== null) {
373
385
  };
374
386
  var IVM_INSTANCE = null;
375
387
  var IVM_CONTEXT = null;
388
+ var SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react";
376
389
  var getIvm = () => {
377
390
  try {
378
391
  if (IVM_INSTANCE)
@@ -383,14 +396,15 @@ var getIvm = () => {
383
396
  } catch (error2) {
384
397
  logger.error("isolated-vm import error.", error2);
385
398
  }
386
- throw new Error(`${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on Node server.
399
+ const ERROR_MESSAGE = `${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
387
400
 
388
- In certain Node environments, the SDK requires additional initialization steps. This can be achieved by
389
- importing and calling \`initializeNodeRuntime()\` from "@builder.io/sdk-react/node/init". This must be done in
390
- a server-only execution path within your application.
401
+ SOLUTION: In a server-only execution path within your application, do one of the following:
402
+
403
+ ${SHOULD_MENTION_INITIALIZE_SCRIPT ? '- import and call `initializeNodeRuntime()` from "${SDK_NAME}/node/init".' : ""}
404
+ - add the following import: \`await import('isolated-vm')\`.
391
405
 
392
- Please see the documentation for more information: https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments
393
- `);
406
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
407
+ throw new Error(ERROR_MESSAGE);
394
408
  };
395
409
  function setIsolateContext(options = {
396
410
  memoryLimit: 128
@@ -1004,7 +1018,7 @@ var getSizesForBreakpoints = ({
1004
1018
 
1005
1019
  // src/components/inlined-styles.tsx
1006
1020
  function InlinedStyles(props) {
1007
- return <style innerHTML={props.styles} data-id={props.id} />;
1021
+ return <><style innerHTML={props.styles} data-id={props.id} /></>;
1008
1022
  }
1009
1023
  var Inlined_styles_default = InlinedStyles;
1010
1024
 
@@ -1027,7 +1041,7 @@ function BlockStyles(props) {
1027
1041
  }
1028
1042
  return true;
1029
1043
  });
1030
- const css5 = createMemo(() => {
1044
+ const css = createMemo(() => {
1031
1045
  const processedBlock = getProcessedBlock({
1032
1046
  block: props.block,
1033
1047
  localState: props.context.localState,
@@ -1090,7 +1104,7 @@ function BlockStyles(props) {
1090
1104
  hoverStylesClass
1091
1105
  ].join(" ");
1092
1106
  });
1093
- return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css5()} /></Show2>;
1107
+ return <><Show2 when={TARGET !== "reactNative" && css() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css()} /></Show2></>;
1094
1108
  }
1095
1109
  var Block_styles_default = BlockStyles;
1096
1110
 
@@ -1173,7 +1187,7 @@ function getBlockProperties({
1173
1187
 
1174
1188
  // src/components/block/components/block-wrapper.tsx
1175
1189
  function BlockWrapper(props) {
1176
- return <Dynamic_renderer_default
1190
+ return <><Dynamic_renderer_default
1177
1191
  TagName={props.Wrapper}
1178
1192
  attributes={getBlockProperties({
1179
1193
  block: props.block,
@@ -1187,7 +1201,7 @@ function BlockWrapper(props) {
1187
1201
  context: props.context.context,
1188
1202
  stripPrefix: true
1189
1203
  })}
1190
- >{props.children}</Dynamic_renderer_default>;
1204
+ >{props.children}</Dynamic_renderer_default></>;
1191
1205
  }
1192
1206
  var Block_wrapper_default = BlockWrapper;
1193
1207
 
@@ -1214,11 +1228,11 @@ function InteractiveElement(props) {
1214
1228
  })
1215
1229
  } : {};
1216
1230
  });
1217
- return <Dynamic2
1231
+ return <><Dynamic2
1218
1232
  {...props.wrapperProps}
1219
1233
  attributes={attributes()}
1220
1234
  component={props.Wrapper}
1221
- >{props.children}</Dynamic2>;
1235
+ >{props.children}</Dynamic2></>;
1222
1236
  }
1223
1237
  var interactive_element_default = InteractiveElement;
1224
1238
 
@@ -1260,7 +1274,7 @@ function ComponentRef(props) {
1260
1274
  const [Wrapper, setWrapper] = createSignal3(
1261
1275
  props.isInteractive ? interactive_element_default : props.componentRef
1262
1276
  );
1263
- return <Show3 when={props.componentRef}><Dynamic3
1277
+ return <><Show3 when={props.componentRef}><Dynamic3
1264
1278
  {...getWrapperProps({
1265
1279
  componentOptions: props.componentOptions,
1266
1280
  builderBlock: props.builderBlock,
@@ -1281,7 +1295,7 @@ function ComponentRef(props) {
1281
1295
  registeredComponents={props.registeredComponents}
1282
1296
  linkComponent={props.linkComponent}
1283
1297
  />;
1284
- }}</For></Dynamic3></Show3>;
1298
+ }}</For></Dynamic3></Show3></>;
1285
1299
  }
1286
1300
  var Component_ref_default = ComponentRef;
1287
1301
 
@@ -1289,12 +1303,12 @@ var Component_ref_default = ComponentRef;
1289
1303
  import { createSignal as createSignal4 } from "solid-js";
1290
1304
  function RepeatedBlock(props) {
1291
1305
  const [store, setStore] = createSignal4(props.repeatContext);
1292
- return <builder_context_default.Provider value={store()}><Block_default
1306
+ return <><builder_context_default.Provider value={store()}><Block_default
1293
1307
  block={props.block}
1294
1308
  context={store()}
1295
1309
  registeredComponents={props.registeredComponents}
1296
1310
  linkComponent={props.linkComponent}
1297
- /></builder_context_default.Provider>;
1311
+ /></builder_context_default.Provider></>;
1298
1312
  }
1299
1313
  var Repeated_block_default = RepeatedBlock;
1300
1314
 
@@ -1378,7 +1392,7 @@ function Block(props) {
1378
1392
  );
1379
1393
  }
1380
1394
  });
1381
- return <Show4 when={canShowBlock()}>
1395
+ return <><Show4 when={canShowBlock()}>
1382
1396
  <Block_styles_default block={props.block} context={props.context} />
1383
1397
  <Show4
1384
1398
  fallback={<Component_ref_default
@@ -1432,14 +1446,13 @@ function Block(props) {
1432
1446
  />;
1433
1447
  }}</For2>
1434
1448
  </Block_wrapper_default></Show4></Show4>
1435
- </Show4>;
1449
+ </Show4></>;
1436
1450
  }
1437
1451
  var Block_default = Block;
1438
1452
 
1439
1453
  // src/components/blocks/blocks-wrapper.tsx
1440
1454
  import { createMemo as createMemo6 } from "solid-js";
1441
1455
  import { Dynamic as Dynamic4 } from "solid-js/web";
1442
- import { css } from "solid-styled-components";
1443
1456
  function BlocksWrapper(props) {
1444
1457
  const className = createMemo6(() => {
1445
1458
  return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
@@ -1472,22 +1485,25 @@ function BlocksWrapper(props) {
1472
1485
  );
1473
1486
  }
1474
1487
  }
1475
- return <Dynamic4
1476
- class={className() + " " + css({
1477
- display: "flex",
1478
- flexDirection: "column",
1479
- alignItems: "stretch"
1480
- })}
1481
- builder-path={props.path}
1482
- builder-parent-id={props.parent}
1483
- {...{}}
1484
- style={props.styleProp}
1485
- onClick={(event) => onClick()}
1486
- onMouseEnter={(event) => onMouseEnter()}
1487
- onKeyPress={(event) => onClick()}
1488
- {...props.BlocksWrapperProps}
1489
- component={props.BlocksWrapper}
1490
- >{props.children}</Dynamic4>;
1488
+ return <>
1489
+ <Dynamic4
1490
+ class={className() + " dynamic-1bb6a3a2"}
1491
+ builder-path={props.path}
1492
+ builder-parent-id={props.parent}
1493
+ {...{}}
1494
+ style={props.styleProp}
1495
+ onClick={(event) => onClick()}
1496
+ onMouseEnter={(event) => onMouseEnter()}
1497
+ onKeyPress={(event) => onClick()}
1498
+ {...props.BlocksWrapperProps}
1499
+ component={props.BlocksWrapper}
1500
+ >{props.children}</Dynamic4>
1501
+ <style>{`.dynamic-1bb6a3a2 {
1502
+ display: flex;
1503
+ flex-direction: column;
1504
+ align-items: stretch;
1505
+ }`}</style>
1506
+ </>;
1491
1507
  }
1492
1508
  var Blocks_wrapper_default = BlocksWrapper;
1493
1509
 
@@ -1495,7 +1511,7 @@ var Blocks_wrapper_default = BlocksWrapper;
1495
1511
  function Blocks(props) {
1496
1512
  const builderContext = useContext(builder_context_default);
1497
1513
  const componentsContext = useContext(components_context_default);
1498
- return <Blocks_wrapper_default
1514
+ return <><Blocks_wrapper_default
1499
1515
  blocks={props.blocks}
1500
1516
  parent={props.parent}
1501
1517
  path={props.path}
@@ -1511,7 +1527,7 @@ function Blocks(props) {
1511
1527
  context={props.context || builderContext}
1512
1528
  registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
1513
1529
  />;
1514
- }}</For3></Show5></Blocks_wrapper_default>;
1530
+ }}</For3></Show5></Blocks_wrapper_default></>;
1515
1531
  }
1516
1532
  var Blocks_default = Blocks;
1517
1533
 
@@ -1638,50 +1654,52 @@ function Columns(props) {
1638
1654
  style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1639
1655
  };
1640
1656
  }
1641
- return <div
1642
- class={getColumnsClass(props.builderBlock?.id) + " " + css2({
1643
- display: "flex",
1644
- lineHeight: "normal"
1645
- })}
1646
- style={columnsCssVars()}
1647
- {...{}}
1648
- >
1649
- <Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
1650
- id="builderio-columns"
1651
- styles={columnsStyles()}
1652
- /></Show6>
1653
- <For4 each={props.columns}>{(column, _index) => {
1654
- const index = _index();
1655
- return <Dynamic_renderer_default
1656
- key={index}
1657
- TagName={getTagName(column)}
1658
- actionAttributes={{}}
1659
- attributes={getAttributes(column, index)}
1660
- ><Blocks_default
1661
- path={`component.options.columns.${index}.blocks`}
1662
- parent={props.builderBlock.id}
1663
- styleProp={{
1664
- flexGrow: "1"
1665
- }}
1666
- context={props.builderContext}
1667
- registeredComponents={props.builderComponents}
1668
- linkComponent={props.builderLinkComponent}
1669
- blocks={column.blocks}
1670
- /></Dynamic_renderer_default>;
1671
- }}</For4>
1672
- </div>;
1657
+ return <>
1658
+ <div
1659
+ class={getColumnsClass(props.builderBlock?.id) + " div-f2f53158"}
1660
+ style={columnsCssVars()}
1661
+ {...{}}
1662
+ >
1663
+ <Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
1664
+ id="builderio-columns"
1665
+ styles={columnsStyles()}
1666
+ /></Show6>
1667
+ <For4 each={props.columns}>{(column, _index) => {
1668
+ const index = _index();
1669
+ return <Dynamic_renderer_default
1670
+ key={index}
1671
+ TagName={getTagName(column)}
1672
+ actionAttributes={{}}
1673
+ attributes={getAttributes(column, index)}
1674
+ ><Blocks_default
1675
+ path={`component.options.columns.${index}.blocks`}
1676
+ parent={props.builderBlock.id}
1677
+ styleProp={{
1678
+ flexGrow: "1"
1679
+ }}
1680
+ context={props.builderContext}
1681
+ registeredComponents={props.builderComponents}
1682
+ linkComponent={props.builderLinkComponent}
1683
+ blocks={column.blocks}
1684
+ /></Dynamic_renderer_default>;
1685
+ }}</For4>
1686
+ </div>
1687
+ <style>{`.div-f2f53158 {
1688
+ display: flex;
1689
+ line-height: normal;
1690
+ }`}</style>
1691
+ </>;
1673
1692
  }
1674
1693
  var columns_default = Columns;
1675
1694
 
1676
1695
  // src/blocks/fragment/fragment.tsx
1677
1696
  function FragmentComponent(props) {
1678
- return <span>{props.children}</span>;
1697
+ return <><span>{props.children}</span></>;
1679
1698
  }
1680
1699
  var fragment_default = FragmentComponent;
1681
1700
 
1682
1701
  // src/blocks/image/image.tsx
1683
1702
  import { Show as Show7, createMemo as createMemo8 } from "solid-js";
1684
- import { css as css3 } from "solid-styled-components";
1685
1703
 
1686
1704
  // src/blocks/image/image.helpers.ts
1687
1705
  function removeProtocol(path) {
@@ -1769,59 +1787,60 @@ function Image(props) {
1769
1787
  return out;
1770
1788
  });
1771
1789
  return <>
1772
- <picture>
1773
- <Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
1774
- <img
1775
- class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
1776
- opacity: "1",
1777
- transition: "opacity 0.2s ease-in-out"
1778
- })}
1779
- loading={props.highPriority ? "eager" : "lazy"}
1780
- fetchpriority={props.highPriority ? "high" : "auto"}
1781
- alt={props.altText}
1782
- role={props.altText ? void 0 : "presentation"}
1790
+ <>
1791
+ <picture>
1792
+ <Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
1793
+ <img
1794
+ class={"builder-image" + (props.className ? " " + props.className : "") + " img-54b38751"}
1795
+ loading={props.highPriority ? "eager" : "lazy"}
1796
+ fetchpriority={props.highPriority ? "high" : "auto"}
1797
+ alt={props.altText}
1798
+ role={props.altText ? void 0 : "presentation"}
1799
+ style={{
1800
+ "object-position": props.backgroundPosition || "center",
1801
+ "object-fit": props.backgroundSize || "cover",
1802
+ ...aspectRatioCss()
1803
+ }}
1804
+ src={props.image}
1805
+ srcset={srcSetToUse()}
1806
+ sizes={props.sizes}
1807
+ />
1808
+ </picture>
1809
+ <Show7
1810
+ when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
1811
+ ><div
1812
+ class="builder-image-sizer div-54b38751"
1783
1813
  style={{
1784
- "object-position": props.backgroundPosition || "center",
1785
- "object-fit": props.backgroundSize || "cover",
1786
- ...aspectRatioCss()
1814
+ "padding-top": props.aspectRatio * 100 + "%"
1787
1815
  }}
1788
- src={props.image}
1789
- srcset={srcSetToUse()}
1790
- sizes={props.sizes}
1791
- />
1792
- </picture>
1793
- <Show7
1794
- when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
1795
- ><div
1796
- class={"builder-image-sizer " + css3({
1797
- width: "100%",
1798
- pointerEvents: "none",
1799
- fontSize: "0"
1800
- })}
1801
- style={{
1802
- "padding-top": props.aspectRatio * 100 + "%"
1803
- }}
1804
- /></Show7>
1805
- <Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
1806
- <Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div
1807
- class={css3({
1808
- display: "flex",
1809
- flexDirection: "column",
1810
- alignItems: "stretch",
1811
- position: "absolute",
1812
- top: "0",
1813
- left: "0",
1814
- width: "100%",
1815
- height: "100%"
1816
- })}
1817
- >{props.children}</div></Show7>
1816
+ /></Show7>
1817
+ <Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
1818
+ <Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-54b38751-2">{props.children}</div></Show7>
1819
+ </>
1820
+ <style>{`.img-54b38751 {
1821
+ opacity: 1;
1822
+ transition: opacity 0.2s ease-in-out;
1823
+ }.div-54b38751 {
1824
+ width: 100%;
1825
+ pointer-events: none;
1826
+ font-size: 0;
1827
+ }.div-54b38751-2 {
1828
+ display: flex;
1829
+ flex-direction: column;
1830
+ align-items: stretch;
1831
+ position: absolute;
1832
+ top: 0;
1833
+ left: 0;
1834
+ width: 100%;
1835
+ height: 100%;
1836
+ }`}</style>
1818
1837
  </>;
1819
1838
  }
1820
1839
  var image_default = Image;
1821
1840
 
1822
1841
  // src/blocks/section/section.tsx
1823
1842
  function SectionComponent(props) {
1824
- return <section
1843
+ return <><section
1825
1844
  {...{}}
1826
1845
  {...props.attributes}
1827
1846
  style={{
@@ -1836,7 +1855,7 @@ function SectionComponent(props) {
1836
1855
  "margin-left": "auto",
1837
1856
  "margin-right": "auto"
1838
1857
  }}
1839
- >{props.children}</section>;
1858
+ >{props.children}</section></>;
1840
1859
  }
1841
1860
  var section_default = SectionComponent;
1842
1861
 
@@ -2278,7 +2297,7 @@ function Accordion(props) {
2278
2297
  setOpen(onlyOneAtATime() ? [index] : open().concat(index));
2279
2298
  }
2280
2299
  }
2281
- return <div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
2300
+ return <><div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
2282
2301
  const index = _index();
2283
2302
  return <>
2284
2303
  <div
@@ -2312,7 +2331,7 @@ function Accordion(props) {
2312
2331
  linkComponent={props.builderLinkComponent}
2313
2332
  /></div></Show8>
2314
2333
  </>;
2315
- }}</For5></div>;
2334
+ }}</For5></div></>;
2316
2335
  }
2317
2336
  var accordion_default = Accordion;
2318
2337
 
@@ -2597,7 +2616,7 @@ var componentInfo5 = {
2597
2616
  name: "image",
2598
2617
  type: "file",
2599
2618
  bubble: true,
2600
- allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
2619
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
2601
2620
  required: true,
2602
2621
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
2603
2622
  onChange: (options) => {
@@ -2769,7 +2788,7 @@ var componentInfo7 = {
2769
2788
 
2770
2789
  // src/blocks/slot/slot.tsx
2771
2790
  function Slot(props) {
2772
- return <div
2791
+ return <><div
2773
2792
  style={{
2774
2793
  "pointer-events": "auto"
2775
2794
  }}
@@ -2781,7 +2800,7 @@ function Slot(props) {
2781
2800
  path={`symbol.data.${props.name}`}
2782
2801
  context={props.builderContext}
2783
2802
  blocks={props.builderContext.rootState?.[props.name]}
2784
- /></div>;
2803
+ /></div></>;
2785
2804
  }
2786
2805
  var slot_default = Slot;
2787
2806
 
@@ -2977,7 +2996,7 @@ function Tabs(props) {
2977
2996
  setActiveTab(index);
2978
2997
  }
2979
2998
  }
2980
- return <div>
2999
+ return <><div>
2981
3000
  <div
2982
3001
  class="builder-tabs-wrap"
2983
3002
  style={{
@@ -3012,7 +3031,7 @@ function Tabs(props) {
3012
3031
  registeredComponents={props.builderComponents}
3013
3032
  linkComponent={props.builderLinkComponent}
3014
3033
  /></div></Show9>
3015
- </div>;
3034
+ </div></>;
3016
3035
  }
3017
3036
  var tabs_default = Tabs;
3018
3037
 
@@ -3039,13 +3058,13 @@ var componentInfo10 = {
3039
3058
 
3040
3059
  // src/blocks/text/text.tsx
3041
3060
  function Text(props) {
3042
- return <div
3061
+ return <><div
3043
3062
  class="builder-text"
3044
3063
  innerHTML={props.text?.toString() || ""}
3045
3064
  style={{
3046
3065
  outline: "none"
3047
3066
  }}
3048
- />;
3067
+ /></>;
3049
3068
  }
3050
3069
  var text_default = Text;
3051
3070
 
@@ -3113,11 +3132,11 @@ function CustomCode(props) {
3113
3132
  }
3114
3133
  }
3115
3134
  });
3116
- return <div
3135
+ return <><div
3117
3136
  class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
3118
3137
  ref={elementRef}
3119
3138
  innerHTML={props.code}
3120
- />;
3139
+ /></>;
3121
3140
  }
3122
3141
  var custom_code_default = CustomCode;
3123
3142
 
@@ -3135,7 +3154,7 @@ var componentInfo12 = {
3135
3154
  const url = options.get("url");
3136
3155
  if (url) {
3137
3156
  options.set("content", "Loading...");
3138
- const apiKey = "ae0e60e78201a3f2b0de4b";
3157
+ const apiKey = _iframelyApiKey;
3139
3158
  return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
3140
3159
  if (options.get("url") === url) {
3141
3160
  if (data.html) {
@@ -3205,7 +3224,7 @@ function Embed(props) {
3205
3224
  createEffect(
3206
3225
  on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
3207
3226
  );
3208
- return <div class="builder-embed" ref={elem} innerHTML={props.content} />;
3227
+ return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
3209
3228
  }
3210
3229
  var embed_default = Embed;
3211
3230
 
@@ -3445,7 +3464,6 @@ var componentInfo13 = {
3445
3464
 
3446
3465
  // src/blocks/form/form/form.tsx
3447
3466
  import { Show as Show10, For as For7, createSignal as createSignal13 } from "solid-js";
3448
- import { css as css4 } from "solid-styled-components";
3449
3467
 
3450
3468
  // src/functions/get-env.ts
3451
3469
  var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
@@ -3648,50 +3666,51 @@ function FormComponent(props) {
3648
3666
  }
3649
3667
  }
3650
3668
  let formRef;
3651
- return <form
3652
- validate={props.validate}
3653
- ref={formRef}
3654
- action={!props.sendWithJs && props.action}
3655
- method={props.method}
3656
- name={props.name}
3657
- onSubmit={(event) => onSubmit(event)}
3658
- {...{}}
3659
- {...{}}
3660
- {...props.attributes}
3661
- >
3662
- <Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
3663
- const idx = _index();
3664
- return <Block_default
3665
- key={`form-block-${idx}`}
3666
- block={block}
3669
+ return <>
3670
+ <form
3671
+ validate={props.validate}
3672
+ ref={formRef}
3673
+ action={!props.sendWithJs && props.action}
3674
+ method={props.method}
3675
+ name={props.name}
3676
+ onSubmit={(event) => onSubmit(event)}
3677
+ {...{}}
3678
+ {...{}}
3679
+ {...props.attributes}
3680
+ >
3681
+ <Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
3682
+ const idx = _index();
3683
+ return <Block_default
3684
+ key={`form-block-${idx}`}
3685
+ block={block}
3686
+ context={props.builderContext}
3687
+ registeredComponents={props.builderComponents}
3688
+ linkComponent={props.builderLinkComponent}
3689
+ />;
3690
+ }}</For7></Show10>
3691
+ <Show10 when={submissionState() === "error"}><Blocks_default
3692
+ path="errorMessage"
3693
+ blocks={props.errorMessage}
3667
3694
  context={props.builderContext}
3668
- registeredComponents={props.builderComponents}
3669
- linkComponent={props.builderLinkComponent}
3670
- />;
3671
- }}</For7></Show10>
3672
- <Show10 when={submissionState() === "error"}><Blocks_default
3673
- path="errorMessage"
3674
- blocks={props.errorMessage}
3675
- context={props.builderContext}
3676
- /></Show10>
3677
- <Show10 when={submissionState() === "sending"}><Blocks_default
3678
- path="sendingMessage"
3679
- blocks={props.sendingMessage}
3680
- context={props.builderContext}
3681
- /></Show10>
3682
- <Show10 when={submissionState() === "error" && responseData()}><pre
3683
- class={"builder-form-error-text " + css4({
3684
- padding: "10px",
3685
- color: "red",
3686
- textAlign: "center"
3687
- })}
3688
- >{JSON.stringify(responseData(), null, 2)}</pre></Show10>
3689
- <Show10 when={submissionState() === "success"}><Blocks_default
3690
- path="successMessage"
3691
- blocks={props.successMessage}
3692
- context={props.builderContext}
3693
- /></Show10>
3694
- </form>;
3695
+ /></Show10>
3696
+ <Show10 when={submissionState() === "sending"}><Blocks_default
3697
+ path="sendingMessage"
3698
+ blocks={props.sendingMessage}
3699
+ context={props.builderContext}
3700
+ /></Show10>
3701
+ <Show10 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-2e825338">{JSON.stringify(responseData(), null, 2)}</pre></Show10>
3702
+ <Show10 when={submissionState() === "success"}><Blocks_default
3703
+ path="successMessage"
3704
+ blocks={props.successMessage}
3705
+ context={props.builderContext}
3706
+ /></Show10>
3707
+ </form>
3708
+ <style>{`.pre-2e825338 {
3709
+ padding: 10px;
3710
+ color: red;
3711
+ text-align: center;
3712
+ }`}</style>
3713
+ </>;
3695
3714
  }
3696
3715
  var form_default = FormComponent;
3697
3716
 
@@ -3751,7 +3770,7 @@ var componentInfo14 = {
3751
3770
 
3752
3771
  // src/blocks/form/input/input.tsx
3753
3772
  function FormInputComponent(props) {
3754
- return <input
3773
+ return <><input
3755
3774
  {...{}}
3756
3775
  {...props.attributes}
3757
3776
  key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
@@ -3761,7 +3780,7 @@ function FormInputComponent(props) {
3761
3780
  value={props.value}
3762
3781
  defaultValue={props.defaultValue}
3763
3782
  required={props.required}
3764
- />;
3783
+ /></>;
3765
3784
  }
3766
3785
  var input_default = FormInputComponent;
3767
3786
 
@@ -3813,17 +3832,18 @@ var componentInfo15 = {
3813
3832
  // src/blocks/form/select/select.tsx
3814
3833
  import { For as For8 } from "solid-js";
3815
3834
  function SelectComponent(props) {
3816
- return <select
3835
+ return <><select
3817
3836
  {...{}}
3818
3837
  {...props.attributes}
3819
3838
  value={props.value}
3820
3839
  key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
3821
3840
  defaultValue={props.defaultValue}
3822
3841
  name={props.name}
3842
+ required={props.required}
3823
3843
  ><For8 each={props.options}>{(option, _index) => {
3824
3844
  const index = _index();
3825
3845
  return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
3826
- }}</For8></select>;
3846
+ }}</For8></select></>;
3827
3847
  }
3828
3848
  var select_default = SelectComponent;
3829
3849
 
@@ -3857,12 +3877,65 @@ var componentInfo16 = {
3857
3877
 
3858
3878
  // src/blocks/form/submit-button/submit-button.tsx
3859
3879
  function SubmitButton(props) {
3860
- return <button type="submit" {...{}} {...props.attributes}>{props.text}</button>;
3880
+ return <><button type="submit" {...{}} {...props.attributes}>{props.text}</button></>;
3861
3881
  }
3862
3882
  var submit_button_default = SubmitButton;
3863
3883
 
3864
- // src/blocks/img/component-info.ts
3884
+ // src/blocks/form/textarea/component-info.ts
3865
3885
  var componentInfo17 = {
3886
+ name: "Form:TextArea",
3887
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
3888
+ inputs: [{
3889
+ advanced: true,
3890
+ name: "value",
3891
+ type: "string"
3892
+ }, {
3893
+ name: "name",
3894
+ type: "string",
3895
+ required: true,
3896
+ helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"'
3897
+ }, {
3898
+ name: "defaultValue",
3899
+ type: "string"
3900
+ }, {
3901
+ name: "placeholder",
3902
+ type: "string",
3903
+ defaultValue: "Hello there"
3904
+ }, {
3905
+ name: "required",
3906
+ type: "boolean",
3907
+ defaultValue: false
3908
+ }],
3909
+ defaultStyles: {
3910
+ paddingTop: "10px",
3911
+ paddingBottom: "10px",
3912
+ paddingLeft: "10px",
3913
+ paddingRight: "10px",
3914
+ borderRadius: "3px",
3915
+ borderWidth: "1px",
3916
+ borderStyle: "solid",
3917
+ borderColor: "#ccc"
3918
+ },
3919
+ static: true,
3920
+ noWrap: true
3921
+ };
3922
+
3923
+ // src/blocks/form/textarea/textarea.tsx
3924
+ function Textarea(props) {
3925
+ return <><textarea
3926
+ {...{}}
3927
+ {...props.attributes}
3928
+ placeholder={props.placeholder}
3929
+ name={props.name}
3930
+ value={props.value}
3931
+ defaultValue={props.defaultValue}
3932
+ required={props.required}
3933
+ /></>;
3934
+ }
3935
+ var textarea_default = Textarea;
3936
+
3937
+ // src/blocks/img/component-info.ts
3938
+ var componentInfo18 = {
3866
3939
  // friendlyName?
3867
3940
  name: "Raw:Img",
3868
3941
  hideFromInsertMenu: true,
@@ -3880,7 +3953,7 @@ var componentInfo17 = {
3880
3953
 
3881
3954
  // src/blocks/img/img.tsx
3882
3955
  function ImgComponent(props) {
3883
- return <img
3956
+ return <><img
3884
3957
  style={{
3885
3958
  "object-fit": props.backgroundSize || "cover",
3886
3959
  "object-position": props.backgroundPosition || "center"
@@ -3890,12 +3963,12 @@ function ImgComponent(props) {
3890
3963
  src={props.imgSrc || props.image}
3891
3964
  {...{}}
3892
3965
  {...props.attributes}
3893
- />;
3966
+ /></>;
3894
3967
  }
3895
3968
  var img_default = ImgComponent;
3896
3969
 
3897
3970
  // src/blocks/video/component-info.ts
3898
- var componentInfo18 = {
3971
+ var componentInfo19 = {
3899
3972
  name: "Video",
3900
3973
  canHaveChildren: true,
3901
3974
  defaultStyles: {
@@ -4005,7 +4078,7 @@ function Video(props) {
4005
4078
  ...videoProps()
4006
4079
  };
4007
4080
  });
4008
- return <div
4081
+ return <><div
4009
4082
  style={{
4010
4083
  position: "relative"
4011
4084
  }}
@@ -4061,7 +4134,7 @@ function Video(props) {
4061
4134
  height: "100%"
4062
4135
  }}
4063
4136
  >{props.children}</div></Show11>
4064
- </div>;
4137
+ </div></>;
4065
4138
  }
4066
4139
  var video_default = Video;
4067
4140
 
@@ -4084,12 +4157,15 @@ var getExtraComponents = () => [{
4084
4157
  }, {
4085
4158
  component: select_default,
4086
4159
  ...componentInfo15
4160
+ }, {
4161
+ component: textarea_default,
4162
+ ...componentInfo17
4087
4163
  }], {
4088
4164
  component: img_default,
4089
- ...componentInfo17
4165
+ ...componentInfo18
4090
4166
  }, {
4091
4167
  component: video_default,
4092
- ...componentInfo18
4168
+ ...componentInfo19
4093
4169
  }];
4094
4170
 
4095
4171
  // src/constants/builder-registered-components.ts
@@ -4195,7 +4271,7 @@ var getUpdateVariantVisibilityScript = ({
4195
4271
 
4196
4272
  // src/components/inlined-script.tsx
4197
4273
  function InlinedScript(props) {
4198
- return <script innerHTML={props.scriptStr} data-id={props.id} />;
4274
+ return <><script innerHTML={props.scriptStr} data-id={props.id} /></>;
4199
4275
  }
4200
4276
  var Inlined_script_default = InlinedScript;
4201
4277
 
@@ -4709,7 +4785,7 @@ function isFromTrustedHost(trustedHosts, e) {
4709
4785
  }
4710
4786
 
4711
4787
  // src/constants/sdk-version.ts
4712
- var SDK_VERSION = "1.0.33";
4788
+ var SDK_VERSION = "1.0.36";
4713
4789
 
4714
4790
  // src/functions/register.ts
4715
4791
  var registry = {};
@@ -5274,7 +5350,7 @@ function EnableEditor(props) {
5274
5350
  }
5275
5351
  }
5276
5352
  createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
5277
- return <builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
5353
+ return <><builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
5278
5354
  class={getWrapperClassName(
5279
5355
  props.content?.testVariationId || props.content?.id
5280
5356
  )}
@@ -5287,7 +5363,7 @@ function EnableEditor(props) {
5287
5363
  {...showContentProps()}
5288
5364
  {...props.contentWrapperProps}
5289
5365
  component={ContentWrapper()}
5290
- >{props.children}</Dynamic5></Show12></builder_context_default.Provider>;
5366
+ >{props.children}</Dynamic5></Show12></builder_context_default.Provider></>;
5291
5367
  }
5292
5368
  var Enable_editor_default = EnableEditor;
5293
5369
 
@@ -5306,10 +5382,10 @@ ${getFontCss({
5306
5382
  ${getDefaultStyles(props.isNestedRender)}
5307
5383
  `.trim()
5308
5384
  );
5309
- return <Inlined_styles_default
5385
+ return <><Inlined_styles_default
5310
5386
  id="builderio-content"
5311
5387
  styles={injectedStyles()}
5312
- />;
5388
+ /></>;
5313
5389
  }
5314
5390
  var Styles_default = ContentStyles;
5315
5391
 
@@ -5410,7 +5486,7 @@ function ContentComponent(props) {
5410
5486
  rootState: newRootState
5411
5487
  }));
5412
5488
  }
5413
- return <components_context_default.Provider
5489
+ return <><components_context_default.Provider
5414
5490
  value={{
5415
5491
  registeredComponents: registeredComponents()
5416
5492
  }}
@@ -5448,7 +5524,7 @@ function ContentComponent(props) {
5448
5524
  registeredComponents={registeredComponents()}
5449
5525
  linkComponent={props.linkComponent}
5450
5526
  />
5451
- </Enable_editor_default></components_context_default.Provider>;
5527
+ </Enable_editor_default></components_context_default.Provider></>;
5452
5528
  }
5453
5529
  var Content_default = ContentComponent;
5454
5530
 
@@ -5484,7 +5560,7 @@ function ContentVariants(props) {
5484
5560
  onMount4(() => {
5485
5561
  setShouldRenderVariants(false);
5486
5562
  });
5487
- return <>
5563
+ return <><>
5488
5564
  <Show14 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
5489
5565
  id="builderio-init-variants-fns"
5490
5566
  scriptStr={getInitVariantsFnsScriptString()}
@@ -5546,7 +5622,7 @@ function ContentVariants(props) {
5546
5622
  contentWrapperProps={props.contentWrapperProps}
5547
5623
  trustedHosts={props.trustedHosts}
5548
5624
  />
5549
- </>;
5625
+ </></>;
5550
5626
  }
5551
5627
  var Content_variants_default = ContentVariants;
5552
5628
 
@@ -5610,7 +5686,7 @@ function Symbol(props) {
5610
5686
  setContent();
5611
5687
  }
5612
5688
  createEffect3(on3(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
5613
- return <div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
5689
+ return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
5614
5690
  isNestedRender={true}
5615
5691
  apiVersion={props.builderContext.apiVersion}
5616
5692
  apiKey={props.builderContext.apiKey}
@@ -5630,7 +5706,7 @@ function Symbol(props) {
5630
5706
  linkComponent={props.builderLinkComponent}
5631
5707
  blocksWrapper={blocksWrapper()}
5632
5708
  contentWrapper={contentWrapper()}
5633
- /></div>;
5709
+ /></div></>;
5634
5710
  }
5635
5711
  var symbol_default = Symbol;
5636
5712