@weaverse/hydrogen 1.0.39 → 1.0.41

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/dist/index.js CHANGED
@@ -591,7 +591,7 @@ var WeaverseItemStore = class {
591
591
  let defaultCss = this.Element?.defaultCss || {};
592
592
  let currentCss = this._data.css || {};
593
593
  let css = merge(defaultCss, currentCss);
594
- let defaultData = { ...this.Element?.Component?.defaultProps };
594
+ let defaultData = { ...this.Element?.Component?.defaultProps, ...this.Element?.extraData || {} };
595
595
  return { ...defaultData, ...this._data, css };
596
596
  }
597
597
  };
@@ -635,6 +635,7 @@ var Weaverse = class {
635
635
  this.platformType = "shopify-section";
636
636
  this.isPreviewMode = false;
637
637
  this.ssrMode = false;
638
+ this.elementSchemas = [];
638
639
  this.mediaBreakPoints = {
639
640
  desktop: "all",
640
641
  // max-width need to subtract 0.02px to prevent bug https://getbootstrap.com/docs/5.1/layout/breakpoints/#max-width
@@ -837,9 +838,6 @@ async function weaverseLoader(args, components) {
837
838
  url: `${weaverseHost}/api/public/project`,
838
839
  options: {
839
840
  method: "POST",
840
- headers: {
841
- "Content-Type": "application/json"
842
- },
843
841
  body: JSON.stringify({
844
842
  projectId,
845
843
  url: request.url
@@ -868,9 +866,7 @@ async function weaverseLoader(args, components) {
868
866
  })
869
867
  };
870
868
  } catch (err) {
871
- console.log(
872
- `\u274C Loader run failed! Item: ${item}: ${err}`
873
- );
869
+ console.log(`\u274C Loader run failed! Item: ${item}: ${err}`);
874
870
  return item;
875
871
  }
876
872
  }
package/dist/index.mjs CHANGED
@@ -555,7 +555,7 @@ var WeaverseItemStore = class {
555
555
  let defaultCss = this.Element?.defaultCss || {};
556
556
  let currentCss = this._data.css || {};
557
557
  let css = merge(defaultCss, currentCss);
558
- let defaultData = { ...this.Element?.Component?.defaultProps };
558
+ let defaultData = { ...this.Element?.Component?.defaultProps, ...this.Element?.extraData || {} };
559
559
  return { ...defaultData, ...this._data, css };
560
560
  }
561
561
  };
@@ -599,6 +599,7 @@ var Weaverse = class {
599
599
  this.platformType = "shopify-section";
600
600
  this.isPreviewMode = false;
601
601
  this.ssrMode = false;
602
+ this.elementSchemas = [];
602
603
  this.mediaBreakPoints = {
603
604
  desktop: "all",
604
605
  // max-width need to subtract 0.02px to prevent bug https://getbootstrap.com/docs/5.1/layout/breakpoints/#max-width
@@ -801,9 +802,6 @@ async function weaverseLoader(args, components) {
801
802
  url: `${weaverseHost}/api/public/project`,
802
803
  options: {
803
804
  method: "POST",
804
- headers: {
805
- "Content-Type": "application/json"
806
- },
807
805
  body: JSON.stringify({
808
806
  projectId,
809
807
  url: request.url
@@ -832,9 +830,7 @@ async function weaverseLoader(args, components) {
832
830
  })
833
831
  };
834
832
  } catch (err) {
835
- console.log(
836
- `\u274C Loader run failed! Item: ${item}: ${err}`
837
- );
833
+ console.log(`\u274C Loader run failed! Item: ${item}: ${err}`);
838
834
  return item;
839
835
  }
840
836
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.39",
2
+ "version": "1.0.41",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "author": "Weaverse Team",
34
34
  "dependencies": {
35
35
  "@shopify/hydrogen": "2023.4.0",
36
- "@weaverse/react": "1.0.39"
36
+ "@weaverse/react": "1.0.41"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@shopify/remix-oxygen": "^1.0.5"