@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.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, Dynamic, memo, use } from 'solid-js/web';
2
2
  import { createContext, useContext, Show, For, createSignal, createMemo, onMount, createEffect, on } from 'solid-js';
3
- import { css } from 'solid-styled-components';
4
3
  import { createRequire } from 'node:module';
5
4
 
6
5
  // src/blocks/button/button.tsx
@@ -306,6 +305,19 @@ function flattenState({
306
305
  });
307
306
  }
308
307
 
308
+ // src/constants/sdk-name.ts
309
+ var SDK_NAME_FOR_TARGET = (() => {
310
+ switch (TARGET) {
311
+ case "rsc":
312
+ return "react-nextjs";
313
+ case "reactNative":
314
+ return "react-native";
315
+ default:
316
+ return TARGET;
317
+ }
318
+ })();
319
+ var SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`;
320
+
309
321
  // src/functions/fast-clone.ts
310
322
  var fastClone = (obj) => JSON.parse(JSON.stringify(obj));
311
323
 
@@ -384,6 +396,7 @@ if (typeof output === 'object' && output !== null) {
384
396
  };
385
397
  var IVM_INSTANCE = null;
386
398
  var IVM_CONTEXT = null;
399
+ var SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react";
387
400
  var getIvm = () => {
388
401
  try {
389
402
  if (IVM_INSTANCE)
@@ -394,14 +407,15 @@ var getIvm = () => {
394
407
  } catch (error2) {
395
408
  logger.error("isolated-vm import error.", error2);
396
409
  }
397
- throw new Error(`${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on Node server.
410
+ const ERROR_MESSAGE = `${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
398
411
 
399
- In certain Node environments, the SDK requires additional initialization steps. This can be achieved by
400
- importing and calling \`initializeNodeRuntime()\` from "@builder.io/sdk-react/node/init". This must be done in
401
- a server-only execution path within your application.
412
+ SOLUTION: In a server-only execution path within your application, do one of the following:
413
+
414
+ ${SHOULD_MENTION_INITIALIZE_SCRIPT ? '- import and call `initializeNodeRuntime()` from "${SDK_NAME}/node/init".' : ""}
415
+ - add the following import: \`await import('isolated-vm')\`.
402
416
 
403
- Please see the documentation for more information: https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments
404
- `);
417
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
418
+ throw new Error(ERROR_MESSAGE);
405
419
  };
406
420
  function setIsolateContext(options = {
407
421
  memoryLimit: 128
@@ -1046,7 +1060,7 @@ function BlockStyles(props) {
1046
1060
  }
1047
1061
  return true;
1048
1062
  });
1049
- const css5 = createMemo(() => {
1063
+ const css = createMemo(() => {
1050
1064
  const processedBlock = getProcessedBlock({
1051
1065
  block: props.block,
1052
1066
  localState: props.context.localState,
@@ -1096,13 +1110,13 @@ function BlockStyles(props) {
1096
1110
  });
1097
1111
  return createComponent(Show, {
1098
1112
  get when() {
1099
- return memo(() => !!(TARGET !== "reactNative" && css5()))() && canShowBlock();
1113
+ return memo(() => !!(TARGET !== "reactNative" && css()))() && canShowBlock();
1100
1114
  },
1101
1115
  get children() {
1102
1116
  return createComponent(inlined_styles_default, {
1103
1117
  id: "builderio-block",
1104
1118
  get styles() {
1105
- return css5();
1119
+ return css();
1106
1120
  }
1107
1121
  });
1108
1122
  }
@@ -1580,6 +1594,11 @@ function Block(props) {
1580
1594
  });
1581
1595
  }
1582
1596
  var block_default = Block;
1597
+ var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-1bb6a3a2 {
1598
+ display: flex;
1599
+ flex-direction: column;
1600
+ align-items: stretch;
1601
+ }`);
1583
1602
  function BlocksWrapper(props) {
1584
1603
  const className = createMemo(() => {
1585
1604
  return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
@@ -1606,13 +1625,9 @@ function BlocksWrapper(props) {
1606
1625
  }, "*");
1607
1626
  }
1608
1627
  }
1609
- return createComponent(Dynamic, mergeProps({
1628
+ return [createComponent(Dynamic, mergeProps({
1610
1629
  get ["class"]() {
1611
- return className() + " " + css({
1612
- display: "flex",
1613
- flexDirection: "column",
1614
- alignItems: "stretch"
1615
- });
1630
+ return className() + " dynamic-1bb6a3a2";
1616
1631
  },
1617
1632
  get ["builder-path"]() {
1618
1633
  return props.path;
@@ -1634,7 +1649,7 @@ function BlocksWrapper(props) {
1634
1649
  get children() {
1635
1650
  return props.children;
1636
1651
  }
1637
- }));
1652
+ })), _tmpl$2()];
1638
1653
  }
1639
1654
  var blocks_wrapper_default = BlocksWrapper;
1640
1655
 
@@ -1703,7 +1718,11 @@ var getColumnsClass = (id) => {
1703
1718
  };
1704
1719
 
1705
1720
  // src/blocks/columns/columns.tsx
1706
- var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
1721
+ var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
1722
+ var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-f2f53158 {
1723
+ display: flex;
1724
+ line-height: normal;
1725
+ }`);
1707
1726
  function Columns(props) {
1708
1727
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
1709
1728
  const [cols, setCols] = createSignal(props.columns || []);
@@ -1815,14 +1834,11 @@ function Columns(props) {
1815
1834
  style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1816
1835
  };
1817
1836
  }
1818
- return (() => {
1819
- const _el$ = _tmpl$2();
1837
+ return [(() => {
1838
+ const _el$ = _tmpl$3();
1820
1839
  spread(_el$, mergeProps({
1821
1840
  get ["class"]() {
1822
- return getColumnsClass(props.builderBlock?.id) + " " + css({
1823
- display: "flex",
1824
- lineHeight: "normal"
1825
- });
1841
+ return getColumnsClass(props.builderBlock?.id) + " div-f2f53158";
1826
1842
  },
1827
1843
  get style() {
1828
1844
  return columnsCssVars();
@@ -1881,13 +1897,13 @@ function Columns(props) {
1881
1897
  }
1882
1898
  }), null);
1883
1899
  return _el$;
1884
- })();
1900
+ })(), _tmpl$22()];
1885
1901
  }
1886
1902
  var columns_default = Columns;
1887
- var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
1903
+ var _tmpl$4 = /* @__PURE__ */ template(`<span>`);
1888
1904
  function FragmentComponent(props) {
1889
1905
  return (() => {
1890
- const _el$ = _tmpl$3();
1906
+ const _el$ = _tmpl$4();
1891
1907
  insert(_el$, () => props.children);
1892
1908
  return _el$;
1893
1909
  })();
@@ -1942,9 +1958,27 @@ function getSrcSet(url) {
1942
1958
  }
1943
1959
 
1944
1960
  // src/blocks/image/image.tsx
1945
- var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
1946
- var _tmpl$22 = /* @__PURE__ */ template(`<picture><img>`);
1947
- var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
1961
+ var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
1962
+ var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
1963
+ var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-54b38751">`);
1964
+ var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-54b38751-2>`);
1965
+ var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-54b38751 {
1966
+ opacity: 1;
1967
+ transition: opacity 0.2s ease-in-out;
1968
+ }.div-54b38751 {
1969
+ width: 100%;
1970
+ pointer-events: none;
1971
+ font-size: 0;
1972
+ }.div-54b38751-2 {
1973
+ display: flex;
1974
+ flex-direction: column;
1975
+ align-items: stretch;
1976
+ position: absolute;
1977
+ top: 0;
1978
+ left: 0;
1979
+ width: 100%;
1980
+ height: 100%;
1981
+ }`);
1948
1982
  function Image(props) {
1949
1983
  const srcSetToUse = createMemo(() => {
1950
1984
  const imageToUse = props.image || props.src;
@@ -1982,23 +2016,20 @@ function Image(props) {
1982
2016
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
1983
2017
  return out;
1984
2018
  });
1985
- return [(() => {
1986
- const _el$ = _tmpl$22(), _el$3 = _el$.firstChild;
2019
+ return [[(() => {
2020
+ const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
1987
2021
  insert(_el$, createComponent(Show, {
1988
2022
  get when() {
1989
2023
  return webpSrcSet();
1990
2024
  },
1991
2025
  get children() {
1992
- const _el$2 = _tmpl$4();
2026
+ const _el$2 = _tmpl$5();
1993
2027
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
1994
2028
  return _el$2;
1995
2029
  }
1996
2030
  }), _el$3);
1997
2031
  effect((_p$) => {
1998
- const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " " + css({
1999
- opacity: "1",
2000
- transition: "opacity 0.2s ease-in-out"
2001
- }), _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.altText ? void 0 : "presentation", _v$6 = {
2032
+ const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-54b38751", _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.altText ? void 0 : "presentation", _v$6 = {
2002
2033
  "object-position": props.backgroundPosition || "center",
2003
2034
  "object-fit": props.backgroundSize || "cover",
2004
2035
  ...aspectRatioCss()
@@ -2031,19 +2062,7 @@ function Image(props) {
2031
2062
  },
2032
2063
  get children() {
2033
2064
  const _el$4 = _tmpl$32();
2034
- effect((_p$) => {
2035
- const _v$10 = "builder-image-sizer " + css({
2036
- width: "100%",
2037
- pointerEvents: "none",
2038
- fontSize: "0"
2039
- }), _v$11 = props.aspectRatio * 100 + "%";
2040
- _v$10 !== _p$._v$10 && className(_el$4, _p$._v$10 = _v$10);
2041
- _v$11 !== _p$._v$11 && ((_p$._v$11 = _v$11) != null ? _el$4.style.setProperty("padding-top", _v$11) : _el$4.style.removeProperty("padding-top"));
2042
- return _p$;
2043
- }, {
2044
- _v$10: void 0,
2045
- _v$11: void 0
2046
- });
2065
+ effect(() => props.aspectRatio * 100 + "%" != null ? _el$4.style.setProperty("padding-top", props.aspectRatio * 100 + "%") : _el$4.style.removeProperty("padding-top"));
2047
2066
  return _el$4;
2048
2067
  }
2049
2068
  }), createComponent(Show, {
@@ -2058,27 +2077,17 @@ function Image(props) {
2058
2077
  return !props.fitContent && props.builderBlock?.children?.length;
2059
2078
  },
2060
2079
  get children() {
2061
- const _el$5 = _tmpl$32();
2080
+ const _el$5 = _tmpl$42();
2062
2081
  insert(_el$5, () => props.children);
2063
- effect(() => className(_el$5, css({
2064
- display: "flex",
2065
- flexDirection: "column",
2066
- alignItems: "stretch",
2067
- position: "absolute",
2068
- top: "0",
2069
- left: "0",
2070
- width: "100%",
2071
- height: "100%"
2072
- })));
2073
2082
  return _el$5;
2074
2083
  }
2075
- })];
2084
+ })], _tmpl$52()];
2076
2085
  }
2077
2086
  var image_default = Image;
2078
- var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
2087
+ var _tmpl$6 = /* @__PURE__ */ template(`<section>`);
2079
2088
  function SectionComponent(props) {
2080
2089
  return (() => {
2081
- const _el$ = _tmpl$5();
2090
+ const _el$ = _tmpl$6();
2082
2091
  spread(_el$, mergeProps({}, () => props.attributes, {
2083
2092
  get style() {
2084
2093
  return {
@@ -2423,8 +2432,8 @@ var convertOrderNumberToString = (order) => {
2423
2432
  };
2424
2433
 
2425
2434
  // src/blocks/accordion/accordion.tsx
2426
- var _tmpl$6 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
2427
- var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
2435
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
2436
+ var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
2428
2437
  function Accordion(props) {
2429
2438
  const [open, setOpen] = createSignal([]);
2430
2439
  const onlyOneAtATime = createMemo(() => {
@@ -2514,7 +2523,7 @@ function Accordion(props) {
2514
2523
  }
2515
2524
  }
2516
2525
  return (() => {
2517
- const _el$ = _tmpl$6();
2526
+ const _el$ = _tmpl$7();
2518
2527
  insert(_el$, createComponent(For, {
2519
2528
  get each() {
2520
2529
  return props.items;
@@ -2522,7 +2531,7 @@ function Accordion(props) {
2522
2531
  children: (item, _index) => {
2523
2532
  const index = _index();
2524
2533
  return [(() => {
2525
- const _el$2 = _tmpl$23();
2534
+ const _el$2 = _tmpl$24();
2526
2535
  _el$2.$$click = (event) => onClick(index);
2527
2536
  setAttribute(_el$2, "data-index", index);
2528
2537
  insert(_el$2, createComponent(blocks_default, {
@@ -2564,7 +2573,7 @@ function Accordion(props) {
2564
2573
  return open().includes(index);
2565
2574
  },
2566
2575
  get children() {
2567
- const _el$3 = _tmpl$23();
2576
+ const _el$3 = _tmpl$24();
2568
2577
  insert(_el$3, createComponent(blocks_default, {
2569
2578
  get blocks() {
2570
2579
  return item.detail;
@@ -2885,7 +2894,7 @@ var componentInfo5 = {
2885
2894
  name: "image",
2886
2895
  type: "file",
2887
2896
  bubble: true,
2888
- allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
2897
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
2889
2898
  required: true,
2890
2899
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
2891
2900
  onChange: (options) => {
@@ -3054,10 +3063,10 @@ var componentInfo7 = {
3054
3063
  defaultValue: "children"
3055
3064
  }]
3056
3065
  };
3057
- var _tmpl$7 = /* @__PURE__ */ template(`<div>`);
3066
+ var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
3058
3067
  function Slot(props) {
3059
3068
  return (() => {
3060
- const _el$ = _tmpl$7();
3069
+ const _el$ = _tmpl$8();
3061
3070
  _el$.style.setProperty("pointer-events", "auto");
3062
3071
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
3063
3072
  "builder-slot": props.name
@@ -3256,8 +3265,8 @@ var componentInfo9 = {
3256
3265
  }]
3257
3266
  }]
3258
3267
  };
3259
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
3260
- var _tmpl$24 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
3268
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
3269
+ var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
3261
3270
  var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
3262
3271
  function Tabs(props) {
3263
3272
  const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
@@ -3272,7 +3281,7 @@ function Tabs(props) {
3272
3281
  }
3273
3282
  }
3274
3283
  return (() => {
3275
- const _el$ = _tmpl$24(), _el$2 = _el$.firstChild;
3284
+ const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
3276
3285
  _el$2.style.setProperty("display", "flex");
3277
3286
  _el$2.style.setProperty("flex-direction", "row");
3278
3287
  _el$2.style.setProperty("overflow", "auto");
@@ -3324,7 +3333,7 @@ function Tabs(props) {
3324
3333
  return activeTabContent(activeTab());
3325
3334
  },
3326
3335
  get children() {
3327
- const _el$3 = _tmpl$8();
3336
+ const _el$3 = _tmpl$9();
3328
3337
  insert(_el$3, createComponent(blocks_default, {
3329
3338
  get parent() {
3330
3339
  return props.builderBlock.id;
@@ -3375,10 +3384,10 @@ var componentInfo10 = {
3375
3384
  textAlign: "center"
3376
3385
  }
3377
3386
  };
3378
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-text>`);
3387
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
3379
3388
  function Text(props) {
3380
3389
  return (() => {
3381
- const _el$ = _tmpl$9();
3390
+ const _el$ = _tmpl$10();
3382
3391
  _el$.style.setProperty("outline", "none");
3383
3392
  effect(() => _el$.innerHTML = props.text?.toString() || "");
3384
3393
  return _el$;
@@ -3410,7 +3419,7 @@ var componentInfo11 = {
3410
3419
  advanced: true
3411
3420
  }]
3412
3421
  };
3413
- var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
3422
+ var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
3414
3423
  function CustomCode(props) {
3415
3424
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
3416
3425
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -3445,7 +3454,7 @@ function CustomCode(props) {
3445
3454
  }
3446
3455
  });
3447
3456
  return (() => {
3448
- const _el$ = _tmpl$10();
3457
+ const _el$ = _tmpl$11();
3449
3458
  const _ref$ = elementRef;
3450
3459
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
3451
3460
  effect((_p$) => {
@@ -3476,7 +3485,7 @@ var componentInfo12 = {
3476
3485
  const url = options.get("url");
3477
3486
  if (url) {
3478
3487
  options.set("content", "Loading...");
3479
- const apiKey = "ae0e60e78201a3f2b0de4b";
3488
+ const apiKey = _iframelyApiKey;
3480
3489
  return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
3481
3490
  if (options.get("url") === url) {
3482
3491
  if (data.html) {
@@ -3505,7 +3514,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
3505
3514
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
3506
3515
 
3507
3516
  // src/blocks/embed/embed.tsx
3508
- var _tmpl$11 = /* @__PURE__ */ template(`<div class=builder-embed>`);
3517
+ var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
3509
3518
  function Embed(props) {
3510
3519
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
3511
3520
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -3543,7 +3552,7 @@ function Embed(props) {
3543
3552
  }
3544
3553
  createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
3545
3554
  return (() => {
3546
- const _el$ = _tmpl$11();
3555
+ const _el$ = _tmpl$12();
3547
3556
  const _ref$ = elem;
3548
3557
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
3549
3558
  effect(() => _el$.innerHTML = props.content);
@@ -3800,8 +3809,13 @@ var get = (obj, path, defaultValue) => {
3800
3809
  };
3801
3810
 
3802
3811
  // src/blocks/form/form/form.tsx
3803
- var _tmpl$12 = /* @__PURE__ */ template(`<pre>`);
3804
- var _tmpl$25 = /* @__PURE__ */ template(`<form>`);
3812
+ var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-2e825338">`);
3813
+ var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
3814
+ var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-2e825338 {
3815
+ padding: 10px;
3816
+ color: red;
3817
+ text-align: center;
3818
+ }`);
3805
3819
  function FormComponent(props) {
3806
3820
  const [formState, setFormState] = createSignal("unsubmitted");
3807
3821
  const [responseData, setResponseData] = createSignal(null);
@@ -3986,8 +4000,8 @@ function FormComponent(props) {
3986
4000
  }
3987
4001
  }
3988
4002
  let formRef;
3989
- return (() => {
3990
- const _el$ = _tmpl$25();
4003
+ return [(() => {
4004
+ const _el$ = _tmpl$26();
3991
4005
  _el$.addEventListener("submit", (event) => onSubmit(event));
3992
4006
  const _ref$ = formRef;
3993
4007
  typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
@@ -4070,13 +4084,8 @@ function FormComponent(props) {
4070
4084
  return memo(() => submissionState() === "error")() && responseData();
4071
4085
  },
4072
4086
  get children() {
4073
- const _el$2 = _tmpl$12();
4087
+ const _el$2 = _tmpl$13();
4074
4088
  insert(_el$2, () => JSON.stringify(responseData(), null, 2));
4075
- effect(() => className(_el$2, "builder-form-error-text " + css({
4076
- padding: "10px",
4077
- color: "red",
4078
- textAlign: "center"
4079
- })));
4080
4089
  return _el$2;
4081
4090
  }
4082
4091
  }), null);
@@ -4097,7 +4106,7 @@ function FormComponent(props) {
4097
4106
  }
4098
4107
  }), null);
4099
4108
  return _el$;
4100
- })();
4109
+ })(), _tmpl$34()];
4101
4110
  }
4102
4111
  var form_default = FormComponent;
4103
4112
 
@@ -4154,10 +4163,10 @@ var componentInfo14 = {
4154
4163
  borderColor: "#ccc"
4155
4164
  }
4156
4165
  };
4157
- var _tmpl$13 = /* @__PURE__ */ template(`<input>`);
4166
+ var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
4158
4167
  function FormInputComponent(props) {
4159
4168
  return (() => {
4160
- const _el$ = _tmpl$13();
4169
+ const _el$ = _tmpl$14();
4161
4170
  spread(_el$, mergeProps({}, () => props.attributes, {
4162
4171
  get key() {
4163
4172
  return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
@@ -4230,11 +4239,11 @@ var componentInfo15 = {
4230
4239
  static: true,
4231
4240
  noWrap: true
4232
4241
  };
4233
- var _tmpl$14 = /* @__PURE__ */ template(`<select>`);
4234
- var _tmpl$26 = /* @__PURE__ */ template(`<option>`);
4242
+ var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
4243
+ var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
4235
4244
  function SelectComponent(props) {
4236
4245
  return (() => {
4237
- const _el$ = _tmpl$14();
4246
+ const _el$ = _tmpl$15();
4238
4247
  spread(_el$, mergeProps({}, () => props.attributes, {
4239
4248
  get value() {
4240
4249
  return props.value;
@@ -4247,6 +4256,9 @@ function SelectComponent(props) {
4247
4256
  },
4248
4257
  get name() {
4249
4258
  return props.name;
4259
+ },
4260
+ get required() {
4261
+ return props.required;
4250
4262
  }
4251
4263
  }), false, true);
4252
4264
  insert(_el$, createComponent(For, {
@@ -4256,7 +4268,7 @@ function SelectComponent(props) {
4256
4268
  children: (option, _index) => {
4257
4269
  const index = _index();
4258
4270
  return (() => {
4259
- const _el$2 = _tmpl$26();
4271
+ const _el$2 = _tmpl$27();
4260
4272
  insert(_el$2, () => option.name || option.value);
4261
4273
  effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
4262
4274
  effect(() => _el$2.value = option.value);
@@ -4296,10 +4308,10 @@ var componentInfo16 = {
4296
4308
  // TODO: defaultChildren
4297
4309
  // canHaveChildren: true,
4298
4310
  };
4299
- var _tmpl$15 = /* @__PURE__ */ template(`<button type=submit>`);
4311
+ var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
4300
4312
  function SubmitButton(props) {
4301
4313
  return (() => {
4302
- const _el$ = _tmpl$15();
4314
+ const _el$ = _tmpl$16();
4303
4315
  spread(_el$, mergeProps({}, () => props.attributes), false, true);
4304
4316
  insert(_el$, () => props.text);
4305
4317
  return _el$;
@@ -4307,8 +4319,72 @@ function SubmitButton(props) {
4307
4319
  }
4308
4320
  var submit_button_default = SubmitButton;
4309
4321
 
4310
- // src/blocks/img/component-info.ts
4322
+ // src/blocks/form/textarea/component-info.ts
4311
4323
  var componentInfo17 = {
4324
+ name: "Form:TextArea",
4325
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
4326
+ inputs: [{
4327
+ advanced: true,
4328
+ name: "value",
4329
+ type: "string"
4330
+ }, {
4331
+ name: "name",
4332
+ type: "string",
4333
+ required: true,
4334
+ helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"'
4335
+ }, {
4336
+ name: "defaultValue",
4337
+ type: "string"
4338
+ }, {
4339
+ name: "placeholder",
4340
+ type: "string",
4341
+ defaultValue: "Hello there"
4342
+ }, {
4343
+ name: "required",
4344
+ type: "boolean",
4345
+ defaultValue: false
4346
+ }],
4347
+ defaultStyles: {
4348
+ paddingTop: "10px",
4349
+ paddingBottom: "10px",
4350
+ paddingLeft: "10px",
4351
+ paddingRight: "10px",
4352
+ borderRadius: "3px",
4353
+ borderWidth: "1px",
4354
+ borderStyle: "solid",
4355
+ borderColor: "#ccc"
4356
+ },
4357
+ static: true,
4358
+ noWrap: true
4359
+ };
4360
+ var _tmpl$17 = /* @__PURE__ */ template(`<textarea>`);
4361
+ function Textarea(props) {
4362
+ return (() => {
4363
+ const _el$ = _tmpl$17();
4364
+ spread(_el$, mergeProps({}, () => props.attributes, {
4365
+ get placeholder() {
4366
+ return props.placeholder;
4367
+ },
4368
+ get name() {
4369
+ return props.name;
4370
+ },
4371
+ get value() {
4372
+ return props.value;
4373
+ },
4374
+ get defaultValue() {
4375
+ return props.defaultValue;
4376
+ },
4377
+ get required() {
4378
+ return props.required;
4379
+ }
4380
+ }), false, false);
4381
+ return _el$;
4382
+ })();
4383
+ }
4384
+ var textarea_default = Textarea;
4385
+
4386
+ // src/blocks/img/component-info.ts
4387
+ var componentInfo18 = {
4312
4388
  // friendlyName?
4313
4389
  name: "Raw:Img",
4314
4390
  hideFromInsertMenu: true,
@@ -4323,10 +4399,10 @@ var componentInfo17 = {
4323
4399
  noWrap: true,
4324
4400
  static: true
4325
4401
  };
4326
- var _tmpl$16 = /* @__PURE__ */ template(`<img>`);
4402
+ var _tmpl$18 = /* @__PURE__ */ template(`<img>`);
4327
4403
  function ImgComponent(props) {
4328
4404
  return (() => {
4329
- const _el$ = _tmpl$16();
4405
+ const _el$ = _tmpl$18();
4330
4406
  spread(_el$, mergeProps({
4331
4407
  get style() {
4332
4408
  return {
@@ -4350,7 +4426,7 @@ function ImgComponent(props) {
4350
4426
  var img_default = ImgComponent;
4351
4427
 
4352
4428
  // src/blocks/video/component-info.ts
4353
- var componentInfo18 = {
4429
+ var componentInfo19 = {
4354
4430
  name: "Video",
4355
4431
  canHaveChildren: true,
4356
4432
  defaultStyles: {
@@ -4432,9 +4508,9 @@ var componentInfo18 = {
4432
4508
  advanced: true
4433
4509
  }]
4434
4510
  };
4435
- var _tmpl$17 = /* @__PURE__ */ template(`<source type=video/mp4>`);
4436
- var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
4437
- var _tmpl$34 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
4511
+ var _tmpl$19 = /* @__PURE__ */ template(`<source type=video/mp4>`);
4512
+ var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
4513
+ var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
4438
4514
  function Video(props) {
4439
4515
  const videoProps = createMemo(() => {
4440
4516
  return {
@@ -4461,7 +4537,7 @@ function Video(props) {
4461
4537
  };
4462
4538
  });
4463
4539
  return (() => {
4464
- const _el$ = _tmpl$34(), _el$2 = _el$.firstChild;
4540
+ const _el$ = _tmpl$35(), _el$2 = _el$.firstChild;
4465
4541
  _el$.style.setProperty("position", "relative");
4466
4542
  spread(_el$2, mergeProps(spreadProps, {
4467
4543
  get preload() {
@@ -4495,7 +4571,7 @@ function Video(props) {
4495
4571
  return !props.lazyLoad;
4496
4572
  },
4497
4573
  get children() {
4498
- const _el$3 = _tmpl$17();
4574
+ const _el$3 = _tmpl$19();
4499
4575
  effect(() => setAttribute(_el$3, "src", props.video));
4500
4576
  return _el$3;
4501
4577
  }
@@ -4505,7 +4581,7 @@ function Video(props) {
4505
4581
  return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
4506
4582
  },
4507
4583
  get children() {
4508
- const _el$4 = _tmpl$27();
4584
+ const _el$4 = _tmpl$28();
4509
4585
  _el$4.style.setProperty("width", "100%");
4510
4586
  _el$4.style.setProperty("pointer-events", "none");
4511
4587
  _el$4.style.setProperty("font-size", "0px");
@@ -4518,7 +4594,7 @@ function Video(props) {
4518
4594
  return props.builderBlock?.children?.length && props.fitContent;
4519
4595
  },
4520
4596
  get children() {
4521
- const _el$5 = _tmpl$27();
4597
+ const _el$5 = _tmpl$28();
4522
4598
  _el$5.style.setProperty("display", "flex");
4523
4599
  _el$5.style.setProperty("flex-direction", "column");
4524
4600
  _el$5.style.setProperty("align-items", "stretch");
@@ -4531,7 +4607,7 @@ function Video(props) {
4531
4607
  return props.builderBlock?.children?.length && !props.fitContent;
4532
4608
  },
4533
4609
  get children() {
4534
- const _el$6 = _tmpl$27();
4610
+ const _el$6 = _tmpl$28();
4535
4611
  _el$6.style.setProperty("pointer-events", "none");
4536
4612
  _el$6.style.setProperty("display", "flex");
4537
4613
  _el$6.style.setProperty("flex-direction", "column");
@@ -4569,12 +4645,15 @@ var getExtraComponents = () => [{
4569
4645
  }, {
4570
4646
  component: select_default,
4571
4647
  ...componentInfo15
4648
+ }, {
4649
+ component: textarea_default,
4650
+ ...componentInfo17
4572
4651
  }], {
4573
4652
  component: img_default,
4574
- ...componentInfo17
4653
+ ...componentInfo18
4575
4654
  }, {
4576
4655
  component: video_default,
4577
- ...componentInfo18
4656
+ ...componentInfo19
4578
4657
  }];
4579
4658
 
4580
4659
  // src/constants/builder-registered-components.ts
@@ -4677,10 +4756,10 @@ var getUpdateVariantVisibilityScript = ({
4677
4756
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
4678
4757
  "${variationId}", "${contentId}", ${isHydrationTarget}
4679
4758
  )`;
4680
- var _tmpl$18 = /* @__PURE__ */ template(`<script>`);
4759
+ var _tmpl$20 = /* @__PURE__ */ template(`<script>`);
4681
4760
  function InlinedScript(props) {
4682
4761
  return (() => {
4683
- const _el$ = _tmpl$18();
4762
+ const _el$ = _tmpl$20();
4684
4763
  effect((_p$) => {
4685
4764
  const _v$ = props.scriptStr, _v$2 = props.id;
4686
4765
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -5194,7 +5273,7 @@ function isFromTrustedHost(trustedHosts, e) {
5194
5273
  }
5195
5274
 
5196
5275
  // src/constants/sdk-version.ts
5197
- var SDK_VERSION = "1.0.33";
5276
+ var SDK_VERSION = "1.0.36";
5198
5277
 
5199
5278
  // src/functions/register.ts
5200
5279
  var registry = {};
@@ -6178,7 +6257,7 @@ var fetchSymbolContent = async ({
6178
6257
  };
6179
6258
 
6180
6259
  // src/blocks/symbol/symbol.tsx
6181
- var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
6260
+ var _tmpl$21 = /* @__PURE__ */ template(`<div>`);
6182
6261
  function Symbol(props) {
6183
6262
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
6184
6263
  const blocksWrapper = createMemo(() => {
@@ -6210,7 +6289,7 @@ function Symbol(props) {
6210
6289
  }
6211
6290
  createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6212
6291
  return (() => {
6213
- const _el$ = _tmpl$19();
6292
+ const _el$ = _tmpl$21();
6214
6293
  spread(_el$, mergeProps({
6215
6294
  get ["class"]() {
6216
6295
  return className();