@weaverse/core 0.7.58 → 0.7.60

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
@@ -282,24 +282,29 @@ declare class Weaverse {
282
282
  */
283
283
  projectData: ProjectDataType;
284
284
  /**
285
- * storing subscribe callback function for any component that want to listen to the change of WeaverseRoot
285
+ * Storing subscribe callback function for any component that want to listen to the change of WeaverseRoot
286
286
  * @type {Map<string, (data: any) => void>}
287
287
  */
288
288
  listeners: Set<any>;
289
289
  /**
290
- * check whether the sdk is isDesignMode or not
291
- * if isDesignMode is true, it means the sdk is isDesignMode mode, render the editor UI
290
+ * Check whether the sdk is in editor or not.
291
+ * If isDesignMode is true, it means the sdk is isDesignMode mode, render the editor UI,
292
292
  * else render the preview UI, plain HTML + CSS + React hydrate
293
293
  * @type {boolean}
294
294
  */
295
295
  isDesignMode: boolean;
296
+ /**
297
+ * Check whether the sdk is in preview mode or not
298
+ * @type {boolean}
299
+ */
300
+ isPreviewMode: boolean;
296
301
  /**
297
302
  * Use in element to optionally render special HTML for hydration
298
303
  * @type {boolean}
299
304
  */
300
305
  ssrMode: boolean;
301
306
  /**
302
- * stitches instance for handling CSS stylesheet, media, theme for Weaverse project
307
+ * Stitches instance for handling CSS stylesheet, media, theme for Weaverse project
303
308
  */
304
309
  stitchesInstance: Stitches$1 | any;
305
310
  studioBridge?: any;
@@ -320,7 +325,7 @@ declare class Weaverse {
320
325
  initializeData: (data: InitializeData) => void;
321
326
  loadStudio(): void;
322
327
  /**
323
- * register the custom React Component to Weaverse, store it into Weaverse.elementInstances
328
+ * Register the custom React Component to Weaverse, store it into Weaverse.elementInstances
324
329
  * @param element {WeaverseElement} custom React Component
325
330
  */
326
331
  registerElement(element: WeaverseElement): void;
@@ -329,7 +334,7 @@ declare class Weaverse {
329
334
  unsubscribe(fn: any): void;
330
335
  triggerUpdate(): void;
331
336
  /**
332
- * fetch data from Weaverse API (https://weaverse.io/api/v1/project/:projectKey)
337
+ * Fetch data from Weaverse API (https://weaverse.io/api/v1/project/:projectKey)
333
338
  * @param fetch {fetch} custom fetch function, pass in custom fetch function if you want to use your own fetch function
334
339
  * @param appUrl
335
340
  * @param projectKey
package/dist/index.js CHANGED
@@ -159,6 +159,7 @@ var Weaverse = class {
159
159
  };
160
160
  this.listeners = /* @__PURE__ */ new Set();
161
161
  this.isDesignMode = false;
162
+ this.isPreviewMode = false;
162
163
  this.ssrMode = false;
163
164
  this.mediaBreakPoints = {
164
165
  desktop: "all",
package/dist/index.mjs CHANGED
@@ -121,6 +121,7 @@ var Weaverse = class {
121
121
  };
122
122
  this.listeners = /* @__PURE__ */ new Set();
123
123
  this.isDesignMode = false;
124
+ this.isPreviewMode = false;
124
125
  this.ssrMode = false;
125
126
  this.mediaBreakPoints = {
126
127
  desktop: "all",
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.58",
2
+ "version": "0.7.60",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",