@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 +1 -0
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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