@builder.io/sdk-solid 4.0.9 → 4.1.0

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.
@@ -2317,8 +2317,8 @@ var DEFAULT_INDEX = "default";
2317
2317
  var FILTER_WITH_CUSTOM_TARGETING_SCRIPT_FN_NAME = "filterWithCustomTargeting";
2318
2318
  var BUILDER_IO_PERSONALIZATION_SCRIPT_FN_NAME = "builderIoPersonalization";
2319
2319
  var UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME = "updateVisibilityStylesScript";
2320
- var SDKS_SUPPORTING_PERSONALIZATION = ["react", "vue", "svelte"];
2321
- var SDKS_REQUIRING_RESET_APPROACH = ["vue", "svelte"];
2320
+ var SDKS_SUPPORTING_PERSONALIZATION = ["react", "vue", "svelte", "qwik"];
2321
+ var SDKS_REQUIRING_RESET_APPROACH = ["vue", "svelte", "qwik"];
2322
2322
  function checkShouldRenderVariants(variants, canTrack) {
2323
2323
  const hasVariants = variants && variants.length > 0;
2324
2324
  if (TARGET === "reactNative")
@@ -2576,6 +2576,11 @@ var handleABTesting = async ({
2576
2576
  };
2577
2577
  };
2578
2578
 
2579
+ // src/helpers/no-serialize-wrapper.ts
2580
+ function noSerializeWrapper(fn) {
2581
+ return fn;
2582
+ }
2583
+
2579
2584
  // src/helpers/user-attributes.ts
2580
2585
  var USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
2581
2586
  function createUserAttributesService() {
@@ -2606,18 +2611,32 @@ function createUserAttributesService() {
2606
2611
  canTrack
2607
2612
  }) || "{}");
2608
2613
  },
2609
- subscribeOnUserAttributesChange(callback) {
2614
+ subscribeOnUserAttributesChange(callback, {
2615
+ fireImmediately
2616
+ } = {}) {
2610
2617
  subscribers.add(callback);
2611
- return () => {
2618
+ if (fireImmediately) {
2619
+ callback(this.getUserAttributes());
2620
+ }
2621
+ return noSerializeWrapper(function() {
2612
2622
  subscribers.delete(callback);
2613
- };
2623
+ });
2614
2624
  },
2615
2625
  setCanTrack(value) {
2616
2626
  canTrack = value;
2617
2627
  }
2618
2628
  };
2619
2629
  }
2620
- var userAttributesService = createUserAttributesService();
2630
+ var _userAttributesService;
2631
+ if (isBrowser() && TARGET === "qwik") {
2632
+ if (!window.__BUILDER_USER_ATTRIBUTES_SERVICE__) {
2633
+ window.__BUILDER_USER_ATTRIBUTES_SERVICE__ = createUserAttributesService();
2634
+ }
2635
+ _userAttributesService = window.__BUILDER_USER_ATTRIBUTES_SERVICE__;
2636
+ } else {
2637
+ _userAttributesService = createUserAttributesService();
2638
+ }
2639
+ var userAttributesService = _userAttributesService;
2621
2640
  var setClientUserAttributes = (attributes) => {
2622
2641
  userAttributesService.setUserAttributes(attributes);
2623
2642
  };
@@ -3473,6 +3492,8 @@ function PersonalizationContainer(props) {
3473
3492
  setShouldResetVariants(true);
3474
3493
  const unsub = userAttributesService.subscribeOnUserAttributesChange((attrs2) => {
3475
3494
  setUserAttributes(attrs2);
3495
+ }, {
3496
+ fireImmediately: TARGET === "qwik"
3476
3497
  });
3477
3498
  if (!(isEditing() || isPreviewing())) {
3478
3499
  const variant = filteredVariants()[0];
@@ -4490,9 +4511,9 @@ function logFetch(url) {
4490
4511
  }
4491
4512
 
4492
4513
  // src/blocks/form/form/form.tsx
4493
- var _tmpl$15 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-04a43b72">`);
4514
+ var _tmpl$15 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-7430044e">`);
4494
4515
  var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
4495
- var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-04a43b72 {
4516
+ var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-7430044e {
4496
4517
  padding: 10px;
4497
4518
  color: red;
4498
4519
  text-align: center;
@@ -4604,6 +4625,15 @@ function FormComponent(props) {
4604
4625
  }
4605
4626
  }
4606
4627
  setFormState("sending");
4628
+ if (props.sendSubmissionsTo === "email" && (props.sendSubmissionsToEmail === "your@email.com" || !props.sendSubmissionsToEmail)) {
4629
+ const message = "SubmissionsToEmail is required when sendSubmissionsTo is set to email";
4630
+ console.error(message);
4631
+ setFormState("error");
4632
+ mergeNewRootState({
4633
+ formErrorMessage: message
4634
+ });
4635
+ return;
4636
+ }
4607
4637
  const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(props.sendSubmissionsToEmail || "")}&name=${encodeURIComponent(props.name || "")}`;
4608
4638
  const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
4609
4639
  logFetch(url);
@@ -4619,17 +4649,30 @@ function FormComponent(props) {
4619
4649
  } else {
4620
4650
  body2 = await res.text();
4621
4651
  }
4622
- if (!res.ok && props.errorMessagePath) {
4623
- let message = get(body2, props.errorMessagePath);
4624
- if (message) {
4625
- if (typeof message !== "string") {
4626
- message = JSON.stringify(message);
4652
+ if (!res.ok) {
4653
+ const submitErrorEvent = new CustomEvent("submit:error", {
4654
+ detail: {
4655
+ error: body2,
4656
+ status: res.status
4627
4657
  }
4628
- setFormErrorMessage(message);
4629
- mergeNewRootState({
4630
- formErrorMessage: message
4631
- });
4658
+ });
4659
+ if (formRef?.nativeElement) {
4660
+ formRef?.nativeElement.dispatchEvent(submitErrorEvent);
4661
+ if (submitErrorEvent.defaultPrevented) {
4662
+ return;
4663
+ }
4664
+ }
4665
+ setResponseData(body2);
4666
+ setFormState("error");
4667
+ let message = props.errorMessagePath ? get(body2, props.errorMessagePath) : body2.message || body2.error || body2;
4668
+ if (typeof message !== "string") {
4669
+ message = JSON.stringify(message);
4632
4670
  }
4671
+ setFormErrorMessage(message);
4672
+ mergeNewRootState({
4673
+ formErrorMessage: message
4674
+ });
4675
+ return;
4633
4676
  }
4634
4677
  setResponseData(body2);
4635
4678
  setFormState(res.ok ? "success" : "error");
@@ -5057,6 +5100,16 @@ var componentInfo19 = {
5057
5100
  };
5058
5101
  var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
5059
5102
  function ImgComponent(props) {
5103
+ const srcSetToUse = createMemo(() => {
5104
+ const url = props.imgSrc || props.image;
5105
+ if (!url || typeof url !== "string") {
5106
+ return void 0;
5107
+ }
5108
+ if (!url.match(/builder\.io/)) {
5109
+ return void 0;
5110
+ }
5111
+ return getSrcSet(url);
5112
+ });
5060
5113
  return (() => {
5061
5114
  const _el$ = _tmpl$20();
5062
5115
  spread(_el$, mergeProps({
@@ -5074,6 +5127,9 @@ function ImgComponent(props) {
5074
5127
  },
5075
5128
  get src() {
5076
5129
  return props.imgSrc || props.image;
5130
+ },
5131
+ get srcSet() {
5132
+ return srcSetToUse();
5077
5133
  }
5078
5134
  }, {}, () => props.attributes), false, false);
5079
5135
  return _el$;
@@ -5445,7 +5501,7 @@ function getPreviewContent(_searchParams) {
5445
5501
  }
5446
5502
 
5447
5503
  // src/constants/sdk-version.ts
5448
- var SDK_VERSION = "4.0.9";
5504
+ var SDK_VERSION = "4.1.0";
5449
5505
 
5450
5506
  // src/helpers/sdk-headers.ts
5451
5507
  var getSdkHeaders = () => ({
@@ -1982,10 +1982,10 @@ function SectionComponent(props) {
1982
1982
  var section_default = SectionComponent;
1983
1983
 
1984
1984
  // src/blocks/symbol/symbol.tsx
1985
- import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
1985
+ import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo21, createSignal as createSignal21 } from "solid-js";
1986
1986
 
1987
1987
  // src/components/content-variants/content-variants.tsx
1988
- import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
1988
+ import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal20, createMemo as createMemo20 } from "solid-js";
1989
1989
 
1990
1990
  // src/blocks/personalization-container/helpers/inlined-fns.ts
1991
1991
  function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
@@ -2076,8 +2076,8 @@ var DEFAULT_INDEX = "default";
2076
2076
  var FILTER_WITH_CUSTOM_TARGETING_SCRIPT_FN_NAME = "filterWithCustomTargeting";
2077
2077
  var BUILDER_IO_PERSONALIZATION_SCRIPT_FN_NAME = "builderIoPersonalization";
2078
2078
  var UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME = "updateVisibilityStylesScript";
2079
- var SDKS_SUPPORTING_PERSONALIZATION = ["react", "vue", "svelte"];
2080
- var SDKS_REQUIRING_RESET_APPROACH = ["vue", "svelte"];
2079
+ var SDKS_SUPPORTING_PERSONALIZATION = ["react", "vue", "svelte", "qwik"];
2080
+ var SDKS_REQUIRING_RESET_APPROACH = ["vue", "svelte", "qwik"];
2081
2081
  function checkShouldRenderVariants(variants, canTrack) {
2082
2082
  const hasVariants = variants && variants.length > 0;
2083
2083
  if (TARGET === "reactNative")
@@ -2335,6 +2335,11 @@ var handleABTesting = async ({
2335
2335
  };
2336
2336
  };
2337
2337
 
2338
+ // src/helpers/no-serialize-wrapper.ts
2339
+ function noSerializeWrapper(fn) {
2340
+ return fn;
2341
+ }
2342
+
2338
2343
  // src/helpers/user-attributes.ts
2339
2344
  var USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
2340
2345
  function createUserAttributesService() {
@@ -2365,18 +2370,32 @@ function createUserAttributesService() {
2365
2370
  canTrack
2366
2371
  }) || "{}");
2367
2372
  },
2368
- subscribeOnUserAttributesChange(callback) {
2373
+ subscribeOnUserAttributesChange(callback, {
2374
+ fireImmediately
2375
+ } = {}) {
2369
2376
  subscribers.add(callback);
2370
- return () => {
2377
+ if (fireImmediately) {
2378
+ callback(this.getUserAttributes());
2379
+ }
2380
+ return noSerializeWrapper(function() {
2371
2381
  subscribers.delete(callback);
2372
- };
2382
+ });
2373
2383
  },
2374
2384
  setCanTrack(value) {
2375
2385
  canTrack = value;
2376
2386
  }
2377
2387
  };
2378
2388
  }
2379
- var userAttributesService = createUserAttributesService();
2389
+ var _userAttributesService;
2390
+ if (isBrowser() && TARGET === "qwik") {
2391
+ if (!window.__BUILDER_USER_ATTRIBUTES_SERVICE__) {
2392
+ window.__BUILDER_USER_ATTRIBUTES_SERVICE__ = createUserAttributesService();
2393
+ }
2394
+ _userAttributesService = window.__BUILDER_USER_ATTRIBUTES_SERVICE__;
2395
+ } else {
2396
+ _userAttributesService = createUserAttributesService();
2397
+ }
2398
+ var userAttributesService = _userAttributesService;
2380
2399
  var setClientUserAttributes = (attributes) => {
2381
2400
  userAttributesService.setUserAttributes(attributes);
2382
2401
  };
@@ -2389,7 +2408,7 @@ var getDefaultCanTrack = (canTrack) => {
2389
2408
  };
2390
2409
 
2391
2410
  // src/components/content/content.tsx
2392
- import { Show as Show15, createSignal as createSignal18 } from "solid-js";
2411
+ import { Show as Show15, createSignal as createSignal19 } from "solid-js";
2393
2412
 
2394
2413
  // src/blocks/accordion/component-info.ts
2395
2414
  var defaultTitle = {
@@ -3219,6 +3238,9 @@ function PersonalizationContainer(props) {
3219
3238
  const unsub = userAttributesService.subscribeOnUserAttributesChange(
3220
3239
  (attrs2) => {
3221
3240
  setUserAttributes(attrs2);
3241
+ },
3242
+ {
3243
+ fireImmediately: TARGET === "qwik"
3222
3244
  }
3223
3245
  );
3224
3246
  if (!(isEditing() || isPreviewing())) {
@@ -4199,6 +4221,15 @@ function FormComponent(props) {
4199
4221
  }
4200
4222
  }
4201
4223
  setFormState("sending");
4224
+ if (props.sendSubmissionsTo === "email" && (props.sendSubmissionsToEmail === "your@email.com" || !props.sendSubmissionsToEmail)) {
4225
+ const message = "SubmissionsToEmail is required when sendSubmissionsTo is set to email";
4226
+ console.error(message);
4227
+ setFormState("error");
4228
+ mergeNewRootState({
4229
+ formErrorMessage: message
4230
+ });
4231
+ return;
4232
+ }
4202
4233
  const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(
4203
4234
  props.sendSubmissionsToEmail || ""
4204
4235
  )}&name=${encodeURIComponent(props.name || "")}`;
@@ -4217,17 +4248,30 @@ function FormComponent(props) {
4217
4248
  } else {
4218
4249
  body2 = await res.text();
4219
4250
  }
4220
- if (!res.ok && props.errorMessagePath) {
4221
- let message = get(body2, props.errorMessagePath);
4222
- if (message) {
4223
- if (typeof message !== "string") {
4224
- message = JSON.stringify(message);
4251
+ if (!res.ok) {
4252
+ const submitErrorEvent = new CustomEvent("submit:error", {
4253
+ detail: {
4254
+ error: body2,
4255
+ status: res.status
4256
+ }
4257
+ });
4258
+ if (formRef?.nativeElement) {
4259
+ formRef?.nativeElement.dispatchEvent(submitErrorEvent);
4260
+ if (submitErrorEvent.defaultPrevented) {
4261
+ return;
4225
4262
  }
4226
- setFormErrorMessage(message);
4227
- mergeNewRootState({
4228
- formErrorMessage: message
4229
- });
4230
4263
  }
4264
+ setResponseData(body2);
4265
+ setFormState("error");
4266
+ let message = props.errorMessagePath ? get(body2, props.errorMessagePath) : body2.message || body2.error || body2;
4267
+ if (typeof message !== "string") {
4268
+ message = JSON.stringify(message);
4269
+ }
4270
+ setFormErrorMessage(message);
4271
+ mergeNewRootState({
4272
+ formErrorMessage: message
4273
+ });
4274
+ return;
4231
4275
  }
4232
4276
  setResponseData(body2);
4233
4277
  setFormState(res.ok ? "success" : "error");
@@ -4306,14 +4350,14 @@ function FormComponent(props) {
4306
4350
  blocks={props.sendingMessage}
4307
4351
  context={props.builderContext}
4308
4352
  /></Show12>
4309
- <Show12 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-04a43b72">{JSON.stringify(responseData(), null, 2)}</pre></Show12>
4353
+ <Show12 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-7430044e">{JSON.stringify(responseData(), null, 2)}</pre></Show12>
4310
4354
  <Show12 when={submissionState() === "success"}><Blocks_default
4311
4355
  path="successMessage"
4312
4356
  blocks={props.successMessage}
4313
4357
  context={props.builderContext}
4314
4358
  /></Show12>
4315
4359
  </form>
4316
- <style>{`.pre-04a43b72 {
4360
+ <style>{`.pre-7430044e {
4317
4361
  padding: 10px;
4318
4362
  color: red;
4319
4363
  text-align: center;
@@ -4560,7 +4604,18 @@ var componentInfo19 = {
4560
4604
  };
4561
4605
 
4562
4606
  // src/blocks/img/img.tsx
4607
+ import { createMemo as createMemo15 } from "solid-js";
4563
4608
  function ImgComponent(props) {
4609
+ const srcSetToUse = createMemo15(() => {
4610
+ const url = props.imgSrc || props.image;
4611
+ if (!url || typeof url !== "string") {
4612
+ return void 0;
4613
+ }
4614
+ if (!url.match(/builder\.io/)) {
4615
+ return void 0;
4616
+ }
4617
+ return getSrcSet(url);
4618
+ });
4564
4619
  return <><img
4565
4620
  style={{
4566
4621
  "object-fit": props.backgroundSize || "cover",
@@ -4569,6 +4624,7 @@ function ImgComponent(props) {
4569
4624
  key={isEditing() && props.imgSrc || "default-key"}
4570
4625
  alt={props.altText}
4571
4626
  src={props.imgSrc || props.image}
4627
+ srcSet={srcSetToUse()}
4572
4628
  {...{}}
4573
4629
  {...props.attributes}
4574
4630
  /></>;
@@ -4663,10 +4719,10 @@ var componentInfo20 = {
4663
4719
  };
4664
4720
 
4665
4721
  // src/blocks/video/video.tsx
4666
- import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
4722
+ import { Show as Show13, onMount as onMount7, createSignal as createSignal16, createMemo as createMemo16 } from "solid-js";
4667
4723
  function Video(props) {
4668
- const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
4669
- const videoProps = createMemo15(() => {
4724
+ const [lazyVideoObserver, setLazyVideoObserver] = createSignal16(void 0);
4725
+ const videoProps = createMemo16(() => {
4670
4726
  return {
4671
4727
  ...props.autoPlay === true ? {
4672
4728
  autoPlay: true
@@ -4685,7 +4741,7 @@ function Video(props) {
4685
4741
  } : {}
4686
4742
  };
4687
4743
  });
4688
- const spreadProps = createMemo15(() => {
4744
+ const spreadProps = createMemo16(() => {
4689
4745
  return {
4690
4746
  ...videoProps()
4691
4747
  };
@@ -4925,8 +4981,8 @@ import {
4925
4981
  onMount as onMount8,
4926
4982
  on as on8,
4927
4983
  createEffect as createEffect8,
4928
- createMemo as createMemo16,
4929
- createSignal as createSignal16
4984
+ createMemo as createMemo17,
4985
+ createSignal as createSignal17
4930
4986
  } from "solid-js";
4931
4987
  import { Dynamic as Dynamic5 } from "solid-js/web";
4932
4988
 
@@ -4936,7 +4992,7 @@ function getPreviewContent(_searchParams) {
4936
4992
  }
4937
4993
 
4938
4994
  // src/constants/sdk-version.ts
4939
- var SDK_VERSION = "4.0.9";
4995
+ var SDK_VERSION = "4.1.0";
4940
4996
 
4941
4997
  // src/helpers/sdk-headers.ts
4942
4998
  var getSdkHeaders = () => ({
@@ -5797,13 +5853,13 @@ var getWrapperClassName = (variationId) => {
5797
5853
 
5798
5854
  // src/components/content/components/enable-editor.tsx
5799
5855
  function EnableEditor(props) {
5800
- const [hasExecuted, setHasExecuted] = createSignal16(false);
5801
- const [ContentWrapper, setContentWrapper] = createSignal16(
5856
+ const [hasExecuted, setHasExecuted] = createSignal17(false);
5857
+ const [ContentWrapper, setContentWrapper] = createSignal17(
5802
5858
  props.contentWrapper || "div"
5803
5859
  );
5804
- const [httpReqsData, setHttpReqsData] = createSignal16({});
5805
- const [httpReqsPending, setHttpReqsPending] = createSignal16({});
5806
- const [clicked, setClicked] = createSignal16(false);
5860
+ const [httpReqsData, setHttpReqsData] = createSignal17({});
5861
+ const [httpReqsPending, setHttpReqsPending] = createSignal17({});
5862
+ const [clicked, setClicked] = createSignal17(false);
5807
5863
  function mergeNewRootState(newData) {
5808
5864
  const combinedState = {
5809
5865
  ...props.builderContextSignal.rootState,
@@ -5837,7 +5893,7 @@ function EnableEditor(props) {
5837
5893
  content: newContentValue
5838
5894
  }));
5839
5895
  }
5840
- const showContentProps = createMemo16(() => {
5896
+ const showContentProps = createMemo17(() => {
5841
5897
  return props.showContent ? {} : {
5842
5898
  hidden: true,
5843
5899
  "aria-hidden": true
@@ -6022,14 +6078,14 @@ function EnableEditor(props) {
6022
6078
  }
6023
6079
  }
6024
6080
  });
6025
- const onUpdateFn_0_props_content = createMemo16(() => props.content);
6081
+ const onUpdateFn_0_props_content = createMemo17(() => props.content);
6026
6082
  function onUpdateFn_0() {
6027
6083
  if (props.content) {
6028
6084
  mergeNewContent(props.content);
6029
6085
  }
6030
6086
  }
6031
6087
  createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
6032
- const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
6088
+ const onUpdateFn_1_props_builderContextSignal_rootState = createMemo17(
6033
6089
  () => props.builderContextSignal.rootState
6034
6090
  );
6035
6091
  function onUpdateFn_1() {
@@ -6041,14 +6097,14 @@ function EnableEditor(props) {
6041
6097
  onUpdateFn_1
6042
6098
  )
6043
6099
  );
6044
- const onUpdateFn_2_props_data = createMemo16(() => props.data);
6100
+ const onUpdateFn_2_props_data = createMemo17(() => props.data);
6045
6101
  function onUpdateFn_2() {
6046
6102
  if (props.data) {
6047
6103
  mergeNewRootState(props.data);
6048
6104
  }
6049
6105
  }
6050
6106
  createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
6051
- const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
6107
+ const onUpdateFn_3_props_locale = createMemo17(() => props.locale);
6052
6108
  function onUpdateFn_3() {
6053
6109
  if (props.locale) {
6054
6110
  mergeNewRootState({
@@ -6080,9 +6136,9 @@ function EnableEditor(props) {
6080
6136
  var Enable_editor_default = EnableEditor;
6081
6137
 
6082
6138
  // src/components/content/components/styles.tsx
6083
- import { createSignal as createSignal17 } from "solid-js";
6139
+ import { createSignal as createSignal18 } from "solid-js";
6084
6140
  function ContentStyles(props) {
6085
- const [injectedStyles, setInjectedStyles] = createSignal17(
6141
+ const [injectedStyles, setInjectedStyles] = createSignal18(
6086
6142
  `
6087
6143
  ${getCss({
6088
6144
  cssCode: props.cssCode,
@@ -6140,7 +6196,7 @@ var getContentInitialValue = ({
6140
6196
 
6141
6197
  // src/components/content/content.tsx
6142
6198
  function ContentComponent(props) {
6143
- const [scriptStr, setScriptStr] = createSignal18(
6199
+ const [scriptStr, setScriptStr] = createSignal19(
6144
6200
  getUpdateVariantVisibilityScript({
6145
6201
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
6146
6202
  variationId: props.content?.testVariationId,
@@ -6148,7 +6204,7 @@ function ContentComponent(props) {
6148
6204
  contentId: props.content?.id
6149
6205
  })
6150
6206
  );
6151
- const [registeredComponents, setRegisteredComponents] = createSignal18(
6207
+ const [registeredComponents, setRegisteredComponents] = createSignal19(
6152
6208
  [
6153
6209
  ...getDefaultRegisteredComponents(),
6154
6210
  ...props.customComponents || []
@@ -6163,7 +6219,7 @@ function ContentComponent(props) {
6163
6219
  {}
6164
6220
  )
6165
6221
  );
6166
- const [builderContextSignal, setBuilderContextSignal] = createSignal18({
6222
+ const [builderContextSignal, setBuilderContextSignal] = createSignal19({
6167
6223
  content: getContentInitialValue({
6168
6224
  content: props.content,
6169
6225
  data: props.data
@@ -6271,13 +6327,13 @@ var Content_default = ContentComponent;
6271
6327
 
6272
6328
  // src/components/content-variants/content-variants.tsx
6273
6329
  function ContentVariants(props) {
6274
- const [shouldRenderVariants, setShouldRenderVariants] = createSignal19(
6330
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal20(
6275
6331
  checkShouldRenderVariants2({
6276
6332
  canTrack: getDefaultCanTrack(props.canTrack),
6277
6333
  content: props.content
6278
6334
  })
6279
6335
  );
6280
- const updateCookieAndStylesScriptStr = createMemo19(() => {
6336
+ const updateCookieAndStylesScriptStr = createMemo20(() => {
6281
6337
  return getUpdateCookieAndStylesScript(
6282
6338
  getVariants(props.content).map((value) => ({
6283
6339
  id: value.testVariationId,
@@ -6286,10 +6342,10 @@ function ContentVariants(props) {
6286
6342
  props.content?.id || ""
6287
6343
  );
6288
6344
  });
6289
- const hideVariantsStyleString = createMemo19(() => {
6345
+ const hideVariantsStyleString = createMemo20(() => {
6290
6346
  return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
6291
6347
  });
6292
- const defaultContent = createMemo19(() => {
6348
+ const defaultContent = createMemo20(() => {
6293
6349
  return shouldRenderVariants() ? {
6294
6350
  ...props.content,
6295
6351
  testVariationId: props.content?.id
@@ -6408,15 +6464,15 @@ var fetchSymbolContent = async ({
6408
6464
 
6409
6465
  // src/blocks/symbol/symbol.tsx
6410
6466
  function Symbol(props) {
6411
- const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
6412
- const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
6413
- const blocksWrapper = createMemo20(() => {
6467
+ const [contentToUse, setContentToUse] = createSignal21(props.symbol?.content);
6468
+ const [symbolEntry, setSymbolEntry] = createSignal21(props.symbol?.entry);
6469
+ const blocksWrapper = createMemo21(() => {
6414
6470
  return "div";
6415
6471
  });
6416
- const contentWrapper = createMemo20(() => {
6472
+ const contentWrapper = createMemo21(() => {
6417
6473
  return "div";
6418
6474
  });
6419
- const className = createMemo20(() => {
6475
+ const className = createMemo21(() => {
6420
6476
  return [
6421
6477
  ...[props.attributes[getClassPropName()]],
6422
6478
  "builder-symbol",
@@ -6439,7 +6495,7 @@ function Symbol(props) {
6439
6495
  }
6440
6496
  onMount10(() => {
6441
6497
  });
6442
- const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
6498
+ const onUpdateFn_0_props_symbol = createMemo21(() => props.symbol);
6443
6499
  function onUpdateFn_0() {
6444
6500
  setContent();
6445
6501
  }