@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.
@@ -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";
@@ -291,6 +290,19 @@ function flattenState({
291
290
  });
292
291
  }
293
292
 
293
+ // src/constants/sdk-name.ts
294
+ var SDK_NAME_FOR_TARGET = (() => {
295
+ switch (TARGET) {
296
+ case "rsc":
297
+ return "react-nextjs";
298
+ case "reactNative":
299
+ return "react-native";
300
+ default:
301
+ return TARGET;
302
+ }
303
+ })();
304
+ var SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`;
305
+
294
306
  // src/functions/fast-clone.ts
295
307
  var fastClone = (obj) => JSON.parse(JSON.stringify(obj));
296
308
 
@@ -372,6 +384,7 @@ if (typeof output === 'object' && output !== null) {
372
384
  };
373
385
  var IVM_INSTANCE = null;
374
386
  var IVM_CONTEXT = null;
387
+ var SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react";
375
388
  var getIvm = () => {
376
389
  try {
377
390
  if (IVM_INSTANCE)
@@ -382,14 +395,15 @@ var getIvm = () => {
382
395
  } catch (error2) {
383
396
  logger.error("isolated-vm import error.", error2);
384
397
  }
385
- throw new Error(`${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on Node server.
398
+ const ERROR_MESSAGE = `${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
386
399
 
387
- In certain Node environments, the SDK requires additional initialization steps. This can be achieved by
388
- importing and calling \`initializeNodeRuntime()\` from "@builder.io/sdk-react/node/init". This must be done in
389
- a server-only execution path within your application.
400
+ SOLUTION: In a server-only execution path within your application, do one of the following:
401
+
402
+ ${SHOULD_MENTION_INITIALIZE_SCRIPT ? '- import and call `initializeNodeRuntime()` from "${SDK_NAME}/node/init".' : ""}
403
+ - add the following import: \`await import('isolated-vm')\`.
390
404
 
391
- Please see the documentation for more information: https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments
392
- `);
405
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
406
+ throw new Error(ERROR_MESSAGE);
393
407
  };
394
408
  function setIsolateContext(options = {
395
409
  memoryLimit: 128
@@ -998,7 +1012,7 @@ var getSizesForBreakpoints = ({
998
1012
 
999
1013
  // src/components/inlined-styles.tsx
1000
1014
  function InlinedStyles(props) {
1001
- return <style innerHTML={props.styles} data-id={props.id} />;
1015
+ return <><style innerHTML={props.styles} data-id={props.id} /></>;
1002
1016
  }
1003
1017
  var Inlined_styles_default = InlinedStyles;
1004
1018
 
@@ -1021,7 +1035,7 @@ function BlockStyles(props) {
1021
1035
  }
1022
1036
  return true;
1023
1037
  });
1024
- const css5 = createMemo(() => {
1038
+ const css = createMemo(() => {
1025
1039
  const processedBlock = getProcessedBlock({
1026
1040
  block: props.block,
1027
1041
  localState: props.context.localState,
@@ -1084,7 +1098,7 @@ function BlockStyles(props) {
1084
1098
  hoverStylesClass
1085
1099
  ].join(" ");
1086
1100
  });
1087
- return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css5()} /></Show2>;
1101
+ return <><Show2 when={TARGET !== "reactNative" && css() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css()} /></Show2></>;
1088
1102
  }
1089
1103
  var Block_styles_default = BlockStyles;
1090
1104
 
@@ -1167,7 +1181,7 @@ function getBlockProperties({
1167
1181
 
1168
1182
  // src/components/block/components/block-wrapper.tsx
1169
1183
  function BlockWrapper(props) {
1170
- return <Dynamic_renderer_default
1184
+ return <><Dynamic_renderer_default
1171
1185
  TagName={props.Wrapper}
1172
1186
  attributes={getBlockProperties({
1173
1187
  block: props.block,
@@ -1181,7 +1195,7 @@ function BlockWrapper(props) {
1181
1195
  context: props.context.context,
1182
1196
  stripPrefix: true
1183
1197
  })}
1184
- >{props.children}</Dynamic_renderer_default>;
1198
+ >{props.children}</Dynamic_renderer_default></>;
1185
1199
  }
1186
1200
  var Block_wrapper_default = BlockWrapper;
1187
1201
 
@@ -1208,11 +1222,11 @@ function InteractiveElement(props) {
1208
1222
  })
1209
1223
  } : {};
1210
1224
  });
1211
- return <Dynamic2
1225
+ return <><Dynamic2
1212
1226
  {...props.wrapperProps}
1213
1227
  attributes={attributes()}
1214
1228
  component={props.Wrapper}
1215
- >{props.children}</Dynamic2>;
1229
+ >{props.children}</Dynamic2></>;
1216
1230
  }
1217
1231
  var interactive_element_default = InteractiveElement;
1218
1232
 
@@ -1254,7 +1268,7 @@ function ComponentRef(props) {
1254
1268
  const [Wrapper, setWrapper] = createSignal3(
1255
1269
  props.isInteractive ? interactive_element_default : props.componentRef
1256
1270
  );
1257
- return <Show3 when={props.componentRef}><Dynamic3
1271
+ return <><Show3 when={props.componentRef}><Dynamic3
1258
1272
  {...getWrapperProps({
1259
1273
  componentOptions: props.componentOptions,
1260
1274
  builderBlock: props.builderBlock,
@@ -1275,7 +1289,7 @@ function ComponentRef(props) {
1275
1289
  registeredComponents={props.registeredComponents}
1276
1290
  linkComponent={props.linkComponent}
1277
1291
  />;
1278
- }}</For></Dynamic3></Show3>;
1292
+ }}</For></Dynamic3></Show3></>;
1279
1293
  }
1280
1294
  var Component_ref_default = ComponentRef;
1281
1295
 
@@ -1283,12 +1297,12 @@ var Component_ref_default = ComponentRef;
1283
1297
  import { createSignal as createSignal4 } from "solid-js";
1284
1298
  function RepeatedBlock(props) {
1285
1299
  const [store, setStore] = createSignal4(props.repeatContext);
1286
- return <builder_context_default.Provider value={store()}><Block_default
1300
+ return <><builder_context_default.Provider value={store()}><Block_default
1287
1301
  block={props.block}
1288
1302
  context={store()}
1289
1303
  registeredComponents={props.registeredComponents}
1290
1304
  linkComponent={props.linkComponent}
1291
- /></builder_context_default.Provider>;
1305
+ /></builder_context_default.Provider></>;
1292
1306
  }
1293
1307
  var Repeated_block_default = RepeatedBlock;
1294
1308
 
@@ -1372,7 +1386,7 @@ function Block(props) {
1372
1386
  );
1373
1387
  }
1374
1388
  });
1375
- return <Show4 when={canShowBlock()}>
1389
+ return <><Show4 when={canShowBlock()}>
1376
1390
  <Block_styles_default block={props.block} context={props.context} />
1377
1391
  <Show4
1378
1392
  fallback={<Component_ref_default
@@ -1426,14 +1440,13 @@ function Block(props) {
1426
1440
  />;
1427
1441
  }}</For2>
1428
1442
  </Block_wrapper_default></Show4></Show4>
1429
- </Show4>;
1443
+ </Show4></>;
1430
1444
  }
1431
1445
  var Block_default = Block;
1432
1446
 
1433
1447
  // src/components/blocks/blocks-wrapper.tsx
1434
1448
  import { createMemo as createMemo6 } from "solid-js";
1435
1449
  import { Dynamic as Dynamic4 } from "solid-js/web";
1436
- import { css } from "solid-styled-components";
1437
1450
  function BlocksWrapper(props) {
1438
1451
  const className = createMemo6(() => {
1439
1452
  return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
@@ -1466,22 +1479,25 @@ function BlocksWrapper(props) {
1466
1479
  );
1467
1480
  }
1468
1481
  }
1469
- return <Dynamic4
1470
- class={className() + " " + css({
1471
- display: "flex",
1472
- flexDirection: "column",
1473
- alignItems: "stretch"
1474
- })}
1475
- builder-path={props.path}
1476
- builder-parent-id={props.parent}
1477
- {...{}}
1478
- style={props.styleProp}
1479
- onClick={(event) => onClick()}
1480
- onMouseEnter={(event) => onMouseEnter()}
1481
- onKeyPress={(event) => onClick()}
1482
- {...props.BlocksWrapperProps}
1483
- component={props.BlocksWrapper}
1484
- >{props.children}</Dynamic4>;
1482
+ return <>
1483
+ <Dynamic4
1484
+ class={className() + " dynamic-1bb6a3a2"}
1485
+ builder-path={props.path}
1486
+ builder-parent-id={props.parent}
1487
+ {...{}}
1488
+ style={props.styleProp}
1489
+ onClick={(event) => onClick()}
1490
+ onMouseEnter={(event) => onMouseEnter()}
1491
+ onKeyPress={(event) => onClick()}
1492
+ {...props.BlocksWrapperProps}
1493
+ component={props.BlocksWrapper}
1494
+ >{props.children}</Dynamic4>
1495
+ <style>{`.dynamic-1bb6a3a2 {
1496
+ display: flex;
1497
+ flex-direction: column;
1498
+ align-items: stretch;
1499
+ }`}</style>
1500
+ </>;
1485
1501
  }
1486
1502
  var Blocks_wrapper_default = BlocksWrapper;
1487
1503
 
@@ -1489,7 +1505,7 @@ var Blocks_wrapper_default = BlocksWrapper;
1489
1505
  function Blocks(props) {
1490
1506
  const builderContext = useContext(builder_context_default);
1491
1507
  const componentsContext = useContext(components_context_default);
1492
- return <Blocks_wrapper_default
1508
+ return <><Blocks_wrapper_default
1493
1509
  blocks={props.blocks}
1494
1510
  parent={props.parent}
1495
1511
  path={props.path}
@@ -1505,7 +1521,7 @@ function Blocks(props) {
1505
1521
  context={props.context || builderContext}
1506
1522
  registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
1507
1523
  />;
1508
- }}</For3></Show5></Blocks_wrapper_default>;
1524
+ }}</For3></Show5></Blocks_wrapper_default></>;
1509
1525
  }
1510
1526
  var Blocks_default = Blocks;
1511
1527
 
@@ -1632,50 +1648,52 @@ function Columns(props) {
1632
1648
  style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1633
1649
  };
1634
1650
  }
1635
- return <div
1636
- class={getColumnsClass(props.builderBlock?.id) + " " + css2({
1637
- display: "flex",
1638
- lineHeight: "normal"
1639
- })}
1640
- style={columnsCssVars()}
1641
- {...{}}
1642
- >
1643
- <Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
1644
- id="builderio-columns"
1645
- styles={columnsStyles()}
1646
- /></Show6>
1647
- <For4 each={props.columns}>{(column, _index) => {
1648
- const index = _index();
1649
- return <Dynamic_renderer_default
1650
- key={index}
1651
- TagName={getTagName(column)}
1652
- actionAttributes={{}}
1653
- attributes={getAttributes(column, index)}
1654
- ><Blocks_default
1655
- path={`component.options.columns.${index}.blocks`}
1656
- parent={props.builderBlock.id}
1657
- styleProp={{
1658
- flexGrow: "1"
1659
- }}
1660
- context={props.builderContext}
1661
- registeredComponents={props.builderComponents}
1662
- linkComponent={props.builderLinkComponent}
1663
- blocks={column.blocks}
1664
- /></Dynamic_renderer_default>;
1665
- }}</For4>
1666
- </div>;
1651
+ return <>
1652
+ <div
1653
+ class={getColumnsClass(props.builderBlock?.id) + " div-f2f53158"}
1654
+ style={columnsCssVars()}
1655
+ {...{}}
1656
+ >
1657
+ <Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
1658
+ id="builderio-columns"
1659
+ styles={columnsStyles()}
1660
+ /></Show6>
1661
+ <For4 each={props.columns}>{(column, _index) => {
1662
+ const index = _index();
1663
+ return <Dynamic_renderer_default
1664
+ key={index}
1665
+ TagName={getTagName(column)}
1666
+ actionAttributes={{}}
1667
+ attributes={getAttributes(column, index)}
1668
+ ><Blocks_default
1669
+ path={`component.options.columns.${index}.blocks`}
1670
+ parent={props.builderBlock.id}
1671
+ styleProp={{
1672
+ flexGrow: "1"
1673
+ }}
1674
+ context={props.builderContext}
1675
+ registeredComponents={props.builderComponents}
1676
+ linkComponent={props.builderLinkComponent}
1677
+ blocks={column.blocks}
1678
+ /></Dynamic_renderer_default>;
1679
+ }}</For4>
1680
+ </div>
1681
+ <style>{`.div-f2f53158 {
1682
+ display: flex;
1683
+ line-height: normal;
1684
+ }`}</style>
1685
+ </>;
1667
1686
  }
1668
1687
  var columns_default = Columns;
1669
1688
 
1670
1689
  // src/blocks/fragment/fragment.tsx
1671
1690
  function FragmentComponent(props) {
1672
- return <span>{props.children}</span>;
1691
+ return <><span>{props.children}</span></>;
1673
1692
  }
1674
1693
  var fragment_default = FragmentComponent;
1675
1694
 
1676
1695
  // src/blocks/image/image.tsx
1677
1696
  import { Show as Show7, createMemo as createMemo8 } from "solid-js";
1678
- import { css as css3 } from "solid-styled-components";
1679
1697
 
1680
1698
  // src/blocks/image/image.helpers.ts
1681
1699
  function removeProtocol(path) {
@@ -1762,59 +1780,60 @@ function Image(props) {
1762
1780
  return out;
1763
1781
  });
