@weaverse/core 0.7.0 → 0.7.3

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.d.ts CHANGED
@@ -56,6 +56,7 @@ interface InitializeData {
56
56
  data: ProjectDataType;
57
57
  published: boolean;
58
58
  projectKey?: string;
59
+ studioUrl?: string;
59
60
  }
60
61
  interface WeaverseType {
61
62
  mediaBreakPoints?: any;
package/dist/index.js CHANGED
@@ -135,7 +135,7 @@ var Weaverse = class {
135
135
  constructor({ appUrl, projectKey, projectData, mediaBreakPoints, isDesignMode, ssrMode } = {}) {
136
136
  this.elementInstances = /* @__PURE__ */ new Map();
137
137
  this.itemInstances = /* @__PURE__ */ new Map();
138
- this.appUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://weaverse.io";
138
+ this.appUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://ss.weaverse.io";
139
139
  this.projectKey = "";
140
140
  this.projectData = {
141
141
  rootId: "",
@@ -152,8 +152,9 @@ var Weaverse = class {
152
152
  this.initialized = false;
153
153
  this.initializeData = (data) => {
154
154
  if (!this.initialized) {
155
- let { data: pageData, published, id, projectKey } = data;
155
+ let { data: pageData, published, id, projectKey, studioUrl } = data;
156
156
  this.projectKey = projectKey || this.projectKey;
157
+ this.appUrl = studioUrl || this.appUrl;
157
158
  this.projectData = { ...pageData, pageId: id };
158
159
  this.isDesignMode = !published;
159
160
  this.initProjectItemData();
package/dist/index.mjs CHANGED
@@ -99,7 +99,7 @@ var Weaverse = class {
99
99
  constructor({ appUrl, projectKey, projectData, mediaBreakPoints, isDesignMode, ssrMode } = {}) {
100
100
  this.elementInstances = /* @__PURE__ */ new Map();
101
101
  this.itemInstances = /* @__PURE__ */ new Map();
102
- this.appUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://weaverse.io";
102
+ this.appUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://ss.weaverse.io";
103
103
  this.projectKey = "";
104
104
  this.projectData = {
105
105
  rootId: "",
@@ -116,8 +116,9 @@ var Weaverse = class {
116
116
  this.initialized = false;
117
117
  this.initializeData = (data) => {
118
118
  if (!this.initialized) {
119
- let { data: pageData, published, id, projectKey } = data;
119
+ let { data: pageData, published, id, projectKey, studioUrl } = data;
120
120
  this.projectKey = projectKey || this.projectKey;
121
+ this.appUrl = studioUrl || this.appUrl;
121
122
  this.projectData = { ...pageData, pageId: id };
122
123
  this.isDesignMode = !published;
123
124
  this.initProjectItemData();
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.0",
2
+ "version": "0.7.3",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",