@builder.io/sdk-solid 1.0.32 → 1.0.35

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.
@@ -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
 
5
4
  // src/blocks/button/button.tsx
6
5
 
@@ -885,7 +884,7 @@ function BlockStyles(props) {
885
884
  }
886
885
  return true;
887
886
  });
888
- const css5 = createMemo(() => {
887
+ const css = createMemo(() => {
889
888
  const processedBlock = getProcessedBlock({
890
889
  block: props.block,
891
890
  localState: props.context.localState,
@@ -935,13 +934,13 @@ function BlockStyles(props) {
935
934
  });
936
935
  return createComponent(Show, {
937
936
  get when() {
938
- return memo(() => !!(TARGET !== "reactNative" && css5()))() && canShowBlock();
937
+ return memo(() => !!(TARGET !== "reactNative" && css()))() && canShowBlock();
939
938
  },
940
939
  get children() {
941
940
  return createComponent(inlined_styles_default, {
942
941
  id: "builderio-block",
943
942
  get styles() {
944
- return css5();
943
+ return css();
945
944
  }
946
945
  });
947
946
  }
@@ -1419,6 +1418,11 @@ function Block(props) {
1419
1418
  });
1420
1419
  }
1421
1420
  var block_default = Block;
1421
+ var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-1bb6a3a2 {
1422
+ display: flex;
1423
+ flex-direction: column;
1424
+ align-items: stretch;
1425
+ }`);
1422
1426
  function BlocksWrapper(props) {
1423
1427
  const className = createMemo(() => {
1424
1428
  return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
@@ -1445,13 +1449,9 @@ function BlocksWrapper(props) {
1445
1449
  }, "*");
1446
1450
  }
1447
1451
  }
1448
- return createComponent(Dynamic, mergeProps({
1452
+ return [createComponent(Dynamic, mergeProps({
1449
1453
  get ["class"]() {
1450
- return className() + " " + css({
1451
- display: "flex",
1452
- flexDirection: "column",
1453
- alignItems: "stretch"
1454
- });
1454
+ return className() + " dynamic-1bb6a3a2";
1455
1455
  },
1456
1456
  get ["builder-path"]() {
1457
1457
  return props.path;
@@ -1473,7 +1473,7 @@ function BlocksWrapper(props) {
1473
1473
  get children() {
1474
1474
  return props.children;
1475
1475
  }
1476
- }));
1476
+ })), _tmpl$2()];
1477
1477
  }
1478
1478
  var blocks_wrapper_default = BlocksWrapper;
1479
1479
 
@@ -1542,7 +1542,11 @@ var getColumnsClass = (id) => {
1542
1542
  };
1543
1543
 
1544
1544
  // src/blocks/columns/columns.tsx
1545
- var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
1545
+ var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
1546
+ var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-f2f53158 {
1547
+ display: flex;
1548
+ line-height: normal;
1549
+ }`);
1546
1550
  function Columns(props) {
1547
1551
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
1548
1552
  const [cols, setCols] = createSignal(props.columns || []);
@@ -1654,14 +1658,11 @@ function Columns(props) {
1654
1658
  style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1655
1659
  };
1656
1660
  }
1657
- return (() => {
1658
- const _el$ = _tmpl$2();
1661
+ return [(() => {
1662
+ const _el$ = _tmpl$3();
1659
1663
  spread(_el$, mergeProps({
1660
1664
  get ["class"]() {
1661
- return getColumnsClass(props.builderBlock?.id) + " " + css({
1662
- display: "flex",
1663
- lineHeight: "normal"
1664
- });
1665
+ return getColumnsClass(props.builderBlock?.id) + " div-f2f53158";
1665
1666
  },
1666
1667
  get style() {
1667
1668
  return columnsCssVars();
@@ -1720,13 +1721,13 @@ function Columns(props) {
1720
1721
  }
1721
1722
  }), null);
1722
1723
  return _el$;
1723
- })();
1724
+ })(), _tmpl$22()];
1724
1725
  }
1725
1726
  var columns_default = Columns;
1726
- var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
1727
+ var _tmpl$4 = /* @__PURE__ */ template(`<span>`);
1727
1728
  function FragmentComponent(props) {
1728
1729
  return (() => {
1729
- const _el$ = _tmpl$3();
1730
+ const _el$ = _tmpl$4();
1730
1731
  insert(_el$, () => props.children);
1731
1732
  return _el$;
1732
1733
  })();
@@ -1781,9 +1782,27 @@ function getSrcSet(url) {
1781
1782
  }
1782
1783
 
1783
1784
  // src/blocks/image/image.tsx
1784
- var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
1785
- var _tmpl$22 = /* @__PURE__ */ template(`<picture><img>`);
1786
- var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
1785
+ var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
1786
+ var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
1787
+ var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-54b38751">`);
1788
+ var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-54b38751-2>`);
1789
+ var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-54b38751 {
1790
+ opacity: 1;
1791
+ transition: opacity 0.2s ease-in-out;
1792
+ }.div-54b38751 {
1793
+ width: 100%;
1794
+ pointer-events: none;
1795
+ font-size: 0;
1796
+ }.div-54b38751-2 {
1797
+ display: flex;
1798
+ flex-direction: column;
1799
+ align-items: stretch;
1800
+ position: absolute;
1801
+ top: 0;
1802
+ left: 0;
1803
+ width: 100%;
1804
+ height: 100%;
1805
+ }`);
1787
1806
  function Image(props) {
1788
1807
  const srcSetToUse = createMemo(() => {
1789
1808
  const imageToUse = props.image || props.src;
@@ -1820,23 +1839,20 @@ function Image(props) {
1820
1839
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
1821
1840
  return out;
1822
1841
  });
1823
- return [(() => {
1824
- const _el$ = _tmpl$22(), _el$3 = _el$.firstChild;
1842
+ return [[(() => {
1843
+ const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
1825
1844
  insert(_el$, createComponent(Show, {
1826
1845
  get when() {
1827
1846
  return webpSrcSet();
1828
1847
  },
1829
1848
  get children() {
1830
- const _el$2 = _tmpl$4();
1849
+ const _el$2 = _tmpl$5();
1831
1850
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
1832
1851
  return _el$2;
1833
1852
  }
1834
1853
  }), _el$3);
1835
1854
  effect((_p$) => {
1836
- const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " " + css({
1837
- opacity: "1",
1838
- transition: "opacity 0.2s ease-in-out"
1839
- }), _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 = {
1855
+ 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 = {
1840
1856
  "object-position": props.backgroundPosition || "center",
1841
1857
  "object-fit": props.backgroundSize || "cover",
1842
1858
  ...aspectRatioCss()
@@ -1869,19 +1885,7 @@ function Image(props) {
1869
1885
  },
1870
1886
  get children() {
1871
1887
  const _el$4 = _tmpl$32();
1872
- effect((_p$) => {
1873
- const _v$10 = "builder-image-sizer " + css({
1874
- width: "100%",
1875
- pointerEvents: "none",
1876
- fontSize: "0"
1877
- }), _v$11 = props.aspectRatio * 100 + "%";
1878
- _v$10 !== _p$._v$10 && className(_el$4, _p$._v$10 = _v$10);
1879
- _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"));
1880
- return _p$;
1881
- }, {
1882
- _v$10: void 0,
1883
- _v$11: void 0
1884
- });
1888
+ effect(() => props.aspectRatio * 100 + "%" != null ? _el$4.style.setProperty("padding-top", props.aspectRatio * 100 + "%") : _el$4.style.removeProperty("padding-top"));
1885
1889
  return _el$4;
1886
1890
  }
1887
1891
  }), createComponent(Show, {
@@ -1896,27 +1900,17 @@ function Image(props) {
1896
1900
  return !props.fitContent && props.builderBlock?.children?.length;
1897
1901
  },
1898
1902
  get children() {
1899
- const _el$5 = _tmpl$32();
1903
+ const _el$5 = _tmpl$42();
1900
1904
  insert(_el$5, () => props.children);
1901
- effect(() => className(_el$5, css({
1902
- display: "flex",
1903
- flexDirection: "column",
1904
- alignItems: "stretch",
1905
- position: "absolute",
1906
- top: "0",
1907
- left: "0",
1908
- width: "100%",
1909
- height: "100%"
1910
- })));
1911
1905
  return _el$5;
1912
1906
  }
1913
- })];
1907
+ })], _tmpl$52()];
1914
1908
  }
1915
1909
  var image_default = Image;
1916
- var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
1910
+ var _tmpl$6 = /* @__PURE__ */ template(`<section>`);
1917
1911
  function SectionComponent(props) {
1918
1912
  return (() => {
1919
- const _el$ = _tmpl$5();
1913
+ const _el$ = _tmpl$6();
1920
1914
  spread(_el$, mergeProps({}, () => props.attributes, {
1921
1915
  get style() {
1922
1916
  return {
@@ -2261,8 +2255,8 @@ var convertOrderNumberToString = (order) => {
2261
2255
  };
2262
2256
 
2263
2257
  // src/blocks/accordion/accordion.tsx
2264
- var _tmpl$6 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
2265
- var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
2258
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
2259
+ var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
2266
2260
  function Accordion(props) {
2267
2261
  const [open, setOpen] = createSignal([]);
2268
2262
  const onlyOneAtATime = createMemo(() => {
@@ -2352,7 +2346,7 @@ function Accordion(props) {
2352
2346
  }
2353
2347
  }
2354
2348
  return (() => {
2355
- const _el$ = _tmpl$6();
2349
+ const _el$ = _tmpl$7();
2356
2350
  insert(_el$, createComponent(For, {
2357
2351
  get each() {
2358
2352
  return props.items;
@@ -2360,7 +2354,7 @@ function Accordion(props) {
2360
2354
  children: (item, _index) => {
2361
2355
  const index = _index();
2362
2356
  return [(() => {
2363
- const _el$2 = _tmpl$23();
2357
+ const _el$2 = _tmpl$24();
2364
2358
  _el$2.$$click = (event) => onClick(index);
2365
2359
  setAttribute(_el$2, "data-index", index);
2366
2360
  insert(_el$2, createComponent(blocks_default, {
@@ -2402,7 +2396,7 @@ function Accordion(props) {
2402
2396
  return open().includes(index);
2403
2397
  },
2404
2398
  get children() {
2405
- const _el$3 = _tmpl$23();
2399
+ const _el$3 = _tmpl$24();
2406
2400
  insert(_el$3, createComponent(blocks_default, {
2407
2401
  get blocks() {
2408
2402
  return item.detail;
@@ -2723,7 +2717,7 @@ var componentInfo5 = {
2723
2717
  name: "image",
2724
2718
  type: "file",
2725
2719
  bubble: true,
2726
- allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
2720
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
2727
2721
  required: true,
2728
2722
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
2729
2723
  onChange: (options) => {
@@ -2891,10 +2885,10 @@ var componentInfo7 = {
2891
2885
  defaultValue: "children"
2892
2886
  }]
2893
2887
  };
2894
- var _tmpl$7 = /* @__PURE__ */ template(`<div>`);
2888
+ var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
2895
2889
  function Slot(props) {
2896
2890
  return (() => {
2897
- const _el$ = _tmpl$7();
2891
+ const _el$ = _tmpl$8();
2898
2892
  _el$.style.setProperty("pointer-events", "auto");
2899
2893
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
2900
2894
  "builder-slot": props.name
@@ -3093,8 +3087,8 @@ var componentInfo9 = {
3093
3087
  }]
3094
3088
  }]
3095
3089
  };
3096
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
3097
- var _tmpl$24 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
3090
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
3091
+ var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
3098
3092
  var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
3099
3093
  function Tabs(props) {
3100
3094
  const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
@@ -3109,7 +3103,7 @@ function Tabs(props) {
3109
3103
  }
3110
3104
  }
3111
3105
  return (() => {
3112
- const _el$ = _tmpl$24(), _el$2 = _el$.firstChild;
3106
+ const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
3113
3107
  _el$2.style.setProperty("display", "flex");
3114
3108
  _el$2.style.setProperty("flex-direction", "row");
3115
3109
  _el$2.style.setProperty("overflow", "auto");
@@ -3161,7 +3155,7 @@ function Tabs(props) {
3161
3155
  return activeTabContent(activeTab());
3162
3156
  },
3163
3157
  get children() {
3164
- const _el$3 = _tmpl$8();
3158
+ const _el$3 = _tmpl$9();
3165
3159
  insert(_el$3, createComponent(blocks_default, {
3166
3160
  get parent() {
3167
3161
  return props.builderBlock.id;
@@ -3212,10 +3206,10 @@ var componentInfo10 = {
3212
3206
  textAlign: "center"
3213
3207
  }
3214
3208
  };
3215
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-text>`);
3209
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
3216
3210
  function Text(props) {
3217
3211
  return (() => {
3218
- const _el$ = _tmpl$9();
3212
+ const _el$ = _tmpl$10();
3219
3213
  _el$.style.setProperty("outline", "none");
3220
3214
  effect(() => _el$.innerHTML = props.text?.toString() || "");
3221
3215
  return _el$;
@@ -3247,7 +3241,7 @@ var componentInfo11 = {
3247
3241
  advanced: true
3248
3242
  }]
3249
3243
  };
3250
- var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
3244
+ var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
3251
3245
  function CustomCode(props) {
3252
3246
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
3253
3247
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -3281,7 +3275,7 @@ function CustomCode(props) {
3281
3275
  }
3282
3276
  });
3283
3277
  return (() => {
3284
- const _el$ = _tmpl$10();
3278
+ const _el$ = _tmpl$11();
3285
3279
  const _ref$ = elementRef;
3286
3280
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
3287
3281
  effect((_p$) => {
@@ -3312,7 +3306,7 @@ var componentInfo12 = {
3312
3306
  const url = options.get("url");
3313
3307
  if (url) {
3314
3308
  options.set("content", "Loading...");
3315
- const apiKey = "ae0e60e78201a3f2b0de4b";
3309
+ const apiKey = _iframelyApiKey;
3316
3310
  return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
3317
3311
  if (options.get("url") === url) {
3318
3312
  if (data.html) {
@@ -3341,7 +3335,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
3341
3335
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
3342
3336
 
3343
3337
  // src/blocks/embed/embed.tsx
3344
- var _tmpl$11 = /* @__PURE__ */ template(`<div class=builder-embed>`);
3338
+ var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
3345
3339
  function Embed(props) {
3346
3340
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
3347
3341
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -3378,7 +3372,7 @@ function Embed(props) {
3378
3372
  }
3379
3373
  createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
3380
3374
  return (() => {
3381
- const _el$ = _tmpl$11();
3375
+ const _el$ = _tmpl$12();
3382
3376
  const _ref$ = elem;
3383
3377
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
3384
3378
  effect(() => _el$.innerHTML = props.content);
@@ -3635,8 +3629,13 @@ var get = (obj, path, defaultValue) => {
3635
3629
  };
3636
3630
 
3637
3631
  // src/blocks/form/form/form.tsx
3638
- var _tmpl$12 = /* @__PURE__ */ template(`<pre>`);
3639
- var _tmpl$25 = /* @__PURE__ */ template(`<form>`);
3632
+ var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-2e825338">`);
3633
+ var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
3634
+ var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-2e825338 {
3635
+ padding: 10px;
3636
+ color: red;
3637
+ text-align: center;
3638
+ }`);
3640
3639
  function FormComponent(props) {
3641
3640
  const [formState, setFormState] = createSignal("unsubmitted");
3642
3641
  const [responseData, setResponseData] = createSignal(null);
@@ -3821,8 +3820,8 @@ function FormComponent(props) {
3821
3820
  }
3822
3821
  }
3823
3822
  let formRef;
3824
- return (() => {
3825
- const _el$ = _tmpl$25();
3823
+ return [(() => {
3824
+ const _el$ = _tmpl$26();
3826
3825
  _el$.addEventListener("submit", (event) => onSubmit(event));
3827
3826
  const _ref$ = formRef;
3828
3827
  typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
@@ -3905,13 +3904,8 @@ function FormComponent(props) {
3905
3904
  return memo(() => submissionState() === "error")() && responseData();
3906
3905
  },
3907
3906
  get children() {
3908
- const _el$2 = _tmpl$12();
3907
+ const _el$2 = _tmpl$13();
3909
3908
  insert(_el$2, () => JSON.stringify(responseData(), null, 2));
3910
- effect(() => className(_el$2, "builder-form-error-text " + css({
3911
- padding: "10px",
3912
- color: "red",
3913
- textAlign: "center"
3914
- })));
3915
3909
  return _el$2;
3916
3910
  }
3917
3911
  }), null);
@@ -3932,7 +3926,7 @@ function FormComponent(props) {
3932
3926
  }
3933
3927
  }), null);
3934
3928
  return _el$;
3935
- })();
3929
+ })(), _tmpl$34()];
3936
3930
  }
3937
3931
  var form_default = FormComponent;
3938
3932
 
@@ -3989,10 +3983,10 @@ var componentInfo14 = {
3989
3983
  borderColor: "#ccc"
3990
3984
  }
3991
3985
  };
3992
- var _tmpl$13 = /* @__PURE__ */ template(`<input>`);
3986
+ var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
3993
3987
  function FormInputComponent(props) {
3994
3988
  return (() => {
3995
- const _el$ = _tmpl$13();
3989
+ const _el$ = _tmpl$14();
3996
3990
  spread(_el$, mergeProps({}, () => props.attributes, {
3997
3991
  get key() {
3998
3992
  return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
@@ -4065,11 +4059,11 @@ var componentInfo15 = {
4065
4059
  static: true,
4066
4060
  noWrap: true
4067
4061
  };
4068
- var _tmpl$14 = /* @__PURE__ */ template(`<select>`);
4069
- var _tmpl$26 = /* @__PURE__ */ template(`<option>`);
4062
+ var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
4063
+ var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
4070
4064
  function SelectComponent(props) {
4071
4065
  return (() => {
4072
- const _el$ = _tmpl$14();
4066
+ const _el$ = _tmpl$15();
4073
4067
  spread(_el$, mergeProps({}, () => props.attributes, {
4074
4068
  get value() {
4075
4069
  return props.value;
@@ -4091,7 +4085,7 @@ function SelectComponent(props) {
4091
4085
  children: (option, _index) => {
4092
4086
  const index = _index();
4093
4087
  return (() => {
4094
- const _el$2 = _tmpl$26();
4088
+ const _el$2 = _tmpl$27();
4095
4089
  insert(_el$2, () => option.name || option.value);
4096
4090
  effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
4097
4091
  effect(() => _el$2.value = option.value);
@@ -4131,10 +4125,10 @@ var componentInfo16 = {
4131
4125
  // TODO: defaultChildren
4132
4126
  // canHaveChildren: true,
4133
4127
  };
4134
- var _tmpl$15 = /* @__PURE__ */ template(`<button type=submit>`);
4128
+ var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
4135
4129
  function SubmitButton(props) {
4136
4130
  return (() => {
4137
- const _el$ = _tmpl$15();
4131
+ const _el$ = _tmpl$16();
4138
4132
  spread(_el$, mergeProps({}, () => props.attributes), false, true);
4139
4133
  insert(_el$, () => props.text);
4140
4134
  return _el$;
@@ -4158,10 +4152,10 @@ var componentInfo17 = {
4158
4152
  noWrap: true,
4159
4153
  static: true
4160
4154
  };
4161
- var _tmpl$16 = /* @__PURE__ */ template(`<img>`);
4155
+ var _tmpl$17 = /* @__PURE__ */ template(`<img>`);
4162
4156
  function ImgComponent(props) {
4163
4157
  return (() => {
4164
- const _el$ = _tmpl$16();
4158
+ const _el$ = _tmpl$17();
4165
4159
  spread(_el$, mergeProps({
4166
4160
  get style() {
4167
4161
  return {
@@ -4267,9 +4261,9 @@ var componentInfo18 = {
4267
4261
  advanced: true
4268
4262
  }]
4269
4263
  };
4270
- var _tmpl$17 = /* @__PURE__ */ template(`<source type=video/mp4>`);
4271
- var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
4272
- var _tmpl$34 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
4264
+ var _tmpl$18 = /* @__PURE__ */ template(`<source type=video/mp4>`);
4265
+ var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
4266
+ var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
4273
4267
  function Video(props) {
4274
4268
  const videoProps = createMemo(() => {
4275
4269
  return {
@@ -4296,7 +4290,7 @@ function Video(props) {
4296
4290
  };
4297
4291
  });
4298
4292
  return (() => {
4299
- const _el$ = _tmpl$34(), _el$2 = _el$.firstChild;
4293
+ const _el$ = _tmpl$35(), _el$2 = _el$.firstChild;
4300
4294
  _el$.style.setProperty("position", "relative");
4301
4295
  spread(_el$2, mergeProps(spreadProps, {
4302
4296
  get preload() {
@@ -4330,7 +4324,7 @@ function Video(props) {
4330
4324
  return !props.lazyLoad;
4331
4325
  },
4332
4326
  get children() {
4333
- const _el$3 = _tmpl$17();
4327
+ const _el$3 = _tmpl$18();
4334
4328
  effect(() => setAttribute(_el$3, "src", props.video));
4335
4329
  return _el$3;
4336
4330
  }
@@ -4340,7 +4334,7 @@ function Video(props) {
4340
4334
  return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
4341
4335
  },
4342
4336
  get children() {
4343
- const _el$4 = _tmpl$27();
4337
+ const _el$4 = _tmpl$28();
4344
4338
  _el$4.style.setProperty("width", "100%");
4345
4339
  _el$4.style.setProperty("pointer-events", "none");
4346
4340
  _el$4.style.setProperty("font-size", "0px");
@@ -4353,7 +4347,7 @@ function Video(props) {
4353
4347
  return props.builderBlock?.children?.length && props.fitContent;
4354
4348
  },
4355
4349
  get children() {
4356
- const _el$5 = _tmpl$27();
4350
+ const _el$5 = _tmpl$28();
4357
4351
  _el$5.style.setProperty("display", "flex");
4358
4352
  _el$5.style.setProperty("flex-direction", "column");
4359
4353
  _el$5.style.setProperty("align-items", "stretch");
@@ -4366,7 +4360,7 @@ function Video(props) {
4366
4360
  return props.builderBlock?.children?.length && !props.fitContent;
4367
4361
  },
4368
4362
  get children() {
4369
- const _el$6 = _tmpl$27();
4363
+ const _el$6 = _tmpl$28();
4370
4364
  _el$6.style.setProperty("pointer-events", "none");
4371
4365
  _el$6.style.setProperty("display", "flex");
4372
4366
  _el$6.style.setProperty("flex-direction", "column");
@@ -4512,10 +4506,10 @@ var getUpdateVariantVisibilityScript = ({
4512
4506
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
4513
4507
  "${variationId}", "${contentId}", ${isHydrationTarget}
4514
4508
  )`;
4515
- var _tmpl$18 = /* @__PURE__ */ template(`<script>`);
4509
+ var _tmpl$19 = /* @__PURE__ */ template(`<script>`);
4516
4510
  function InlinedScript(props) {
4517
4511
  return (() => {
4518
- const _el$ = _tmpl$18();
4512
+ const _el$ = _tmpl$19();
4519
4513
  effect((_p$) => {
4520
4514
  const _v$ = props.scriptStr, _v$2 = props.id;
4521
4515
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -5016,12 +5010,15 @@ var getInteractionPropertiesForEvent = (event) => {
5016
5010
  // src/functions/is-from-trusted-host.ts
5017
5011
  var DEFAULT_TRUSTED_HOSTS = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
5018
5012
  function isFromTrustedHost(trustedHosts, e) {
5013
+ if (!e.origin.startsWith("http") && !e.origin.startsWith("https")) {
5014
+ return false;
5015
+ }
5019
5016
  const url = new URL(e.origin), hostname = url.hostname;
5020
5017
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5021
5018
  }
5022
5019
 
5023
5020
  // src/constants/sdk-version.ts
5024
- var SDK_VERSION = "1.0.32";
5021
+ var SDK_VERSION = "1.0.35";
5025
5022
 
5026
5023
  // src/functions/register.ts
5027
5024
  var registry = {};
@@ -6003,7 +6000,7 @@ var fetchSymbolContent = async ({
6003
6000
  };
6004
6001
 
6005
6002
  // src/blocks/symbol/symbol.tsx
6006
- var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
6003
+ var _tmpl$20 = /* @__PURE__ */ template(`<div>`);
6007
6004
  function Symbol(props) {
6008
6005
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
6009
6006
  const blocksWrapper = createMemo(() => {
@@ -6035,7 +6032,7 @@ function Symbol(props) {
6035
6032
  }
6036
6033
  createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6037
6034
  return (() => {
6038
- const _el$ = _tmpl$19();
6035
+ const _el$ = _tmpl$20();
6039
6036
  spread(_el$, mergeProps({
6040
6037
  get ["class"]() {
6041
6038
  return className();