@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/index.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
@@ -305,6 +304,19 @@ function flattenState({
305
304
  });
306
305
  }
307
306
 
307
+ // src/constants/sdk-name.ts
308
+ var SDK_NAME_FOR_TARGET = (() => {
309
+ switch (TARGET) {
310
+ case "rsc":
311
+ return "react-nextjs";
312
+ case "reactNative":
313
+ return "react-native";
314
+ default:
315
+ return TARGET;
316
+ }
317
+ })();
318
+ var SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`;
319
+
308
320
  // src/functions/fast-clone.ts
309
321
  var fastClone = (obj) => JSON.parse(JSON.stringify(obj));
310
322
 
@@ -383,6 +395,7 @@ if (typeof output === 'object' && output !== null) {
383
395
  };
384
396
  var IVM_INSTANCE = null;
385
397
  var IVM_CONTEXT = null;
398
+ var SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react";
386
399
  var getIvm = () => {
387
400
  try {
388
401
  if (IVM_INSTANCE)
@@ -393,14 +406,15 @@ var getIvm = () => {
393
406
  } catch (error2) {
394
407
  logger.error("isolated-vm import error.", error2);
395
408
  }
396
- throw new Error(`${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on Node server.
409
+ const ERROR_MESSAGE = `${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
397
410
 
398
- In certain Node environments, the SDK requires additional initialization steps. This can be achieved by
399
- importing and calling \`initializeNodeRuntime()\` from "@builder.io/sdk-react/node/init". This must be done in
400
- a server-only execution path within your application.
411
+ SOLUTION: In a server-only execution path within your application, do one of the following:
412
+
413
+ ${SHOULD_MENTION_INITIALIZE_SCRIPT ? '- import and call `initializeNodeRuntime()` from "${SDK_NAME}/node/init".' : ""}
414
+ - add the following import: \`await import('isolated-vm')\`.
401
415
 
402
- Please see the documentation for more information: https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments
403
- `);
416
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
417
+ throw new Error(ERROR_MESSAGE);
404
418
  };
405
419
  function setIsolateContext(options = {
406
420
  memoryLimit: 128
@@ -1040,7 +1054,7 @@ function BlockStyles(props) {
1040
1054
  }
1041
1055
  return true;
1042
1056
  });
1043
- const css5 = createMemo(() => {
1057
+ const css = createMemo(() => {
1044
1058
  const processedBlock = getProcessedBlock({
1045
1059
  block: props.block,
1046
1060
  localState: props.context.localState,
@@ -1090,13 +1104,13 @@ function BlockStyles(props) {
1090
1104
  });
1091
1105
  return createComponent(Show, {
1092
1106
  get when() {
1093
- return memo(() => !!(TARGET !== "reactNative" && css5()))() && canShowBlock();
1107
+ return memo(() => !!(TARGET !== "reactNative" && css()))() && canShowBlock();
1094
1108
  },
1095
1109
  get children() {
1096
1110
  return createComponent(inlined_styles_default, {
1097
1111
  id: "builderio-block",
1098
1112
  get styles() {
1099
- return css5();
1113
+ return css();
1100
1114
  }
1101
1115
  });
1102
1116
  }
@@ -1574,6 +1588,11 @@ function Block(props) {
1574
1588
  });
1575
1589
  }
1576
1590
  var block_default = Block;
1591
+ var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-1bb6a3a2 {
1592
+ display: flex;
1593
+ flex-direction: column;
1594
+ align-items: stretch;
1595
+ }`);
1577
1596
  function BlocksWrapper(props) {
1578
1597
  const className = createMemo(() => {
1579
1598
  return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
@@ -1600,13 +1619,9 @@ function BlocksWrapper(props) {
1600
1619
  }, "*");
1601
1620
  }
1602
1621
  }
1603
- return createComponent(Dynamic, mergeProps({
1622
+ return [createComponent(Dynamic, mergeProps({
1604
1623
  get ["class"]() {
1605
- return className() + " " + css({
1606
- display: "flex",
1607
- flexDirection: "column",
1608
- alignItems: "stretch"
1609
- });
1624
+ return className() + " dynamic-1bb6a3a2";
1610
1625
  },
1611
1626
  get ["builder-path"]() {
1612
1627
  return props.path;
@@ -1628,7 +1643,7 @@ function BlocksWrapper(props) {
1628
1643
  get children() {
1629
1644
  return props.children;
1630
1645
  }
1631
- }));
1646
+ })), _tmpl$2()];
1632
1647
  }
1633
1648
  var blocks_wrapper_default = BlocksWrapper;
1634
1649
 
@@ -1697,7 +1712,11 @@ var getColumnsClass = (id) => {
1697
1712
  };
1698
1713
 
1699
1714
  // src/blocks/columns/columns.tsx
1700
- var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
1715
+ var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
1716
+ var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-f2f53158 {
1717
+ display: flex;
1718
+ line-height: normal;
1719
+ }`);
1701
1720
  function Columns(props) {
1702
1721
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
1703
1722
  const [cols, setCols] = createSignal(props.columns || []);
@@ -1809,14 +1828,11 @@ function Columns(props) {
1809
1828
  style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1810
1829
  };
1811
1830
  }
1812
- return (() => {
1813
- const _el$ = _tmpl$2();
1831
+ return [(() => {
1832
+ const _el$ = _tmpl$3();
1814
1833
  spread(_el$, mergeProps({
1815
1834
  get ["class"]() {
1816
- return getColumnsClass(props.builderBlock?.id) + " " + css({
1817
- display: "flex",
1818
- lineHeight: "normal"
1819
- });
1835
+ return getColumnsClass(props.builderBlock?.id) + " div-f2f53158";
1820
1836
  },
1821
1837
  get style() {
1822
1838
  return columnsCssVars();
@@ -1875,13 +1891,13 @@ function Columns(props) {
1875
1891
  }
1876
1892
  }), null);
1877
1893
  return _el$;
1878
- })();
1894
+ })(), _tmpl$22()];
1879
1895
  }
1880
1896
  var columns_default = Columns;
1881
- var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
1897
+ var _tmpl$4 = /* @__PURE__ */ template(`<span>`);
1882
1898
  function FragmentComponent(props) {
1883
1899
  return (() => {
1884
- const _el$ = _tmpl$3();
1900
+ const _el$ = _tmpl$4();
1885
1901
  insert(_el$, () => props.children);
1886
1902
  return _el$;
1887
1903
  })();
@@ -1936,9 +1952,27 @@ function getSrcSet(url) {
1936
1952
  }
1937
1953
 
1938
1954
  // src/blocks/image/image.tsx
1939
- var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
1940
- var _tmpl$22 = /* @__PURE__ */ template(`<picture><img>`);
1941
- var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
1955
+ var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
1956
+ var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
1957
+ var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-54b38751">`);
1958
+ var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-54b38751-2>`);
1959
+ var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-54b38751 {
1960
+ opacity: 1;
1961
+ transition: opacity 0.2s ease-in-out;
1962
+ }.div-54b38751 {
1963
+ width: 100%;
1964
+ pointer-events: none;
1965
+ font-size: 0;
1966
+ }.div-54b38751-2 {
1967
+ display: flex;
1968
+ flex-direction: column;
1969
+ align-items: stretch;
1970
+ position: absolute;
1971
+ top: 0;
1972
+ left: 0;
1973
+ width: 100%;
1974
+ height: 100%;
1975
+ }`);
1942
1976
  function Image(props) {
1943
1977
  const srcSetToUse = createMemo(() => {
1944
1978
  const imageToUse = props.image || props.src;
@@ -1975,23 +2009,20 @@ function Image(props) {
1975
2009
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
1976
2010
  return out;
1977
2011
  });
1978
- return [(() => {
1979
- const _el$ = _tmpl$22(), _el$3 = _el$.firstChild;
2012
+ return [[(() => {
2013
+ const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
1980
2014
  insert(_el$, createComponent(Show, {
1981
2015
  get when() {
1982
2016
  return webpSrcSet();
1983
2017
  },
1984
2018
  get children() {
1985
- const _el$2 = _tmpl$4();
2019
+ const _el$2 = _tmpl$5();
1986
2020
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
1987
2021
  return _el$2;
1988
2022
  }
1989
2023
  }), _el$3);
1990
2024
  effect((_p$) => {
1991
- const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " " + css({
1992
- opacity: "1",
1993
- transition: "opacity 0.2s ease-in-out"
1994
- }), _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 = {
2025
+ 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 = {
1995
2026
  "object-position": props.backgroundPosition || "center",
1996
2027
  "object-fit": props.backgroundSize || "cover",
1997
2028
  ...aspectRatioCss()
@@ -2024,19 +2055,7 @@ function Image(props) {
2024
2055
  },
2025
2056
  get children() {
2026
2057
  const _el$4 = _tmpl$32();
2027
- effect((_p$) => {
2028
- const _v$10 = "builder-image-sizer " + css({
2029
- width: "100%",
2030
- pointerEvents: "none",
2031
- fontSize: "0"
2032
- }), _v$11 = props.aspectRatio * 100 + "%";
2033
- _v$10 !== _p$._v$10 && className(_el$4, _p$._v$10 = _v$10);
2034
- _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"));
2035
- return _p$;
2036
- }, {
2037
- _v$10: void 0,
2038
- _v$11: void 0
2039
- });
2058
+ effect(() => props.aspectRatio * 100 + "%" != null ? _el$4.style.setProperty("padding-top", props.aspectRatio * 100 + "%") : _el$4.style.removeProperty("padding-top"));
2040
2059
  return _el$4;
2041
2060
  }
2042
2061
  }), createComponent(Show, {
@@ -2051,27 +2070,17 @@ function Image(props) {
2051
2070
  return !props.fitContent && props.builderBlock?.children?.length;
2052
2071
  },
2053
2072
  get children() {
2054
- const _el$5 = _tmpl$32();
2073
+ const _el$5 = _tmpl$42();
2055
2074
  insert(_el$5, () => props.children);
2056
- effect(() => className(_el$5, css({
2057
- display: "flex",
2058
- flexDirection: "column",
2059
- alignItems: "stretch",
2060
- position: "absolute",
2061
- top: "0",
2062
- left: "0",
2063
- width: "100%",
2064
- height: "100%"
2065
- })));
2066
2075
  return _el$5;
2067
2076
  }
2068
- })];
2077
+ })], _tmpl$52()];
2069
2078
  }
2070
2079
  var image_default = Image;
2071
- var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
2080
+ var _tmpl$6 = /* @__PURE__ */ template(`<section>`);
2072
2081
  function SectionComponent(props) {
2073
2082
  return (() => {
2074
- const _el$ = _tmpl$5();
2083
+ const _el$ = _tmpl$6();
2075
2084
  spread(_el$, mergeProps({}, () => props.attributes, {
2076
2085
  get style() {
2077
2086
  return {
@@ -2416,8 +2425,8 @@ var convertOrderNumberToString = (order) => {
2416
2425
  };
2417
2426
 
2418
2427
  // src/blocks/accordion/accordion.tsx
2419
- var _tmpl$6 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
2420
- var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
2428
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
2429
+ var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
2421
2430
  function Accordion(props) {
2422
2431
  const [open, setOpen] = createSignal([]);
2423
2432
  const onlyOneAtATime = createMemo(() => {
@@ -2507,7 +2516,7 @@ function Accordion(props) {
2507
2516
  }
2508
2517
  }
2509
2518
  return (() => {
2510
- const _el$ = _tmpl$6();
2519
+ const _el$ = _tmpl$7();
2511
2520
  insert(_el$, createComponent(For, {
2512
2521
  get each() {
2513
2522
  return props.items;
@@ -2515,7 +2524,7 @@ function Accordion(props) {
2515
2524
  children: (item, _index) => {
2516
2525
  const index = _index();
2517
2526
  return [(() => {
2518
- const _el$2 = _tmpl$23();
2527
+ const _el$2 = _tmpl$24();
2519
2528
  _el$2.$$click = (event) => onClick(index);
2520
2529
  setAttribute(_el$2, "data-index", index);
2521
2530
  insert(_el$2, createComponent(blocks_default, {
@@ -2557,7 +2566,7 @@ function Accordion(props) {
2557
2566
  return open().includes(index);
2558
2567
  },
2559
2568
  get children() {
2560
- const _el$3 = _tmpl$23();
2569
+ const _el$3 = _tmpl$24();
2561
2570
  insert(_el$3, createComponent(blocks_default, {
2562
2571
  get blocks() {
2563
2572
  return item.detail;
@@ -2878,7 +2887,7 @@ var componentInfo5 = {
2878
2887
  name: "image",
2879
2888
  type: "file",
2880
2889
  bubble: true,
2881
- allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
2890
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
2882
2891
  required: true,
2883
2892
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
2884
2893
  onChange: (options) => {
@@ -3046,10 +3055,10 @@ var componentInfo7 = {
3046
3055
  defaultValue: "children"
3047
3056
  }]
3048
3057
  };
3049
- var _tmpl$7 = /* @__PURE__ */ template(`<div>`);
3058
+ var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
3050
3059
  function Slot(props) {
3051
3060
  return (() => {
3052
- const _el$ = _tmpl$7();
3061
+ const _el$ = _tmpl$8();
3053
3062
  _el$.style.setProperty("pointer-events", "auto");
3054
3063
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
3055
3064
  "builder-slot": props.name
@@ -3248,8 +3257,8 @@ var componentInfo9 = {
3248
3257
  }]
3249
3258
  }]
3250
3259
  };
3251
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
3252
- var _tmpl$24 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
3260
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
3261
+ var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
3253
3262
  var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
3254
3263
  function Tabs(props) {
3255
3264
  const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
@@ -3264,7 +3273,7 @@ function Tabs(props) {
3264
3273
  }
3265
3274
  }
3266
3275
  return (() => {
3267
- const _el$ = _tmpl$24(), _el$2 = _el$.firstChild;
3276
+ const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
3268
3277
  _el$2.style.setProperty("display", "flex");
3269
3278
  _el$2.style.setProperty("flex-direction", "row");
3270
3279
  _el$2.style.setProperty("overflow", "auto");
@@ -3316,7 +3325,7 @@ function Tabs(props) {
3316
3325
  return activeTabContent(activeTab());
3317
3326
  },
3318
3327
  get children() {
3319
- const _el$3 = _tmpl$8();
3328
+ const _el$3 = _tmpl$9();
3320
3329
  insert(_el$3, createComponent(blocks_default, {
3321
3330
  get parent() {
3322
3331
  return props.builderBlock.id;
@@ -3367,10 +3376,10 @@ var componentInfo10 = {
3367
3376
  textAlign: "center"
3368
3377
  }
3369
3378
  };
3370
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-text>`);
3379
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
3371
3380
  function Text(props) {
3372
3381
  return (() => {
3373
- const _el$ = _tmpl$9();
3382
+ const _el$ = _tmpl$10();
3374
3383
  _el$.style.setProperty("outline", "none");
3375
3384
  effect(() => _el$.innerHTML = props.text?.toString() || "");
3376
3385
  return _el$;
@@ -3402,7 +3411,7 @@ var componentInfo11 = {
3402
3411
  advanced: true
3403
3412
  }]
3404
3413
  };
3405
- var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
3414
+ var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
3406
3415
  function CustomCode(props) {
3407
3416
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
3408
3417
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -3436,7 +3445,7 @@ function CustomCode(props) {
3436
3445
  }
3437
3446
  });
3438
3447
  return (() => {
3439
- const _el$ = _tmpl$10();
3448
+ const _el$ = _tmpl$11();
3440
3449
  const _ref$ = elementRef;
3441
3450
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
3442
3451
  effect((_p$) => {
@@ -3467,7 +3476,7 @@ var componentInfo12 = {
3467
3476
  const url = options.get("url");
3468
3477
  if (url) {
3469
3478
  options.set("content", "Loading...");
3470
- const apiKey = "ae0e60e78201a3f2b0de4b";
3479
+ const apiKey = _iframelyApiKey;
3471
3480
  return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
3472
3481
  if (options.get("url") === url) {
3473
3482
  if (data.html) {
@@ -3496,7 +3505,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
3496
3505
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
3497
3506
 
3498
3507
  // src/blocks/embed/embed.tsx
3499
- var _tmpl$11 = /* @__PURE__ */ template(`<div class=builder-embed>`);
3508
+ var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
3500
3509
  function Embed(props) {
3501
3510
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
3502
3511
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -3533,7 +3542,7 @@ function Embed(props) {
3533
3542
  }
3534
3543
  createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
3535
3544
  return (() => {
3536
- const _el$ = _tmpl$11();
3545
+ const _el$ = _tmpl$12();
3537
3546
  const _ref$ = elem;
3538
3547
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
3539
3548
  effect(() => _el$.innerHTML = props.content);
@@ -3790,8 +3799,13 @@ var get = (obj, path, defaultValue) => {
3790
3799
  };
3791
3800
 
3792
3801
  // src/blocks/form/form/form.tsx
3793
- var _tmpl$12 = /* @__PURE__ */ template(`<pre>`);
3794
- var _tmpl$25 = /* @__PURE__ */ template(`<form>`);
3802
+ var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-2e825338">`);
3803
+ var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
3804
+ var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-2e825338 {
3805
+ padding: 10px;
3806
+ color: red;
3807
+ text-align: center;
3808
+ }`);
3795
3809
  function FormComponent(props) {
3796
3810
  const [formState, setFormState] = createSignal("unsubmitted");
3797
3811
  const [responseData, setResponseData] = createSignal(null);
@@ -3976,8 +3990,8 @@ function FormComponent(props) {
3976
3990
  }
3977
3991
  }
3978
3992
  let formRef;
3979
- return (() => {
3980
- const _el$ = _tmpl$25();
3993
+ return [(() => {
3994
+ const _el$ = _tmpl$26();
3981
3995
  _el$.addEventListener("submit", (event) => onSubmit(event));
3982
3996
  const _ref$ = formRef;
3983
3997
  typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
@@ -4060,13 +4074,8 @@ function FormComponent(props) {
4060
4074
  return memo(() => submissionState() === "error")() && responseData();
4061
4075
  },
4062
4076
  get children() {
4063
- const _el$2 = _tmpl$12();
4077
+ const _el$2 = _tmpl$13();
4064
4078
  insert(_el$2, () => JSON.stringify(responseData(), null, 2));
4065
- effect(() => className(_el$2, "builder-form-error-text " + css({
4066
- padding: "10px",
4067
- color: "red",
4068
- textAlign: "center"
4069
- })));
4070
4079
  return _el$2;
4071
4080
  }
4072
4081
  }), null);
@@ -4087,7 +4096,7 @@ function FormComponent(props) {
4087
4096
  }
4088
4097
  }), null);
4089
4098
  return _el$;
4090
- })();
4099
+ })(), _tmpl$34()];
4091
4100
  }
4092
4101
  var form_default = FormComponent;
4093
4102
 
@@ -4144,10 +4153,10 @@ var componentInfo14 = {
4144
4153
  borderColor: "#ccc"
4145
4154
  }
4146
4155
  };
4147
- var _tmpl$13 = /* @__PURE__ */ template(`<input>`);
4156
+ var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
4148
4157
  function FormInputComponent(props) {
4149
4158
  return (() => {
4150
- const _el$ = _tmpl$13();
4159
+ const _el$ = _tmpl$14();
4151
4160
  spread(_el$, mergeProps({}, () => props.attributes, {
4152
4161
  get key() {
4153
4162
  return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
@@ -4220,11 +4229,11 @@ var componentInfo15 = {
4220
4229
  static: true,
4221
4230
  noWrap: true
4222
4231
  };
4223
- var _tmpl$14 = /* @__PURE__ */ template(`<select>`);
4224
- var _tmpl$26 = /* @__PURE__ */ template(`<option>`);
4232
+ var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
4233
+ var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
4225
4234
  function SelectComponent(props) {
4226
4235
  return (() => {
4227
- const _el$ = _tmpl$14();
4236
+ const _el$ = _tmpl$15();
4228
4237
  spread(_el$, mergeProps({}, () => props.attributes, {
4229
4238
  get value() {
4230
4239
  return props.value;
@@ -4237,6 +4246,9 @@ function SelectComponent(props) {
4237
4246
  },
4238
4247
  get name() {
4239
4248
  return props.name;
4249
+ },
4250
+ get required() {
4251
+ return props.required;
4240
4252
  }
4241
4253
  }), false, true);
4242
4254
  insert(_el$, createComponent(For, {
@@ -4246,7 +4258,7 @@ function SelectComponent(props) {
4246
4258
  children: (option, _index) => {
4247
4259
  const index = _index();
4248
4260
  return (() => {
4249
- const _el$2 = _tmpl$26();
4261
+ const _el$2 = _tmpl$27();
4250
4262
  insert(_el$2, () => option.name || option.value);
4251
4263
  effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
4252
4264
  effect(() => _el$2.value = option.value);
@@ -4286,10 +4298,10 @@ var componentInfo16 = {
4286
4298
  // TODO: defaultChildren
4287
4299
  // canHaveChildren: true,
4288
4300
  };
4289
- var _tmpl$15 = /* @__PURE__ */ template(`<button type=submit>`);
4301
+ var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
4290
4302
  function SubmitButton(props) {
4291
4303
  return (() => {
4292
- const _el$ = _tmpl$15();
4304
+ const _el$ = _tmpl$16();
4293
4305
  spread(_el$, mergeProps({}, () => props.attributes), false, true);
4294
4306
  insert(_el$, () => props.text);
4295
4307
  return _el$;
@@ -4297,8 +4309,72 @@ function SubmitButton(props) {
4297
4309
  }
4298
4310
  var submit_button_default = SubmitButton;
4299
4311
 
4300
- // src/blocks/img/component-info.ts
4312
+ // src/blocks/form/textarea/component-info.ts
4301
4313
  var componentInfo17 = {
4314
+ name: "Form:TextArea",
4315
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
4316
+ inputs: [{
4317
+ advanced: true,
4318
+ name: "value",
4319
+ type: "string"
4320
+ }, {
4321
+ name: "name",
4322
+ type: "string",
4323
+ required: true,
4324
+ helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"'
4325
+ }, {
4326
+ name: "defaultValue",
4327
+ type: "string"
4328
+ }, {
4329
+ name: "placeholder",
4330
+ type: "string",
4331
+ defaultValue: "Hello there"
4332
+ }, {
4333
+ name: "required",
4334
+ type: "boolean",
4335
+ defaultValue: false
4336
+ }],
4337
+ defaultStyles: {
4338
+ paddingTop: "10px",
4339
+ paddingBottom: "10px",
4340
+ paddingLeft: "10px",
4341
+ paddingRight: "10px",
4342
+ borderRadius: "3px",
4343
+ borderWidth: "1px",
4344
+ borderStyle: "solid",
4345
+ borderColor: "#ccc"
4346
+ },
4347
+ static: true,
4348
+ noWrap: true
4349
+ };
4350
+ var _tmpl$17 = /* @__PURE__ */ template(`<textarea>`);
4351
+ function Textarea(props) {
4352
+ return (() => {
4353
+ const _el$ = _tmpl$17();
4354
+ spread(_el$, mergeProps({}, () => props.attributes, {
4355
+ get placeholder() {
4356
+ return props.placeholder;
4357
+ },
4358
+ get name() {
4359
+ return props.name;
4360
+ },
4361
+ get value() {
4362
+ return props.value;
4363
+ },
4364
+ get defaultValue() {
4365
+ return props.defaultValue;
4366
+ },
4367
+ get required() {
4368
+ return props.required;
4369
+ }
4370
+ }), false, false);
4371
+ return _el$;
4372
+ })();
4373
+ }
4374
+ var textarea_default = Textarea;
4375
+
4376
+ // src/blocks/img/component-info.ts
4377
+ var componentInfo18 = {
4302
4378
  // friendlyName?
4303
4379
  name: "Raw:Img",
4304
4380
  hideFromInsertMenu: true,
@@ -4313,10 +4389,10 @@ var componentInfo17 = {
4313
4389
  noWrap: true,
4314
4390
  static: true
4315
4391
  };
4316
- var _tmpl$16 = /* @__PURE__ */ template(`<img>`);
4392
+ var _tmpl$18 = /* @__PURE__ */ template(`<img>`);
4317
4393
  function ImgComponent(props) {
4318
4394
  return (() => {
4319
- const _el$ = _tmpl$16();
4395
+ const _el$ = _tmpl$18();
4320
4396
  spread(_el$, mergeProps({
4321
4397
  get style() {
4322
4398
  return {
@@ -4340,7 +4416,7 @@ function ImgComponent(props) {
4340
4416
  var img_default = ImgComponent;
4341
4417
 
4342
4418
  // src/blocks/video/component-info.ts
4343
- var componentInfo18 = {
4419
+ var componentInfo19 = {
4344
4420
  name: "Video",
4345
4421
  canHaveChildren: true,
4346
4422
  defaultStyles: {
@@ -4422,9 +4498,9 @@ var componentInfo18 = {
4422
4498
  advanced: true
4423
4499
  }]
4424
4500
  };
4425
- var _tmpl$17 = /* @__PURE__ */ template(`<source type=video/mp4>`);
4426
- var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
4427
- var _tmpl$34 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
4501
+ var _tmpl$19 = /* @__PURE__ */ template(`<source type=video/mp4>`);
4502
+ var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
4503
+ var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
4428
4504
  function Video(props) {
4429
4505
  const videoProps = createMemo(() => {
4430
4506
  return {
@@ -4451,7 +4527,7 @@ function Video(props) {
4451
4527
  };
4452
4528
  });
4453
4529
  return (() => {
4454
- const _el$ = _tmpl$34(), _el$2 = _el$.firstChild;
4530
+ const _el$ = _tmpl$35(), _el$2 = _el$.firstChild;
4455
4531
  _el$.style.setProperty("position", "relative");
4456
4532
  spread(_el$2, mergeProps(spreadProps, {
4457
4533
  get preload() {
@@ -4485,7 +4561,7 @@ function Video(props) {
4485
4561
  return !props.lazyLoad;
4486
4562
  },
4487
4563
  get children() {
4488
- const _el$3 = _tmpl$17();
4564
+ const _el$3 = _tmpl$19();
4489
4565
  effect(() => setAttribute(_el$3, "src", props.video));
4490
4566
  return _el$3;
4491
4567
  }
@@ -4495,7 +4571,7 @@ function Video(props) {
4495
4571
  return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
4496
4572
  },
4497
4573
  get children() {
4498
- const _el$4 = _tmpl$27();
4574
+ const _el$4 = _tmpl$28();
4499
4575
  _el$4.style.setProperty("width", "100%");
4500
4576
  _el$4.style.setProperty("pointer-events", "none");
4501
4577
  _el$4.style.setProperty("font-size", "0px");
@@ -4508,7 +4584,7 @@ function Video(props) {
4508
4584
  return props.builderBlock?.children?.length && props.fitContent;
4509
4585
  },
4510
4586
  get children() {
4511
- const _el$5 = _tmpl$27();
4587
+ const _el$5 = _tmpl$28();
4512
4588
  _el$5.style.setProperty("display", "flex");
4513
4589
  _el$5.style.setProperty("flex-direction", "column");
4514
4590
  _el$5.style.setProperty("align-items", "stretch");
@@ -4521,7 +4597,7 @@ function Video(props) {
4521
4597
  return props.builderBlock?.children?.length && !props.fitContent;
4522
4598
  },
4523
4599
  get children() {
4524
- const _el$6 = _tmpl$27();
4600
+ const _el$6 = _tmpl$28();
4525
4601
  _el$6.style.setProperty("pointer-events", "none");
4526
4602
  _el$6.style.setProperty("display", "flex");
4527
4603
  _el$6.style.setProperty("flex-direction", "column");
@@ -4559,12 +4635,15 @@ var getExtraComponents = () => [{
4559
4635
  }, {
4560
4636
  component: select_default,
4561
4637
  ...componentInfo15
4638
+ }, {
4639
+ component: textarea_default,
4640
+ ...componentInfo17
4562
4641
  }], {
4563
4642
  component: img_default,
4564
- ...componentInfo17
4643
+ ...componentInfo18
4565
4644
  }, {
4566
4645
  component: video_default,
4567
- ...componentInfo18
4646
+ ...componentInfo19
4568
4647
  }];
4569
4648
 
4570
4649
  // src/constants/builder-registered-components.ts
@@ -4667,10 +4746,10 @@ var getUpdateVariantVisibilityScript = ({
4667
4746
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
4668
4747
  "${variationId}", "${contentId}", ${isHydrationTarget}
4669
4748
  )`;
4670
- var _tmpl$18 = /* @__PURE__ */ template(`<script>`);
4749
+ var _tmpl$20 = /* @__PURE__ */ template(`<script>`);
4671
4750
  function InlinedScript(props) {
4672
4751
  return (() => {
4673
- const _el$ = _tmpl$18();
4752
+ const _el$ = _tmpl$20();
4674
4753
  effect((_p$) => {
4675
4754
  const _v$ = props.scriptStr, _v$2 = props.id;
4676
4755
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -5179,7 +5258,7 @@ function isFromTrustedHost(trustedHosts, e) {
5179
5258
  }
5180
5259
 
5181
5260
  // src/constants/sdk-version.ts
5182
- var SDK_VERSION = "1.0.33";
5261
+ var SDK_VERSION = "1.0.36";
5183
5262
 
5184
5263
  // src/functions/register.ts
5185
5264
  var registry = {};
@@ -6161,7 +6240,7 @@ var fetchSymbolContent = async ({
6161
6240
  };
6162
6241
 
6163
6242
  // src/blocks/symbol/symbol.tsx
6164
- var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
6243
+ var _tmpl$21 = /* @__PURE__ */ template(`<div>`);
6165
6244
  function Symbol(props) {
6166
6245
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
6167
6246
  const blocksWrapper = createMemo(() => {
@@ -6193,7 +6272,7 @@ function Symbol(props) {
6193
6272
  }
6194
6273
  createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6195
6274
  return (() => {
6196
- const _el$ = _tmpl$19();
6275
+ const _el$ = _tmpl$21();
6197
6276
  spread(_el$, mergeProps({
6198
6277
  get ["class"]() {
6199
6278
  return className();