@weaverse/core 2.10.0 → 2.10.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.mts +71 -72
- package/dist/index.d.ts +71 -72
- package/dist/index.js +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,73 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import Stitches from '@stitches/core/types/stitches';
|
|
4
|
-
|
|
5
|
-
type AnyFunction = (...args: any[]) => any;
|
|
6
|
-
declare class EventEmitter {
|
|
7
|
-
listeners: Set<AnyFunction>;
|
|
8
|
-
constructor();
|
|
9
|
-
subscribe: (fn: AnyFunction) => () => void;
|
|
10
|
-
unsubscribe: (fn: AnyFunction) => void;
|
|
11
|
-
emit: (data?: any) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare class WeaverseItemStore extends EventEmitter {
|
|
15
|
-
weaverse: Weaverse;
|
|
16
|
-
ref: RefObject<HTMLElement>;
|
|
17
|
-
_store: ElementData;
|
|
18
|
-
stitchesClass: string;
|
|
19
|
-
constructor(initialData: ElementData, weaverse: Weaverse);
|
|
20
|
-
get _id(): string;
|
|
21
|
-
get _element(): HTMLElement | null;
|
|
22
|
-
get Element(): any;
|
|
23
|
-
getDefaultCss: () => ElementCSS;
|
|
24
|
-
get data(): ElementData;
|
|
25
|
-
set data(update: Omit<ElementData, 'id' | 'type'>);
|
|
26
|
-
setData: (update: Omit<ElementData, 'id' | 'type'>) => ElementData;
|
|
27
|
-
getSnapShot: () => ElementData;
|
|
28
|
-
triggerUpdate: () => void;
|
|
29
|
-
}
|
|
30
|
-
declare class Weaverse extends EventEmitter {
|
|
31
|
-
contentRootElement: HTMLElement | null;
|
|
32
|
-
static itemInstances: Map<string, any>;
|
|
33
|
-
weaverseHost: string;
|
|
34
|
-
weaverseVersion: string;
|
|
35
|
-
projectId: string;
|
|
36
|
-
isDesignMode: boolean;
|
|
37
|
-
isPreviewMode: boolean;
|
|
38
|
-
static stitchesInstance: Stitches | any;
|
|
39
|
-
studioBridge?: any;
|
|
40
|
-
ItemConstructor: typeof WeaverseItemStore;
|
|
41
|
-
data: WeaverseProjectDataType;
|
|
42
|
-
platformType: PlatformTypeEnum;
|
|
43
|
-
static elementRegistry: Map<any, any>;
|
|
44
|
-
static mediaBreakPoints: BreakPoints;
|
|
45
|
-
constructor(params: WeaverseCoreParams);
|
|
46
|
-
getSnapShot: () => WeaverseProjectDataType;
|
|
47
|
-
/**
|
|
48
|
-
* Create new `WeaverseItemStore` instance for each item in the project.
|
|
49
|
-
*/
|
|
50
|
-
initProject: () => void;
|
|
51
|
-
get itemInstances(): Map<string, any>;
|
|
52
|
-
static initStitches: (externalConfig?: stitches.CreateStitches) => void;
|
|
53
|
-
get stitchesInstance(): any;
|
|
54
|
-
/**
|
|
55
|
-
* Register the custom React Component to Weaverse, store it into Weaverse.elementRegistry
|
|
56
|
-
*/
|
|
57
|
-
static registerElement(element: {
|
|
58
|
-
type: string;
|
|
59
|
-
[x: string]: any;
|
|
60
|
-
}): void;
|
|
61
|
-
get elementRegistry(): Map<any, any>;
|
|
62
|
-
triggerUpdate(): void;
|
|
63
|
-
refreshAllItems(): void;
|
|
64
|
-
/**
|
|
65
|
-
* Reset the project data and re-initialize all items.
|
|
66
|
-
* Used when we need to re-render the project with new data (like applying new template)
|
|
67
|
-
* @param data {WeaverseProjectDataType}
|
|
68
|
-
*/
|
|
69
|
-
setProjectData: (data: WeaverseProjectDataType) => void;
|
|
70
|
-
}
|
|
1
|
+
import * as Stitches from '@stitches/core';
|
|
2
|
+
import { ForwardRefExoticComponent, RefObject } from 'react';
|
|
3
|
+
import Stitches$1 from '@stitches/core/types/stitches';
|
|
71
4
|
|
|
72
5
|
declare let stitchesUtils: {
|
|
73
6
|
m: (value: string) => {
|
|
@@ -112,7 +45,7 @@ type ToolbarAction = 'general-settings' | 'settings-level-2' | 'duplicate' | 'de
|
|
|
112
45
|
type AdvancedGroupType = 'border' | 'alignment' | 'background' | 'dimensions' | 'spacing' | 'typography' | 'visibility' | 'shadows-and-effects' | 'layout-background';
|
|
113
46
|
type PositionInputValue = 'top left' | 'top center' | 'top right' | 'center left' | 'center center' | 'center right' | 'bottom left' | 'bottom center' | 'bottom right';
|
|
114
47
|
type InputType = 'blog' | 'collection' | 'collection-list' | 'color' | 'datepicker' | 'image' | 'map-autocomplete' | 'position' | 'product' | 'product-list' | 'range' | 'richtext' | 'select' | 'switch' | 'text' | 'textarea' | 'toggle-group' | 'swatches' | 'metaobject';
|
|
115
|
-
type WeaverseCSSProperties =
|
|
48
|
+
type WeaverseCSSProperties = Stitches.CSS & Partial<Record<keyof typeof stitchesUtils, string | number>>;
|
|
116
49
|
type ChildElementCSS = Partial<{
|
|
117
50
|
[selector: string]: WeaverseCSSProperties & ChildElementCSS;
|
|
118
51
|
}>;
|
|
@@ -162,7 +95,6 @@ interface WeaverseCoreParams {
|
|
|
162
95
|
data: WeaverseProjectDataType;
|
|
163
96
|
isDesignMode?: boolean;
|
|
164
97
|
platformType?: PlatformTypeEnum;
|
|
165
|
-
ItemConstructor: typeof WeaverseItemStore;
|
|
166
98
|
}
|
|
167
99
|
/**
|
|
168
100
|
* BasicInput interface
|
|
@@ -216,6 +148,73 @@ declare global {
|
|
|
216
148
|
}
|
|
217
149
|
}
|
|
218
150
|
|
|
151
|
+
type AnyFunction = (...args: any[]) => any;
|
|
152
|
+
declare class EventEmitter {
|
|
153
|
+
listeners: Set<AnyFunction>;
|
|
154
|
+
constructor();
|
|
155
|
+
subscribe: (fn: AnyFunction) => () => void;
|
|
156
|
+
unsubscribe: (fn: AnyFunction) => void;
|
|
157
|
+
emit: (data?: any) => void;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class WeaverseItemStore extends EventEmitter {
|
|
161
|
+
weaverse: Weaverse;
|
|
162
|
+
ref: RefObject<HTMLElement>;
|
|
163
|
+
_store: ElementData;
|
|
164
|
+
stitchesClass: string;
|
|
165
|
+
constructor(initialData: ElementData, weaverse: Weaverse);
|
|
166
|
+
get _id(): string;
|
|
167
|
+
get _element(): HTMLElement | null;
|
|
168
|
+
get Element(): any;
|
|
169
|
+
getDefaultCss: () => ElementCSS;
|
|
170
|
+
get data(): ElementData;
|
|
171
|
+
set data(update: Omit<ElementData, 'id' | 'type'>);
|
|
172
|
+
setData: (update: Omit<ElementData, 'id' | 'type'>) => ElementData;
|
|
173
|
+
getSnapShot: () => ElementData;
|
|
174
|
+
triggerUpdate: () => void;
|
|
175
|
+
}
|
|
176
|
+
declare class Weaverse extends EventEmitter {
|
|
177
|
+
contentRootElement: HTMLElement | null;
|
|
178
|
+
static itemInstances: Map<string, any>;
|
|
179
|
+
weaverseHost: string;
|
|
180
|
+
weaverseVersion: string;
|
|
181
|
+
projectId: string;
|
|
182
|
+
isDesignMode: boolean;
|
|
183
|
+
isPreviewMode: boolean;
|
|
184
|
+
static stitchesInstance: Stitches$1 | any;
|
|
185
|
+
studioBridge?: any;
|
|
186
|
+
static ItemConstructor: typeof WeaverseItemStore;
|
|
187
|
+
data: WeaverseProjectDataType;
|
|
188
|
+
platformType: PlatformTypeEnum;
|
|
189
|
+
static elementRegistry: Map<any, any>;
|
|
190
|
+
static mediaBreakPoints: BreakPoints;
|
|
191
|
+
constructor(params: WeaverseCoreParams);
|
|
192
|
+
getSnapShot: () => WeaverseProjectDataType;
|
|
193
|
+
/**
|
|
194
|
+
* Create new `WeaverseItemStore` instance for each item in the project.
|
|
195
|
+
*/
|
|
196
|
+
initProject: () => void;
|
|
197
|
+
get itemInstances(): Map<string, any>;
|
|
198
|
+
static initStitches: (externalConfig?: Stitches.CreateStitches) => void;
|
|
199
|
+
get stitchesInstance(): any;
|
|
200
|
+
/**
|
|
201
|
+
* Register the custom React Component to Weaverse, store it into Weaverse.elementRegistry
|
|
202
|
+
*/
|
|
203
|
+
static registerElement(element: {
|
|
204
|
+
type: string;
|
|
205
|
+
[x: string]: any;
|
|
206
|
+
}): void;
|
|
207
|
+
get elementRegistry(): Map<any, any>;
|
|
208
|
+
triggerUpdate: () => void;
|
|
209
|
+
refreshAllItems(): void;
|
|
210
|
+
/**
|
|
211
|
+
* Reset the project data and re-initialize all items.
|
|
212
|
+
* Used when we need to re-render the project with new data (like applying new template)
|
|
213
|
+
* @param data {WeaverseProjectDataType}
|
|
214
|
+
*/
|
|
215
|
+
setProjectData: (data: WeaverseProjectDataType) => void;
|
|
216
|
+
}
|
|
217
|
+
|
|
219
218
|
declare let isReactNative: boolean;
|
|
220
219
|
declare let isBrowser: boolean;
|
|
221
220
|
declare let isIframe: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,73 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import Stitches from '@stitches/core/types/stitches';
|
|
4
|
-
|
|
5
|
-
type AnyFunction = (...args: any[]) => any;
|
|
6
|
-
declare class EventEmitter {
|
|
7
|
-
listeners: Set<AnyFunction>;
|
|
8
|
-
constructor();
|
|
9
|
-
subscribe: (fn: AnyFunction) => () => void;
|
|
10
|
-
unsubscribe: (fn: AnyFunction) => void;
|
|
11
|
-
emit: (data?: any) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare class WeaverseItemStore extends EventEmitter {
|
|
15
|
-
weaverse: Weaverse;
|
|
16
|
-
ref: RefObject<HTMLElement>;
|
|
17
|
-
_store: ElementData;
|
|
18
|
-
stitchesClass: string;
|
|
19
|
-
constructor(initialData: ElementData, weaverse: Weaverse);
|
|
20
|
-
get _id(): string;
|
|
21
|
-
get _element(): HTMLElement | null;
|
|
22
|
-
get Element(): any;
|
|
23
|
-
getDefaultCss: () => ElementCSS;
|
|
24
|
-
get data(): ElementData;
|
|
25
|
-
set data(update: Omit<ElementData, 'id' | 'type'>);
|
|
26
|
-
setData: (update: Omit<ElementData, 'id' | 'type'>) => ElementData;
|
|
27
|
-
getSnapShot: () => ElementData;
|
|
28
|
-
triggerUpdate: () => void;
|
|
29
|
-
}
|
|
30
|
-
declare class Weaverse extends EventEmitter {
|
|
31
|
-
contentRootElement: HTMLElement | null;
|
|
32
|
-
static itemInstances: Map<string, any>;
|
|
33
|
-
weaverseHost: string;
|
|
34
|
-
weaverseVersion: string;
|
|
35
|
-
projectId: string;
|
|
36
|
-
isDesignMode: boolean;
|
|
37
|
-
isPreviewMode: boolean;
|
|
38
|
-
static stitchesInstance: Stitches | any;
|
|
39
|
-
studioBridge?: any;
|
|
40
|
-
ItemConstructor: typeof WeaverseItemStore;
|
|
41
|
-
data: WeaverseProjectDataType;
|
|
42
|
-
platformType: PlatformTypeEnum;
|
|
43
|
-
static elementRegistry: Map<any, any>;
|
|
44
|
-
static mediaBreakPoints: BreakPoints;
|
|
45
|
-
constructor(params: WeaverseCoreParams);
|
|
46
|
-
getSnapShot: () => WeaverseProjectDataType;
|
|
47
|
-
/**
|
|
48
|
-
* Create new `WeaverseItemStore` instance for each item in the project.
|
|
49
|
-
*/
|
|
50
|
-
initProject: () => void;
|
|
51
|
-
get itemInstances(): Map<string, any>;
|
|
52
|
-
static initStitches: (externalConfig?: stitches.CreateStitches) => void;
|
|
53
|
-
get stitchesInstance(): any;
|
|
54
|
-
/**
|
|
55
|
-
* Register the custom React Component to Weaverse, store it into Weaverse.elementRegistry
|
|
56
|
-
*/
|
|
57
|
-
static registerElement(element: {
|
|
58
|
-
type: string;
|
|
59
|
-
[x: string]: any;
|
|
60
|
-
}): void;
|
|
61
|
-
get elementRegistry(): Map<any, any>;
|
|
62
|
-
triggerUpdate(): void;
|
|
63
|
-
refreshAllItems(): void;
|
|
64
|
-
/**
|
|
65
|
-
* Reset the project data and re-initialize all items.
|
|
66
|
-
* Used when we need to re-render the project with new data (like applying new template)
|
|
67
|
-
* @param data {WeaverseProjectDataType}
|
|
68
|
-
*/
|
|
69
|
-
setProjectData: (data: WeaverseProjectDataType) => void;
|
|
70
|
-
}
|
|
1
|
+
import * as Stitches from '@stitches/core';
|
|
2
|
+
import { ForwardRefExoticComponent, RefObject } from 'react';
|
|
3
|
+
import Stitches$1 from '@stitches/core/types/stitches';
|
|
71
4
|
|
|
72
5
|
declare let stitchesUtils: {
|
|
73
6
|
m: (value: string) => {
|
|
@@ -112,7 +45,7 @@ type ToolbarAction = 'general-settings' | 'settings-level-2' | 'duplicate' | 'de
|
|
|
112
45
|
type AdvancedGroupType = 'border' | 'alignment' | 'background' | 'dimensions' | 'spacing' | 'typography' | 'visibility' | 'shadows-and-effects' | 'layout-background';
|
|
113
46
|
type PositionInputValue = 'top left' | 'top center' | 'top right' | 'center left' | 'center center' | 'center right' | 'bottom left' | 'bottom center' | 'bottom right';
|
|
114
47
|
type InputType = 'blog' | 'collection' | 'collection-list' | 'color' | 'datepicker' | 'image' | 'map-autocomplete' | 'position' | 'product' | 'product-list' | 'range' | 'richtext' | 'select' | 'switch' | 'text' | 'textarea' | 'toggle-group' | 'swatches' | 'metaobject';
|
|
115
|
-
type WeaverseCSSProperties =
|
|
48
|
+
type WeaverseCSSProperties = Stitches.CSS & Partial<Record<keyof typeof stitchesUtils, string | number>>;
|
|
116
49
|
type ChildElementCSS = Partial<{
|
|
117
50
|
[selector: string]: WeaverseCSSProperties & ChildElementCSS;
|
|
118
51
|
}>;
|
|
@@ -162,7 +95,6 @@ interface WeaverseCoreParams {
|
|
|
162
95
|
data: WeaverseProjectDataType;
|
|
163
96
|
isDesignMode?: boolean;
|
|
164
97
|
platformType?: PlatformTypeEnum;
|
|
165
|
-
ItemConstructor: typeof WeaverseItemStore;
|
|
166
98
|
}
|
|
167
99
|
/**
|
|
168
100
|
* BasicInput interface
|
|
@@ -216,6 +148,73 @@ declare global {
|
|
|
216
148
|
}
|
|
217
149
|
}
|
|
218
150
|
|
|
151
|
+
type AnyFunction = (...args: any[]) => any;
|
|
152
|
+
declare class EventEmitter {
|
|
153
|
+
listeners: Set<AnyFunction>;
|
|
154
|
+
constructor();
|
|
155
|
+
subscribe: (fn: AnyFunction) => () => void;
|
|
156
|
+
unsubscribe: (fn: AnyFunction) => void;
|
|
157
|
+
emit: (data?: any) => void;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class WeaverseItemStore extends EventEmitter {
|
|
161
|
+
weaverse: Weaverse;
|
|
162
|
+
ref: RefObject<HTMLElement>;
|
|
163
|
+
_store: ElementData;
|
|
164
|
+
stitchesClass: string;
|
|
165
|
+
constructor(initialData: ElementData, weaverse: Weaverse);
|
|
166
|
+
get _id(): string;
|
|
167
|
+
get _element(): HTMLElement | null;
|
|
168
|
+
get Element(): any;
|
|
169
|
+
getDefaultCss: () => ElementCSS;
|
|
170
|
+
get data(): ElementData;
|
|
171
|
+
set data(update: Omit<ElementData, 'id' | 'type'>);
|
|
172
|
+
setData: (update: Omit<ElementData, 'id' | 'type'>) => ElementData;
|
|
173
|
+
getSnapShot: () => ElementData;
|
|
174
|
+
triggerUpdate: () => void;
|
|
175
|
+
}
|
|
176
|
+
declare class Weaverse extends EventEmitter {
|
|
177
|
+
contentRootElement: HTMLElement | null;
|
|
178
|
+
static itemInstances: Map<string, any>;
|
|
179
|
+
weaverseHost: string;
|
|
180
|
+
weaverseVersion: string;
|
|
181
|
+
projectId: string;
|
|
182
|
+
isDesignMode: boolean;
|
|
183
|
+
isPreviewMode: boolean;
|
|
184
|
+
static stitchesInstance: Stitches$1 | any;
|
|
185
|
+
studioBridge?: any;
|
|
186
|
+
static ItemConstructor: typeof WeaverseItemStore;
|
|
187
|
+
data: WeaverseProjectDataType;
|
|
188
|
+
platformType: PlatformTypeEnum;
|
|
189
|
+
static elementRegistry: Map<any, any>;
|
|
190
|
+
static mediaBreakPoints: BreakPoints;
|
|
191
|
+
constructor(params: WeaverseCoreParams);
|
|
192
|
+
getSnapShot: () => WeaverseProjectDataType;
|
|
193
|
+
/**
|
|
194
|
+
* Create new `WeaverseItemStore` instance for each item in the project.
|
|
195
|
+
*/
|
|
196
|
+
initProject: () => void;
|
|
197
|
+
get itemInstances(): Map<string, any>;
|
|
198
|
+
static initStitches: (externalConfig?: Stitches.CreateStitches) => void;
|
|
199
|
+
get stitchesInstance(): any;
|
|
200
|
+
/**
|
|
201
|
+
* Register the custom React Component to Weaverse, store it into Weaverse.elementRegistry
|
|
202
|
+
*/
|
|
203
|
+
static registerElement(element: {
|
|
204
|
+
type: string;
|
|
205
|
+
[x: string]: any;
|
|
206
|
+
}): void;
|
|
207
|
+
get elementRegistry(): Map<any, any>;
|
|
208
|
+
triggerUpdate: () => void;
|
|
209
|
+
refreshAllItems(): void;
|
|
210
|
+
/**
|
|
211
|
+
* Reset the project data and re-initialize all items.
|
|
212
|
+
* Used when we need to re-render the project with new data (like applying new template)
|
|
213
|
+
* @param data {WeaverseProjectDataType}
|
|
214
|
+
*/
|
|
215
|
+
setProjectData: (data: WeaverseProjectDataType) => void;
|
|
216
|
+
}
|
|
217
|
+
|
|
219
218
|
declare let isReactNative: boolean;
|
|
220
219
|
declare let isBrowser: boolean;
|
|
221
220
|
declare let isIframe: boolean;
|
package/dist/index.js
CHANGED
|
@@ -143,6 +143,7 @@ var WeaverseItemStore = class extends EventEmitter {
|
|
|
143
143
|
this.weaverse = weaverse;
|
|
144
144
|
if (id && type) {
|
|
145
145
|
weaverse.itemInstances.set(id, this);
|
|
146
|
+
Object.assign(this._store, initialData);
|
|
146
147
|
} else {
|
|
147
148
|
throw new Error(`'id' and 'type' are required to create a new Weaverse item.`);
|
|
148
149
|
}
|
|
@@ -211,7 +212,7 @@ var Weaverse = class _Weaverse extends EventEmitter {
|
|
|
211
212
|
* Create new `WeaverseItemStore` instance for each item in the project.
|
|
212
213
|
*/
|
|
213
214
|
initProject = () => {
|
|
214
|
-
let { data
|
|
215
|
+
let { data } = this;
|
|
215
216
|
let itemInstances = this.itemInstances;
|
|
216
217
|
if (data?.items) {
|
|
217
218
|
data.items.forEach((item) => {
|
|
@@ -219,7 +220,7 @@ var Weaverse = class _Weaverse extends EventEmitter {
|
|
|
219
220
|
if (itemInstance) {
|
|
220
221
|
itemInstance.setData(item);
|
|
221
222
|
} else {
|
|
222
|
-
new ItemConstructor(item, this);
|
|
223
|
+
new _Weaverse.ItemConstructor(item, this);
|
|
223
224
|
}
|
|
224
225
|
});
|
|
225
226
|
}
|
|
@@ -253,9 +254,10 @@ var Weaverse = class _Weaverse extends EventEmitter {
|
|
|
253
254
|
get elementRegistry() {
|
|
254
255
|
return _Weaverse.elementRegistry;
|
|
255
256
|
}
|
|
256
|
-
triggerUpdate() {
|
|
257
|
+
triggerUpdate = () => {
|
|
258
|
+
this.data = { ...this.data };
|
|
257
259
|
this.emit();
|
|
258
|
-
}
|
|
260
|
+
};
|
|
259
261
|
refreshAllItems() {
|
|
260
262
|
this.itemInstances.forEach((item) => {
|
|
261
263
|
item.triggerUpdate();
|
package/dist/index.mjs
CHANGED
|
@@ -101,6 +101,7 @@ var WeaverseItemStore = class extends EventEmitter {
|
|
|
101
101
|
this.weaverse = weaverse;
|
|
102
102
|
if (id && type) {
|
|
103
103
|
weaverse.itemInstances.set(id, this);
|
|
104
|
+
Object.assign(this._store, initialData);
|
|
104
105
|
} else {
|
|
105
106
|
throw new Error(`'id' and 'type' are required to create a new Weaverse item.`);
|
|
106
107
|
}
|
|
@@ -169,7 +170,7 @@ var Weaverse = class _Weaverse extends EventEmitter {
|
|
|
169
170
|
* Create new `WeaverseItemStore` instance for each item in the project.
|
|
170
171
|
*/
|
|
171
172
|
initProject = () => {
|
|
172
|
-
let { data
|
|
173
|
+
let { data } = this;
|
|
173
174
|
let itemInstances = this.itemInstances;
|
|
174
175
|
if (data?.items) {
|
|
175
176
|
data.items.forEach((item) => {
|
|
@@ -177,7 +178,7 @@ var Weaverse = class _Weaverse extends EventEmitter {
|
|
|
177
178
|
if (itemInstance) {
|
|
178
179
|
itemInstance.setData(item);
|
|
179
180
|
} else {
|
|
180
|
-
new ItemConstructor(item, this);
|
|
181
|
+
new _Weaverse.ItemConstructor(item, this);
|
|
181
182
|
}
|
|
182
183
|
});
|
|
183
184
|
}
|
|
@@ -211,9 +212,10 @@ var Weaverse = class _Weaverse extends EventEmitter {
|
|
|
211
212
|
get elementRegistry() {
|
|
212
213
|
return _Weaverse.elementRegistry;
|
|
213
214
|
}
|
|
214
|
-
triggerUpdate() {
|
|
215
|
+
triggerUpdate = () => {
|
|
216
|
+
this.data = { ...this.data };
|
|
215
217
|
this.emit();
|
|
216
|
-
}
|
|
218
|
+
};
|
|
217
219
|
refreshAllItems() {
|
|
218
220
|
this.itemInstances.forEach((item) => {
|
|
219
221
|
item.triggerUpdate();
|