@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.
package/lib/node/dev.js CHANGED
@@ -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
  import { createRequire } from 'node:module';
4
4
 
5
5
  // src/blocks/button/button.tsx
@@ -1105,6 +1105,9 @@ var provideBuilderContext = (block, context) => {
1105
1105
  };
1106
1106
  return {};
1107
1107
  };
1108
+ var generateKey = (index) => {
1109
+ return index.toString();
1110
+ };
1108
1111
 
1109
1112
  // src/constants/device-sizes.ts
1110
1113
  var SIZES = {
@@ -1384,6 +1387,7 @@ var awaiter_default = Awaiter;
1384
1387
 
1385
1388
  // src/components/block/components/interactive-element.tsx
1386
1389
  function InteractiveElement(props) {
1390
+ createSignal(0);
1387
1391
  const attributes = createMemo(() => {
1388
1392
  return props.includeBlockProps ? {
1389
1393
  ...getBlockProperties({
@@ -1399,9 +1403,17 @@ function InteractiveElement(props) {
1399
1403
  })
1400
1404
  } : {};
1401
1405
  });
1406
+ const targetWrapperProps = createMemo(() => {
1407
+ return props.wrapperProps;
1408
+ });
1409
+ const onUpdateFn_0_props_wrapperProps = createMemo(() => props.wrapperProps);
1410
+ const onUpdateFn_0_props_block__component__options = createMemo(() => props.block?.component?.options);
1411
+ function onUpdateFn_0() {
1412
+ }
1413
+ createEffect(on(() => [onUpdateFn_0_props_wrapperProps(), onUpdateFn_0_props_block__component__options()], onUpdateFn_0));
1402
1414
  return createComponent(Show, {
1403
1415
  get fallback() {
1404
- return createComponent(Dynamic, mergeProps(() => props.wrapperProps, {
1416
+ return createComponent(Dynamic, mergeProps(targetWrapperProps, {
1405
1417
  get attributes() {
1406
1418
  return attributes();
1407
1419
  },
@@ -1531,6 +1543,11 @@ function ComponentRef(props) {
1531
1543
  var component_ref_default = ComponentRef;
1532
1544
  function RepeatedBlock(props) {
1533
1545
  const [store, setStore] = createSignal(props.repeatContext);
1546
+ const onUpdateFn_0_props_repeatContext = createMemo(() => props.repeatContext);
1547
+ function onUpdateFn_0() {
1548
+ setStore(props.repeatContext);
1549
+ }
1550
+ createEffect(on(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
1534
1551
  return createComponent(builder_context_default.Provider, {
1535
1552
  get value() {
1536
1553
  return store();
@@ -1657,7 +1674,9 @@ function Block(props) {
1657
1674
  children: (data, _index) => {
1658
1675
  const index = _index();
1659
1676
  return createComponent(repeated_block_default, {
1660
- key: index,
1677
+ get key() {
1678
+ return generateKey(index);
1679
+ },
1661
1680
  get repeatContext() {
1662
1681
  return data.context;
1663
1682
  },
@@ -1723,7 +1742,9 @@ function Block(props) {
1723
1742
  children: (data, _index) => {
1724
1743
  const index = _index();
1725
1744
  return createComponent(repeated_block_default, {
1726
- key: index,
1745
+ get key() {
1746
+ return generateKey(index);
1747
+ },
1727
1748
  get repeatContext() {
1728
1749
  return data.context;
1729
1750
  },
@@ -2219,16 +2240,16 @@ function getSrcSet(url) {
2219
2240
  // src/blocks/image/image.tsx
2220
2241
  var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
2221
2242
  var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
2222
- var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-040e729e">`);
2223
- var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-040e729e-2>`);
2224
- var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-040e729e {
2243
+ var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-5f381e78">`);
2244
+ var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-5f381e78-2>`);
2245
+ var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-5f381e78 {
2225
2246
  opacity: 1;
2226
2247
  transition: opacity 0.2s ease-in-out;
2227
- }.div-040e729e {
2248
+ }.div-5f381e78 {
2228
2249
  width: 100%;
2229
2250
  pointer-events: none;
2230
2251
  font-size: 0;
2231
- }.div-040e729e-2 {
2252
+ }.div-5f381e78-2 {
2232
2253
  display: flex;
2233
2254
  flex-direction: column;
2234
2255
  align-items: stretch;
@@ -2278,6 +2299,8 @@ function Image(props) {
2278
2299
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
2279
2300
  return out;
2280
2301
  });
2302
+ onMount(() => {
2303
+ });
2281
2304
  return [[(() => {
2282
2305
  const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
2283
2306
  insert(_el$, createComponent(Show, {
@@ -2291,7 +2314,7 @@ function Image(props) {
2291
2314
  }
2292
2315
  }), _el$3);
2293
2316
  effect((_p$) => {
2294
- 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 = {
2317
+ 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 = {
2295
2318
  "object-position": props.backgroundPosition || "center",
2296
2319
  "object-fit": props.backgroundSize || "cover",
2297
2320
  ...aspectRatioCss()
@@ -4127,10 +4150,10 @@ delegateEvents(["click"]);
4127
4150
 
4128
4151
  // src/blocks/text/component-info.ts
4129
4152
  var componentInfo11 = {
4130
- shouldReceiveBuilderProps: {
4131
- builderBlock: TARGET === "reactNative" ? true : false,
4153
+ shouldReceiveBuilderProps: TARGET === "reactNative" ? {
4154
+ builderBlock: true,
4132
4155
  builderContext: true
4133
- },
4156
+ } : {},
4134
4157
  name: "Text",
4135
4158
  static: true,
4136
4159
  isRSC: true,
@@ -5528,7 +5551,7 @@ function getPreviewContent(_searchParams) {
5528
5551
  }
5529
5552
 
5530
5553
  // src/constants/sdk-version.ts
5531
- var SDK_VERSION = "4.0.6";
5554
+ var SDK_VERSION = "4.0.8";
5532
5555
 
5533
5556
  // src/helpers/sdk-headers.ts
5534
5557
  var getSdkHeaders = () => ({
@@ -7150,6 +7173,7 @@ var fetchSymbolContent = async ({
7150
7173
  var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
7151
7174
  function Symbol(props) {
7152
7175
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
7176
+ const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
7153
7177
  const blocksWrapper = createMemo(() => {
7154
7178
  return "div";
7155
7179
  });
@@ -7160,7 +7184,7 @@ function Symbol(props) {
7160
7184
  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(" ");
7161
7185
  });
7162
7186
  function setContent() {
7163
- if (contentToUse())
7187
+ if (contentToUse() && symbolEntry() === props.symbol?.entry)
7164
7188
  return;
7165
7189
  fetchSymbolContent({
7166
7190
  symbol: props.symbol,
@@ -7168,6 +7192,7 @@ function Symbol(props) {
7168
7192
  }).then((newContent) => {
7169
7193
  if (newContent) {
7170
7194
  setContentToUse(newContent);
7195
+ setSymbolEntry(props.symbol?.entry);
7171
7196
  }
7172
7197
  });
7173
7198
  }
package/lib/node/dev.jsx CHANGED
@@ -1100,6 +1100,9 @@ var provideBuilderContext = (block, context) => {
1100
1100
  };
1101
1101
  return {};
1102
1102
  };
1103
+ var generateKey = (index) => {
1104
+ return index.toString();
1105
+ };
1103
1106
 
1104
1107
  // src/components/block/components/block-styles.tsx
1105
1108
  import { Show as Show2, createMemo } from "solid-js";
@@ -1370,15 +1373,15 @@ var Block_wrapper_default = BlockWrapper;
1370
1373
  import {
1371
1374
  Show as Show4,
1372
1375
  For,
1373
- on,
1374
- createEffect,
1376
+ on as on2,
1377
+ createEffect as createEffect2,
1375
1378
  createMemo as createMemo3,
1376
1379
  createSignal as createSignal3
1377
1380
  } from "solid-js";
1378
1381
  import { Dynamic as Dynamic3 } from "solid-js/web";
1379
1382
 
1380
1383
  // src/components/block/components/interactive-element.tsx
1381
- import { Show as Show3, createMemo as createMemo2 } from "solid-js";
1384
+ import { Show as Show3, on, createEffect, createMemo as createMemo2, createSignal as createSignal2 } from "solid-js";
1382
1385
  import { Dynamic as Dynamic2 } from "solid-js/web";
1383
1386
 
1384
1387
  // src/components/awaiter.tsx
@@ -1392,6 +1395,7 @@ var Awaiter_default = Awaiter;
1392
1395
 
1393
1396
  // src/components/block/components/interactive-element.tsx
1394
1397
  function InteractiveElement(props) {
1398
+ const [forceRenderCount, setForceRenderCount] = createSignal2(0);
1395
1399
  const attributes = createMemo2(() => {
1396
1400
  return props.includeBlockProps ? {
1397
1401
  ...getBlockProperties({
@@ -1407,9 +1411,27 @@ function InteractiveElement(props) {
1407
1411
  })
1408
1412
  } : {};
1409
1413
  });
1414
+ const targetWrapperProps = createMemo2(() => {
1415
+ return props.wrapperProps;
1416
+ });
1417
+ const onUpdateFn_0_props_wrapperProps = createMemo2(() => props.wrapperProps);
1418
+ const onUpdateFn_0_props_block__component__options = createMemo2(
1419
+ () => props.block?.component?.options
1420
+ );
1421
+ function onUpdateFn_0() {
1422
+ }
1423
+ createEffect(
1424
+ on(
1425
+ () => [
1426
+ onUpdateFn_0_props_wrapperProps(),
1427
+ onUpdateFn_0_props_block__component__options()
1428
+ ],
1429
+ onUpdateFn_0
1430
+ )
1431
+ );
1410
1432
  return <><Show3
1411
1433
  fallback={<Dynamic2
1412
- {...props.wrapperProps}
1434
+ {...targetWrapperProps()}
1413
1435
  attributes={attributes()}
1414
1436
  component={props.Wrapper}
1415
1437
  >{props.children}</Dynamic2>}
@@ -1470,8 +1492,8 @@ function ComponentRef(props) {
1470
1492
  );
1471
1493
  function onUpdateFn_0() {
1472
1494
  }
1473
- createEffect(
1474
- on(
1495
+ createEffect2(
1496
+ on2(
1475
1497
  () => [
1476
1498
  onUpdateFn_0_props_componentOptions(),
1477
1499
  onUpdateFn_0_props_blockChildren()
@@ -1505,9 +1527,16 @@ function ComponentRef(props) {
1505
1527
  var Component_ref_default = ComponentRef;
1506
1528
 
1507
1529
  // src/components/block/components/repeated-block.tsx
1508
- import { createSignal as createSignal4 } from "solid-js";
1530
+ import { on as on3, createEffect as createEffect3, createMemo as createMemo4, createSignal as createSignal4 } from "solid-js";
1509
1531
  function RepeatedBlock(props) {
1510
1532
  const [store, setStore] = createSignal4(props.repeatContext);
1533
+ const onUpdateFn_0_props_repeatContext = createMemo4(
1534
+ () => props.repeatContext
1535
+ );
1536
+ function onUpdateFn_0() {
1537
+ setStore(props.repeatContext);
1538
+ }
1539
+ createEffect3(on3(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
1511
1540
  return <><builder_context_default.Provider value={store()}><Block_default
1512
1541
  block={props.block}
1513
1542
  context={store()}
@@ -1612,7 +1641,7 @@ function Block(props) {
1612
1641
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
1613
1642
  const index = _index();
1614
1643
  return <Repeated_block_default
1615
- key={index}
1644
+ key={generateKey(index)}
1616
1645
  repeatContext={data.context}
1617
1646
  block={data.block}
1618
1647
  registeredComponents={props.registeredComponents}
@@ -1636,7 +1665,7 @@ function Block(props) {
1636
1665
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
1637
1666
  const index = _index();
1638
1667
  return <Repeated_block_default
1639
- key={index}
1668
+ key={generateKey(index)}
1640
1669
  repeatContext={data.context}
1641
1670
  block={data.block}
1642
1671
  registeredComponents={props.registeredComponents}
@@ -1676,7 +1705,7 @@ function Block(props) {
1676
1705
  var Block_default = Block;
1677
1706
 
1678
1707
  // src/components/blocks/blocks-wrapper.tsx
1679
- import { onMount as onMount3, on as on3, createEffect as createEffect3, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
1708
+ import { onMount as onMount3, on as on5, createEffect as createEffect5, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
1680
1709
  import { Dynamic as Dynamic4 } from "solid-js/web";
1681
1710
  function BlocksWrapper(props) {
1682
1711
  const [shouldUpdate, setShouldUpdate] = createSignal6(false);
@@ -1729,7 +1758,7 @@ function BlocksWrapper(props) {
1729
1758
  const onUpdateFn_0_props_blocks = createMemo6(() => props.blocks);
1730
1759
  function onUpdateFn_0() {
1731
1760
  }
1732
- createEffect3(on3(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
1761
+ createEffect5(on5(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
1733
1762
  return <>
1734
1763
  <Dynamic4
1735
1764
  class={className() + " dynamic-023c60f2"}
@@ -1954,7 +1983,7 @@ function FragmentComponent(props) {
1954
1983
  var fragment_default = FragmentComponent;
1955
1984
 
1956
1985
  // src/blocks/image/image.tsx
1957
- import { Show as Show8, createMemo as createMemo8 } from "solid-js";
1986
+ import { Show as Show8, onMount as onMount4, createMemo as createMemo8 } from "solid-js";
1958
1987
 
1959
1988
  // src/blocks/image/image.helpers.ts
1960
1989
  function removeProtocol(path) {
@@ -2044,12 +2073,14 @@ function Image(props) {
2044
2073
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
2045
2074
  return out;
2046
2075
  });
2076
+ onMount4(() => {
2077
+ });
2047
2078
  return <>
2048
2079
  <>
2049
2080
  <picture>
2050
2081
  <Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
2051
2082
  <img
2052
- class={"builder-image" + (props.className ? " " + props.className : "") + " img-040e729e"}
2083
+ class={"builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78"}
2053
2084
  loading={props.highPriority ? "eager" : "lazy"}
2054
2085
  fetchpriority={props.highPriority ? "high" : "auto"}
2055
2086
  alt={props.altText}
@@ -2068,22 +2099,22 @@ function Image(props) {
2068
2099
  <Show8
2069
2100
  when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
2070
2101
  ><div
2071
- class="builder-image-sizer div-040e729e"
2102
+ class="builder-image-sizer div-5f381e78"
2072
2103
  style={{
2073
2104
  "padding-top": props.aspectRatio * 100 + "%"
2074
2105
  }}
2075
2106
  /></Show8>
2076
2107
  <Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
2077
- <Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-040e729e-2">{props.children}</div></Show8>
2108
+ <Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-5f381e78-2">{props.children}</div></Show8>
2078
2109
  </>
2079
- <style>{`.img-040e729e {
2110
+ <style>{`.img-5f381e78 {
2080
2111
  opacity: 1;
2081
2112
  transition: opacity 0.2s ease-in-out;
2082
- }.div-040e729e {
2113
+ }.div-5f381e78 {
2083
2114
  width: 100%;
2084
2115
  pointer-events: none;
2085
2116
  font-size: 0;
2086
- }.div-040e729e-2 {
2117
+ }.div-5f381e78-2 {
2087
2118
  display: flex;
2088
2119
  flex-direction: column;
2089
2120
  align-items: stretch;
@@ -2119,10 +2150,10 @@ function SectionComponent(props) {
2119
2150
  var section_default = SectionComponent;
2120
2151
 
2121
2152
  // src/blocks/symbol/symbol.tsx
2122
- import { onMount as onMount9, on as on7, createEffect as createEffect7, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
2153
+ import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
2123
2154
 
2124
2155
  // src/components/content-variants/content-variants.tsx
2125
- import { Show as Show16, For as For9, onMount as onMount8, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
2156
+ import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
2126
2157
 
2127
2158
  // src/helpers/url.ts
2128
2159
  var getTopLevelDomain = (host) => {
@@ -3104,7 +3135,7 @@ var componentInfo6 = {
3104
3135
  };
3105
3136
 
3106
3137
  // src/blocks/personalization-container/personalization-container.tsx
3107
- import { Show as Show10, For as For6, onMount as onMount4, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
3138
+ import { Show as Show10, For as For6, onMount as onMount5, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
3108
3139
 
3109
3140
  // src/components/inlined-script.tsx
3110
3141
  function InlinedScript(props) {
@@ -3369,7 +3400,7 @@ function PersonalizationContainer(props) {
3369
3400
  ).join("");
3370
3401
  });
3371
3402
  let rootRef;
3372
- onMount4(() => {
3403
+ onMount5(() => {
3373
3404
  setIsHydrated(true);
3374
3405
  const unsub = userAttributesService.subscribeOnUserAttributesChange(
3375
3406
  (attrs) => {
@@ -3771,10 +3802,10 @@ var tabs_default = Tabs;
3771
3802
 
3772
3803
  // src/blocks/text/component-info.ts
3773
3804
  var componentInfo11 = {
3774
- shouldReceiveBuilderProps: {
3775
- builderBlock: TARGET === "reactNative" ? true : false,
3805
+ shouldReceiveBuilderProps: TARGET === "reactNative" ? {
3806
+ builderBlock: true,
3776
3807
  builderContext: true
3777
- },
3808
+ } : {},
3778
3809
  name: "Text",
3779
3810
  static: true,
3780
3811
  isRSC: true,
@@ -3832,7 +3863,7 @@ var componentInfo12 = {
3832
3863
  };
3833
3864
 
3834
3865
  // src/blocks/custom-code/custom-code.tsx
3835
- import { onMount as onMount5, on as on4, createEffect as createEffect4, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
3866
+ import { onMount as onMount6, on as on6, createEffect as createEffect6, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
3836
3867
  function CustomCode(props) {
3837
3868
  const [scriptsInserted, setScriptsInserted] = createSignal12([]);
3838
3869
  const [scriptsRun, setScriptsRun] = createSignal12([]);
@@ -3873,7 +3904,7 @@ function CustomCode(props) {
3873
3904
  }
3874
3905
  }
3875
3906
  let elementRef;
3876
- onMount5(() => {
3907
+ onMount6(() => {
3877
3908
  runScripts();
3878
3909
  });
3879
3910
  const onUpdateFn_0_props_code = createMemo12(() => props.code);
@@ -3882,7 +3913,7 @@ function CustomCode(props) {
3882
3913
  runScripts();
3883
3914
  }
3884
3915
  }
3885
- createEffect4(on4(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
3916
+ createEffect6(on6(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
3886
3917
  return <><div
3887
3918
  class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
3888
3919
  ref={elementRef}
@@ -3910,7 +3941,7 @@ var componentInfo13 = {
3910
3941
  };
3911
3942
 
3912
3943
  // src/blocks/embed/embed.tsx
3913
- import { on as on5, createEffect as createEffect5, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
3944
+ import { on as on7, createEffect as createEffect7, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
3914
3945
 
3915
3946
  // src/blocks/embed/helpers.ts
3916
3947
  var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
@@ -3952,8 +3983,8 @@ function Embed(props) {
3952
3983
  findAndRunScripts();
3953
3984
  }
3954
3985
  }
3955
- createEffect5(
3956
- on5(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
3986
+ createEffect7(
3987
+ on7(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
3957
3988
  );
3958
3989
  return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
3959
3990
  }
@@ -4785,7 +4816,7 @@ var componentInfo20 = {
4785
4816
  };
4786
4817
 
4787
4818
  // src/blocks/video/video.tsx
4788
- import { Show as Show13, onMount as onMount6, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
4819
+ import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
4789
4820
  function Video(props) {
4790
4821
  const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
4791
4822
  const videoProps = createMemo15(() => {
@@ -4813,7 +4844,7 @@ function Video(props) {
4813
4844
  };
4814
4845
  });
4815
4846
  let videoRef;
4816
- onMount6(() => {
4847
+ onMount7(() => {
4817
4848
  if (props.lazyLoad) {
4818
4849
  const oberver = new IntersectionObserver(function(entries) {
4819
4850
  entries.forEach(function(entry) {
@@ -5044,9 +5075,9 @@ var getUpdateVariantVisibilityScript = ({
5044
5075
  // src/components/content/components/enable-editor.tsx
5045
5076
  import {
5046
5077
  Show as Show14,
5047
- onMount as onMount7,
5048
- on as on6,
5049
- createEffect as createEffect6,
5078
+ onMount as onMount8,
5079
+ on as on8,
5080
+ createEffect as createEffect8,
5050
5081
  createMemo as createMemo16,
5051
5082
  createSignal as createSignal16
5052
5083
  } from "solid-js";
@@ -5058,7 +5089,7 @@ function getPreviewContent(_searchParams) {
5058
5089
  }
5059
5090
 
5060
5091
  // src/constants/sdk-version.ts
5061
- var SDK_VERSION = "4.0.6";
5092
+ var SDK_VERSION = "4.0.8";
5062
5093
 
5063
5094
  // src/helpers/sdk-headers.ts
5064
5095
  var getSdkHeaders = () => ({
@@ -6069,7 +6100,7 @@ function EnableEditor(props) {
6069
6100
  let elementRef;
6070
6101
  runHttpRequests();
6071
6102
  emitStateUpdate();
6072
- onMount7(() => {
6103
+ onMount8(() => {
6073
6104
  if (isBrowser()) {
6074
6105
  if (isEditing() && !props.isNestedRender) {
6075
6106
  window.addEventListener("message", processMessage);
@@ -6150,15 +6181,15 @@ function EnableEditor(props) {
6150
6181
  mergeNewContent(props.content);
6151
6182
  }
6152
6183
  }
6153
- createEffect6(on6(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
6184
+ createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
6154
6185
  const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
6155
6186
  () => props.builderContextSignal.rootState
6156
6187
  );
6157
6188
  function onUpdateFn_1() {
6158
6189
  emitStateUpdate();
6159
6190
  }
6160
- createEffect6(
6161
- on6(
6191
+ createEffect8(
6192
+ on8(
6162
6193
  () => [onUpdateFn_1_props_builderContextSignal_rootState()],
6163
6194
  onUpdateFn_1
6164
6195
  )
@@ -6169,7 +6200,7 @@ function EnableEditor(props) {
6169
6200
  mergeNewRootState(props.data);
6170
6201
  }
6171
6202
  }
6172
- createEffect6(on6(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
6203
+ createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
6173
6204
  const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
6174
6205
  function onUpdateFn_3() {
6175
6206
  if (props.locale) {
@@ -6178,7 +6209,7 @@ function EnableEditor(props) {
6178
6209
  });
6179
6210
  }
6180
6211
  }
6181
- createEffect6(on6(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
6212
+ createEffect8(on8(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
6182
6213
  return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
6183
6214
  when={props.builderContextSignal.content || needsElementRefDivForEditing()}
6184
6215
  ><Dynamic5
@@ -6420,7 +6451,7 @@ function ContentVariants(props) {
6420
6451
  canTrack: getDefaultCanTrack(props.canTrack)
6421
6452
  });
6422
6453
  });
6423
- onMount8(() => {
6454
+ onMount9(() => {
6424
6455
  setShouldRenderVariants(false);
6425
6456
  });
6426
6457
  return <><>
@@ -6524,6 +6555,7 @@ var fetchSymbolContent = async ({
6524
6555
  // src/blocks/symbol/symbol.tsx
6525
6556
  function Symbol(props) {
6526
6557
  const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
6558
+ const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
6527
6559
  const blocksWrapper = createMemo20(() => {
6528
6560
  return "div";
6529
6561
  });
@@ -6539,7 +6571,7 @@ function Symbol(props) {
6539
6571
  ].filter(Boolean).join(" ");
6540
6572
  });
6541
6573
  function setContent() {
6542
- if (contentToUse())
6574
+ if (contentToUse() && symbolEntry() === props.symbol?.entry)
6543
6575
  return;
6544
6576
  fetchSymbolContent({
6545
6577
  symbol: props.symbol,
@@ -6547,16 +6579,17 @@ function Symbol(props) {
6547
6579
  }).then((newContent) => {
6548
6580
  if (newContent) {
6549
6581
  setContentToUse(newContent);
6582
+ setSymbolEntry(props.symbol?.entry);
6550
6583
  }
6551
6584
  });
6552
6585
  }
6553
- onMount9(() => {
6586
+ onMount10(() => {
6554
6587
  });
6555
6588
  const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
6556
6589
  function onUpdateFn_0() {
6557
6590
  setContent();
6558
6591
  }
6559
- createEffect7(on7(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6592
+ createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6560
6593
  return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
6561
6594
  nonce={props.builderContext.nonce}
6562
6595
  isNestedRender={true}