@weaverse/core 1.0.30 → 1.0.32

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
@@ -159,10 +159,11 @@ declare class Weaverse {
159
159
  * @param element {WeaverseElement} custom React Component
160
160
  */
161
161
  registerElement(element: WeaverseElement): void;
162
- initStitches: () => void;
162
+ initStitches: (externalConfig?: {}) => void;
163
163
  subscribe(fn: any): void;
164
164
  unsubscribe(fn: any): void;
165
165
  triggerUpdate(): void;
166
+ refreshAllItems(): void;
166
167
  setProjectData(data: WeaverseProjectDataType): void;
167
168
  initProjectItemData(): void;
168
169
  }
package/dist/index.js CHANGED
@@ -256,11 +256,12 @@ var Weaverse = class {
256
256
  // tablet: "(max-width: 1023.98px)", // to set css for tablet, {'@tablet' : { // css }},
257
257
  mobile: "(max-width: 767.98px)"
258
258
  };
259
- this.initStitches = () => {
259
+ this.initStitches = (externalConfig = {}) => {
260
260
  this.stitchesInstance = this.stitchesInstance || stitches.createStitches({
261
261
  prefix: "weaverse",
262
262
  media: this.mediaBreakPoints,
263
- utils: stitchesUtils
263
+ utils: stitchesUtils,
264
+ ...externalConfig
264
265
  });
265
266
  };
266
267
  this.init({
@@ -323,6 +324,11 @@ var Weaverse = class {
323
324
  triggerUpdate() {
324
325
  this.listeners.forEach((fn) => fn());
325
326
  }
327
+ refreshAllItems() {
328
+ this.itemInstances.forEach((item) => {
329
+ item.triggerUpdate();
330
+ });
331
+ }
326
332
  setProjectData(data) {
327
333
  this.data = data;
328
334
  this.initProjectItemData();
package/dist/index.mjs CHANGED
@@ -214,11 +214,12 @@ var Weaverse = class {
214
214
  // tablet: "(max-width: 1023.98px)", // to set css for tablet, {'@tablet' : { // css }},
215
215
  mobile: "(max-width: 767.98px)"
216
216
  };
217
- this.initStitches = () => {
217
+ this.initStitches = (externalConfig = {}) => {
218
218
  this.stitchesInstance = this.stitchesInstance || stitches.createStitches({
219
219
  prefix: "weaverse",
220
220
  media: this.mediaBreakPoints,
221
- utils: stitchesUtils
221
+ utils: stitchesUtils,
222
+ ...externalConfig
222
223
  });
223
224
  };
224
225
  this.init({
@@ -281,6 +282,11 @@ var Weaverse = class {
281
282
  triggerUpdate() {
282
283
  this.listeners.forEach((fn) => fn());
283
284
  }
285
+ refreshAllItems() {
286
+ this.itemInstances.forEach((item) => {
287
+ item.triggerUpdate();
288
+ });
289
+ }
284
290
  setProjectData(data) {
285
291
  this.data = data;
286
292
  this.initProjectItemData();
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.30",
2
+ "version": "1.0.32",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",