@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 +11 -6
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -282,24 +282,29 @@ declare class Weaverse {
|
|
|
282
282
|
*/
|
|
283
283
|
projectData: ProjectDataType;
|
|
284
284
|
/**
|
|
285
|
-
*
|
|
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
|
-
*
|
|
291
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
package/dist/index.mjs
CHANGED
package/package.json
CHANGED