1764
1782
  return <>
1765
- <picture>
1766
- <Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
1767
- <img
1768
- class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
1769
- opacity: "1",
1770
- transition: "opacity 0.2s ease-in-out"
1771
- })}
1772
- loading={props.highPriority ? "eager" : "lazy"}
1773
- fetchpriority={props.highPriority ? "high" : "auto"}
1774
- alt={props.altText}
1775
- role={props.altText ? void 0 : "presentation"}
1783
+ <>
1784
+ <picture>
1785
+ <Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
1786
+ <img
1787
+ class={"builder-image" + (props.className ? " " + props.className : "") + " img-54b38751"}
1788
+ loading={props.highPriority ? "eager" : "lazy"}
1789
+ fetchpriority={props.highPriority ? "high" : "auto"}
1790
+ alt={props.altText}
1791
+ role={props.altText ? void 0 : "presentation"}
1792
+ style={{
1793
+ "object-position": props.backgroundPosition || "center",
1794
+ "object-fit": props.backgroundSize || "cover",
1795
+ ...aspectRatioCss()
1796
+ }}
1797
+ src={props.image}
1798
+ srcset={srcSetToUse()}
1799
+ sizes={props.sizes}
1800
+ />
1801
+ </picture>
1802
+ <Show7
1803
+ when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
1804
+ ><div
1805
+ class="builder-image-sizer div-54b38751"
1776
1806
  style={{
1777
- "object-position": props.backgroundPosition || "center",
1778
- "object-fit": props.backgroundSize || "cover",
1779
- ...aspectRatioCss()
1807
+ "padding-top": props.aspectRatio * 100 + "%"
1780
1808
  }}
1781
- src={props.image}
1782
- srcset={srcSetToUse()}
1783
- sizes={props.sizes}
1784
- />
1785
- </picture>
1786
- <Show7
1787
- when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
1788
- ><div
1789
- class={"builder-image-sizer " + css3({
1790
- width: "100%",
1791
- pointerEvents: "none",
1792
- fontSize: "0"
1793
- })}
1794
- style={{
1795
- "padding-top": props.aspectRatio * 100 + "%"
1796
- }}
1797
- /></Show7>
1798
- <Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
1799
- <Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div
1800
- class={css3({
1801
- display: "flex",
1802
- flexDirection: "column",
1803
- alignItems: "stretch",
1804
- position: "absolute",
1805
- top: "0",
1806
- left: "0",
1807
- width: "100%",
1808
- height: "100%"
1809
- })}
1810
- >{props.children}</div></Show7>
1809
+ /></Show7>
1810
+ <Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
1811
+ <Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-54b38751-2">{props.children}</div></Show7>
1812
+ </>
1813
+ <style>{`.img-54b38751 {
1814
+ opacity: 1;
1815
+ transition: opacity 0.2s ease-in-out;
1816
+ }.div-54b38751 {
1817
+ width: 100%;
1818
+ pointer-events: none;
1819
+ font-size: 0;
1820
+ }.div-54b38751-2 {
1821
+ display: flex;
1822
+ flex-direction: column;
1823
+ align-items: stretch;
1824
+ position: absolute;
1825
+ top: 0;
1826
+ left: 0;
1827
+ width: 100%;
1828
+ height: 100%;
1829
+ }`}</style>
1811
1830
  </>;
1812
1831
  }
1813
1832
  var image_default = Image;
1814
1833
 
1815
1834
  // src/blocks/section/section.tsx
1816
1835
  function SectionComponent(props) {
1817
- return <section
1836
+ return <><section
1818
1837
  {...{}}
1819
1838
  {...props.attributes}
1820
1839
  style={{
@@ -1829,7 +1848,7 @@ function SectionComponent(props) {
1829
1848
  "margin-left": "auto",
1830
1849
  "margin-right": "auto"
1831
1850
  }}
1832
- >{props.children}</section>;
1851
+ >{props.children}</section></>;
1833
1852
  }
1834
1853
  var section_default = SectionComponent;
1835
1854
 
@@ -2271,7 +2290,7 @@ function Accordion(props) {
2271
2290
  setOpen(onlyOneAtATime() ? [index] : open().concat(index));
2272
2291
  }
2273
2292
  }
2274
- return <div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
2293
+ return <><div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
2275
2294
  const index = _index();
2276
2295
  return <>
2277
2296
  <div
@@ -2305,7 +2324,7 @@ function Accordion(props) {
2305
2324
  linkComponent={props.builderLinkComponent}
2306
2325
  /></div></Show8>
2307
2326
  </>;
2308
- }}</For5></div>;
2327
+ }}</For5></div></>;
2309
2328
  }
2310
2329
  var accordion_default = Accordion;
2311
2330
 
@@ -2590,7 +2609,7 @@ var componentInfo5 = {
2590
2609
  name: "image",
2591
2610
  type: "file",
2592
2611
  bubble: true,
2593
- allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
2612
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
2594
2613
  required: true,
2595
2614
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
2596
2615
  onChange: (options) => {
@@ -2761,7 +2780,7 @@ var componentInfo7 = {
2761
2780
 
2762
2781
  // src/blocks/slot/slot.tsx
2763
2782
  function Slot(props) {
2764
- return <div
2783
+ return <><div
2765
2784
  style={{
2766
2785
  "pointer-events": "auto"
2767
2786
  }}
@@ -2773,7 +2792,7 @@ function Slot(props) {
2773
2792
  path={`symbol.data.${props.name}`}
2774
2793
  context={props.builderContext}
2775
2794
  blocks={props.builderContext.rootState?.[props.name]}
2776
- /></div>;
2795
+ /></div></>;
2777
2796
  }
2778
2797
  var slot_default = Slot;
2779
2798
 
@@ -2969,7 +2988,7 @@ function Tabs(props) {
2969
2988
  setActiveTab(index);
2970
2989
  }
2971
2990
  }
2972
- return <div>
2991
+ return <><div>
2973
2992
  <div
2974
2993
  class="builder-tabs-wrap"
2975
2994
  style={{
@@ -3004,7 +3023,7 @@ function Tabs(props) {
3004
3023
  registeredComponents={props.builderComponents}
3005
3024
  linkComponent={props.builderLinkComponent}
3006
3025
  /></div></Show9>
3007
- </div>;
3026
+ </div></>;
3008
3027
  }
3009
3028
  var tabs_default = Tabs;
3010
3029
 
@@ -3031,13 +3050,13 @@ var componentInfo10 = {
3031
3050
 
3032
3051
  // src/blocks/text/text.tsx
3033
3052
  function Text(props) {
3034
- return <div
3053
+ return <><div
3035
3054
  class="builder-text"
3036
3055
  innerHTML={props.text?.toString() || ""}
3037
3056
  style={{
3038
3057
  outline: "none"
3039
3058
  }}
3040
- />;
3059
+ /></>;
3041
3060
  }
3042
3061
  var text_default = Text;
3043
3062
 
@@ -3104,11 +3123,11 @@ function CustomCode(props) {
3104
3123
  }
3105
3124
  }
3106
3125
  });
3107
- return <div
3126
+ return <><div
3108
3127
  class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
3109
3128
  ref={elementRef}
3110
3129
  innerHTML={props.code}
3111
- />;
3130
+ /></>;
3112
3131
  }
3113
3132
  var custom_code_default = CustomCode;
3114
3133
 
@@ -3126,7 +3145,7 @@ var componentInfo12 = {
3126
3145
  const url = options.get("url");
3127
3146
  if (url) {
3128
3147
  options.set("content", "Loading...");
3129
- const apiKey = "ae0e60e78201a3f2b0de4b";
3148
+ const apiKey = _iframelyApiKey;
3130
3149
  return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
3131
3150
  if (options.get("url") === url) {
3132
3151
  if (data.html) {
@@ -3195,7 +3214,7 @@ function Embed(props) {
3195
3214
  createEffect(
3196
3215
  on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
3197
3216
  );
3198
- return <div class="builder-embed" ref={elem} innerHTML={props.content} />;
3217
+ return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
3199
3218
  }
3200
3219
  var embed_default = Embed;
3201
3220
 
@@ -3435,7 +3454,6 @@ var componentInfo13 = {
3435
3454
 
3436
3455
  // src/blocks/form/form/form.tsx
3437
3456
  import { Show as Show10, For as For7, createSignal as createSignal13 } from "solid-js";
3438
- import { css as css4 } from "solid-styled-components";
3439
3457
 
3440
3458
  // src/functions/get-env.ts
3441
3459
  var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
@@ -3638,50 +3656,51 @@ function FormComponent(props) {
3638
3656
  }
3639
3657
  }
3640
3658
  let formRef;
3641
- return <form
3642
- validate={props.validate}
3643
- ref={formRef}
3644
- action={!props.sendWithJs && props.action}
3645
- method={props.method}
3646
- name={props.name}
3647
- onSubmit={(event) => onSubmit(event)}
3648
- {...{}}
3649
- {...{}}
3650
- {...props.attributes}
3651
- >
3652
- <Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
3653
- const idx = _index();
3654
- return <Block_default
3655
- key={`form-block-${idx}`}
3656
- block={block}
3659
+ return <>
3660
+ <form
3661
+ validate={props.validate}
3662
+ ref={formRef}
3663
+ action={!props.sendWithJs && props.action}
3664
+ method={props.method}
3665
+ name={props.name}
3666
+ onSubmit={(event) => onSubmit(event)}
3667
+ {...{}}
3668
+ {...{}}
3669
+ {...props.attributes}
3670
+ >
3671
+ <Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
3672
+ const idx = _index();
3673
+ return <Block_default
3674
+ key={`form-block-${idx}`}
3675
+ block={block}
3676
+ context={props.builderContext}
3677
+ registeredComponents={props.builderComponents}
3678
+ linkComponent={props.builderLinkComponent}
3679
+ />;
3680
+ }}</For7></Show10>
3681
+ <Show10 when={submissionState() === "error"}><Blocks_default
3682
+ path="errorMessage"
3683
+ blocks={props.errorMessage}
3657
3684
  context={props.builderContext}
3658
- registeredComponents={props.builderComponents}
3659
- linkComponent={props.builderLinkComponent}
3660
- />;
3661
- }}</For7></Show10>
3662
- <Show10 when={submissionState() === "error"}><Blocks_default
3663
- path="errorMessage"
3664
- blocks={props.errorMessage}
3665
- context={props.builderContext}
3666
- /></Show10>
3667
- <Show10 when={submissionState() === "sending"}><Blocks_default
3668
- path="sendingMessage"
3669
- blocks={props.sendingMessage}
3670
- context={props.builderContext}
3671
- /></Show10>
3672
- <Show10 when={submissionState() === "error" && responseData()}><pre
3673
- class={"builder-form-error-text " + css4({
3674
- padding: "10px",
3675
- color: "red",
3676
- textAlign: "center"
3677
- })}
3678
- >{JSON.stringify(responseData(), null, 2)}</pre></Show10>
3679
- <Show10 when={submissionState() === "success"}><Blocks_default
3680
- path="successMessage"
3681
- blocks={props.successMessage}
3682
- context={props.builderContext}
3683
- /></Show10>
3684
- </form>;
3685
+ /></Show10>
3686
+ <Show10 when={submissionState() === "sending"}><Blocks_default
3687
+ path="sendingMessage"
3688
+ blocks={props.sendingMessage}
3689
+ context={props.builderContext}
3690
+ /></Show10>
3691
+ <Show10 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-2e825338">{JSON.stringify(responseData(), null, 2)}</pre></Show10>
3692
+ <Show10 when={submissionState() === "success"}><Blocks_default
3693
+ path="successMessage"
3694
+ blocks={props.successMessage}
3695
+ context={props.builderContext}
3696
+ /></Show10>
3697
+ </form>
3698
+ <style>{`.pre-2e825338 {
3699
+ padding: 10px;
3700
+ color: red;
3701
+ text-align: center;
3702
+ }`}</style>
3703
+ </>;
3685
3704
  }
3686
3705
  var form_default = FormComponent;
3687
3706
 
@@ -3741,7 +3760,7 @@ var componentInfo14 = {
3741
3760
 
3742
3761
  // src/blocks/form/input/input.tsx
3743
3762
  function FormInputComponent(props) {
3744
- return <input
3763
+ return <><input
3745
3764
  {...{}}
3746
3765
  {...props.attributes}
3747
3766
  key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
@@ -3751,7 +3770,7 @@ function FormInputComponent(props) {
3751
3770
  value={props.value}
3752
3771
  defaultValue={props.defaultValue}
3753
3772
  required={props.required}
3754
- />;
3773
+ /></>;
3755
3774
  }
3756
3775
  var input_default = FormInputComponent;
3757
3776
 
@@ -3803,17 +3822,18 @@ var componentInfo15 = {
3803
3822
  // src/blocks/form/select/select.tsx
3804
3823
  import { For as For8 } from "solid-js";
3805
3824
  function SelectComponent(props) {
3806
- return <select
3825
+ return <><select
3807
3826
  {...{}}
3808
3827
  {...props.attributes}
3809
3828
  value={props.value}
3810
3829
  key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
3811
3830
  defaultValue={props.defaultValue}
3812
3831
  name={props.name}
3832
+ required={props.required}
3813
3833
  ><For8 each={props.options}>{(option, _index) => {
3814
3834
  const index = _index();
3815
3835
  return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
3816
- }}</For8></select>;
3836
+ }}</For8></select></>;
3817
3837
  }
3818
3838
  var select_default = SelectComponent;
3819
3839
 
@@ -3847,12 +3867,65 @@ var componentInfo16 = {
3847
3867
 
3848
3868
  // src/blocks/form/submit-button/submit-button.tsx
3849
3869
  function SubmitButton(props) {
3850
- return <button type="submit" {...{}} {...props.attributes}>{props.text}</button>;
3870
+ return <><button type="submit" {...{}} {...props.attributes}>{props.text}</button></>;
3851
3871
  }
3852
3872
  var submit_button_default = SubmitButton;
3853
3873
 
3854
- // src/blocks/img/component-info.ts
3874
+ // src/blocks/form/textarea/component-info.ts
3855
3875
  var componentInfo17 = {
3876
+ name: "Form:TextArea",
3877
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
3878
+ inputs: [{
3879
+ advanced: true,
3880
+ name: "value",
3881
+ type: "string"
3882
+ }, {
3883
+ name: "name",
3884
+ type: "string",
3885
+ required: true,
3886
+ helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"'
3887
+ }, {
3888
+ name: "defaultValue",
3889
+ type: "string"
3890
+ }, {
3891
+ name: "placeholder",
3892
+ type: "string",
3893
+ defaultValue: "Hello there"
3894
+ }, {
3895
+ name: "required",
3896
+ type: "boolean",
3897
+ defaultValue: false
3898
+ }],
3899
+ defaultStyles: {
3900
+ paddingTop: "10px",
3901
+ paddingBottom: "10px",
3902
+ paddingLeft: "10px",
3903
+ paddingRight: "10px",
3904
+ borderRadius: "3px",
3905
+ borderWidth: "1px",
3906
+ borderStyle: "solid",
3907
+ borderColor: "#ccc"
3908
+ },
3909
+ static: true,
3910
+ noWrap: true
3911
+ };
3912
+
3913
+ // src/blocks/form/textarea/textarea.tsx
3914
+ function Textarea(props) {
3915
+ return <><textarea
3916
+ {...{}}
3917
+ {...props.attributes}
3918
+ placeholder={props.placeholder}
3919
+ name={props.name}
3920
+ value={props.value}
3921
+ defaultValue={props.defaultValue}
3922
+ required={props.required}
3923
+ /></>;
3924
+ }
3925
+ var textarea_default = Textarea;
3926
+
3927
+ // src/blocks/img/component-info.ts
3928
+ var componentInfo18 = {
3856
3929
  // friendlyName?
3857
3930
  name: "Raw:Img",
3858
3931
  hideFromInsertMenu: true,
@@ -3870,7 +3943,7 @@ var componentInfo17 = {
3870
3943
 
3871
3944
  // src/blocks/img/img.tsx
3872
3945
  function ImgComponent(props) {
3873
- return <img
3946
+ return <><img
3874
3947
  style={{
3875
3948
  "object-fit": props.backgroundSize || "cover",
3876
3949
  "object-position": props.backgroundPosition || "center"
@@ -3880,12 +3953,12 @@ function ImgComponent(props) {
3880
3953
  src={props.imgSrc || props.image}
3881
3954
  {...{}}
3882
3955
  {...props.attributes}
3883
- />;
3956
+ /></>;
3884
3957
  }
3885
3958
  var img_default = ImgComponent;
3886
3959
 
3887
3960
  // src/blocks/video/component-info.ts
3888
- var componentInfo18 = {
3961
+ var componentInfo19 = {
3889
3962
  name: "Video",
3890
3963
  canHaveChildren: true,
3891
3964
  defaultStyles: {
@@ -3995,7 +4068,7 @@ function Video(props) {
3995
4068
  ...videoProps()
3996
4069
  };
3997
4070
  });
3998
- return <div
4071
+ return <><div
3999
4072
  style={{
4000
4073
  position: "relative"
4001
4074
  }}
@@ -4051,7 +4124,7 @@ function Video(props) {
4051
4124
  height: "100%"
4052
4125
  }}
4053
4126
  >{props.children}</div></Show11>
4054
- </div>;
4127
+ </div></>;
4055
4128
  }
4056
4129
  var video_default = Video;
4057
4130
 
@@ -4074,12 +4147,15 @@ var getExtraComponents = () => [{
4074
4147
  }, {
4075
4148
  component: select_default,
4076
4149
  ...componentInfo15
4150
+ }, {
4151
+ component: textarea_default,
4152
+ ...componentInfo17
4077
4153
  }], {
4078
4154
  component: img_default,
4079
- ...componentInfo17
4155
+ ...componentInfo18
4080
4156
  }, {
4081
4157
  component: video_default,
4082
- ...componentInfo18
4158
+ ...componentInfo19
4083
4159
  }];
4084
4160
 
4085
4161
  // src/constants/builder-registered-components.ts
@@ -4185,7 +4261,7 @@ var getUpdateVariantVisibilityScript = ({
4185
4261
 
4186
4262
  // src/components/inlined-script.tsx
4187
4263
  function InlinedScript(props) {
4188
- return <script innerHTML={props.scriptStr} data-id={props.id} />;
4264
+ return <><script innerHTML={props.scriptStr} data-id={props.id} /></>;
4189
4265
  }
4190
4266
  var Inlined_script_default = InlinedScript;
4191
4267
 
@@ -4694,7 +4770,7 @@ function isFromTrustedHost(trustedHosts, e) {
4694
4770
  }
4695
4771
 
4696
4772
  // src/constants/sdk-version.ts
4697
- var SDK_VERSION = "1.0.33";
4773
+ var SDK_VERSION = "1.0.36";
4698
4774
 
4699
4775
  // src/functions/register.ts
4700
4776
  var registry = {};
@@ -5257,7 +5333,7 @@ function EnableEditor(props) {
5257
5333
  }
5258
5334
  }
5259
5335
  createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
5260
- return <builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
5336
+ return <><builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
5261
5337
  class={getWrapperClassName(
5262
5338
  props.content?.testVariationId || props.content?.id
5263
5339
  )}
@@ -5270,7 +5346,7 @@ function EnableEditor(props) {
5270
5346
  {...showContentProps()}
5271
5347
  {...props.contentWrapperProps}
5272
5348
  component={ContentWrapper()}
5273
- >{props.children}</Dynamic5></Show12></builder_context_default.Provider>;
5349
+ >{props.children}</Dynamic5></Show12></builder_context_default.Provider></>;
5274
5350
  }
5275
5351
  var Enable_editor_default = EnableEditor;
5276
5352
 
@@ -5289,10 +5365,10 @@ ${getFontCss({
5289
5365
  ${getDefaultStyles(props.isNestedRender)}
5290
5366
  `.trim()
5291
5367
  );
5292
- return <Inlined_styles_default
5368
+ return <><Inlined_styles_default
5293
5369
  id="builderio-content"
5294
5370
  styles={injectedStyles()}
5295
- />;
5371
+ /></>;
5296
5372
  }
5297
5373
  var Styles_default = ContentStyles;
5298
5374
 
@@ -5393,7 +5469,7 @@ function ContentComponent(props) {
5393
5469
  rootState: newRootState
5394
5470
  }));
5395
5471
  }
5396
- return <components_context_default.Provider
5472
+ return <><components_context_default.Provider
5397
5473
  value={{
5398
5474
  registeredComponents: registeredComponents()
5399
5475
  }}
@@ -5431,7 +5507,7 @@ function ContentComponent(props) {
5431
5507
  registeredComponents={registeredComponents()}
5432
5508
  linkComponent={props.linkComponent}
5433
5509
  />
5434
- </Enable_editor_default></components_context_default.Provider>;
5510
+ </Enable_editor_default></components_context_default.Provider></>;
5435
5511
  }
5436
5512
  var Content_default = ContentComponent;
5437
5513
 
@@ -5467,7 +5543,7 @@ function ContentVariants(props) {
5467
5543
  onMount4(() => {
5468
5544
  setShouldRenderVariants(false);
5469
5545
  });
5470
- return <>
5546
+ return <><>
5471
5547
  <Show14 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
5472
5548
  id="builderio-init-variants-fns"
5473
5549
  scriptStr={getInitVariantsFnsScriptString()}
@@ -5529,7 +5605,7 @@ function ContentVariants(props) {
5529
5605
  contentWrapperProps={props.contentWrapperProps}
5530
5606
  trustedHosts={props.trustedHosts}
5531
5607
  />
5532
- </>;
5608
+ </></>;
5533
5609
  }
5534
5610
  var Content_variants_default = ContentVariants;
5535
5611
 
@@ -5593,7 +5669,7 @@ function Symbol(props) {
5593
5669
  setContent();
5594
5670
  }
5595
5671
  createEffect3(on3(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
5596
- return <div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
5672
+ return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
5597
5673
  isNestedRender={true}
5598
5674
  apiVersion={props.builderContext.apiVersion}
5599
5675
  apiKey={props.builderContext.apiKey}
@@ -5613,7 +5689,7 @@ function Symbol(props) {
5613
5689
  linkComponent={props.builderLinkComponent}
5614
5690
  blocksWrapper={blocksWrapper()}
5615
5691
  contentWrapper={contentWrapper()}
5616
- /></div>;
5692
+ /></div></>;
5617
5693
  }
5618
5694
  var symbol_default = Symbol;
5619
5695