@builder.io/sdk-solid 2.0.3 → 2.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
@@ -701,6 +701,9 @@ function assign(target, ..._args) {
701
701
  return to;
702
702
  }
703
703
  function bindAnimations(animations) {
704
+ if (TARGET === "reactNative") {
705
+ return;
706
+ }
704
707
  for (const animation of animations) {
705
708
  switch (animation.trigger) {
706
709
  case "pageLoad":
@@ -1439,7 +1442,7 @@ function Block(props) {
1439
1442
  registeredComponents: props.registeredComponents,
1440
1443
  builderBlock: processedBlock(),
1441
1444
  includeBlockProps: blockComponent()?.noWrap === true,
1442
- isInteractive: !blockComponent()?.isRSC
1445
+ isInteractive: !(blockComponent()?.isRSC && TARGET === "rsc")
1443
1446
  };
1444
1447
  });
1445
1448
  onMount(() => {
@@ -1973,16 +1976,16 @@ function getSrcSet(url) {
1973
1976
  // src/blocks/image/image.tsx
1974
1977
  var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
1975
1978
  var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
1976
- var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-e3b1053e">`);
1977
- var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-e3b1053e-2>`);
1978
- var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-e3b1053e {
1979
+ var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-4512e110">`);
1980
+ var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-4512e110-2>`);
1981
+ var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-4512e110 {
1979
1982
  opacity: 1;
1980
1983
  transition: opacity 0.2s ease-in-out;
1981
- }.div-e3b1053e {
1984
+ }.div-4512e110 {
1982
1985
  width: 100%;
1983
1986
  pointer-events: none;
1984
1987
  font-size: 0;
1985
- }.div-e3b1053e-2 {
1988
+ }.div-4512e110-2 {
1986
1989
  display: flex;
1987
1990
  flex-direction: column;
1988
1991
  align-items: stretch;
@@ -2031,6 +2034,8 @@ function Image(props) {
2031
2034
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
2032
2035
  return out;
2033
2036
  });
2037
+ onMount(() => {
2038
+ });
2034
2039
  return [[(() => {
2035
2040
  const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
2036
2041
  insert(_el$, createComponent(Show, {
@@ -2044,7 +2049,7 @@ function Image(props) {
2044
2049
  }
2045
2050
  }), _el$3);
2046
2051
  effect((_p$) => {
2047
- const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-e3b1053e", _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 = {
2052
+ const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-4512e110", _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 = {
2048
2053
  "object-position": props.backgroundPosition || "center",
2049
2054
  "object-fit": props.backgroundSize || "cover",
2050
2055
  ...aspectRatioCss()
@@ -3414,7 +3419,8 @@ delegateEvents(["click"]);
3414
3419
  // src/blocks/text/component-info.ts
3415
3420
  var componentInfo10 = {
3416
3421
  shouldReceiveBuilderProps: {
3417
- builderBlock: TARGET === "reactNative" ? true : false
3422
+ builderBlock: TARGET === "reactNative" ? true : false,
3423
+ builderContext: true
3418
3424
  },
3419
3425
  name: "Text",
3420
3426
  static: true,
@@ -3436,10 +3442,27 @@ var componentInfo10 = {
3436
3442
  };
3437
3443
  var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
3438
3444
  function Text(props) {
3445
+ const processedText = createMemo(() => {
3446
+ const context = props.builderContext;
3447
+ const {
3448
+ context: contextContext,
3449
+ localState,
3450
+ rootState,
3451
+ rootSetState
3452
+ } = context;
3453
+ return String(props.text?.toString() || "").replace(/{{([^}]+)}}/g, (match, group) => evaluate({
3454
+ code: group,
3455
+ context: contextContext,
3456
+ localState,
3457
+ rootState,
3458
+ rootSetState,
3459
+ enableCache: false
3460
+ }));
3461
+ });
3439
3462
  return (() => {
3440
3463
  const _el$ = _tmpl$10();
3441
3464
  _el$.style.setProperty("outline", "none");
3442
- effect(() => _el$.innerHTML = props.text?.toString() || "");
3465
+ effect(() => _el$.innerHTML = processedText());
3443
3466
  return _el$;
3444
3467
  })();
3445
3468
  }
@@ -5304,7 +5327,7 @@ function isFromTrustedHost(trustedHosts, e) {
5304
5327
  }
5305
5328
 
5306
5329
  // src/constants/sdk-version.ts
5307
- var SDK_VERSION = "2.0.3";
5330
+ var SDK_VERSION = "2.0.8";
5308
5331
 
5309
5332
  // src/functions/register.ts
5310
5333
  var registry = {};
@@ -6177,7 +6200,7 @@ function ContentVariants(props) {
6177
6200
  },
6178
6201
  children: (variant, _index) => {
6179
6202
  _index();
6180
- return createComponent(content_default, {
6203
+ return createComponent(content_default, mergeProps({
6181
6204
  get isNestedRender() {
6182
6205
  return props.isNestedRender;
6183
6206
  },
@@ -6237,7 +6260,7 @@ function ContentVariants(props) {
6237
6260
  get trustedHosts() {
6238
6261
  return props.trustedHosts;
6239
6262
  }
6240
- });
6263
+ }, {}));
6241
6264
  }
6242
6265
  })];
6243
6266
  }
@@ -690,6 +690,9 @@ function assign(target, ..._args) {
690
690
  return to;
691
691
  }
692
692
  function bindAnimations(animations) {
693
+ if (TARGET === "reactNative") {
694
+ return;
695
+ }
693
696
  for (const animation of animations) {
694
697
  switch (animation.trigger) {
695
698
  case "pageLoad":
@@ -1388,7 +1391,7 @@ function Block(props) {
1388
1391
  registeredComponents: props.registeredComponents,
1389
1392
  builderBlock: processedBlock(),
1390
1393
  includeBlockProps: blockComponent()?.noWrap === true,
1391
- isInteractive: !blockComponent()?.isRSC
1394
+ isInteractive: !(blockComponent()?.isRSC && TARGET === "rsc")
1392
1395
  };
1393
1396
  });
1394
1397
  onMount(() => {
@@ -1713,7 +1716,7 @@ function FragmentComponent(props) {
1713
1716
  var fragment_default = FragmentComponent;
1714
1717
 
1715
1718
  // src/blocks/image/image.tsx
1716
- import { Show as Show7, createMemo as createMemo8 } from "solid-js";
1719
+ import { Show as Show7, onMount as onMount2, createMemo as createMemo8 } from "solid-js";
1717
1720
 
1718
1721
  // src/blocks/image/image.helpers.ts
1719
1722
  function removeProtocol(path) {
@@ -1802,12 +1805,14 @@ function Image(props) {
1802
1805
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
1803
1806
  return out;
1804
1807
  });
1808
+ onMount2(() => {
1809
+ });
1805
1810
  return <>
1806
1811
  <>
1807
1812
  <picture>
1808
1813
  <Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
1809
1814
  <img
1810
- class={"builder-image" + (props.className ? " " + props.className : "") + " img-e3b1053e"}
1815
+ class={"builder-image" + (props.className ? " " + props.className : "") + " img-4512e110"}
1811
1816
  loading={props.highPriority ? "eager" : "lazy"}
1812
1817
  fetchpriority={props.highPriority ? "high" : "auto"}
1813
1818
  alt={props.altText}
@@ -1825,22 +1830,22 @@ function Image(props) {
1825
1830
  <Show7
1826
1831
  when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
1827
1832
  ><div
1828
- class="builder-image-sizer div-e3b1053e"
1833
+ class="builder-image-sizer div-4512e110"
1829
1834
  style={{
1830
1835
  "padding-top": props.aspectRatio * 100 + "%"
1831
1836
  }}
1832
1837
  /></Show7>
1833
1838
  <Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
1834
- <Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-e3b1053e-2">{props.children}</div></Show7>
1839
+ <Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-4512e110-2">{props.children}</div></Show7>
1835
1840
  </>
1836
- <style>{`.img-e3b1053e {
1841
+ <style>{`.img-4512e110 {
1837
1842
  opacity: 1;
1838
1843
  transition: opacity 0.2s ease-in-out;
1839
- }.div-e3b1053e {
1844
+ }.div-4512e110 {
1840
1845
  width: 100%;
1841
1846
  pointer-events: none;
1842
1847
  font-size: 0;
1843
- }.div-e3b1053e-2 {
1848
+ }.div-4512e110-2 {
1844
1849
  display: flex;
1845
1850
  flex-direction: column;
1846
1851
  align-items: stretch;
@@ -1876,10 +1881,10 @@ function SectionComponent(props) {
1876
1881
  var section_default = SectionComponent;
1877
1882
 
1878
1883
  // src/blocks/symbol/symbol.tsx
1879
- import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as createMemo19, createSignal as createSignal19 } from "solid-js";
1884
+ import { onMount as onMount6, on as on3, createEffect as createEffect3, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
1880
1885
 
1881
1886
  // src/components/content-variants/content-variants.tsx
1882
- import { Show as Show14, For as For9, onMount as onMount4, createSignal as createSignal18, createMemo as createMemo18 } from "solid-js";
1887
+ import { Show as Show14, For as For9, onMount as onMount5, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
1883
1888
 
1884
1889
  // src/helpers/url.ts
1885
1890
  var getTopLevelDomain = (host) => {
@@ -2073,7 +2078,7 @@ var handleABTesting = async ({
2073
2078
  var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
2074
2079
 
2075
2080
  // src/components/content/content.tsx
2076
- import { Show as Show13, createSignal as createSignal17 } from "solid-js";
2081
+ import { Show as Show13, createSignal as createSignal18 } from "solid-js";
2077
2082
 
2078
2083
  // src/blocks/accordion/component-info.ts
2079
2084
  var defaultTitle = {
@@ -3086,7 +3091,8 @@ var tabs_default = Tabs;
3086
3091
  // src/blocks/text/component-info.ts
3087
3092
  var componentInfo10 = {
3088
3093
  shouldReceiveBuilderProps: {
3089
- builderBlock: TARGET === "reactNative" ? true : false
3094
+ builderBlock: TARGET === "reactNative" ? true : false,
3095
+ builderContext: true
3090
3096
  },
3091
3097
  name: "Text",
3092
3098
  static: true,
@@ -3108,10 +3114,31 @@ var componentInfo10 = {
3108
3114
  };
3109
3115
 
3110
3116
  // src/blocks/text/text.tsx
3117
+ import { createMemo as createMemo11 } from "solid-js";
3111
3118
  function Text(props) {
3119
+ const processedText = createMemo11(() => {
3120
+ const context = props.builderContext;
3121
+ const {
3122
+ context: contextContext,
3123
+ localState,
3124
+ rootState,
3125
+ rootSetState
3126
+ } = context;
3127
+ return String(props.text?.toString() || "").replace(
3128
+ /{{([^}]+)}}/g,
3129
+ (match, group) => evaluate({
3130
+ code: group,
3131
+ context: contextContext,
3132
+ localState,
3133
+ rootState,
3134
+ rootSetState,
3135
+ enableCache: false
3136
+ })
3137
+ );
3138
+ });
3112
3139
  return <><div
3113
3140
  class="builder-text"
3114
- innerHTML={props.text?.toString() || ""}
3141
+ innerHTML={processedText()}
3115
3142
  style={{
3116
3143
  outline: "none"
3117
3144
  }}
@@ -3145,12 +3172,12 @@ var componentInfo11 = {
3145
3172
  };
3146
3173
 
3147
3174
  // src/blocks/custom-code/custom-code.tsx
3148
- import { onMount as onMount2, createSignal as createSignal11 } from "solid-js";
3175
+ import { onMount as onMount3, createSignal as createSignal12 } from "solid-js";
3149
3176
  function CustomCode(props) {
3150
- const [scriptsInserted, setScriptsInserted] = createSignal11([]);
3151
- const [scriptsRun, setScriptsRun] = createSignal11([]);
3177
+ const [scriptsInserted, setScriptsInserted] = createSignal12([]);
3178
+ const [scriptsRun, setScriptsRun] = createSignal12([]);
3152
3179
  let elementRef;
3153
- onMount2(() => {
3180
+ onMount3(() => {
3154
3181
  if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
3155
3182
  return;
3156
3183
  }
@@ -3209,7 +3236,7 @@ var componentInfo12 = {
3209
3236
  };
3210
3237
 
3211
3238
  // src/blocks/embed/embed.tsx
3212
- import { on, createEffect, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
3239
+ import { on, createEffect, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
3213
3240
 
3214
3241
  // src/blocks/embed/helpers.ts
3215
3242
  var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
@@ -3217,9 +3244,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
3217
3244
 
3218
3245
  // src/blocks/embed/embed.tsx
3219
3246
  function Embed(props) {
3220
- const [scriptsInserted, setScriptsInserted] = createSignal12([]);
3221
- const [scriptsRun, setScriptsRun] = createSignal12([]);
3222
- const [ranInitFn, setRanInitFn] = createSignal12(false);
3247
+ const [scriptsInserted, setScriptsInserted] = createSignal13([]);
3248
+ const [scriptsRun, setScriptsRun] = createSignal13([]);
3249
+ const [ranInitFn, setRanInitFn] = createSignal13(false);
3223
3250
  function findAndRunScripts() {
3224
3251
  if (!elem || !elem.getElementsByTagName)
3225
3252
  return;
@@ -3242,8 +3269,8 @@ function Embed(props) {
3242
3269
  }
3243
3270
  }
3244
3271
  let elem;
3245
- const onUpdateFn_0_elem = createMemo12(() => elem);
3246
- const onUpdateFn_0_ranInitFn__ = createMemo12(() => ranInitFn());
3272
+ const onUpdateFn_0_elem = createMemo13(() => elem);
3273
+ const onUpdateFn_0_ranInitFn__ = createMemo13(() => ranInitFn());
3247
3274
  function onUpdateFn_0() {
3248
3275
  if (elem && !ranInitFn()) {
3249
3276
  setRanInitFn(true);
@@ -3498,7 +3525,7 @@ var componentInfo13 = {
3498
3525
  };
3499
3526
 
3500
3527
  // src/blocks/form/form/form.tsx
3501
- import { Show as Show10, For as For7, createSignal as createSignal13 } from "solid-js";
3528
+ import { Show as Show10, For as For7, createSignal as createSignal14 } from "solid-js";
3502
3529
 
3503
3530
  // src/functions/get-env.ts
3504
3531
  var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
@@ -3515,9 +3542,9 @@ var get = (obj, path, defaultValue) => {
3515
3542
 
3516
3543
  // src/blocks/form/form/form.tsx
3517
3544
  function FormComponent(props) {
3518
- const [formState, setFormState] = createSignal13("unsubmitted");
3519
- const [responseData, setResponseData] = createSignal13(null);
3520
- const [formErrorMessage, setFormErrorMessage] = createSignal13("");
3545
+ const [formState, setFormState] = createSignal14("unsubmitted");
3546
+ const [responseData, setResponseData] = createSignal14(null);
3547
+ const [formErrorMessage, setFormErrorMessage] = createSignal14("");
3521
3548
  function mergeNewRootState(newData) {
3522
3549
  const combinedState = {
3523
3550
  ...props.builderContext.rootState,
@@ -4090,9 +4117,9 @@ var componentInfo19 = {
4090
4117
  };
4091
4118
 
4092
4119
  // src/blocks/video/video.tsx
4093
- import { Show as Show11, createMemo as createMemo14 } from "solid-js";
4120
+ import { Show as Show11, createMemo as createMemo15 } from "solid-js";
4094
4121
  function Video(props) {
4095
- const videoProps = createMemo14(() => {
4122
+ const videoProps = createMemo15(() => {
4096
4123
  return {
4097
4124
  ...props.autoPlay === true ? {
4098
4125
  autoPlay: true
@@ -4111,7 +4138,7 @@ function Video(props) {
4111
4138
  } : {}
4112
4139
  };
4113
4140
  });
4114
- const spreadProps = createMemo14(() => {
4141
+ const spreadProps = createMemo15(() => {
4115
4142
  return {
4116
4143
  ...videoProps()
4117
4144
  };
@@ -4317,11 +4344,11 @@ var Inlined_script_default = InlinedScript;
4317
4344
  // src/components/content/components/enable-editor.tsx
4318
4345
  import {
4319
4346
  Show as Show12,
4320
- onMount as onMount3,
4347
+ onMount as onMount4,
4321
4348
  on as on2,
4322
4349
  createEffect as createEffect2,
4323
- createMemo as createMemo15,
4324
- createSignal as createSignal15
4350
+ createMemo as createMemo16,
4351
+ createSignal as createSignal16
4325
4352
  } from "solid-js";
4326
4353
  import { Dynamic as Dynamic5 } from "solid-js/web";
4327
4354
 
@@ -4819,7 +4846,7 @@ function isFromTrustedHost(trustedHosts, e) {
4819
4846
  }
4820
4847
 
4821
4848
  // src/constants/sdk-version.ts
4822
- var SDK_VERSION = "2.0.3";
4849
+ var SDK_VERSION = "2.0.8";
4823
4850
 
4824
4851
  // src/functions/register.ts
4825
4852
  var registry = {};
@@ -5096,12 +5123,12 @@ var getWrapperClassName = (variationId) => {
5096
5123
 
5097
5124
  // src/components/content/components/enable-editor.tsx
5098
5125
  function EnableEditor(props) {
5099
- const [ContentWrapper, setContentWrapper] = createSignal15(
5126
+ const [ContentWrapper, setContentWrapper] = createSignal16(
5100
5127
  props.contentWrapper || "div"
5101
5128
  );
5102
- const [httpReqsData, setHttpReqsData] = createSignal15({});
5103
- const [httpReqsPending, setHttpReqsPending] = createSignal15({});
5104
- const [clicked, setClicked] = createSignal15(false);
5129
+ const [httpReqsData, setHttpReqsData] = createSignal16({});
5130
+ const [httpReqsPending, setHttpReqsPending] = createSignal16({});
5131
+ const [clicked, setClicked] = createSignal16(false);
5105
5132
  function mergeNewRootState(newData) {
5106
5133
  const combinedState = {
5107
5134
  ...props.builderContextSignal.rootState,
@@ -5135,7 +5162,7 @@ function EnableEditor(props) {
5135
5162
  content: newContentValue
5136
5163
  }));
5137
5164
  }
5138
- const showContentProps = createMemo15(() => {
5165
+ const showContentProps = createMemo16(() => {
5139
5166
  return props.showContent ? {} : {
5140
5167
  hidden: true,
5141
5168
  "aria-hidden": true
@@ -5254,7 +5281,7 @@ function EnableEditor(props) {
5254
5281
  }
5255
5282
  }
5256
5283
  let elementRef;
5257
- onMount3(() => {
5284
+ onMount4(() => {
5258
5285
  if (isBrowser()) {
5259
5286
  if (isEditing()) {
5260
5287
  window.addEventListener("message", processMessage);
@@ -5315,7 +5342,7 @@ function EnableEditor(props) {
5315
5342
  }
5316
5343
  }
5317
5344
  });
5318
- onMount3(() => {
5345
+ onMount4(() => {
5319
5346
  if (!props.apiKey) {
5320
5347
  logger.error(
5321
5348
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
@@ -5325,14 +5352,14 @@ function EnableEditor(props) {
5325
5352
  runHttpRequests();
5326
5353
  emitStateUpdate();
5327
5354
  });
5328
- const onUpdateFn_0_props_content = createMemo15(() => props.content);
5355
+ const onUpdateFn_0_props_content = createMemo16(() => props.content);
5329
5356
  function onUpdateFn_0() {
5330
5357
  if (props.content) {
5331
5358
  mergeNewContent(props.content);
5332
5359
  }
5333
5360
  }
5334
5361
  createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
5335
- const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo15(() => props.builderContextSignal.content?.data?.jsCode);
5362
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo16(() => props.builderContextSignal.content?.data?.jsCode);
5336
5363
  function onUpdateFn_1() {
5337
5364
  evaluateJsCode();
5338
5365
  }
@@ -5342,7 +5369,7 @@ function EnableEditor(props) {
5342
5369
  onUpdateFn_1
5343
5370
  )
5344
5371
  );
5345
- const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo15(() => props.builderContextSignal.content?.data?.httpRequests);
5372
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo16(() => props.builderContextSignal.content?.data?.httpRequests);
5346
5373
  function onUpdateFn_2() {
5347
5374
  runHttpRequests();
5348
5375
  }
@@ -5354,7 +5381,7 @@ function EnableEditor(props) {
5354
5381
  onUpdateFn_2
5355
5382
  )
5356
5383
  );
5357
- const onUpdateFn_3_props_builderContextSignal_rootState = createMemo15(
5384
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo16(
5358
5385
  () => props.builderContextSignal.rootState
5359
5386
  );
5360
5387
  function onUpdateFn_3() {
@@ -5366,14 +5393,14 @@ function EnableEditor(props) {
5366
5393
  onUpdateFn_3
5367
5394
  )
5368
5395
  );
5369
- const onUpdateFn_4_props_data = createMemo15(() => props.data);
5396
+ const onUpdateFn_4_props_data = createMemo16(() => props.data);
5370
5397
  function onUpdateFn_4() {
5371
5398
  if (props.data) {
5372
5399
  mergeNewRootState(props.data);
5373
5400
  }
5374
5401
  }
5375
5402
  createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
5376
- const onUpdateFn_5_props_locale = createMemo15(() => props.locale);
5403
+ const onUpdateFn_5_props_locale = createMemo16(() => props.locale);
5377
5404
  function onUpdateFn_5() {
5378
5405
  if (props.locale) {
5379
5406
  mergeNewRootState({
@@ -5400,9 +5427,9 @@ function EnableEditor(props) {
5400
5427
  var Enable_editor_default = EnableEditor;
5401
5428
 
5402
5429
  // src/components/content/components/styles.tsx
5403
- import { createSignal as createSignal16 } from "solid-js";
5430
+ import { createSignal as createSignal17 } from "solid-js";
5404
5431
  function ContentStyles(props) {
5405
- const [injectedStyles, setInjectedStyles] = createSignal16(
5432
+ const [injectedStyles, setInjectedStyles] = createSignal17(
5406
5433
  `
5407
5434
  ${getCss({
5408
5435
  cssCode: props.cssCode,
@@ -5460,7 +5487,7 @@ var getContentInitialValue = ({
5460
5487
 
5461
5488
  // src/components/content/content.tsx
5462
5489
  function ContentComponent(props) {
5463
- const [scriptStr, setScriptStr] = createSignal17(
5490
+ const [scriptStr, setScriptStr] = createSignal18(
5464
5491
  getUpdateVariantVisibilityScript({
5465
5492
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
5466
5493
  variationId: props.content?.testVariationId,
@@ -5468,7 +5495,7 @@ function ContentComponent(props) {
5468
5495
  contentId: props.content?.id
5469
5496
  })
5470
5497
  );
5471
- const [registeredComponents, setRegisteredComponents] = createSignal17(
5498
+ const [registeredComponents, setRegisteredComponents] = createSignal18(
5472
5499
  [
5473
5500
  ...getDefaultRegisteredComponents(),
5474
5501
  ...props.customComponents?.filter(({ models }) => {
@@ -5489,7 +5516,7 @@ function ContentComponent(props) {
5489
5516
  {}
5490
5517
  )
5491
5518
  );
5492
- const [builderContextSignal, setBuilderContextSignal] = createSignal17({
5519
+ const [builderContextSignal, setBuilderContextSignal] = createSignal18({
5493
5520
  content: getContentInitialValue({
5494
5521
  content: props.content,
5495
5522
  data: props.data
@@ -5579,13 +5606,13 @@ var Content_default = ContentComponent;
5579
5606
 
5580
5607
  // src/components/content-variants/content-variants.tsx
5581
5608
  function ContentVariants(props) {
5582
- const [shouldRenderVariants, setShouldRenderVariants] = createSignal18(
5609
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal19(
5583
5610
  checkShouldRenderVariants({
5584
5611
  canTrack: getDefaultCanTrack(props.canTrack),
5585
5612
  content: props.content
5586
5613
  })
5587
5614
  );
5588
- const updateCookieAndStylesScriptStr = createMemo18(() => {
5615
+ const updateCookieAndStylesScriptStr = createMemo19(() => {
5589
5616
  return getUpdateCookieAndStylesScript(
5590
5617
  getVariants(props.content).map((value) => ({
5591
5618
  id: value.testVariationId,
@@ -5594,10 +5621,10 @@ function ContentVariants(props) {
5594
5621
  props.content?.id || ""
5595
5622
  );
5596
5623
  });
5597
- const hideVariantsStyleString = createMemo18(() => {
5624
+ const hideVariantsStyleString = createMemo19(() => {
5598
5625
  return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
5599
5626
  });
5600
- const defaultContent = createMemo18(() => {
5627
+ const defaultContent = createMemo19(() => {
5601
5628
  return shouldRenderVariants() ? {
5602
5629
  ...props.content,
5603
5630
  testVariationId: props.content?.id
@@ -5606,7 +5633,7 @@ function ContentVariants(props) {
5606
5633
  canTrack: getDefaultCanTrack(props.canTrack)
5607
5634
  });
5608
5635
  });
5609
- onMount4(() => {
5636
+ onMount5(() => {
5610
5637
  setShouldRenderVariants(false);
5611
5638
  });
5612
5639
  return <><>
@@ -5650,6 +5677,7 @@ function ContentVariants(props) {
5650
5677
  contentWrapper={props.contentWrapper}
5651
5678
  contentWrapperProps={props.contentWrapperProps}
5652
5679
  trustedHosts={props.trustedHosts}
5680
+ {...{}}
5653
5681
  />;
5654
5682
  }}</For9>
5655
5683
  </Show14>
@@ -5706,14 +5734,14 @@ var fetchSymbolContent = async ({
5706
5734
 
5707
5735
  // src/blocks/symbol/symbol.tsx
5708
5736
  function Symbol(props) {
5709
- const [contentToUse, setContentToUse] = createSignal19(props.symbol?.content);
5710
- const blocksWrapper = createMemo19(() => {
5737
+ const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
5738
+ const blocksWrapper = createMemo20(() => {
5711
5739
  return "div";
5712
5740
  });
5713
- const contentWrapper = createMemo19(() => {
5741
+ const contentWrapper = createMemo20(() => {
5714
5742
  return "div";
5715
5743
  });
5716
- const className = createMemo19(() => {
5744
+ const className = createMemo20(() => {
5717
5745
  return [
5718
5746
  ...[props.attributes[getClassPropName()]],
5719
5747
  "builder-symbol",
@@ -5733,9 +5761,9 @@ function Symbol(props) {
5733
5761
  }
5734
5762
  });
5735
5763
  }
5736
- onMount5(() => {
5764
+ onMount6(() => {
5737
5765
  });
5738
- const onUpdateFn_0_props_symbol = createMemo19(() => props.symbol);
5766
+ const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
5739
5767
  function onUpdateFn_0() {
5740
5768
  setContent();
5741
5769
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "2.0.3",
3
+ "version": "2.0.8",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist",