@builder.io/sdk-solid 1.0.13 → 1.0.15

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/edge/dev.jsx CHANGED
@@ -6873,7 +6873,8 @@ async function fetchOneEntry(options) {
6873
6873
  }
6874
6874
  var _fetchContent = async (options) => {
6875
6875
  const url = generateContentUrl(options);
6876
- const res = await fetch2(url.href);
6876
+ const _fetch = options.fetch ?? fetch2;
6877
+ const res = await _fetch(url.href, options.fetchOptions);
6877
6878
  const content = await res.json();
6878
6879
  return content;
6879
6880
  };
@@ -7184,7 +7185,7 @@ function isFromTrustedHost(trustedHosts, e) {
7184
7185
  }
7185
7186
 
7186
7187
  // src/constants/sdk-version.ts
7187
- var SDK_VERSION = "1.0.13";
7188
+ var SDK_VERSION = "1.0.15";
7188
7189
 
7189
7190
  // src/functions/register.ts
7190
7191
  var registry = {};
@@ -7383,10 +7384,6 @@ var subscribeToEditor = (model, callback, options) => {
7383
7384
 
7384
7385
  // src/components/content/components/enable-editor.tsx
7385
7386
  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
7387
  const [ContentWrapper, setContentWrapper] = createSignal12(
7391
7388
  props.contentWrapper || "div"
7392
7389
  );
@@ -7441,7 +7438,6 @@ function EnableEditor(props) {
7441
7438
  breakpoints
7442
7439
  }
7443
7440
  });
7444
- setForceReRenderCount(forceReRenderCount() + 1);
7445
7441
  }
7446
7442
  },
7447
7443
  animation: (animation) => {
@@ -7449,7 +7445,6 @@ function EnableEditor(props) {
7449
7445
  },
7450
7446
  contentUpdate: (newContent) => {
7451
7447
  mergeNewContent(newContent);
7452
- setForceReRenderCount(forceReRenderCount() + 1);
7453
7448
  }
7454
7449
  }
7455
7450
  })(event);
@@ -7548,7 +7543,6 @@ function EnableEditor(props) {
7548
7543
  onMount3(() => {
7549
7544
  if (isBrowser()) {
7550
7545
  if (isEditing()) {
7551
- setForceReRenderCount(forceReRenderCount() + 1);
7552
7546
  window.addEventListener("message", processMessage);
7553
7547
  registerInsertMenu();
7554
7548
  setupBrowserForEditing({
@@ -7624,68 +7618,59 @@ function EnableEditor(props) {
7624
7618
  }
7625
7619
  }
7626
7620
  createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
7627
- const onUpdateFn_1_shouldSendResetCookie__ = createMemo12(
7628
- () => shouldSendResetCookie()
7629
- );
7621
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
7630
7622
  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
7623
  evaluateJsCode();
7638
7624
  }
7639
7625
  createEffect2(
7640
7626
  on2(
7641
- () => [onUpdateFn_2_props_builderContextSignal_content__data__jsCode()],
7642
- onUpdateFn_2
7627
+ () => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()],
7628
+ onUpdateFn_1
7643
7629
  )
7644
7630
  );
7645
- const onUpdateFn_3_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
7646
- function onUpdateFn_3() {
7631
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
7632
+ function onUpdateFn_2() {
7647
7633
  runHttpRequests();
7648
7634
  }
7649
7635
  createEffect2(
7650
7636
  on2(
7651
7637
  () => [
7652
- onUpdateFn_3_props_builderContextSignal_content__data__httpRequests()
7638
+ onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()
7653
7639
  ],
7654
- onUpdateFn_3
7640
+ onUpdateFn_2
7655
7641
  )
7656
7642
  );
7657
- const onUpdateFn_4_props_builderContextSignal_rootState = createMemo12(
7643
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo12(
7658
7644
  () => props.builderContextSignal.rootState
7659
7645
  );
7660
- function onUpdateFn_4() {
7646
+ function onUpdateFn_3() {
7661
7647
  emitStateUpdate();
7662
7648
  }
7663
7649
  createEffect2(
7664
7650
  on2(
7665
- () => [onUpdateFn_4_props_builderContextSignal_rootState()],
7666
- onUpdateFn_4
7651
+ () => [onUpdateFn_3_props_builderContextSignal_rootState()],
7652
+ onUpdateFn_3
7667
7653
  )
7668
7654
  );
7669
- const onUpdateFn_5_props_data = createMemo12(() => props.data);
7670
- function onUpdateFn_5() {
7655
+ const onUpdateFn_4_props_data = createMemo12(() => props.data);
7656
+ function onUpdateFn_4() {
7671
7657
  if (props.data) {
7672
7658
  mergeNewRootState(props.data);
7673
7659
  }
7674
7660
  }
7675
- createEffect2(on2(() => [onUpdateFn_5_props_data()], onUpdateFn_5));
7676
- const onUpdateFn_6_props_locale = createMemo12(() => props.locale);
7677
- function onUpdateFn_6() {
7661
+ createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
7662
+ const onUpdateFn_5_props_locale = createMemo12(() => props.locale);
7663
+ function onUpdateFn_5() {
7678
7664
  if (props.locale) {
7679
7665
  mergeNewRootState({
7680
7666
  locale: props.locale
7681
7667
  });
7682
7668
  }
7683
7669
  }
7684
- createEffect2(on2(() => [onUpdateFn_6_props_locale()], onUpdateFn_6));
7670
+ createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
7685
7671
  return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
7686
7672
  class={`variant-${props.content?.testVariationId || props.content?.id}`}
7687
7673
  {...{}}
7688
- key={forceReRenderCount()}
7689
7674
  ref={elementRef}
7690
7675
  onClick={(event) => onClick(event)}
7691
7676
  builder-content-id={props.builderContextSignal.content?.id}
package/lib/edge/index.js CHANGED
@@ -7276,7 +7276,8 @@ async function fetchOneEntry(options) {
7276
7276
  }
7277
7277
  var _fetchContent = async (options) => {
7278
7278
  const url = generateContentUrl(options);
7279
- const res = await fetch2(url.href);
7279
+ const _fetch = options.fetch ?? fetch2;
7280
+ const res = await _fetch(url.href, options.fetchOptions);
7280
7281
  const content = await res.json();
7281
7282
  return content;
7282
7283
  };
@@ -7584,7 +7585,7 @@ function isFromTrustedHost(trustedHosts, e) {
7584
7585
  }
7585
7586
 
7586
7587
  // src/constants/sdk-version.ts
7587
- var SDK_VERSION = "1.0.13";
7588
+ var SDK_VERSION = "1.0.15";
7588
7589
 
7589
7590
  // src/functions/register.ts
7590
7591
  var registry = {};
@@ -7782,10 +7783,6 @@ var subscribeToEditor = (model, callback, options) => {
7782
7783
 
7783
7784
  // src/components/content/components/enable-editor.tsx
7784
7785
  function EnableEditor(props) {
7785
- const [forceReRenderCount, setForceReRenderCount] = createSignal(0);
7786
- createSignal(true);
7787
- createSignal(0);
7788
- const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal(false);
7789
7786
  const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
7790
7787
  const [httpReqsData, setHttpReqsData] = createSignal({});
7791
7788
  const [clicked, setClicked] = createSignal(false);
@@ -7841,7 +7838,6 @@ function EnableEditor(props) {
7841
7838
  breakpoints
7842
7839
  }
7843
7840
  });
7844
- setForceReRenderCount(forceReRenderCount() + 1);
7845
7841
  }
7846
7842
  },
7847
7843
  animation: (animation) => {
@@ -7849,7 +7845,6 @@ function EnableEditor(props) {
7849
7845
  },
7850
7846
  contentUpdate: (newContent) => {
7851
7847
  mergeNewContent(newContent);
7852
- setForceReRenderCount(forceReRenderCount() + 1);
7853
7848
  }
7854
7849
  }
7855
7850
  })(event);
@@ -7940,7 +7935,6 @@ function EnableEditor(props) {
7940
7935
  onMount(() => {
7941
7936
  if (isBrowser()) {
7942
7937
  if (isEditing()) {
7943
- setForceReRenderCount(forceReRenderCount() + 1);
7944
7938
  window.addEventListener("message", processMessage);
7945
7939
  registerInsertMenu();
7946
7940
  setupBrowserForEditing({
@@ -8007,41 +8001,37 @@ function EnableEditor(props) {
8007
8001
  }
8008
8002
  }
8009
8003
  createEffect(on(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
8010
- const onUpdateFn_1_shouldSendResetCookie__ = createMemo(() => shouldSendResetCookie());
8004
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo(() => props.builderContextSignal.content?.data?.jsCode);
8011
8005
  function onUpdateFn_1() {
8012
- }
8013
- createEffect(on(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1));
8014
- const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo(() => props.builderContextSignal.content?.data?.jsCode);
8015
- function onUpdateFn_2() {
8016
8006
  evaluateJsCode();
8017
8007
  }
8018
- createEffect(on(() => [onUpdateFn_2_props_builderContextSignal_content__data__jsCode()], onUpdateFn_2));
8019
- const onUpdateFn_3_props_builderContextSignal_content__data__httpRequests = createMemo(() => props.builderContextSignal.content?.data?.httpRequests);
8020
- function onUpdateFn_3() {
8008
+ createEffect(on(() => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()], onUpdateFn_1));
8009
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo(() => props.builderContextSignal.content?.data?.httpRequests);
8010
+ function onUpdateFn_2() {
8021
8011
  runHttpRequests();
8022
8012
  }
8023
- createEffect(on(() => [onUpdateFn_3_props_builderContextSignal_content__data__httpRequests()], onUpdateFn_3));
8024
- const onUpdateFn_4_props_builderContextSignal_rootState = createMemo(() => props.builderContextSignal.rootState);
8025
- function onUpdateFn_4() {
8013
+ createEffect(on(() => [onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()], onUpdateFn_2));
8014
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo(() => props.builderContextSignal.rootState);
8015
+ function onUpdateFn_3() {
8026
8016
  emitStateUpdate();
8027
8017
  }
8028
- createEffect(on(() => [onUpdateFn_4_props_builderContextSignal_rootState()], onUpdateFn_4));
8029
- const onUpdateFn_5_props_data = createMemo(() => props.data);
8030
- function onUpdateFn_5() {
8018
+ createEffect(on(() => [onUpdateFn_3_props_builderContextSignal_rootState()], onUpdateFn_3));
8019
+ const onUpdateFn_4_props_data = createMemo(() => props.data);
8020
+ function onUpdateFn_4() {
8031
8021
  if (props.data) {
8032
8022
  mergeNewRootState(props.data);
8033
8023
  }
8034
8024
  }
8035
- createEffect(on(() => [onUpdateFn_5_props_data()], onUpdateFn_5));
8036
- const onUpdateFn_6_props_locale = createMemo(() => props.locale);
8037
- function onUpdateFn_6() {
8025
+ createEffect(on(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
8026
+ const onUpdateFn_5_props_locale = createMemo(() => props.locale);
8027
+ function onUpdateFn_5() {
8038
8028
  if (props.locale) {
8039
8029
  mergeNewRootState({
8040
8030
  locale: props.locale
8041
8031
  });
8042
8032
  }
8043
8033
  }
8044
- createEffect(on(() => [onUpdateFn_6_props_locale()], onUpdateFn_6));
8034
+ createEffect(on(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
8045
8035
  return createComponent(builder_context_default.Provider, {
8046
8036
  get value() {
8047
8037
  return props.builderContextSignal;
@@ -8057,9 +8047,6 @@ function EnableEditor(props) {
8057
8047
  return `variant-${props.content?.testVariationId || props.content?.id}`;
8058
8048
  }
8059
8049
  }, {}, {
8060
- get key() {
8061
- return forceReRenderCount();
8062
- },
8063
8050
  ref(r$) {
8064
8051
  const _ref$ = elementRef;
8065
8052
  typeof _ref$ === "function" ? _ref$(r$) : elementRef = r$;
@@ -6861,7 +6861,8 @@ async function fetchOneEntry(options) {
6861
6861
  }
6862
6862
  var _fetchContent = async (options) => {
6863
6863
  const url = generateContentUrl(options);
6864
- const res = await fetch2(url.href);
6864
+ const _fetch = options.fetch ?? fetch2;
6865
+ const res = await _fetch(url.href, options.fetchOptions);
6865
6866
  const content = await res.json();
6866
6867
  return content;
6867
6868
  };
@@ -7169,7 +7170,7 @@ function isFromTrustedHost(trustedHosts, e) {
7169
7170
  }
7170
7171
 
7171
7172
  // src/constants/sdk-version.ts
7172
- var SDK_VERSION = "1.0.13";
7173
+ var SDK_VERSION = "1.0.15";
7173
7174
 
7174
7175
  // src/functions/register.ts
7175
7176
  var registry = {};
@@ -7367,10 +7368,6 @@ var subscribeToEditor = (model, callback, options) => {
7367
7368
 
7368
7369
  // src/components/content/components/enable-editor.tsx
7369
7370
  function EnableEditor(props) {
7370
- const [forceReRenderCount, setForceReRenderCount] = createSignal12(0);
7371
- const [firstRender, setFirstRender] = createSignal12(true);
7372
- const [lastUpdated, setLastUpdated] = createSignal12(0);
7373
- const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal12(false);
7374
7371
  const [ContentWrapper, setContentWrapper] = createSignal12(
7375
7372
  props.contentWrapper || "div"
7376
7373
  );
@@ -7425,7 +7422,6 @@ function EnableEditor(props) {
7425
7422
  breakpoints
7426
7423
  }
7427
7424
  });
7428
- setForceReRenderCount(forceReRenderCount() + 1);
7429
7425
  }
7430
7426
  },
7431
7427
  animation: (animation) => {
@@ -7433,7 +7429,6 @@ function EnableEditor(props) {
7433
7429
  },
7434
7430
  contentUpdate: (newContent) => {
7435
7431
  mergeNewContent(newContent);
7436
- setForceReRenderCount(forceReRenderCount() + 1);
7437
7432
  }
7438
7433
  }
7439
7434
  })(event);
@@ -7531,7 +7526,6 @@ function EnableEditor(props) {
7531
7526
  onMount3(() => {
7532
7527
  if (isBrowser()) {
7533
7528
  if (isEditing()) {
7534
- setForceReRenderCount(forceReRenderCount() + 1);
7535
7529
  window.addEventListener("message", processMessage);
7536
7530
  registerInsertMenu();
7537
7531
  setupBrowserForEditing({
@@ -7607,68 +7601,59 @@ function EnableEditor(props) {
7607
7601
  }
7608
7602
  }
7609
7603
  createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
7610
- const onUpdateFn_1_shouldSendResetCookie__ = createMemo12(
7611
- () => shouldSendResetCookie()
7612
- );
7604
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
7613
7605
  function onUpdateFn_1() {
7614
- }
7615
- createEffect2(
7616
- on2(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1)
7617
- );
7618
- const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
7619
- function onUpdateFn_2() {
7620
7606
  evaluateJsCode();
7621
7607
  }
7622
7608
  createEffect2(
7623
7609
  on2(
7624
- () => [onUpdateFn_2_props_builderContextSignal_content__data__jsCode()],
7625
- onUpdateFn_2
7610
+ () => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()],
7611
+ onUpdateFn_1
7626
7612
  )
7627
7613
  );
7628
- const onUpdateFn_3_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
7629
- function onUpdateFn_3() {
7614
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
7615
+ function onUpdateFn_2() {
7630
7616
  runHttpRequests();
7631
7617
  }
7632
7618
  createEffect2(
7633
7619
  on2(
7634
7620
  () => [
7635
- onUpdateFn_3_props_builderContextSignal_content__data__httpRequests()
7621
+ onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()
7636
7622
  ],
7637
- onUpdateFn_3
7623
+ onUpdateFn_2
7638
7624
  )
7639
7625
  );
7640
- const onUpdateFn_4_props_builderContextSignal_rootState = createMemo12(
7626
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo12(
7641
7627
  () => props.builderContextSignal.rootState
7642
7628
  );
7643
- function onUpdateFn_4() {
7629
+ function onUpdateFn_3() {
7644
7630
  emitStateUpdate();
7645
7631
  }
7646
7632
  createEffect2(
7647
7633
  on2(
7648
- () => [onUpdateFn_4_props_builderContextSignal_rootState()],
7649
- onUpdateFn_4
7634
+ () => [onUpdateFn_3_props_builderContextSignal_rootState()],
7635
+ onUpdateFn_3
7650
7636
  )
7651
7637
  );
7652
- const onUpdateFn_5_props_data = createMemo12(() => props.data);
7653
- function onUpdateFn_5() {
7638
+ const onUpdateFn_4_props_data = createMemo12(() => props.data);
7639
+ function onUpdateFn_4() {
7654
7640
  if (props.data) {
7655
7641
  mergeNewRootState(props.data);
7656
7642
  }
7657
7643
  }
7658
- createEffect2(on2(() => [onUpdateFn_5_props_data()], onUpdateFn_5));
7659
- const onUpdateFn_6_props_locale = createMemo12(() => props.locale);
7660
- function onUpdateFn_6() {
7644
+ createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
7645
+ const onUpdateFn_5_props_locale = createMemo12(() => props.locale);
7646
+ function onUpdateFn_5() {
7661
7647
  if (props.locale) {
7662
7648
  mergeNewRootState({
7663
7649
  locale: props.locale
7664
7650
  });
7665
7651
  }
7666
7652
  }
7667
- createEffect2(on2(() => [onUpdateFn_6_props_locale()], onUpdateFn_6));
7653
+ createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
7668
7654
  return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
7669
7655
  class={`variant-${props.content?.testVariationId || props.content?.id}`}
7670
7656
  {...{}}
7671
- key={forceReRenderCount()}
7672
7657
  ref={elementRef}
7673
7658
  onClick={(event) => onClick(event)}
7674
7659
  builder-content-id={props.builderContextSignal.content?.id}
package/lib/node/dev.js CHANGED
@@ -4260,7 +4260,8 @@ async function fetchOneEntry(options) {
4260
4260
  }
4261
4261
  var _fetchContent = async (options) => {
4262
4262
  const url = generateContentUrl(options);
4263
- const res = await fetch2(url.href);
4263
+ const _fetch = options.fetch ?? fetch2;
4264
+ const res = await _fetch(url.href, options.fetchOptions);
4264
4265
  const content = await res.json();
4265
4266
  return content;
4266
4267
  };
@@ -4571,7 +4572,7 @@ function isFromTrustedHost(trustedHosts, e) {
4571
4572
  }
4572
4573
 
4573
4574
  // src/constants/sdk-version.ts
4574
- var SDK_VERSION = "1.0.13";
4575
+ var SDK_VERSION = "1.0.15";
4575
4576
 
4576
4577
  // src/functions/register.ts
4577
4578
  var registry = {};
@@ -4770,10 +4771,6 @@ var subscribeToEditor = (model, callback, options) => {
4770
4771
 
4771
4772
  // src/components/content/components/enable-editor.tsx
4772
4773
  function EnableEditor(props) {
4773
- const [forceReRenderCount, setForceReRenderCount] = createSignal(0);
4774
- createSignal(true);
4775
- createSignal(0);
4776
- const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal(false);
4777
4774
  const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
4778
4775
  const [httpReqsData, setHttpReqsData] = createSignal({});
4779
4776
  const [clicked, setClicked] = createSignal(false);
@@ -4829,7 +4826,6 @@ function EnableEditor(props) {
4829
4826
  breakpoints
4830
4827
  }
4831
4828
  });
4832
- setForceReRenderCount(forceReRenderCount() + 1);
4833
4829
  }
4834
4830
  },
4835
4831
  animation: (animation) => {
@@ -4837,7 +4833,6 @@ function EnableEditor(props) {
4837
4833
  },
4838
4834
  contentUpdate: (newContent) => {
4839
4835
  mergeNewContent(newContent);
4840
- setForceReRenderCount(forceReRenderCount() + 1);
4841
4836
  }
4842
4837
  }
4843
4838
  })(event);
@@ -4929,7 +4924,6 @@ function EnableEditor(props) {
4929
4924
  onMount(() => {
4930
4925
  if (isBrowser()) {
4931
4926
  if (isEditing()) {
4932
- setForceReRenderCount(forceReRenderCount() + 1);
4933
4927
  window.addEventListener("message", processMessage);
4934
4928
  registerInsertMenu();
4935
4929
  setupBrowserForEditing({
@@ -4996,41 +4990,37 @@ function EnableEditor(props) {
4996
4990
  }
4997
4991
  }
4998
4992
  createEffect(on(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
4999
- const onUpdateFn_1_shouldSendResetCookie__ = createMemo(() => shouldSendResetCookie());
4993
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo(() => props.builderContextSignal.content?.data?.jsCode);
5000
4994
  function onUpdateFn_1() {
5001
- }
5002
- createEffect(on(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1));
5003
- const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo(() => props.builderContextSignal.content?.data?.jsCode);
5004
- function onUpdateFn_2() {
5005
4995
  evaluateJsCode();
5006
4996
  }
5007
- createEffect(on(() => [onUpdateFn_2_props_builderContextSignal_content__data__jsCode()], onUpdateFn_2));
5008
- const onUpdateFn_3_props_builderContextSignal_content__data__httpRequests = createMemo(() => props.builderContextSignal.content?.data?.httpRequests);
5009
- function onUpdateFn_3() {
4997
+ createEffect(on(() => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()], onUpdateFn_1));
4998
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo(() => props.builderContextSignal.content?.data?.httpRequests);
4999
+ function onUpdateFn_2() {
5010
5000
  runHttpRequests();
5011
5001
  }
5012
- createEffect(on(() => [onUpdateFn_3_props_builderContextSignal_content__data__httpRequests()], onUpdateFn_3));
5013
- const onUpdateFn_4_props_builderContextSignal_rootState = createMemo(() => props.builderContextSignal.rootState);
5014
- function onUpdateFn_4() {
5002
+ createEffect(on(() => [onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()], onUpdateFn_2));
5003
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo(() => props.builderContextSignal.rootState);
5004
+ function onUpdateFn_3() {
5015
5005
  emitStateUpdate();
5016
5006
  }
5017
- createEffect(on(() => [onUpdateFn_4_props_builderContextSignal_rootState()], onUpdateFn_4));
5018
- const onUpdateFn_5_props_data = createMemo(() => props.data);
5019
- function onUpdateFn_5() {
5007
+ createEffect(on(() => [onUpdateFn_3_props_builderContextSignal_rootState()], onUpdateFn_3));
5008
+ const onUpdateFn_4_props_data = createMemo(() => props.data);
5009
+ function onUpdateFn_4() {
5020
5010
  if (props.data) {
5021
5011
  mergeNewRootState(props.data);
5022
5012
  }
5023
5013
  }
5024
- createEffect(on(() => [onUpdateFn_5_props_data()], onUpdateFn_5));
5025
- const onUpdateFn_6_props_locale = createMemo(() => props.locale);
5026
- function onUpdateFn_6() {
5014
+ createEffect(on(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
5015
+ const onUpdateFn_5_props_locale = createMemo(() => props.locale);
5016
+ function onUpdateFn_5() {
5027
5017
  if (props.locale) {
5028
5018
  mergeNewRootState({
5029
5019
  locale: props.locale
5030
5020
  });
5031
5021
  }
5032
5022
  }
5033
- createEffect(on(() => [onUpdateFn_6_props_locale()], onUpdateFn_6));
5023
+ createEffect(on(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
5034
5024
  return createComponent(builder_context_default.Provider, {
5035
5025
  get value() {
5036
5026
  return props.builderContextSignal;
@@ -5046,9 +5036,6 @@ function EnableEditor(props) {
5046
5036
  return `variant-${props.content?.testVariationId || props.content?.id}`;
5047
5037
  }
5048
5038
  }, {}, {
5049
- get key() {
5050
- return forceReRenderCount();
5051
- },
5052
5039
  ref(r$) {
5053
5040
  const _ref$ = elementRef;
5054
5041
  typeof _ref$ === "function" ? _ref$(r$) : elementRef = r$;
package/lib/node/dev.jsx CHANGED
@@ -3845,7 +3845,8 @@ async function fetchOneEntry(options) {
3845
3845
  }
3846
3846
  var _fetchContent = async (options) => {
3847
3847
  const url = generateContentUrl(options);
3848
- const res = await fetch2(url.href);
3848
+ const _fetch = options.fetch ?? fetch2;
3849
+ const res = await _fetch(url.href, options.fetchOptions);
3849
3850
  const content = await res.json();
3850
3851
  return content;
3851
3852
  };
@@ -4156,7 +4157,7 @@ function isFromTrustedHost(trustedHosts, e) {
4156
4157
  }
4157
4158
 
4158
4159
  // src/constants/sdk-version.ts
4159
- var SDK_VERSION = "1.0.13";
4160
+ var SDK_VERSION = "1.0.15";
4160
4161
 
4161
4162
  // src/functions/register.ts
4162
4163
  var registry = {};
@@ -4355,10 +4356,6 @@ var subscribeToEditor = (model, callback, options) => {
4355
4356
 
4356
4357
  // src/components/content/components/enable-editor.tsx
4357
4358
  function EnableEditor(props) {
4358
- const [forceReRenderCount, setForceReRenderCount] = createSignal12(0);
4359
- const [firstRender, setFirstRender] = createSignal12(true);
4360
- const [lastUpdated, setLastUpdated] = createSignal12(0);
4361
- const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal12(false);
4362
4359
  const [ContentWrapper, setContentWrapper] = createSignal12(
4363
4360
  props.contentWrapper || "div"
4364
4361
  );
@@ -4413,7 +4410,6 @@ function EnableEditor(props) {
4413
4410
  breakpoints
4414
4411
  }
4415
4412
  });
4416
- setForceReRenderCount(forceReRenderCount() + 1);
4417
4413
  }
4418
4414
  },
4419
4415
  animation: (animation) => {
@@ -4421,7 +4417,6 @@ function EnableEditor(props) {
4421
4417
  },
4422
4418
  contentUpdate: (newContent) => {
4423
4419
  mergeNewContent(newContent);
4424
- setForceReRenderCount(forceReRenderCount() + 1);
4425
4420
  }
4426
4421
  }
4427
4422
  })(event);
@@ -4520,7 +4515,6 @@ function EnableEditor(props) {
4520
4515
  onMount3(() => {
4521
4516
  if (isBrowser()) {
4522
4517
  if (isEditing()) {
4523
- setForceReRenderCount(forceReRenderCount() + 1);
4524
4518
  window.addEventListener("message", processMessage);
4525
4519
  registerInsertMenu();
4526
4520
  setupBrowserForEditing({
@@ -4596,68 +4590,59 @@ function EnableEditor(props) {
4596
4590
  }
4597
4591
  }
4598
4592
  createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
4599
- const onUpdateFn_1_shouldSendResetCookie__ = createMemo12(
4600
- () => shouldSendResetCookie()
4601
- );
4593
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
4602
4594
  function onUpdateFn_1() {
4603
- }
4604
- createEffect2(
4605
- on2(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1)
4606
- );
4607
- const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
4608
- function onUpdateFn_2() {
4609
4595
  evaluateJsCode();
4610
4596
  }
4611
4597
  createEffect2(
4612
4598
  on2(
4613
- () => [onUpdateFn_2_props_builderContextSignal_content__data__jsCode()],
4614
- onUpdateFn_2
4599
+ () => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()],
4600
+ onUpdateFn_1
4615
4601
  )
4616
4602
  );
4617
- const onUpdateFn_3_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
4618
- function onUpdateFn_3() {
4603
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
4604
+ function onUpdateFn_2() {
4619
4605
  runHttpRequests();
4620
4606
  }
4621
4607
  createEffect2(
4622
4608
  on2(
4623
4609
  () => [
4624
- onUpdateFn_3_props_builderContextSignal_content__data__httpRequests()
4610
+ onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()
4625
4611
  ],
4626
- onUpdateFn_3
4612
+ onUpdateFn_2
4627
4613
  )
4628
4614
  );
4629
- const onUpdateFn_4_props_builderContextSignal_rootState = createMemo12(
4615
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo12(
4630
4616
  () => props.builderContextSignal.rootState
4631
4617
  );
4632
- function onUpdateFn_4() {
4618
+ function onUpdateFn_3() {
4633
4619
  emitStateUpdate();
4634
4620
  }
4635
4621
  createEffect2(
4636
4622
  on2(
4637
- () => [onUpdateFn_4_props_builderContextSignal_rootState()],
4638
- onUpdateFn_4
4623
+ () => [onUpdateFn_3_props_builderContextSignal_rootState()],
4624
+ onUpdateFn_3
4639
4625
  )
4640
4626
  );
4641
- const onUpdateFn_5_props_data = createMemo12(() => props.data);
4642
- function onUpdateFn_5() {
4627
+ const onUpdateFn_4_props_data = createMemo12(() => props.data);
4628
+ function onUpdateFn_4() {
4643
4629
  if (props.data) {
4644
4630
  mergeNewRootState(props.data);
4645
4631
  }
4646
4632
  }
4647
- createEffect2(on2(() => [onUpdateFn_5_props_data()], onUpdateFn_5));
4648
- const onUpdateFn_6_props_locale = createMemo12(() => props.locale);
4649
- function onUpdateFn_6() {
4633
+ createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
4634
+ const onUpdateFn_5_props_locale = createMemo12(() => props.locale);
4635
+ function onUpdateFn_5() {
4650
4636
  if (props.locale) {
4651
4637
  mergeNewRootState({
4652
4638
  locale: props.locale
4653
4639
  });
4654
4640
  }
4655
4641
  }
4656
- createEffect2(on2(() => [onUpdateFn_6_props_locale()], onUpdateFn_6));
4642
+ createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
4657
4643
  return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
4658
4644
  class={`variant-${props.content?.testVariationId || props.content?.id}`}
4659
4645
  {...{}}
4660
- key={forceReRenderCount()}
4661
4646
  ref={elementRef}
4662
4647
  onClick={(event) => onClick(event)}
4663
4648
  builder-content-id={props.builderContextSignal.content?.id}