@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/index.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
@@ -1096,6 +1096,9 @@ var provideBuilderContext = (block, context) => {
1096
1096
  };
1097
1097
  return {};
1098
1098
  };
1099
+ var generateKey = (index) => {
1100
+ return index.toString();
1101
+ };
1099
1102
 
1100
1103
  // src/constants/device-sizes.ts
1101
1104
  var SIZES = {
@@ -1375,6 +1378,7 @@ var awaiter_default = Awaiter;
1375
1378
 
1376
1379
  // src/components/block/components/interactive-element.tsx
1377
1380
  function InteractiveElement(props) {
1381
+ createSignal(0);
1378
1382
  const attributes = createMemo(() => {
1379
1383
  return props.includeBlockProps ? {
1380
1384
  ...getBlockProperties({
@@ -1390,9 +1394,17 @@ function InteractiveElement(props) {
1390
1394
  })
1391
1395
  } : {};
1392
1396
  });
1397
+ const targetWrapperProps = createMemo(() => {
1398
+ return props.wrapperProps;
1399
+ });
1400
+ const onUpdateFn_0_props_wrapperProps = createMemo(() => props.wrapperProps);
1401
+ const onUpdateFn_0_props_block__component__options = createMemo(() => props.block?.component?.options);
1402
+ function onUpdateFn_0() {
1403
+ }
1404
+ createEffect(on(() => [onUpdateFn_0_props_wrapperProps(), onUpdateFn_0_props_block__component__options()], onUpdateFn_0));
1393
1405
  return createComponent(Show, {
1394
1406
  get fallback() {
1395
- return createComponent(Dynamic, mergeProps(() => props.wrapperProps, {
1407
+ return createComponent(Dynamic, mergeProps(targetWrapperProps, {
1396
1408
  get attributes() {
1397
1409
  return attributes();
1398
1410
  },
@@ -1522,6 +1534,11 @@ function ComponentRef(props) {
1522
1534
  var component_ref_default = ComponentRef;
1523
1535
  function RepeatedBlock(props) {
1524
1536
  const [store, setStore] = createSignal(props.repeatContext);
1537
+ const onUpdateFn_0_props_repeatContext = createMemo(() => props.repeatContext);
1538
+ function onUpdateFn_0() {
1539
+ setStore(props.repeatContext);
1540
+ }
1541
+ createEffect(on(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
1525
1542
  return createComponent(builder_context_default.Provider, {
1526
1543
  get value() {
1527
1544
  return store();
@@ -1648,7 +1665,9 @@ function Block(props) {
1648
1665
  children: (data, _index) => {
1649
1666
  const index = _index();
1650
1667
  return createComponent(repeated_block_default, {
1651
- key: index,
1668
+ get key() {
1669
+ return generateKey(index);
1670
+ },
1652
1671
  get repeatContext() {
1653
1672
  return data.context;
1654
1673
  },
@@ -1714,7 +1733,9 @@ function Block(props) {
1714
1733
  children: (data, _index) => {
1715
1734
  const index = _index();
1716
1735
  return createComponent(repeated_block_default, {
1717
- key: index,
1736
+ get key() {
1737
+ return generateKey(index);
1738
+ },
1718
1739
  get repeatContext() {
1719
1740
  return data.context;
1720
1741
  },
@@ -2210,16 +2231,16 @@ function getSrcSet(url) {
2210
2231
  // src/blocks/image/image.tsx
2211
2232
  var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
2212
2233
  var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
2213
- var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-040e729e">`);
2214
- var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-040e729e-2>`);
2215
- var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-040e729e {
2234
+ var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-5f381e78">`);
2235
+ var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-5f381e78-2>`);
2236
+ var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-5f381e78 {
2216
2237
  opacity: 1;
2217
2238
  transition: opacity 0.2s ease-in-out;
2218
- }.div-040e729e {
2239
+ }.div-5f381e78 {
2219
2240
  width: 100%;
2220
2241
  pointer-events: none;
2221
2242
  font-size: 0;
2222
- }.div-040e729e-2 {
2243
+ }.div-5f381e78-2 {
2223
2244
  display: flex;
2224
2245
  flex-direction: column;
2225
2246
  align-items: stretch;
@@ -2268,6 +2289,8 @@ function Image(props) {
2268
2289
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
2269
2290
  return out;
2270
2291
  });
2292
+ onMount(() => {
2293
+ });
2271
2294
  return [[(() => {
2272
2295
  const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
2273
2296
  insert(_el$, createComponent(Show, {
@@ -2281,7 +2304,7 @@ function Image(props) {
2281
2304
  }
2282
2305
  }), _el$3);
2283
2306
  effect((_p$) => {
2284
- 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 = {
2307
+ 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 = {
2285
2308
  "object-position": props.backgroundPosition || "center",
2286
2309
  "object-fit": props.backgroundSize || "cover",
2287
2310
  ...aspectRatioCss()
@@ -4116,10 +4139,10 @@ delegateEvents(["click"]);
4116
4139
 
4117
4140
  // src/blocks/text/component-info.ts
4118
4141
  var componentInfo11 = {
4119
- shouldReceiveBuilderProps: {
4120
- builderBlock: TARGET === "reactNative" ? true : false,
4142
+ shouldReceiveBuilderProps: TARGET === "reactNative" ? {
4143
+ builderBlock: true,
4121
4144
  builderContext: true
4122
- },
4145
+ } : {},
4123
4146
  name: "Text",
4124
4147
  static: true,
4125
4148
  isRSC: true,
@@ -5516,7 +5539,7 @@ function getPreviewContent(_searchParams) {
5516
5539
  }
5517
5540
 
5518
5541
  // src/constants/sdk-version.ts
5519
- var SDK_VERSION = "4.0.6";
5542
+ var SDK_VERSION = "4.0.8";
5520
5543
 
5521
5544
  // src/helpers/sdk-headers.ts
5522
5545
  var getSdkHeaders = () => ({
@@ -7131,6 +7154,7 @@ var fetchSymbolContent = async ({
7131
7154
  var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
7132
7155
  function Symbol(props) {
7133
7156
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
7157
+ const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
7134
7158
  const blocksWrapper = createMemo(() => {
7135
7159
  return "div";
7136
7160
  });
@@ -7141,7 +7165,7 @@ function Symbol(props) {
7141
7165
  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(" ");
7142
7166
  });
7143
7167
  function setContent() {
7144
- if (contentToUse())
7168
+ if (contentToUse() && symbolEntry() === props.symbol?.entry)
7145
7169
  return;
7146
7170
  fetchSymbolContent({
7147
7171
  symbol: props.symbol,
@@ -7149,6 +7173,7 @@ function Symbol(props) {
7149
7173
  }).then((newContent) => {
7150
7174
  if (newContent) {
7151
7175
  setContentToUse(newContent);
7176
+ setSymbolEntry(props.symbol?.entry);
7152
7177
  }
7153
7178
  });
7154
7179
  }
@@ -1093,6 +1093,9 @@ var provideBuilderContext = (block, context) => {
1093
1093
  };
1094
1094
  return {};
1095
1095
  };
1096
+ var generateKey = (index) => {
1097
+ return index.toString();
1098
+ };
1096
1099
 
1097
1100
  // src/components/block/components/block-styles.tsx
1098
1101
  import { Show as Show2, createMemo } from "solid-js";
@@ -1363,15 +1366,15 @@ var Block_wrapper_default = BlockWrapper;
1363
1366
  import {
1364
1367
  Show as Show4,
1365
1368
  For,
1366
- on,
1367
- createEffect,
1369
+ on as on2,
1370
+ createEffect as createEffect2,
1368
1371
  createMemo as createMemo3,
1369
1372
  createSignal as createSignal3
1370
1373
  } from "solid-js";
1371
1374
  import { Dynamic as Dynamic3 } from "solid-js/web";
1372
1375
 
1373
1376
  // src/components/block/components/interactive-element.tsx
1374
- import { Show as Show3, createMemo as createMemo2 } from "solid-js";
1377
+ import { Show as Show3, on, createEffect, createMemo as createMemo2, createSignal as createSignal2 } from "solid-js";
1375
1378
  import { Dynamic as Dynamic2 } from "solid-js/web";
1376
1379
 
1377
1380
  // src/components/awaiter.tsx
@@ -1385,6 +1388,7 @@ var Awaiter_default = Awaiter;
1385
1388
 
1386
1389
  // src/components/block/components/interactive-element.tsx
1387
1390
  function InteractiveElement(props) {
1391
+ const [forceRenderCount, setForceRenderCount] = createSignal2(0);
1388
1392
  const attributes = createMemo2(() => {
1389
1393
  return props.includeBlockProps ? {
1390
1394
  ...getBlockProperties({
@@ -1400,9 +1404,27 @@ function InteractiveElement(props) {
1400
1404
  })
1401
1405
  } : {};
1402
1406
  });
1407
+ const targetWrapperProps = createMemo2(() => {
1408
+ return props.wrapperProps;
1409
+ });
1410
+ const onUpdateFn_0_props_wrapperProps = createMemo2(() => props.wrapperProps);
1411
+ const onUpdateFn_0_props_block__component__options = createMemo2(
1412
+ () => props.block?.component?.options
1413
+ );
1414
+ function onUpdateFn_0() {
1415
+ }
1416
+ createEffect(
1417
+ on(
1418
+ () => [
1419
+ onUpdateFn_0_props_wrapperProps(),
1420
+ onUpdateFn_0_props_block__component__options()
1421
+ ],
1422
+ onUpdateFn_0
1423
+ )
1424
+ );
1403
1425
  return <><Show3
1404
1426
  fallback={<Dynamic2
1405
- {...props.wrapperProps}
1427
+ {...targetWrapperProps()}
1406
1428
  attributes={attributes()}
1407
1429
  component={props.Wrapper}
1408
1430
  >{props.children}</Dynamic2>}
@@ -1463,8 +1485,8 @@ function ComponentRef(props) {
1463
1485
  );
1464
1486
  function onUpdateFn_0() {
1465
1487
  }
1466
- createEffect(
1467
- on(
1488
+ createEffect2(
1489
+ on2(
1468
1490
  () => [
1469
1491
  onUpdateFn_0_props_componentOptions(),
1470
1492
  onUpdateFn_0_props_blockChildren()
@@ -1498,9 +1520,16 @@ function ComponentRef(props) {
1498
1520
  var Component_ref_default = ComponentRef;
1499
1521
 
1500
1522
  // src/components/block/components/repeated-block.tsx
1501
- import { createSignal as createSignal4 } from "solid-js";
1523
+ import { on as on3, createEffect as createEffect3, createMemo as createMemo4, createSignal as createSignal4 } from "solid-js";
1502
1524
  function RepeatedBlock(props) {
1503
1525
  const [store, setStore] = createSignal4(props.repeatContext);
1526
+ const onUpdateFn_0_props_repeatContext = createMemo4(
1527
+ () => props.repeatContext
1528
+ );
1529
+ function onUpdateFn_0() {
1530
+ setStore(props.repeatContext);
1531
+ }
1532
+ createEffect3(on3(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
1504
1533
  return <><builder_context_default.Provider value={store()}><Block_default
1505
1534
  block={props.block}
1506
1535
  context={store()}
@@ -1605,7 +1634,7 @@ function Block(props) {
1605
1634
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
1606
1635
  const index = _index();
1607
1636
  return <Repeated_block_default
1608
- key={index}
1637
+ key={generateKey(index)}
1609
1638
  repeatContext={data.context}
1610
1639
  block={data.block}
1611
1640
  registeredComponents={props.registeredComponents}
@@ -1629,7 +1658,7 @@ function Block(props) {
1629
1658
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
1630
1659
  const index = _index();
1631
1660
  return <Repeated_block_default
1632
- key={index}
1661
+ key={generateKey(index)}
1633
1662
  repeatContext={data.context}
1634
1663
  block={data.block}
1635
1664
  registeredComponents={props.registeredComponents}
@@ -1669,7 +1698,7 @@ function Block(props) {
1669
1698
  var Block_default = Block;
1670
1699
 
1671
1700
  // src/components/blocks/blocks-wrapper.tsx
1672
- import { onMount as onMount3, on as on3, createEffect as createEffect3, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
1701
+ import { onMount as onMount3, on as on5, createEffect as createEffect5, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
1673
1702
  import { Dynamic as Dynamic4 } from "solid-js/web";
1674
1703
  function BlocksWrapper(props) {
1675
1704
  const [shouldUpdate, setShouldUpdate] = createSignal6(false);
@@ -1722,7 +1751,7 @@ function BlocksWrapper(props) {
1722
1751
  const onUpdateFn_0_props_blocks = createMemo6(() => props.blocks);
1723
1752
  function onUpdateFn_0() {
1724
1753
  }
1725
- createEffect3(on3(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
1754
+ createEffect5(on5(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
1726
1755
  return <>
1727
1756
  <Dynamic4
1728
1757
  class={className() + " dynamic-023c60f2"}
@@ -1947,7 +1976,7 @@ function FragmentComponent(props) {
1947
1976
  var fragment_default = FragmentComponent;
1948
1977
 
1949
1978
  // src/blocks/image/image.tsx
1950
- import { Show as Show8, createMemo as createMemo8 } from "solid-js";
1979
+ import { Show as Show8, onMount as onMount4, createMemo as createMemo8 } from "solid-js";
1951
1980
 
1952
1981
  // src/blocks/image/image.helpers.ts
1953
1982
  function removeProtocol(path) {
@@ -2036,12 +2065,14 @@ function Image(props) {
2036
2065
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
2037
2066
  return out;
2038
2067
  });
2068
+ onMount4(() => {
2069
+ });
2039
2070
  return <>
2040
2071
  <>
2041
2072
  <picture>
2042
2073
  <Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
2043
2074
  <img
2044
- class={"builder-image" + (props.className ? " " + props.className : "") + " img-040e729e"}
2075
+ class={"builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78"}
2045
2076
  loading={props.highPriority ? "eager" : "lazy"}
2046
2077
  fetchpriority={props.highPriority ? "high" : "auto"}
2047
2078
  alt={props.altText}
@@ -2060,22 +2091,22 @@ function Image(props) {
2060
2091
  <Show8
2061
2092
  when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
2062
2093
  ><div
2063
- class="builder-image-sizer div-040e729e"
2094
+ class="builder-image-sizer div-5f381e78"
2064
2095
  style={{
2065
2096
  "padding-top": props.aspectRatio * 100 + "%"
2066
2097
  }}
2067
2098
  /></Show8>
2068
2099
  <Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
2069
- <Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-040e729e-2">{props.children}</div></Show8>
2100
+ <Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-5f381e78-2">{props.children}</div></Show8>
2070
2101
  </>
2071
- <style>{`.img-040e729e {
2102
+ <style>{`.img-5f381e78 {
2072
2103
  opacity: 1;
2073
2104
  transition: opacity 0.2s ease-in-out;
2074
- }.div-040e729e {
2105
+ }.div-5f381e78 {
2075
2106
  width: 100%;
2076
2107
  pointer-events: none;
2077
2108
  font-size: 0;
2078
- }.div-040e729e-2 {
2109
+ }.div-5f381e78-2 {
2079
2110
  display: flex;
2080
2111
  flex-direction: column;
2081
2112
  align-items: stretch;
@@ -2111,10 +2142,10 @@ function SectionComponent(props) {
2111
2142
  var section_default = SectionComponent;
2112
2143
 
2113
2144
  // src/blocks/symbol/symbol.tsx
2114
- import { onMount as onMount9, on as on7, createEffect as createEffect7, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
2145
+ import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
2115
2146
 
2116
2147
  // src/components/content-variants/content-variants.tsx
2117
- import { Show as Show16, For as For9, onMount as onMount8, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
2148
+ import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
2118
2149
 
2119
2150
  // src/helpers/url.ts
2120
2151
  var getTopLevelDomain = (host) => {
@@ -3095,7 +3126,7 @@ var componentInfo6 = {
3095
3126
  };
3096
3127
 
3097
3128
  // src/blocks/personalization-container/personalization-container.tsx
3098
- import { Show as Show10, For as For6, onMount as onMount4, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
3129
+ import { Show as Show10, For as For6, onMount as onMount5, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
3099
3130
 
3100
3131
  // src/components/inlined-script.tsx
3101
3132
  function InlinedScript(props) {
@@ -3360,7 +3391,7 @@ function PersonalizationContainer(props) {
3360
3391
  ).join("");
3361
3392
  });
3362
3393
  let rootRef;
3363
- onMount4(() => {
3394
+ onMount5(() => {
3364
3395
  setIsHydrated(true);
3365
3396
  const unsub = userAttributesService.subscribeOnUserAttributesChange(
3366
3397
  (attrs) => {
@@ -3762,10 +3793,10 @@ var tabs_default = Tabs;
3762
3793
 
3763
3794
  // src/blocks/text/component-info.ts
3764
3795
  var componentInfo11 = {
3765
- shouldReceiveBuilderProps: {
3766
- builderBlock: TARGET === "reactNative" ? true : false,
3796
+ shouldReceiveBuilderProps: TARGET === "reactNative" ? {
3797
+ builderBlock: true,
3767
3798
  builderContext: true
3768
- },
3799
+ } : {},
3769
3800
  name: "Text",
3770
3801
  static: true,
3771
3802
  isRSC: true,
@@ -3823,7 +3854,7 @@ var componentInfo12 = {
3823
3854
  };
3824
3855
 
3825
3856
  // src/blocks/custom-code/custom-code.tsx
3826
- import { onMount as onMount5, on as on4, createEffect as createEffect4, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
3857
+ import { onMount as onMount6, on as on6, createEffect as createEffect6, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
3827
3858
  function CustomCode(props) {
3828
3859
  const [scriptsInserted, setScriptsInserted] = createSignal12([]);
3829
3860
  const [scriptsRun, setScriptsRun] = createSignal12([]);
@@ -3864,7 +3895,7 @@ function CustomCode(props) {
3864
3895
  }
3865
3896
  }
3866
3897
  let elementRef;
3867
- onMount5(() => {
3898
+ onMount6(() => {
3868
3899
  runScripts();
3869
3900
  });
3870
3901
  const onUpdateFn_0_props_code = createMemo12(() => props.code);
@@ -3873,7 +3904,7 @@ function CustomCode(props) {
3873
3904
  runScripts();
3874
3905
  }
3875
3906
  }
3876
- createEffect4(on4(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
3907
+ createEffect6(on6(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
3877
3908
  return <><div
3878
3909
  class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
3879
3910
  ref={elementRef}
@@ -3901,7 +3932,7 @@ var componentInfo13 = {
3901
3932
  };
3902
3933
 
3903
3934
  // src/blocks/embed/embed.tsx
3904
- import { on as on5, createEffect as createEffect5, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
3935
+ import { on as on7, createEffect as createEffect7, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
3905
3936
 
3906
3937
  // src/blocks/embed/helpers.ts
3907
3938
  var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
@@ -3943,8 +3974,8 @@ function Embed(props) {
3943
3974
  findAndRunScripts();
3944
3975
  }
3945
3976
  }
3946
- createEffect5(
3947
- on5(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
3977
+ createEffect7(
3978
+ on7(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
3948
3979
  );
3949
3980
  return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
3950
3981
  }
@@ -4776,7 +4807,7 @@ var componentInfo20 = {
4776
4807
  };
4777
4808
 
4778
4809
  // src/blocks/video/video.tsx
4779
- import { Show as Show13, onMount as onMount6, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
4810
+ import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
4780
4811
  function Video(props) {
4781
4812
  const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
4782
4813
  const videoProps = createMemo15(() => {
@@ -4804,7 +4835,7 @@ function Video(props) {
4804
4835
  };
4805
4836
  });
4806
4837
  let videoRef;
4807
- onMount6(() => {
4838
+ onMount7(() => {
4808
4839
  if (props.lazyLoad) {
4809
4840
  const oberver = new IntersectionObserver(function(entries) {
4810
4841
  entries.forEach(function(entry) {
@@ -5034,9 +5065,9 @@ var getUpdateVariantVisibilityScript = ({
5034
5065
  // src/components/content/components/enable-editor.tsx
5035
5066
  import {
5036
5067
  Show as Show14,
5037
- onMount as onMount7,
5038
- on as on6,
5039
- createEffect as createEffect6,
5068
+ onMount as onMount8,
5069
+ on as on8,
5070
+ createEffect as createEffect8,
5040
5071
  createMemo as createMemo16,
5041
5072
  createSignal as createSignal16
5042
5073
  } from "solid-js";
@@ -5048,7 +5079,7 @@ function getPreviewContent(_searchParams) {
5048
5079
  }
5049
5080
 
5050
5081
  // src/constants/sdk-version.ts
5051
- var SDK_VERSION = "4.0.6";
5082
+ var SDK_VERSION = "4.0.8";
5052
5083
 
5053
5084
  // src/helpers/sdk-headers.ts
5054
5085
  var getSdkHeaders = () => ({
@@ -6052,7 +6083,7 @@ function EnableEditor(props) {
6052
6083
  let elementRef;
6053
6084
  runHttpRequests();
6054
6085
  emitStateUpdate();
6055
- onMount7(() => {
6086
+ onMount8(() => {
6056
6087
  if (isBrowser()) {
6057
6088
  if (isEditing() && !props.isNestedRender) {
6058
6089
  window.addEventListener("message", processMessage);
@@ -6133,15 +6164,15 @@ function EnableEditor(props) {
6133
6164
  mergeNewContent(props.content);
6134
6165
  }
6135
6166
  }
6136
- createEffect6(on6(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
6167
+ createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
6137
6168
  const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
6138
6169
  () => props.builderContextSignal.rootState
6139
6170
  );
6140
6171
  function onUpdateFn_1() {
6141
6172
  emitStateUpdate();
6142
6173
  }
6143
- createEffect6(
6144
- on6(
6174
+ createEffect8(
6175
+ on8(
6145
6176
  () => [onUpdateFn_1_props_builderContextSignal_rootState()],
6146
6177
  onUpdateFn_1
6147
6178
  )
@@ -6152,7 +6183,7 @@ function EnableEditor(props) {
6152
6183
  mergeNewRootState(props.data);
6153
6184
  }
6154
6185
  }
6155
- createEffect6(on6(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
6186
+ createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
6156
6187
  const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
6157
6188
  function onUpdateFn_3() {
6158
6189
  if (props.locale) {
@@ -6161,7 +6192,7 @@ function EnableEditor(props) {
6161
6192
  });
6162
6193
  }
6163
6194
  }
6164
- createEffect6(on6(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
6195
+ createEffect8(on8(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
6165
6196
  return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
6166
6197
  when={props.builderContextSignal.content || needsElementRefDivForEditing()}
6167
6198
  ><Dynamic5
@@ -6403,7 +6434,7 @@ function ContentVariants(props) {
6403
6434
  canTrack: getDefaultCanTrack(props.canTrack)
6404
6435
  });
6405
6436
  });
6406
- onMount8(() => {
6437
+ onMount9(() => {
6407
6438
  setShouldRenderVariants(false);
6408
6439
  });
6409
6440
  return <><>
@@ -6507,6 +6538,7 @@ var fetchSymbolContent = async ({
6507
6538
  // src/blocks/symbol/symbol.tsx
6508
6539
  function Symbol(props) {
6509
6540
  const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
6541
+ const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
6510
6542
  const blocksWrapper = createMemo20(() => {
6511
6543
  return "div";
6512
6544
  });
@@ -6522,7 +6554,7 @@ function Symbol(props) {
6522
6554
  ].filter(Boolean).join(" ");
6523
6555
  });
6524
6556
  function setContent() {
6525
- if (contentToUse())
6557
+ if (contentToUse() && symbolEntry() === props.symbol?.entry)
6526
6558
  return;
6527
6559
  fetchSymbolContent({
6528
6560
  symbol: props.symbol,
@@ -6530,16 +6562,17 @@ function Symbol(props) {
6530
6562
  }).then((newContent) => {
6531
6563
  if (newContent) {
6532
6564
  setContentToUse(newContent);
6565
+ setSymbolEntry(props.symbol?.entry);
6533
6566
  }
6534
6567
  });
6535
6568
  }
6536
- onMount9(() => {
6569
+ onMount10(() => {
6537
6570
  });
6538
6571
  const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
6539
6572
  function onUpdateFn_0() {
6540
6573
  setContent();
6541
6574
  }
6542
- createEffect7(on7(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6575
+ createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6543
6576
  return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
6544
6577
  nonce={props.builderContext.nonce}
6545
6578
  isNestedRender={true}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "4.0.6",
3
+ "version": "4.0.8",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist",