@builder.io/sdk-solid 1.0.12 → 1.0.14

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.
@@ -4014,7 +4014,7 @@ function isFromTrustedHost(trustedHosts, e) {
4014
4014
  }
4015
4015
 
4016
4016
  // src/constants/sdk-version.ts
4017
- var SDK_VERSION = "1.0.12";
4017
+ var SDK_VERSION = "1.0.14";
4018
4018
 
4019
4019
  // src/functions/register.ts
4020
4020
  var registry = {};
@@ -4212,10 +4212,6 @@ var subscribeToEditor = (model, callback, options) => {
4212
4212
 
4213
4213
  // src/components/content/components/enable-editor.tsx
4214
4214
  function EnableEditor(props) {
4215
- const [forceReRenderCount, setForceReRenderCount] = createSignal12(0);
4216
- const [firstRender, setFirstRender] = createSignal12(true);
4217
- const [lastUpdated, setLastUpdated] = createSignal12(0);
4218
- const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal12(false);
4219
4215
  const [ContentWrapper, setContentWrapper] = createSignal12(
4220
4216
  props.contentWrapper || "div"
4221
4217
  );
@@ -4270,7 +4266,6 @@ function EnableEditor(props) {
4270
4266
  breakpoints
4271
4267
  }
4272
4268
  });
4273
- setForceReRenderCount(forceReRenderCount() + 1);
4274
4269
  }
4275
4270
  },
4276
4271
  animation: (animation) => {
@@ -4278,7 +4273,6 @@ function EnableEditor(props) {
4278
4273
  },
4279
4274
  contentUpdate: (newContent) => {
4280
4275
  mergeNewContent(newContent);
4281
- setForceReRenderCount(forceReRenderCount() + 1);
4282
4276
  }
4283
4277
  }
4284
4278
  })(event);
@@ -4376,7 +4370,6 @@ function EnableEditor(props) {
4376
4370
  onMount3(() => {
4377
4371
  if (isBrowser()) {
4378
4372
  if (isEditing()) {
4379
- setForceReRenderCount(forceReRenderCount() + 1);
4380
4373
  window.addEventListener("message", processMessage);
4381
4374
  registerInsertMenu();
4382
4375
  setupBrowserForEditing({
@@ -4452,68 +4445,59 @@ function EnableEditor(props) {
4452
4445
  }
4453
4446
  }
4454
4447
  createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
4455
- const onUpdateFn_1_shouldSendResetCookie__ = createMemo12(
4456
- () => shouldSendResetCookie()
4457
- );
4448
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
4458
4449
  function onUpdateFn_1() {
4459
- }
4460
- createEffect2(
4461
- on2(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1)
4462
- );
4463
- const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
4464
- function onUpdateFn_2() {
4465
4450
  evaluateJsCode();
4466
4451
  }
4467
4452
  createEffect2(
4468
4453
  on2(
4469
- () => [onUpdateFn_2_props_builderContextSignal_content__data__jsCode()],
4470
- onUpdateFn_2
4454
+ () => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()],
4455
+ onUpdateFn_1
4471
4456
  )
4472
4457
  );
4473
- const onUpdateFn_3_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
4474
- function onUpdateFn_3() {
4458
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
4459
+ function onUpdateFn_2() {
4475
4460
  runHttpRequests();
4476
4461
  }
4477
4462
  createEffect2(
4478
4463
  on2(
4479
4464
  () => [
4480
- onUpdateFn_3_props_builderContextSignal_content__data__httpRequests()
4465
+ onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()
4481
4466
  ],
4482
- onUpdateFn_3
4467
+ onUpdateFn_2
4483
4468
  )
4484
4469
  );
4485
- const onUpdateFn_4_props_builderContextSignal_rootState = createMemo12(
4470
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo12(
4486
4471
  () => props.builderContextSignal.rootState
4487
4472
  );
4488
- function onUpdateFn_4() {
4473
+ function onUpdateFn_3() {
4489
4474
  emitStateUpdate();
4490
4475
  }
4491
4476
  createEffect2(
4492
4477
  on2(
4493
- () => [onUpdateFn_4_props_builderContextSignal_rootState()],
4494
- onUpdateFn_4
4478
+ () => [onUpdateFn_3_props_builderContextSignal_rootState()],
4479
+ onUpdateFn_3
4495
4480
  )
4496
4481
  );
4497
- const onUpdateFn_5_props_data = createMemo12(() => props.data);
4498
- function onUpdateFn_5() {
4482
+ const onUpdateFn_4_props_data = createMemo12(() => props.data);
4483
+ function onUpdateFn_4() {
4499
4484
  if (props.data) {
4500
4485
  mergeNewRootState(props.data);
4501
4486
  }
4502
4487
  }
4503
- createEffect2(on2(() => [onUpdateFn_5_props_data()], onUpdateFn_5));
4504
- const onUpdateFn_6_props_locale = createMemo12(() => props.locale);
4505
- function onUpdateFn_6() {
4488
+ createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
4489
+ const onUpdateFn_5_props_locale = createMemo12(() => props.locale);
4490
+ function onUpdateFn_5() {
4506
4491
  if (props.locale) {
4507
4492
  mergeNewRootState({
4508
4493
  locale: props.locale
4509
4494
  });
4510
4495
  }
4511
4496
  }
4512
- createEffect2(on2(() => [onUpdateFn_6_props_locale()], onUpdateFn_6));
4497
+ createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
4513
4498
  return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
4514
4499
  class={`variant-${props.content?.testVariationId || props.content?.id}`}
4515
4500
  {...{}}
4516
- key={forceReRenderCount()}
4517
4501
  ref={elementRef}
4518
4502
  onClick={(event) => onClick(event)}
4519
4503
  builder-content-id={props.builderContextSignal.content?.id}
@@ -4586,19 +4570,7 @@ var getCss = ({
4586
4570
  }
4587
4571
  return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
4588
4572
  };
4589
-
4590
- // src/components/content/components/styles.tsx
4591
- function ContentStyles(props) {
4592
- const [injectedStyles, setInjectedStyles] = createSignal13(
4593
- `
4594
- ${getCss({
4595
- cssCode: props.cssCode,
4596
- contentId: props.contentId
4597
- })}
4598
- ${getFontCss({
4599
- customFonts: props.customFonts
4600
- })}
4601
-
4573
+ var DEFAULT_STYLES = `
4602
4574
  .builder-button {
4603
4575
  all: unset;
4604
4576
  }
@@ -4615,6 +4587,23 @@ ${getFontCss({
4615
4587
  text-align: inherit;
4616
4588
  font-family: inherit;
4617
4589
  }
4590
+ `;
4591
+ var getDefaultStyles = (isNested) => {
4592
+ return !isNested ? DEFAULT_STYLES : "";
4593
+ };
4594
+
4595
+ // src/components/content/components/styles.tsx
4596
+ function ContentStyles(props) {
4597
+ const [injectedStyles, setInjectedStyles] = createSignal13(
4598
+ `
4599
+ ${getCss({
4600
+ cssCode: props.cssCode,
4601
+ contentId: props.contentId
4602
+ })}
4603
+ ${getFontCss({
4604
+ customFonts: props.customFonts
4605
+ })}
4606
+ ${getDefaultStyles(props.isNestedRender)}
4618
4607
  `.trim()
4619
4608
  );
4620
4609
  return <Inlined_styles_default styles={injectedStyles()} />;
@@ -4742,6 +4731,7 @@ function ContentComponent(props) {
4742
4731
  >
4743
4732
  <Show11 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show11>
4744
4733
  <Show11 when={TARGET !== "reactNative"}><Styles_default
4734
+ isNestedRender={props.isNestedRender}
4745
4735
  contentId={builderContextSignal().content?.id}
4746
4736
  cssCode={builderContextSignal().content?.data?.cssCode}
4747
4737
  customFonts={builderContextSignal().content?.data?.customFonts}
@@ -4789,7 +4779,7 @@ function ContentVariants(props) {
4789
4779
  setShouldRenderVariants(false);
4790
4780
  });
4791
4781
  return <>
4792
- <Show12 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show12>
4782
+ <Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show12>
4793
4783
  <Show12 when={shouldRenderVariants()}>
4794
4784
  <Inlined_styles_default
4795
4785
  id={`variants-styles-${props.content?.id}`}
@@ -4801,6 +4791,7 @@ function ContentVariants(props) {
4801
4791
  <For7 each={getVariants(props.content)}>{(variant, _index) => {
4802
4792
  const index = _index();
4803
4793
  return <Content_default
4794
+ isNestedRender={props.isNestedRender}
4804
4795
  key={variant.testVariationId}
4805
4796
  content={variant}
4806
4797
  showContent={false}
@@ -4824,6 +4815,7 @@ function ContentVariants(props) {
4824
4815
  }}</For7>
4825
4816
  </Show12>
4826
4817
  <Content_default
4818
+ isNestedRender={props.isNestedRender}
4827
4819
  {...{}}
4828
4820
  content={defaultContent()}
4829
4821
  showContent={true}
@@ -4903,7 +4895,7 @@ function Symbol(props) {
4903
4895
  }
4904
4896
  createEffect3(on3(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
4905
4897
  return <div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
4906
- __isNestedRender={true}
4898
+ isNestedRender={true}
4907
4899
  apiVersion={props.builderContext.apiVersion}
4908
4900
  apiKey={props.builderContext.apiKey}
4909
4901
  context={{
package/lib/edge/dev.js CHANGED
@@ -7599,7 +7599,7 @@ function isFromTrustedHost(trustedHosts, e) {
7599
7599
  }
7600
7600
 
7601
7601
  // src/constants/sdk-version.ts
7602
- var SDK_VERSION = "1.0.12";
7602
+ var SDK_VERSION = "1.0.14";
7603
7603
 
7604
7604
  // src/functions/register.ts
7605
7605
  var registry = {};
@@ -7798,10 +7798,6 @@ var subscribeToEditor = (model, callback, options) => {
7798
7798
 
7799
7799
  // src/components/content/components/enable-editor.tsx
7800
7800
  function EnableEditor(props) {
7801
- const [forceReRenderCount, setForceReRenderCount] = createSignal(0);
7802
- createSignal(true);
7803
- createSignal(0);
7804
- const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal(false);
7805
7801
  const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
7806
7802
  const [httpReqsData, setHttpReqsData] = createSignal({});
7807
7803
  const [clicked, setClicked] = createSignal(false);
@@ -7857,7 +7853,6 @@ function EnableEditor(props) {
7857
7853
  breakpoints
7858
7854
  }
7859
7855
  });
7860
- setForceReRenderCount(forceReRenderCount() + 1);
7861
7856
  }
7862
7857
  },
7863
7858
  animation: (animation) => {
@@ -7865,7 +7860,6 @@ function EnableEditor(props) {
7865
7860
  },
7866
7861
  contentUpdate: (newContent) => {
7867
7862
  mergeNewContent(newContent);
7868
- setForceReRenderCount(forceReRenderCount() + 1);
7869
7863
  }
7870
7864
  }
7871
7865
  })(event);
@@ -7957,7 +7951,6 @@ function EnableEditor(props) {
7957
7951
  onMount(() => {
7958
7952
  if (isBrowser()) {
7959
7953
  if (isEditing()) {
7960
- setForceReRenderCount(forceReRenderCount() + 1);
7961
7954
  window.addEventListener("message", processMessage);
7962
7955
  registerInsertMenu();
7963
7956
  setupBrowserForEditing({
@@ -8024,41 +8017,37 @@ function EnableEditor(props) {
8024
8017
  }
8025
8018
  }
8026
8019
  createEffect(on(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
8027
- const onUpdateFn_1_shouldSendResetCookie__ = createMemo(() => shouldSendResetCookie());
8020
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo(() => props.builderContextSignal.content?.data?.jsCode);
8028
8021
  function onUpdateFn_1() {
8029
- }
8030
- createEffect(on(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1));
8031
- const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo(() => props.builderContextSignal.content?.data?.jsCode);
8032
- function onUpdateFn_2() {
8033
8022
  evaluateJsCode();
8034
8023
  }
8035
- createEffect(on(() => [onUpdateFn_2_props_builderContextSignal_content__data__jsCode()], onUpdateFn_2));
8036
- const onUpdateFn_3_props_builderContextSignal_content__data__httpRequests = createMemo(() => props.builderContextSignal.content?.data?.httpRequests);
8037
- function onUpdateFn_3() {
8024
+ createEffect(on(() => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()], onUpdateFn_1));
8025
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo(() => props.builderContextSignal.content?.data?.httpRequests);
8026
+ function onUpdateFn_2() {
8038
8027
  runHttpRequests();
8039
8028
  }
8040
- createEffect(on(() => [onUpdateFn_3_props_builderContextSignal_content__data__httpRequests()], onUpdateFn_3));
8041
- const onUpdateFn_4_props_builderContextSignal_rootState = createMemo(() => props.builderContextSignal.rootState);
8042
- function onUpdateFn_4() {
8029
+ createEffect(on(() => [onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()], onUpdateFn_2));
8030
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo(() => props.builderContextSignal.rootState);
8031
+ function onUpdateFn_3() {
8043
8032
  emitStateUpdate();
8044
8033
  }
8045
- createEffect(on(() => [onUpdateFn_4_props_builderContextSignal_rootState()], onUpdateFn_4));
8046
- const onUpdateFn_5_props_data = createMemo(() => props.data);
8047
- function onUpdateFn_5() {
8034
+ createEffect(on(() => [onUpdateFn_3_props_builderContextSignal_rootState()], onUpdateFn_3));
8035
+ const onUpdateFn_4_props_data = createMemo(() => props.data);
8036
+ function onUpdateFn_4() {
8048
8037
  if (props.data) {
8049
8038
  mergeNewRootState(props.data);
8050
8039
  }
8051
8040
  }
8052
- createEffect(on(() => [onUpdateFn_5_props_data()], onUpdateFn_5));
8053
- const onUpdateFn_6_props_locale = createMemo(() => props.locale);
8054
- function onUpdateFn_6() {
8041
+ createEffect(on(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
8042
+ const onUpdateFn_5_props_locale = createMemo(() => props.locale);
8043
+ function onUpdateFn_5() {
8055
8044
  if (props.locale) {
8056
8045
  mergeNewRootState({
8057
8046
  locale: props.locale
8058
8047
  });
8059
8048
  }
8060
8049
  }
8061
- createEffect(on(() => [onUpdateFn_6_props_locale()], onUpdateFn_6));
8050
+ createEffect(on(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
8062
8051
  return createComponent(builder_context_default.Provider, {
8063
8052
  get value() {
8064
8053
  return props.builderContextSignal;
@@ -8074,9 +8063,6 @@ function EnableEditor(props) {
8074
8063
  return `variant-${props.content?.testVariationId || props.content?.id}`;
8075
8064
  }
8076
8065
  }, {}, {
8077
- get key() {
8078
- return forceReRenderCount();
8079
- },
8080
8066
  ref(r$) {
8081
8067
  const _ref$ = elementRef;
8082
8068
  typeof _ref$ === "function" ? _ref$(r$) : elementRef = r$;
@@ -8160,18 +8146,7 @@ var getCss = ({
8160
8146
  }
8161
8147
  return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
8162
8148
  };
8163
-
8164
- // src/components/content/components/styles.tsx
8165
- function ContentStyles(props) {
8166
- const [injectedStyles, setInjectedStyles] = createSignal(`
8167
- ${getCss({
8168
- cssCode: props.cssCode,
8169
- contentId: props.contentId
8170
- })}
8171
- ${getFontCss({
8172
- customFonts: props.customFonts
8173
- })}
8174
-
8149
+ var DEFAULT_STYLES = `
8175
8150
  .builder-button {
8176
8151
  all: unset;
8177
8152
  }
@@ -8188,6 +8163,22 @@ ${getFontCss({
8188
8163
  text-align: inherit;
8189
8164
  font-family: inherit;
8190
8165
  }
8166
+ `;
8167
+ var getDefaultStyles = (isNested) => {
8168
+ return !isNested ? DEFAULT_STYLES : "";
8169
+ };
8170
+
8171
+ // src/components/content/components/styles.tsx
8172
+ function ContentStyles(props) {
8173
+ const [injectedStyles, setInjectedStyles] = createSignal(`
8174
+ ${getCss({
8175
+ cssCode: props.cssCode,
8176
+ contentId: props.contentId
8177
+ })}
8178
+ ${getFontCss({
8179
+ customFonts: props.customFonts
8180
+ })}
8181
+ ${getDefaultStyles(props.isNestedRender)}
8191
8182
  `.trim());
8192
8183
  return createComponent(inlined_styles_default, {
8193
8184
  get styles() {
@@ -8352,6 +8343,9 @@ function ContentComponent(props) {
8352
8343
  when: TARGET !== "reactNative",
8353
8344
  get children() {
8354
8345
  return createComponent(styles_default, {
8346
+ get isNestedRender() {
8347
+ return props.isNestedRender;
8348
+ },
8355
8349
  get contentId() {
8356
8350
  return builderContextSignal().content?.id;
8357
8351
  },
@@ -8413,7 +8407,7 @@ function ContentVariants(props) {
8413
8407
  });
8414
8408
  return [createComponent(Show, {
8415
8409
  get when() {
8416
- return !props.__isNestedRender && TARGET !== "reactNative";
8410
+ return !props.isNestedRender && TARGET !== "reactNative";
8417
8411
  },
8418
8412
  get children() {
8419
8413
  return createComponent(inlined_script_default, {
@@ -8445,6 +8439,9 @@ function ContentVariants(props) {
8445
8439
  children: (variant, _index) => {
8446
8440
  _index();
8447
8441
  return createComponent(content_default, {
8442
+ get isNestedRender() {
8443
+ return props.isNestedRender;
8444
+ },
8448
8445
  get key() {
8449
8446
  return variant.testVariationId;
8450
8447
  },
@@ -8502,7 +8499,11 @@ function ContentVariants(props) {
8502
8499
  }
8503
8500
  })];
8504
8501
  }
8505
- }), createComponent(content_default, mergeProps({}, {
8502
+ }), createComponent(content_default, mergeProps({
8503
+ get isNestedRender() {
8504
+ return props.isNestedRender;
8505
+ }
8506
+ }, {}, {
8506
8507
  get content() {
8507
8508
  return defaultContent();
8508
8509
  },
@@ -8617,7 +8618,7 @@ function Symbol2(props) {
8617
8618
  }
8618
8619
  }, {}, () => props.attributes, {}), false, true);
8619
8620
  insert(_el$, createComponent(content_variants_default, {
8620
- __isNestedRender: true,
8621
+ isNestedRender: true,
8621
8622
  get apiVersion() {
8622
8623
  return props.builderContext.apiVersion;
8623
8624
  },
package/lib/edge/dev.jsx CHANGED
@@ -7184,7 +7184,7 @@ function isFromTrustedHost(trustedHosts, e) {
7184
7184
  }
7185
7185
 
7186
7186
  // src/constants/sdk-version.ts
7187
- var SDK_VERSION = "1.0.12";
7187
+ var SDK_VERSION = "1.0.14";
7188
7188
 
7189
7189
  // src/functions/register.ts
7190
7190
  var registry = {};
@@ -7383,10 +7383,6 @@ var subscribeToEditor = (model, callback, options) => {
7383
7383
 
7384
7384
  // src/components/content/components/enable-editor.tsx
7385
7385
  function EnableEditor(props) {
7386
- const [forceReRenderCount, setForceReRenderCount] = createSignal12(0);
7387
- const [firstRender, setFirstRender] = createSignal12(true);
7388
- const [lastUpdated, setLastUpdated] = createSignal12(0);
7389
- const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal12(false);
7390
7386
  const [ContentWrapper, setContentWrapper] = createSignal12(
7391
7387
  props.contentWrapper || "div"
7392
7388
  );
@@ -7441,7 +7437,6 @@ function EnableEditor(props) {
7441
7437
  breakpoints
7442
7438
  }
7443
7439
  });
7444
- setForceReRenderCount(forceReRenderCount() + 1);
7445
7440
  }
7446
7441
  },
7447
7442
  animation: (animation) => {
@@ -7449,7 +7444,6 @@ function EnableEditor(props) {
7449
7444
  },
7450
7445
  contentUpdate: (newContent) => {
7451
7446
  mergeNewContent(newContent);
7452
- setForceReRenderCount(forceReRenderCount() + 1);
7453
7447
  }
7454
7448
  }
7455
7449
  })(event);
@@ -7548,7 +7542,6 @@ function EnableEditor(props) {
7548
7542
  onMount3(() => {
7549
7543
  if (isBrowser()) {
7550
7544
  if (isEditing()) {
7551
- setForceReRenderCount(forceReRenderCount() + 1);
7552
7545
  window.addEventListener("message", processMessage);
7553
7546
  registerInsertMenu();
7554
7547
  setupBrowserForEditing({
@@ -7624,68 +7617,59 @@ function EnableEditor(props) {
7624
7617
  }
7625
7618
  }
7626
7619
  createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
7627
- const onUpdateFn_1_shouldSendResetCookie__ = createMemo12(
7628
- () => shouldSendResetCookie()
7629
- );
7620
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
7630
7621
  function onUpdateFn_1() {
7631
- }
7632
- createEffect2(
7633
- on2(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1)
7634
- );
7635
- const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
7636
- function onUpdateFn_2() {
7637
7622
  evaluateJsCode();
7638
7623
  }
7639
7624
  createEffect2(
7640
7625
  on2(
7641
- () => [onUpdateFn_2_props_builderContextSignal_content__data__jsCode()],
7642
- onUpdateFn_2
7626
+ () => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()],
7627
+ onUpdateFn_1
7643
7628
  )
7644
7629
  );
7645
- const onUpdateFn_3_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
7646
- function onUpdateFn_3() {
7630
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
7631
+ function onUpdateFn_2() {
7647
7632
  runHttpRequests();
7648
7633
  }
7649
7634
  createEffect2(
7650
7635
  on2(
7651
7636
  () => [
7652
- onUpdateFn_3_props_builderContextSignal_content__data__httpRequests()
7637
+ onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()
7653
7638
  ],
7654
- onUpdateFn_3
7639
+ onUpdateFn_2
7655
7640
  )
7656
7641
  );
7657
- const onUpdateFn_4_props_builderContextSignal_rootState = createMemo12(
7642
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo12(
7658
7643
  () => props.builderContextSignal.rootState
7659
7644
  );
7660
- function onUpdateFn_4() {
7645
+ function onUpdateFn_3() {
7661
7646
  emitStateUpdate();
7662
7647
  }
7663
7648
  createEffect2(
7664
7649
  on2(
7665
- () => [onUpdateFn_4_props_builderContextSignal_rootState()],
7666
- onUpdateFn_4
7650
+ () => [onUpdateFn_3_props_builderContextSignal_rootState()],
7651
+ onUpdateFn_3
7667
7652
  )
7668
7653
  );
7669
- const onUpdateFn_5_props_data = createMemo12(() => props.data);
7670
- function onUpdateFn_5() {
7654
+ const onUpdateFn_4_props_data = createMemo12(() => props.data);
7655
+ function onUpdateFn_4() {
7671
7656
  if (props.data) {
7672
7657
  mergeNewRootState(props.data);
7673
7658
  }
7674
7659
  }
7675
- createEffect2(on2(() => [onUpdateFn_5_props_data()], onUpdateFn_5));
7676
- const onUpdateFn_6_props_locale = createMemo12(() => props.locale);
7677
- function onUpdateFn_6() {
7660
+ createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
7661
+ const onUpdateFn_5_props_locale = createMemo12(() => props.locale);
7662
+ function onUpdateFn_5() {
7678
7663
  if (props.locale) {
7679
7664
  mergeNewRootState({
7680
7665
  locale: props.locale
7681
7666
  });
7682
7667
  }
7683
7668
  }
7684
- createEffect2(on2(() => [onUpdateFn_6_props_locale()], onUpdateFn_6));
7669
+ createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
7685
7670
  return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
7686
7671
  class={`variant-${props.content?.testVariationId || props.content?.id}`}
7687
7672
  {...{}}
7688
- key={forceReRenderCount()}
7689
7673
  ref={elementRef}
7690
7674
  onClick={(event) => onClick(event)}
7691
7675
  builder-content-id={props.builderContextSignal.content?.id}
@@ -7758,19 +7742,7 @@ var getCss = ({
7758
7742
  }
7759
7743
  return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
7760
7744
  };
7761
-
7762
- // src/components/content/components/styles.tsx
7763
- function ContentStyles(props) {
7764
- const [injectedStyles, setInjectedStyles] = createSignal13(
7765
- `
7766
- ${getCss({
7767
- cssCode: props.cssCode,
7768
- contentId: props.contentId
7769
- })}
7770
- ${getFontCss({
7771
- customFonts: props.customFonts
7772
- })}
7773
-
7745
+ var DEFAULT_STYLES = `
7774
7746
  .builder-button {
7775
7747
  all: unset;
7776
7748
  }
@@ -7787,6 +7759,23 @@ ${getFontCss({
7787
7759
  text-align: inherit;
7788
7760
  font-family: inherit;
7789
7761
  }
7762
+ `;
7763
+ var getDefaultStyles = (isNested) => {
7764
+ return !isNested ? DEFAULT_STYLES : "";
7765
+ };
7766
+
7767
+ // src/components/content/components/styles.tsx
7768
+ function ContentStyles(props) {
7769
+ const [injectedStyles, setInjectedStyles] = createSignal13(
7770
+ `
7771
+ ${getCss({
7772
+ cssCode: props.cssCode,
7773
+ contentId: props.contentId
7774
+ })}
7775
+ ${getFontCss({
7776
+ customFonts: props.customFonts
7777
+ })}
7778
+ ${getDefaultStyles(props.isNestedRender)}
7790
7779
  `.trim()
7791
7780
  );
7792
7781
  return <Inlined_styles_default styles={injectedStyles()} />;
@@ -7914,6 +7903,7 @@ function ContentComponent(props) {
7914
7903
  >
7915
7904
  <Show11 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show11>
7916
7905
  <Show11 when={TARGET !== "reactNative"}><Styles_default
7906
+ isNestedRender={props.isNestedRender}
7917
7907
  contentId={builderContextSignal().content?.id}
7918
7908
  cssCode={builderContextSignal().content?.data?.cssCode}
7919
7909
  customFonts={builderContextSignal().content?.data?.customFonts}
@@ -7961,7 +7951,7 @@ function ContentVariants(props) {
7961
7951
  setShouldRenderVariants(false);
7962
7952
  });
7963
7953
  return <>
7964
- <Show12 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show12>
7954
+ <Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show12>
7965
7955
  <Show12 when={shouldRenderVariants()}>
7966
7956
  <Inlined_styles_default
7967
7957
  id={`variants-styles-${props.content?.id}`}
@@ -7973,6 +7963,7 @@ function ContentVariants(props) {
7973
7963
  <For7 each={getVariants(props.content)}>{(variant, _index) => {
7974
7964
  const index = _index();
7975
7965
  return <Content_default
7966
+ isNestedRender={props.isNestedRender}
7976
7967
  key={variant.testVariationId}
7977
7968
  content={variant}
7978
7969
  showContent={false}
@@ -7996,6 +7987,7 @@ function ContentVariants(props) {
7996
7987
  }}</For7>
7997
7988
  </Show12>
7998
7989
  <Content_default
7990
+ isNestedRender={props.isNestedRender}
7999
7991
  {...{}}
8000
7992
  content={defaultContent()}
8001
7993
  showContent={true}
@@ -8075,7 +8067,7 @@ function Symbol2(props) {
8075
8067
  }
8076
8068
  createEffect3(on3(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
8077
8069
  return <div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
8078
- __isNestedRender={true}
8070
+ isNestedRender={true}
8079
8071
  apiVersion={props.builderContext.apiVersion}
8080
8072
  apiKey={props.builderContext.apiKey}
8081
8073
  context={{