@builder.io/sdk-solid 2.0.28 → 2.0.30

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/dev.jsx CHANGED
@@ -1534,6 +1534,13 @@ function BlocksWrapper(props) {
1534
1534
  props.classNameProp
1535
1535
  ].filter(Boolean).join(" ");
1536
1536
  });
1537
+ const dataPath = createMemo6(() => {
1538
+ if (!props.path) {
1539
+ return void 0;
1540
+ }
1541
+ const pathPrefix = "component.options.";
1542
+ return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
1543
+ });
1537
1544
  function onClick() {
1538
1545
  if (isEditing() && !props.blocks?.length) {
1539
1546
  window.parent?.postMessage(
@@ -1541,7 +1548,7 @@ function BlocksWrapper(props) {
1541
1548
  type: "builder.clickEmptyBlocks",
1542
1549
  data: {
1543
1550
  parentElementId: props.parent,
1544
- dataPath: props.path
1551
+ dataPath: dataPath()
1545
1552
  }
1546
1553
  },
1547
1554
  "*"
@@ -1555,7 +1562,7 @@ function BlocksWrapper(props) {
1555
1562
  type: "builder.hoverEmptyBlocks",
1556
1563
  data: {
1557
1564
  parentElementId: props.parent,
1558
- dataPath: props.path
1565
+ dataPath: dataPath()
1559
1566
  }
1560
1567
  },
1561
1568
  "*"
@@ -1567,9 +1574,9 @@ function BlocksWrapper(props) {
1567
1574
  });
1568
1575
  return <>
1569
1576
  <Dynamic4
1570
- class={className() + " dynamic-6567ee94"}
1577
+ class={className() + " dynamic-5b6a86b6"}
1571
1578
  ref={blocksWrapperRef}
1572
- builder-path={props.path}
1579
+ builder-path={dataPath()}
1573
1580
  builder-parent-id={props.parent}
1574
1581
  {...{}}
1575
1582
  style={props.styleProp}
@@ -1579,7 +1586,7 @@ function BlocksWrapper(props) {
1579
1586
  {...props.BlocksWrapperProps}
1580
1587
  component={props.BlocksWrapper}
1581
1588
  >{props.children}</Dynamic4>
1582
- <style>{`.dynamic-6567ee94 {
1589
+ <style>{`.dynamic-5b6a86b6 {
1583
1590
  display: flex;
1584
1591
  flex-direction: column;
1585
1592
  align-items: stretch;
@@ -1744,7 +1751,7 @@ function Columns(props) {
1744
1751
  }
1745
1752
  return <>
1746
1753
  <div
1747
- class={getColumnsClass(props.builderBlock?.id) + " div-a1dad3b8"}
1754
+ class={getColumnsClass(props.builderBlock?.id) + " div-2ac94efa"}
1748
1755
  style={columnsCssVars()}
1749
1756
  {...{}}
1750
1757
  >
@@ -1761,7 +1768,7 @@ function Columns(props) {
1761
1768
  actionAttributes={{}}
1762
1769
  attributes={getAttributes(column, index)}
1763
1770
  ><Blocks_default
1764
- path={`component.options.columns.${index}.blocks`}
1771
+ path={`columns.${index}.blocks`}
1765
1772
  parent={props.builderBlock.id}
1766
1773
  styleProp={{
1767
1774
  flexGrow: "1"
@@ -1773,7 +1780,7 @@ function Columns(props) {
1773
1780
  /></Dynamic_renderer_default>;
1774
1781
  }}</For4>
1775
1782
  </div>
1776
- <style>{`.div-a1dad3b8 {
1783
+ <style>{`.div-2ac94efa {
1777
1784
  display: flex;
1778
1785
  line-height: normal;
1779
1786
  }`}</style>
@@ -2404,9 +2411,11 @@ function Accordion(props) {
2404
2411
  class={getAccordionTitleClassName(index)}
2405
2412
  style={{
2406
2413
  ...accordionTitleStyles(),
2407
- width: props.grid ? props.gridRowWidth : void 0,
2408
- ...{
2409
- order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
2414
+ ...props.grid && {
2415
+ width: props.gridRowWidth,
2416
+ ...{
2417
+ order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
2418
+ }
2410
2419
  }
2411
2420
  }}
2412
2421
  data-index={index}
@@ -3145,7 +3154,7 @@ function Tabs(props) {
3145
3154
  onClick={(event) => onClick(index)}
3146
3155
  ><Blocks_default
3147
3156
  parent={props.builderBlock.id}
3148
- path={`component.options.tabs.${index}.label`}
3157
+ path={`tabs.${index}.label`}
3149
3158
  blocks={tab.label}
3150
3159
  context={props.builderContext}
3151
3160
  registeredComponents={props.builderComponents}
@@ -3154,7 +3163,7 @@ function Tabs(props) {
3154
3163
  }}</For6></div>
3155
3164
  <Show10 when={activeTabContent(activeTab())}><div><Blocks_default
3156
3165
  parent={props.builderBlock.id}
3157
- path={`component.options.tabs.${activeTab()}.content`}
3166
+ path={`tabs.${activeTab()}.content`}
3158
3167
  blocks={activeTabContent(activeTab())}
3159
3168
  context={props.builderContext}
3160
3169
  registeredComponents={props.builderComponents}
@@ -3611,6 +3620,15 @@ var getEnv = () => {
3611
3620
  return validEnvList.includes(env) ? env : "production";
3612
3621
  };
3613
3622
 
3623
+ // src/functions/log-fetch.ts
3624
+ function logFetch(url) {
3625
+ if (typeof process !== "undefined" && process.env?.DEBUG) {
3626
+ if (String(process.env.DEBUG) == "true") {
3627
+ logger.log(url);
3628
+ }
3629
+ }
3630
+ }
3631
+
3614
3632
  // src/blocks/form/form/form.tsx
3615
3633
  function FormComponent(props) {
3616
3634
  const [formState, setFormState] = createSignal14("unsubmitted");
@@ -3717,14 +3735,13 @@ function FormComponent(props) {
3717
3735
  const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(
3718
3736
  props.sendSubmissionsToEmail || ""
3719
3737
  )}&name=${encodeURIComponent(props.name || "")}`;
3720
- fetch(
3721
- props.sendSubmissionsTo === "email" ? formUrl : props.action,
3722
- {
3723
- body,
3724
- headers,
3725
- method: props.method || "post"
3726
- }
3727
- ).then(
3738
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
3739
+ logFetch(url);
3740
+ fetch(url, {
3741
+ body,
3742
+ headers,
3743
+ method: props.method || "post"
3744
+ }).then(
3728
3745
  async (res) => {
3729
3746
  let body2;
3730
3747
  const contentType = res.headers.get("content-type");
@@ -3831,14 +3848,14 @@ function FormComponent(props) {
3831
3848
  blocks={props.sendingMessage}
3832
3849
  context={props.builderContext}
3833
3850
  /></Show11>
3834
- <Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-2e825338">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
3851
+ <Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-6210236e">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
3835
3852
  <Show11 when={submissionState() === "success"}><Blocks_default
3836
3853
  path="successMessage"
3837
3854
  blocks={props.successMessage}
3838
3855
  context={props.builderContext}
3839
3856
  /></Show11>
3840
3857
  </form>
3841
- <style>{`.pre-2e825338 {
3858
+ <style>{`.pre-6210236e {
3842
3859
  padding: 10px;
3843
3860
  color: red;
3844
3861
  text-align: center;
@@ -4429,7 +4446,7 @@ function getPreviewContent(_searchParams) {
4429
4446
  }
4430
4447
 
4431
4448
  // src/constants/sdk-version.ts
4432
- var SDK_VERSION = "2.0.28";
4449
+ var SDK_VERSION = "2.0.30";
4433
4450
 
4434
4451
  // src/helpers/sdk-headers.ts
4435
4452
  var getSdkHeaders = () => ({
@@ -4858,7 +4875,9 @@ async function _track({
4858
4875
  return;
4859
4876
  }
4860
4877
  const baseUrl = apiHost || "https://cdn.builder.io";
4861
- return fetch(`${baseUrl}/api/v1/track`, {
4878
+ const url = `${baseUrl}/api/v1/track`;
4879
+ logFetch(url);
4880
+ return fetch(url, {
4862
4881
  method: "POST",
4863
4882
  body: JSON.stringify({
4864
4883
  events: [await createEvent(eventProps)]
@@ -5337,6 +5356,7 @@ function EnableEditor(props) {
5337
5356
  })
5338
5357
  )
5339
5358
  );
5359
+ logFetch(evaluatedUrl);
5340
5360
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
5341
5361
  mergeNewRootState({
5342
5362
  [key]: json
package/lib/node/index.js CHANGED
@@ -1684,7 +1684,7 @@ function Block(props) {
1684
1684
  });
1685
1685
  }
1686
1686
  var block_default = Block;
1687
- var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-6567ee94 {
1687
+ var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-5b6a86b6 {
1688
1688
  display: flex;
1689
1689
  flex-direction: column;
1690
1690
  align-items: stretch;
@@ -1693,13 +1693,20 @@ function BlocksWrapper(props) {
1693
1693
  const className = createMemo(() => {
1694
1694
  return ["builder-blocks", !props.blocks?.length ? "no-blocks" : "", props.classNameProp].filter(Boolean).join(" ");
1695
1695
  });
1696
+ const dataPath = createMemo(() => {
1697
+ if (!props.path) {
1698
+ return void 0;
1699
+ }
1700
+ const pathPrefix = "component.options.";
1701
+ return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
1702
+ });
1696
1703
  function onClick() {
1697
1704
  if (isEditing() && !props.blocks?.length) {
1698
1705
  window.parent?.postMessage({
1699
1706
  type: "builder.clickEmptyBlocks",
1700
1707
  data: {
1701
1708
  parentElementId: props.parent,
1702
- dataPath: props.path
1709
+ dataPath: dataPath()
1703
1710
  }
1704
1711
  }, "*");
1705
1712
  }
@@ -1710,7 +1717,7 @@ function BlocksWrapper(props) {
1710
1717
  type: "builder.hoverEmptyBlocks",
1711
1718
  data: {
1712
1719
  parentElementId: props.parent,
1713
- dataPath: props.path
1720
+ dataPath: dataPath()
1714
1721
  }
1715
1722
  }, "*");
1716
1723
  }
@@ -1720,14 +1727,14 @@ function BlocksWrapper(props) {
1720
1727
  });
1721
1728
  return [createComponent(Dynamic, mergeProps({
1722
1729
  get ["class"]() {
1723
- return className() + " dynamic-6567ee94";
1730
+ return className() + " dynamic-5b6a86b6";
1724
1731
  },
1725
1732
  ref(r$) {
1726
1733
  const _ref$ = blocksWrapperRef;
1727
1734
  typeof _ref$ === "function" ? _ref$(r$) : blocksWrapperRef = r$;
1728
1735
  },
1729
1736
  get ["builder-path"]() {
1730
- return props.path;
1737
+ return dataPath();
1731
1738
  },
1732
1739
  get ["builder-parent-id"]() {
1733
1740
  return props.parent;
@@ -1819,7 +1826,7 @@ var getColumnsClass = (id) => {
1819
1826
 
1820
1827
  // src/blocks/columns/columns.tsx
1821
1828
  var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
1822
- var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-a1dad3b8 {
1829
+ var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-2ac94efa {
1823
1830
  display: flex;
1824
1831
  line-height: normal;
1825
1832
  }`);
@@ -1948,7 +1955,7 @@ function Columns(props) {
1948
1955
  const _el$ = _tmpl$3();
1949
1956
  spread(_el$, mergeProps({
1950
1957
  get ["class"]() {
1951
- return getColumnsClass(props.builderBlock?.id) + " div-a1dad3b8";
1958
+ return getColumnsClass(props.builderBlock?.id) + " div-2ac94efa";
1952
1959
  },
1953
1960
  get style() {
1954
1961
  return columnsCssVars();
@@ -1985,7 +1992,7 @@ function Columns(props) {
1985
1992
  },
1986
1993
  get children() {
1987
1994
  return createComponent(blocks_default, {
1988
- path: `component.options.columns.${index}.blocks`,
1995
+ path: `columns.${index}.blocks`,
1989
1996
  get parent() {
1990
1997
  return props.builderBlock.id;
1991
1998
  },
@@ -2678,9 +2685,11 @@ function Accordion(props) {
2678
2685
  effect((_p$) => {
2679
2686
  const _v$ = getAccordionTitleClassName(index), _v$2 = {
2680
2687
  ...accordionTitleStyles(),
2681
- width: props.grid ? props.gridRowWidth : void 0,
2682
- ...{
2683
- order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
2688
+ ...props.grid && {
2689
+ width: props.gridRowWidth,
2690
+ ...{
2691
+ order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
2692
+ }
2684
2693
  }
2685
2694
  };
2686
2695
  _v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
@@ -3452,7 +3461,7 @@ function Tabs(props) {
3452
3461
  get parent() {
3453
3462
  return props.builderBlock.id;
3454
3463
  },
3455
- path: `component.options.tabs.${index}.label`,
3464
+ path: `tabs.${index}.label`,
3456
3465
  get blocks() {
3457
3466
  return tab.label;
3458
3467
  },
@@ -3492,7 +3501,7 @@ function Tabs(props) {
3492
3501
  return props.builderBlock.id;
3493
3502
  },
3494
3503
  get path() {
3495
- return `component.options.tabs.${activeTab()}.content`;
3504
+ return `tabs.${activeTab()}.content`;
3496
3505
  },
3497
3506
  get blocks() {
3498
3507
  return activeTabContent(activeTab());
@@ -3959,10 +3968,19 @@ var getEnv = () => {
3959
3968
  return validEnvList.includes(env) ? env : "production";
3960
3969
  };
3961
3970
 
3971
+ // src/functions/log-fetch.ts
3972
+ function logFetch(url) {
3973
+ if (typeof process !== "undefined" && process.env?.DEBUG) {
3974
+ if (String(process.env.DEBUG) == "true") {
3975
+ logger.log(url);
3976
+ }
3977
+ }
3978
+ }
3979
+
3962
3980
  // src/blocks/form/form/form.tsx
3963
- var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-2e825338">`);
3981
+ var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-6210236e">`);
3964
3982
  var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
3965
- var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-2e825338 {
3983
+ var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-6210236e {
3966
3984
  padding: 10px;
3967
3985
  color: red;
3968
3986
  text-align: center;
@@ -4075,7 +4093,9 @@ function FormComponent(props) {
4075
4093
  }
4076
4094
  setFormState("sending");
4077
4095
  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 || "")}`;
4078
- fetch(props.sendSubmissionsTo === "email" ? formUrl : props.action, {
4096
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
4097
+ logFetch(url);
4098
+ fetch(url, {
4079
4099
  body,
4080
4100
  headers,
4081
4101
  method: props.method || "post"
@@ -4933,7 +4953,7 @@ function getPreviewContent(_searchParams) {
4933
4953
  }
4934
4954
 
4935
4955
  // src/constants/sdk-version.ts
4936
- var SDK_VERSION = "2.0.28";
4956
+ var SDK_VERSION = "2.0.30";
4937
4957
 
4938
4958
  // src/helpers/sdk-headers.ts
4939
4959
  var getSdkHeaders = () => ({
@@ -5358,7 +5378,9 @@ async function _track({
5358
5378
  return;
5359
5379
  }
5360
5380
  const baseUrl = apiHost || "https://cdn.builder.io";
5361
- return fetch(`${baseUrl}/api/v1/track`, {
5381
+ const url = `${baseUrl}/api/v1/track`;
5382
+ logFetch(url);
5383
+ return fetch(url, {
5362
5384
  method: "POST",
5363
5385
  body: JSON.stringify({
5364
5386
  events: [await createEvent(eventProps)]
@@ -5831,6 +5853,7 @@ function EnableEditor(props) {
5831
5853
  rootState: props.builderContextSignal.rootState,
5832
5854
  rootSetState: props.builderContextSignal.rootSetState
5833
5855
  })));
5856
+ logFetch(evaluatedUrl);
5834
5857
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
5835
5858
  mergeNewRootState({
5836
5859
  [key]: json
@@ -1528,6 +1528,13 @@ function BlocksWrapper(props) {
1528
1528
  props.classNameProp
1529
1529
  ].filter(Boolean).join(" ");
1530
1530
  });
1531
+ const dataPath = createMemo6(() => {
1532
+ if (!props.path) {
1533
+ return void 0;
1534
+ }
1535
+ const pathPrefix = "component.options.";
1536
+ return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
1537
+ });
1531
1538
  function onClick() {
1532
1539
  if (isEditing() && !props.blocks?.length) {
1533
1540
  window.parent?.postMessage(
@@ -1535,7 +1542,7 @@ function BlocksWrapper(props) {
1535
1542
  type: "builder.clickEmptyBlocks",
1536
1543
  data: {
1537
1544
  parentElementId: props.parent,
1538
- dataPath: props.path
1545
+ dataPath: dataPath()
1539
1546
  }
1540
1547
  },
1541
1548
  "*"
@@ -1549,7 +1556,7 @@ function BlocksWrapper(props) {
1549
1556
  type: "builder.hoverEmptyBlocks",
1550
1557
  data: {
1551
1558
  parentElementId: props.parent,
1552
- dataPath: props.path
1559
+ dataPath: dataPath()
1553
1560
  }
1554
1561
  },
1555
1562
  "*"
@@ -1561,9 +1568,9 @@ function BlocksWrapper(props) {
1561
1568
  });
1562
1569
  return <>
1563
1570
  <Dynamic4
1564
- class={className() + " dynamic-6567ee94"}
1571
+ class={className() + " dynamic-5b6a86b6"}
1565
1572
  ref={blocksWrapperRef}
1566
- builder-path={props.path}
1573
+ builder-path={dataPath()}
1567
1574
  builder-parent-id={props.parent}
1568
1575
  {...{}}
1569
1576
  style={props.styleProp}
@@ -1573,7 +1580,7 @@ function BlocksWrapper(props) {
1573
1580
  {...props.BlocksWrapperProps}
1574
1581
  component={props.BlocksWrapper}
1575
1582
  >{props.children}</Dynamic4>
1576
- <style>{`.dynamic-6567ee94 {
1583
+ <style>{`.dynamic-5b6a86b6 {
1577
1584
  display: flex;
1578
1585
  flex-direction: column;
1579
1586
  align-items: stretch;
@@ -1738,7 +1745,7 @@ function Columns(props) {
1738
1745
  }
1739
1746
  return <>
1740
1747
  <div
1741
- class={getColumnsClass(props.builderBlock?.id) + " div-a1dad3b8"}
1748
+ class={getColumnsClass(props.builderBlock?.id) + " div-2ac94efa"}
1742
1749
  style={columnsCssVars()}
1743
1750
  {...{}}
1744
1751
  >
@@ -1755,7 +1762,7 @@ function Columns(props) {
1755
1762
  actionAttributes={{}}
1756
1763
  attributes={getAttributes(column, index)}
1757
1764
  ><Blocks_default
1758
- path={`component.options.columns.${index}.blocks`}
1765
+ path={`columns.${index}.blocks`}
1759
1766
  parent={props.builderBlock.id}
1760
1767
  styleProp={{
1761
1768
  flexGrow: "1"
@@ -1767,7 +1774,7 @@ function Columns(props) {
1767
1774
  /></Dynamic_renderer_default>;
1768
1775
  }}</For4>
1769
1776
  </div>
1770
- <style>{`.div-a1dad3b8 {
1777
+ <style>{`.div-2ac94efa {
1771
1778
  display: flex;
1772
1779
  line-height: normal;
1773
1780
  }`}</style>
@@ -2397,9 +2404,11 @@ function Accordion(props) {
2397
2404
  class={getAccordionTitleClassName(index)}
2398
2405
  style={{
2399
2406
  ...accordionTitleStyles(),
2400
- width: props.grid ? props.gridRowWidth : void 0,
2401
- ...{
2402
- order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
2407
+ ...props.grid && {
2408
+ width: props.gridRowWidth,
2409
+ ...{
2410
+ order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
2411
+ }
2403
2412
  }
2404
2413
  }}
2405
2414
  data-index={index}
@@ -3137,7 +3146,7 @@ function Tabs(props) {
3137
3146
  onClick={(event) => onClick(index)}
3138
3147
  ><Blocks_default
3139
3148
  parent={props.builderBlock.id}
3140
- path={`component.options.tabs.${index}.label`}
3149
+ path={`tabs.${index}.label`}
3141
3150
  blocks={tab.label}
3142
3151
  context={props.builderContext}
3143
3152
  registeredComponents={props.builderComponents}
@@ -3146,7 +3155,7 @@ function Tabs(props) {
3146
3155
  }}</For6></div>
3147
3156
  <Show10 when={activeTabContent(activeTab())}><div><Blocks_default
3148
3157
  parent={props.builderBlock.id}
3149
- path={`component.options.tabs.${activeTab()}.content`}
3158
+ path={`tabs.${activeTab()}.content`}
3150
3159
  blocks={activeTabContent(activeTab())}
3151
3160
  context={props.builderContext}
3152
3161
  registeredComponents={props.builderComponents}
@@ -3601,6 +3610,15 @@ var getEnv = () => {
3601
3610
  return validEnvList.includes(env) ? env : "production";
3602
3611
  };
3603
3612
 
3613
+ // src/functions/log-fetch.ts
3614
+ function logFetch(url) {
3615
+ if (typeof process !== "undefined" && process.env?.DEBUG) {
3616
+ if (String(process.env.DEBUG) == "true") {
3617
+ logger.log(url);
3618
+ }
3619
+ }
3620
+ }
3621
+
3604
3622
  // src/blocks/form/form/form.tsx
3605
3623
  function FormComponent(props) {
3606
3624
  const [formState, setFormState] = createSignal14("unsubmitted");
@@ -3707,14 +3725,13 @@ function FormComponent(props) {
3707
3725
  const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(
3708
3726
  props.sendSubmissionsToEmail || ""
3709
3727
  )}&name=${encodeURIComponent(props.name || "")}`;
3710
- fetch(
3711
- props.sendSubmissionsTo === "email" ? formUrl : props.action,
3712
- {
3713
- body,
3714
- headers,
3715
- method: props.method || "post"
3716
- }
3717
- ).then(
3728
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
3729
+ logFetch(url);
3730
+ fetch(url, {
3731
+ body,
3732
+ headers,
3733
+ method: props.method || "post"
3734
+ }).then(
3718
3735
  async (res) => {
3719
3736
  let body2;
3720
3737
  const contentType = res.headers.get("content-type");
@@ -3821,14 +3838,14 @@ function FormComponent(props) {
3821
3838
  blocks={props.sendingMessage}
3822
3839
  context={props.builderContext}
3823
3840
  /></Show11>
3824
- <Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-2e825338">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
3841
+ <Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-6210236e">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
3825
3842
  <Show11 when={submissionState() === "success"}><Blocks_default
3826
3843
  path="successMessage"
3827
3844
  blocks={props.successMessage}
3828
3845
  context={props.builderContext}
3829
3846
  /></Show11>
3830
3847
  </form>
3831
- <style>{`.pre-2e825338 {
3848
+ <style>{`.pre-6210236e {
3832
3849
  padding: 10px;
3833
3850
  color: red;
3834
3851
  text-align: center;
@@ -4419,7 +4436,7 @@ function getPreviewContent(_searchParams) {
4419
4436
  }
4420
4437
 
4421
4438
  // src/constants/sdk-version.ts
4422
- var SDK_VERSION = "2.0.28";
4439
+ var SDK_VERSION = "2.0.30";
4423
4440
 
4424
4441
  // src/helpers/sdk-headers.ts
4425
4442
  var getSdkHeaders = () => ({
@@ -4844,7 +4861,9 @@ async function _track({
4844
4861
  return;
4845
4862
  }
4846
4863
  const baseUrl = apiHost || "https://cdn.builder.io";
4847
- return fetch(`${baseUrl}/api/v1/track`, {
4864
+ const url = `${baseUrl}/api/v1/track`;
4865
+ logFetch(url);
4866
+ return fetch(url, {
4848
4867
  method: "POST",
4849
4868
  body: JSON.stringify({
4850
4869
  events: [await createEvent(eventProps)]
@@ -5321,6 +5340,7 @@ function EnableEditor(props) {
5321
5340
  })
5322
5341
  )
5323
5342
  );
5343
+ logFetch(evaluatedUrl);
5324
5344
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
5325
5345
  mergeNewRootState({
5326
5346
  [key]: json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "2.0.28",
3
+ "version": "2.0.30",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist",