@weaverse/core 1.0.1 → 1.0.2
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 +0 -2
- package/dist/index.js +16 -16
- package/dist/index.mjs +16 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -311,8 +311,6 @@ declare class Weaverse {
|
|
|
311
311
|
*/
|
|
312
312
|
constructor({ weaverseHost, projectId, data, mediaBreakPoints, isDesignMode, ssrMode, elementSchemas, platformType }?: WeaverseType);
|
|
313
313
|
init({ weaverseHost, elementSchemas, platformType, projectId, data, mediaBreakPoints, isDesignMode, ssrMode }?: WeaverseType): void;
|
|
314
|
-
initialized: boolean;
|
|
315
|
-
initializeData: (data: any) => void;
|
|
316
314
|
loadStudio(version?: string): void;
|
|
317
315
|
/**
|
|
318
316
|
* Register the custom React Component to Weaverse, store it into Weaverse.elementInstances
|
package/dist/index.js
CHANGED
|
@@ -233,22 +233,6 @@ var Weaverse = class {
|
|
|
233
233
|
// tablet: "(max-width: 1023.98px)", // to set css for tablet, {'@tablet' : { // css }},
|
|
234
234
|
mobile: "(max-width: 767.98px)"
|
|
235
235
|
};
|
|
236
|
-
this.initialized = false;
|
|
237
|
-
this.initializeData = (data) => {
|
|
238
|
-
if (!this.initialized) {
|
|
239
|
-
let { data: d, isDesignMode, id, projectId, weaverseHost } = data;
|
|
240
|
-
this.projectId = projectId || this.projectId;
|
|
241
|
-
this.weaverseHost = weaverseHost || this.weaverseHost;
|
|
242
|
-
this.data = { ...d, pageId: id };
|
|
243
|
-
this.isDesignMode = isDesignMode;
|
|
244
|
-
this.initProjectItemData();
|
|
245
|
-
if (this.isDesignMode) {
|
|
246
|
-
this.triggerUpdate();
|
|
247
|
-
this.loadStudio();
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
this.initialized = true;
|
|
251
|
-
};
|
|
252
236
|
this.initStitches = () => {
|
|
253
237
|
this.stitchesInstance = this.stitchesInstance || stitches.createStitches({
|
|
254
238
|
prefix: "weaverse",
|
|
@@ -270,6 +254,22 @@ var Weaverse = class {
|
|
|
270
254
|
this.initProjectItemData();
|
|
271
255
|
this.initStitches();
|
|
272
256
|
}
|
|
257
|
+
// initialized = false
|
|
258
|
+
// initializeData = (data: any) => {
|
|
259
|
+
// if (!this.initialized) {
|
|
260
|
+
// let { data: d, isDesignMode, id, projectId, weaverseHost } = data
|
|
261
|
+
// this.projectId = projectId || this.projectId
|
|
262
|
+
// this.weaverseHost = weaverseHost || this.weaverseHost
|
|
263
|
+
// this.data = { ...d, pageId: id }
|
|
264
|
+
// this.isDesignMode = isDesignMode
|
|
265
|
+
// this.initProjectItemData()
|
|
266
|
+
// if (this.isDesignMode) {
|
|
267
|
+
// this.triggerUpdate()
|
|
268
|
+
// this.loadStudio()
|
|
269
|
+
// }
|
|
270
|
+
// }
|
|
271
|
+
// this.initialized = true
|
|
272
|
+
// }
|
|
273
273
|
loadStudio(version) {
|
|
274
274
|
if (isIframe && this.isDesignMode && !this.studioBridge) {
|
|
275
275
|
const initStudio = () => {
|
package/dist/index.mjs
CHANGED
|
@@ -192,22 +192,6 @@ var Weaverse = class {
|
|
|
192
192
|
// tablet: "(max-width: 1023.98px)", // to set css for tablet, {'@tablet' : { // css }},
|
|
193
193
|
mobile: "(max-width: 767.98px)"
|
|
194
194
|
};
|
|
195
|
-
this.initialized = false;
|
|
196
|
-
this.initializeData = (data) => {
|
|
197
|
-
if (!this.initialized) {
|
|
198
|
-
let { data: d, isDesignMode, id, projectId, weaverseHost } = data;
|
|
199
|
-
this.projectId = projectId || this.projectId;
|
|
200
|
-
this.weaverseHost = weaverseHost || this.weaverseHost;
|
|
201
|
-
this.data = { ...d, pageId: id };
|
|
202
|
-
this.isDesignMode = isDesignMode;
|
|
203
|
-
this.initProjectItemData();
|
|
204
|
-
if (this.isDesignMode) {
|
|
205
|
-
this.triggerUpdate();
|
|
206
|
-
this.loadStudio();
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
this.initialized = true;
|
|
210
|
-
};
|
|
211
195
|
this.initStitches = () => {
|
|
212
196
|
this.stitchesInstance = this.stitchesInstance || stitches.createStitches({
|
|
213
197
|
prefix: "weaverse",
|
|
@@ -229,6 +213,22 @@ var Weaverse = class {
|
|
|
229
213
|
this.initProjectItemData();
|
|
230
214
|
this.initStitches();
|
|
231
215
|
}
|
|
216
|
+
// initialized = false
|
|
217
|
+
// initializeData = (data: any) => {
|
|
218
|
+
// if (!this.initialized) {
|
|
219
|
+
// let { data: d, isDesignMode, id, projectId, weaverseHost } = data
|
|
220
|
+
// this.projectId = projectId || this.projectId
|
|
221
|
+
// this.weaverseHost = weaverseHost || this.weaverseHost
|
|
222
|
+
// this.data = { ...d, pageId: id }
|
|
223
|
+
// this.isDesignMode = isDesignMode
|
|
224
|
+
// this.initProjectItemData()
|
|
225
|
+
// if (this.isDesignMode) {
|
|
226
|
+
// this.triggerUpdate()
|
|
227
|
+
// this.loadStudio()
|
|
228
|
+
// }
|
|
229
|
+
// }
|
|
230
|
+
// this.initialized = true
|
|
231
|
+
// }
|
|
232
232
|
loadStudio(version) {
|
|
233
233
|
if (isIframe && this.isDesignMode && !this.studioBridge) {
|
|
234
234
|
const initStudio = () => {
|
package/package.json
CHANGED