@builder.io/sdk-solid 4.0.6 → 4.0.8

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,5 +1,5 @@
1
1
  import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, use, Dynamic, memo } from 'solid-js/web';
2
- import { createContext, useContext, Show, For, createMemo, createSignal, onMount, createEffect, on } from 'solid-js';
2
+ import { createContext, useContext, Show, For, createMemo, onMount, createSignal, createEffect, on } from 'solid-js';
3
3
 
4
4
  // src/blocks/button/button.tsx
5
5
 
@@ -936,6 +936,9 @@ var provideBuilderContext = (block, context) => {
936
936
  };
937
937
  return {};
938
938
  };
939
+ var generateKey = (index) => {
940
+ return index.toString();
941
+ };
939
942
 
940
943
  // src/constants/device-sizes.ts
941
944
  var SIZES = {
@@ -1215,6 +1218,7 @@ var awaiter_default = Awaiter;
1215
1218
 
1216
1219
  // src/components/block/components/interactive-element.tsx
1217
1220
  function InteractiveElement(props) {
1221
+ createSignal(0);
1218
1222
  const attributes = createMemo(() => {
1219
1223
  return props.includeBlockProps ? {
1220
1224
  ...getBlockProperties({
@@ -1230,9 +1234,17 @@ function InteractiveElement(props) {
1230
1234
  })
1231
1235
  } : {};
1232
1236
  });
1237
+ const targetWrapperProps = createMemo(() => {
1238
+ return props.wrapperProps;
1239
+ });
1240
+ const onUpdateFn_0_props_wrapperProps = createMemo(() => props.wrapperProps);
1241
+ const onUpdateFn_0_props_block__component__options = createMemo(() => props.block?.component?.options);
1242
+ function onUpdateFn_0() {
1243
+ }
1244
+ createEffect(on(() => [onUpdateFn_0_props_wrapperProps(), onUpdateFn_0_props_block__component__options()], onUpdateFn_0));
1233
1245
  return createComponent(Show, {
1234
1246
  get fallback() {
1235
- return createComponent(Dynamic, mergeProps(() => props.wrapperProps, {
1247
+ return createComponent(Dynamic, mergeProps(targetWrapperProps, {
1236
1248
  get attributes() {
1237
1249
  return attributes();
1238
1250
  },
@@ -1362,6 +1374,11 @@ function ComponentRef(props) {
1362
1374
  var component_ref_default = ComponentRef;
1363
1375
  function RepeatedBlock(props) {
1364
1376
  const [store, setStore] = createSignal(props.repeatContext);
1377
+ const onUpdateFn_0_props_repeatContext = createMemo(() => props.repeatContext);
1378
+ function onUpdateFn_0() {
1379
+ setStore(props.repeatContext);
1380
+ }
1381
+ createEffect(on(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
1365
1382
  return createComponent(builder_context_default.Provider, {
1366
1383
  get value() {
1367
1384
  return store();
@@ -1488,7 +1505,9 @@ function Block(props) {
1488
1505
  children: (data, _index) => {
1489
1506
  const index = _index();
1490
1507
  return createComponent(repeated_block_default, {
1491
- key: index,
1508
+ get key() {
1509
+ return generateKey(index);
1510
+ },
1492
1511
  get repeatContext() {
1493
1512
  return data.context;
1494
1513
  },
@@ -1554,7 +1573,9 @@ function Block(props) {
1554
1573
  children: (data, _index) => {
1555
1574
  const index = _index();
1556
1575
  return createComponent(repeated_block_default, {
1557
- key: index,
1576
+ get key() {
1577
+ return generateKey(index);
1578
+ },
1558
1579
  get repeatContext() {
1559
1580
  return data.context;
1560
1581
  },
@@ -2050,16 +2071,16 @@ function getSrcSet(url) {
2050
2071
  // src/blocks/image/image.tsx
2051
2072
  var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
2052
2073
  var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
2053
- var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-040e729e">`);
2054
- var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-040e729e-2>`);
2055
- var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-040e729e {
2074
+ var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-5f381e78">`);
2075
+ var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-5f381e78-2>`);
2076
+ var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-5f381e78 {
2056
2077
  opacity: 1;
2057
2078
  transition: opacity 0.2s ease-in-out;
2058
- }.div-040e729e {
2079
+ }.div-5f381e78 {
2059
2080
  width: 100%;
2060
2081
  pointer-events: none;
2061
2082
  font-size: 0;
2062
- }.div-040e729e-2 {
2083
+ }.div-5f381e78-2 {
2063
2084
  display: flex;
2064
2085
  flex-direction: column;
2065
2086
  align-items: stretch;
@@ -2109,6 +2130,8 @@ function Image(props) {
2109
2130
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
2110
2131
  return out;
2111
2132
  });
2133
+ onMount(() => {
2134
+ });
2112
2135
  return [[(() => {
2113
2136
  const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
2114
2137
  insert(_el$, createComponent(Show, {
@@ -2122,7 +2145,7 @@ function Image(props) {
2122
2145
  }
2123
2146
  }), _el$3);
2124
2147
  effect((_p$) => {
2125
- const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-040e729e", _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.title, _v$6 = props.altText ? void 0 : "presentation", _v$7 = {
2148
+ const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78", _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.title, _v$6 = props.altText ? void 0 : "presentation", _v$7 = {
2126
2149
  "object-position": props.backgroundPosition || "center",
2127
2150
  "object-fit": props.backgroundSize || "cover",
2128
2151
  ...aspectRatioCss()
@@ -3958,10 +3981,10 @@ delegateEvents(["click"]);
3958
3981
 
3959
3982
  // src/blocks/text/component-info.ts
3960
3983
  var componentInfo11 = {
3961
- shouldReceiveBuilderProps: {
3962
- builderBlock: TARGET === "reactNative" ? true : false,
3984
+ shouldReceiveBuilderProps: TARGET === "reactNative" ? {
3985
+ builderBlock: true,
3963
3986
  builderContext: true
3964
- },
3987
+ } : {},
3965
3988
  name: "Text",
3966
3989
  static: true,
3967
3990
  isRSC: true,
@@ -5359,7 +5382,7 @@ function getPreviewContent(_searchParams) {
5359
5382
  }
5360
5383
 
5361
5384
  // src/constants/sdk-version.ts
5362
- var SDK_VERSION = "4.0.6";
5385
+ var SDK_VERSION = "4.0.8";
5363
5386
 
5364
5387
  // src/helpers/sdk-headers.ts
5365
5388
  var getSdkHeaders = () => ({
@@ -6981,6 +7004,7 @@ var fetchSymbolContent = async ({
6981
7004
  var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
6982
7005
  function Symbol(props) {
6983
7006
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
7007
+ const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
6984
7008
  const blocksWrapper = createMemo(() => {
6985
7009
  return "div";
6986
7010
  });
@@ -6991,7 +7015,7 @@ function Symbol(props) {
6991
7015
  return [...[props.attributes[getClassPropName()]], "builder-symbol", props.symbol?.inline ? "builder-inline-symbol" : void 0, props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0].filter(Boolean).join(" ");
6992
7016
  });
6993
7017
  function setContent() {
6994
- if (contentToUse())
7018
+ if (contentToUse() && symbolEntry() === props.symbol?.entry)
6995
7019
  return;
6996
7020
  fetchSymbolContent({
6997
7021
  symbol: props.symbol,
@@ -6999,6 +7023,7 @@ function Symbol(props) {
6999
7023
  }).then((newContent) => {
7000
7024
  if (newContent) {
7001
7025
  setContentToUse(newContent);
7026
+ setSymbolEntry(props.symbol?.entry);
7002
7027
  }
7003
7028
  });
7004
7029
  }
@@ -929,6 +929,9 @@ var provideBuilderContext = (block, context) => {
929
929
  };
930
930
  return {};
931
931
  };
932
+ var generateKey = (index) => {
933
+ return index.toString();
934
+ };
932
935
 
933
936
  // src/components/block/components/block-styles.tsx
934
937
  import { Show as Show2, createMemo } from "solid-js";
@@ -1199,15 +1202,15 @@ var Block_wrapper_default = BlockWrapper;
1199
1202
  import {
1200
1203
  Show as Show4,
1201
1204
  For,
1202
- on,
1203
- createEffect,
1205
+ on as on2,
1206
+ createEffect as createEffect2,
1204
1207
  createMemo as createMemo3,
1205
1208
  createSignal as createSignal3
1206
1209
  } from "solid-js";
1207
1210
  import { Dynamic as Dynamic3 } from "solid-js/web";
1208
1211
 
1209
1212
  // src/components/block/components/interactive-element.tsx
1210
- import { Show as Show3, createMemo as createMemo2 } from "solid-js";
1213
+ import { Show as Show3, on, createEffect, createMemo as createMemo2, createSignal as createSignal2 } from "solid-js";
1211
1214
  import { Dynamic as Dynamic2 } from "solid-js/web";
1212
1215
 
1213
1216
  // src/components/awaiter.tsx
@@ -1221,6 +1224,7 @@ var Awaiter_default = Awaiter;
1221
1224
 
1222
1225
  // src/components/block/components/interactive-element.tsx
1223
1226
  function InteractiveElement(props) {
1227
+ const [forceRenderCount, setForceRenderCount] = createSignal2(0);
1224
1228
  const attributes = createMemo2(() => {
1225
1229
  return props.includeBlockProps ? {
1226
1230
  ...getBlockProperties({
@@ -1236,9 +1240,27 @@ function InteractiveElement(props) {
1236
1240
  })
1237
1241
  } : {};
1238
1242
  });
1243
+ const targetWrapperProps = createMemo2(() => {
1244
+ return props.wrapperProps;
1245
+ });
1246
+ const onUpdateFn_0_props_wrapperProps = createMemo2(() => props.wrapperProps);
1247
+ const onUpdateFn_0_props_block__component__options = createMemo2(
1248
+ () => props.block?.component?.options
1249
+ );
1250
+ function onUpdateFn_0() {
1251
+ }
1252
+ createEffect(
1253
+ on(
1254
+ () => [
1255
+ onUpdateFn_0_props_wrapperProps(),
1256
+ onUpdateFn_0_props_block__component__options()
1257
+ ],
1258
+ onUpdateFn_0
1259
+ )
1260
+ );
1239
1261
  return <><Show3
1240
1262
  fallback={<Dynamic2
1241
- {...props.wrapperProps}
1263
+ {...targetWrapperProps()}
1242
1264
  attributes={attributes()}
1243
1265
  component={props.Wrapper}
1244
1266
  >{props.children}</Dynamic2>}
@@ -1299,8 +1321,8 @@ function ComponentRef(props) {
1299
1321
  );
1300
1322
  function onUpdateFn_0() {
1301
1323
  }
1302
- createEffect(
1303
- on(
1324
+ createEffect2(
1325
+ on2(
1304
1326
  () => [
1305
1327
  onUpdateFn_0_props_componentOptions(),
1306
1328
  onUpdateFn_0_props_blockChildren()
@@ -1334,9 +1356,16 @@ function ComponentRef(props) {
1334
1356
  var Component_ref_default = ComponentRef;
1335
1357
 
1336
1358
  // src/components/block/components/repeated-block.tsx
1337
- import { createSignal as createSignal4 } from "solid-js";
1359
+ import { on as on3, createEffect as createEffect3, createMemo as createMemo4, createSignal as createSignal4 } from "solid-js";
1338
1360
  function RepeatedBlock(props) {
1339
1361
  const [store, setStore] = createSignal4(props.repeatContext);
1362
+ const onUpdateFn_0_props_repeatContext = createMemo4(
1363
+ () => props.repeatContext
1364
+ );
1365
+ function onUpdateFn_0() {
1366
+ setStore(props.repeatContext);
1367
+ }
1368
+ createEffect3(on3(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
1340
1369
  return <><builder_context_default.Provider value={store()}><Block_default
1341
1370
  block={props.block}
1342
1371
  context={store()}
@@ -1441,7 +1470,7 @@ function Block(props) {
1441
1470
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
1442
1471
  const index = _index();
1443
1472
  return <Repeated_block_default
1444
- key={index}
1473
+ key={generateKey(index)}
1445
1474
  repeatContext={data.context}
1446
1475
  block={data.block}
1447
1476
  registeredComponents={props.registeredComponents}
@@ -1465,7 +1494,7 @@ function Block(props) {
1465
1494
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
1466
1495
  const index = _index();
1467
1496
  return <Repeated_block_default
1468
- key={index}
1497
+ key={generateKey(index)}
1469
1498
  repeatContext={data.context}
1470
1499
  block={data.block}
1471
1500
  registeredComponents={props.registeredComponents}
@@ -1505,7 +1534,7 @@ function Block(props) {
1505
1534
  var Block_default = Block;
1506
1535
 
1507
1536
  // src/components/blocks/blocks-wrapper.tsx
1508
- import { onMount as onMount3, on as on3, createEffect as createEffect3, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
1537
+ import { onMount as onMount3, on as on5, createEffect as createEffect5, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
1509
1538
  import { Dynamic as Dynamic4 } from "solid-js/web";
1510
1539
  function BlocksWrapper(props) {
1511
1540
  const [shouldUpdate, setShouldUpdate] = createSignal6(false);
@@ -1558,7 +1587,7 @@ function BlocksWrapper(props) {
1558
1587
  const onUpdateFn_0_props_blocks = createMemo6(() => props.blocks);
1559
1588
  function onUpdateFn_0() {
1560
1589
  }
1561
- createEffect3(on3(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
1590
+ createEffect5(on5(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
1562
1591
  return <>
1563
1592
  <Dynamic4
1564
1593
  class={className() + " dynamic-023c60f2"}
@@ -1783,7 +1812,7 @@ function FragmentComponent(props) {
1783
1812
  var fragment_default = FragmentComponent;
1784
1813
 
1785
1814
  // src/blocks/image/image.tsx
1786
- import { Show as Show8, createMemo as createMemo8 } from "solid-js";
1815
+ import { Show as Show8, onMount as onMount4, createMemo as createMemo8 } from "solid-js";
1787
1816
 
1788
1817
  // src/blocks/image/image.helpers.ts
1789
1818
  function removeProtocol(path) {
@@ -1873,12 +1902,14 @@ function Image(props) {
1873
1902
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
1874
1903
  return out;
1875
1904
  });
1905
+ onMount4(() => {
1906
+ });
1876
1907
  return <>
1877
1908
  <>
1878
1909
  <picture>
1879
1910
  <Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
1880
1911
  <img
1881
- class={"builder-image" + (props.className ? " " + props.className : "") + " img-040e729e"}
1912
+ class={"builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78"}
1882
1913
  loading={props.highPriority ? "eager" : "lazy"}
1883
1914
  fetchpriority={props.highPriority ? "high" : "auto"}
1884
1915
  alt={props.altText}
@@ -1897,22 +1928,22 @@ function Image(props) {
1897
1928
  <Show8
1898
1929
  when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
1899
1930
  ><div
1900
- class="builder-image-sizer div-040e729e"
1931
+ class="builder-image-sizer div-5f381e78"
1901
1932
  style={{
1902
1933
  "padding-top": props.aspectRatio * 100 + "%"
1903
1934
  }}
1904
1935
  /></Show8>
1905
1936
  <Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
1906
- <Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-040e729e-2">{props.children}</div></Show8>
1937
+ <Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-5f381e78-2">{props.children}</div></Show8>
1907
1938
  </>
1908
- <style>{`.img-040e729e {
1939
+ <style>{`.img-5f381e78 {
1909
1940
  opacity: 1;
1910
1941
  transition: opacity 0.2s ease-in-out;
1911
- }.div-040e729e {
1942
+ }.div-5f381e78 {
1912
1943
  width: 100%;
1913
1944
  pointer-events: none;
1914
1945
  font-size: 0;
1915
- }.div-040e729e-2 {
1946
+ }.div-5f381e78-2 {
1916
1947
  display: flex;
1917
1948
  flex-direction: column;
1918
1949
  align-items: stretch;
@@ -1948,10 +1979,10 @@ function SectionComponent(props) {
1948
1979
  var section_default = SectionComponent;
1949
1980
 
1950
1981
  // src/blocks/symbol/symbol.tsx
1951
- import { onMount as onMount9, on as on7, createEffect as createEffect7, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
1982
+ import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
1952
1983
 
1953
1984
  // src/components/content-variants/content-variants.tsx
1954
- import { Show as Show16, For as For9, onMount as onMount8, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
1985
+ import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
1955
1986
 
1956
1987
  // src/helpers/url.ts
1957
1988
  var getTopLevelDomain = (host) => {
@@ -2933,7 +2964,7 @@ var componentInfo6 = {
2933
2964
  };
2934
2965
 
2935
2966
  // src/blocks/personalization-container/personalization-container.tsx
2936
- import { Show as Show10, For as For6, onMount as onMount4, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
2967
+ import { Show as Show10, For as For6, onMount as onMount5, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
2937
2968
 
2938
2969
  // src/components/inlined-script.tsx
2939
2970
  function InlinedScript(props) {
@@ -3198,7 +3229,7 @@ function PersonalizationContainer(props) {
3198
3229
  ).join("");
3199
3230
  });
3200
3231
  let rootRef;
3201
- onMount4(() => {
3232
+ onMount5(() => {
3202
3233
  setIsHydrated(true);
3203
3234
  const unsub = userAttributesService.subscribeOnUserAttributesChange(
3204
3235
  (attrs) => {
@@ -3600,10 +3631,10 @@ var tabs_default = Tabs;
3600
3631
 
3601
3632
  // src/blocks/text/component-info.ts
3602
3633
  var componentInfo11 = {
3603
- shouldReceiveBuilderProps: {
3604
- builderBlock: TARGET === "reactNative" ? true : false,
3634
+ shouldReceiveBuilderProps: TARGET === "reactNative" ? {
3635
+ builderBlock: true,
3605
3636
  builderContext: true
3606
- },
3637
+ } : {},
3607
3638
  name: "Text",
3608
3639
  static: true,
3609
3640
  isRSC: true,
@@ -3661,7 +3692,7 @@ var componentInfo12 = {
3661
3692
  };
3662
3693
 
3663
3694
  // src/blocks/custom-code/custom-code.tsx
3664
- import { onMount as onMount5, on as on4, createEffect as createEffect4, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
3695
+ import { onMount as onMount6, on as on6, createEffect as createEffect6, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
3665
3696
  function CustomCode(props) {
3666
3697
  const [scriptsInserted, setScriptsInserted] = createSignal12([]);
3667
3698
  const [scriptsRun, setScriptsRun] = createSignal12([]);
@@ -3702,7 +3733,7 @@ function CustomCode(props) {
3702
3733
  }
3703
3734
  }
3704
3735
  let elementRef;
3705
- onMount5(() => {
3736
+ onMount6(() => {
3706
3737
  runScripts();
3707
3738
  });
3708
3739
  const onUpdateFn_0_props_code = createMemo12(() => props.code);
@@ -3711,7 +3742,7 @@ function CustomCode(props) {
3711
3742
  runScripts();
3712
3743
  }
3713
3744
  }
3714
- createEffect4(on4(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
3745
+ createEffect6(on6(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
3715
3746
  return <><div
3716
3747
  class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
3717
3748
  ref={elementRef}
@@ -3739,7 +3770,7 @@ var componentInfo13 = {
3739
3770
  };
3740
3771
 
3741
3772
  // src/blocks/embed/embed.tsx
3742
- import { on as on5, createEffect as createEffect5, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
3773
+ import { on as on7, createEffect as createEffect7, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
3743
3774
 
3744
3775
  // src/blocks/embed/helpers.ts
3745
3776
  var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
@@ -3781,8 +3812,8 @@ function Embed(props) {
3781
3812
  findAndRunScripts();
3782
3813
  }
3783
3814
  }
3784
- createEffect5(
3785
- on5(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
3815
+ createEffect7(
3816
+ on7(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
3786
3817
  );
3787
3818
  return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
3788
3819
  }
@@ -4614,7 +4645,7 @@ var componentInfo20 = {
4614
4645
  };
4615
4646
 
4616
4647
  // src/blocks/video/video.tsx
4617
- import { Show as Show13, onMount as onMount6, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
4648
+ import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
4618
4649
  function Video(props) {
4619
4650
  const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
4620
4651
  const videoProps = createMemo15(() => {
@@ -4642,7 +4673,7 @@ function Video(props) {
4642
4673
  };
4643
4674
  });
4644
4675
  let videoRef;
4645
- onMount6(() => {
4676
+ onMount7(() => {
4646
4677
  if (props.lazyLoad) {
4647
4678
  const oberver = new IntersectionObserver(function(entries) {
4648
4679
  entries.forEach(function(entry) {
@@ -4873,9 +4904,9 @@ var getUpdateVariantVisibilityScript = ({
4873
4904
  // src/components/content/components/enable-editor.tsx
4874
4905
  import {
4875
4906
  Show as Show14,
4876
- onMount as onMount7,
4877
- on as on6,
4878
- createEffect as createEffect6,
4907
+ onMount as onMount8,
4908
+ on as on8,
4909
+ createEffect as createEffect8,
4879
4910
  createMemo as createMemo16,
4880
4911
  createSignal as createSignal16
4881
4912
  } from "solid-js";
@@ -4887,7 +4918,7 @@ function getPreviewContent(_searchParams) {
4887
4918
  }
4888
4919
 
4889
4920
  // src/constants/sdk-version.ts
4890
- var SDK_VERSION = "4.0.6";
4921
+ var SDK_VERSION = "4.0.8";
4891
4922
 
4892
4923
  // src/helpers/sdk-headers.ts
4893
4924
  var getSdkHeaders = () => ({
@@ -5898,7 +5929,7 @@ function EnableEditor(props) {
5898
5929
  let elementRef;
5899
5930
  runHttpRequests();
5900
5931
  emitStateUpdate();
5901
- onMount7(() => {
5932
+ onMount8(() => {
5902
5933
  if (isBrowser()) {
5903
5934
  if (isEditing() && !props.isNestedRender) {
5904
5935
  window.addEventListener("message", processMessage);
@@ -5979,15 +6010,15 @@ function EnableEditor(props) {
5979
6010
  mergeNewContent(props.content);
5980
6011
  }
5981
6012
  }
5982
- createEffect6(on6(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
6013
+ createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
5983
6014
  const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
5984
6015
  () => props.builderContextSignal.rootState
5985
6016
  );
5986
6017
  function onUpdateFn_1() {
5987
6018
  emitStateUpdate();
5988
6019
  }
5989
- createEffect6(
5990
- on6(
6020
+ createEffect8(
6021
+ on8(
5991
6022
  () => [onUpdateFn_1_props_builderContextSignal_rootState()],
5992
6023
  onUpdateFn_1
5993
6024
  )
@@ -5998,7 +6029,7 @@ function EnableEditor(props) {
5998
6029
  mergeNewRootState(props.data);
5999
6030
  }
6000
6031
  }
6001
- createEffect6(on6(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
6032
+ createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
6002
6033
  const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
6003
6034
  function onUpdateFn_3() {
6004
6035
  if (props.locale) {
@@ -6007,7 +6038,7 @@ function EnableEditor(props) {
6007
6038
  });
6008
6039
  }
6009
6040
  }
6010
- createEffect6(on6(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
6041
+ createEffect8(on8(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
6011
6042
  return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
6012
6043
  when={props.builderContextSignal.content || needsElementRefDivForEditing()}
6013
6044
  ><Dynamic5
@@ -6249,7 +6280,7 @@ function ContentVariants(props) {
6249
6280
  canTrack: getDefaultCanTrack(props.canTrack)
6250
6281
  });
6251
6282
  });
6252
- onMount8(() => {
6283
+ onMount9(() => {
6253
6284
  setShouldRenderVariants(false);
6254
6285
  });
6255
6286
  return <><>
@@ -6353,6 +6384,7 @@ var fetchSymbolContent = async ({
6353
6384
  // src/blocks/symbol/symbol.tsx
6354
6385
  function Symbol(props) {
6355
6386
  const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
6387
+ const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
6356
6388
  const blocksWrapper = createMemo20(() => {
6357
6389
  return "div";
6358
6390
  });
@@ -6368,7 +6400,7 @@ function Symbol(props) {
6368
6400
  ].filter(Boolean).join(" ");
6369
6401
  });
6370
6402
  function setContent() {
6371
- if (contentToUse())
6403
+ if (contentToUse() && symbolEntry() === props.symbol?.entry)
6372
6404
  return;
6373
6405
  fetchSymbolContent({
6374
6406
  symbol: props.symbol,
@@ -6376,16 +6408,17 @@ function Symbol(props) {
6376
6408
  }).then((newContent) => {
6377
6409
  if (newContent) {
6378
6410
  setContentToUse(newContent);
6411
+ setSymbolEntry(props.symbol?.entry);
6379
6412
  }
6380
6413
  });
6381
6414
  }
6382
- onMount9(() => {
6415
+ onMount10(() => {
6383
6416
  });
6384
6417
  const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
6385
6418
  function onUpdateFn_0() {
6386
6419
  setContent();
6387
6420
  }
6388
- createEffect7(on7(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6421
+ createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6389
6422
  return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
6390
6423
  nonce={props.builderContext.nonce}
6391
6424
  isNestedRender={true}