@vnejs/plugins.text.wall 0.2.5 → 0.2.6

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.
@@ -14,9 +14,9 @@ export class TextWallEmitBefore extends ModuleCore {
14
14
  const { texts, tokens, uid } = this.globalState.text;
15
15
  const speakerState = this.globalState["text.speaker"];
16
16
  const { speaker } = speakerState;
17
- const speakerInfo = await this.emitClone(getTextSpeakerInfo(speakerState, speaker));
18
- const wall = await this.emitClone(state.wall);
19
- const wallElement = await this.emitClone({ texts, tokens, uid, speaker, speakerInfo });
17
+ const speakerInfo = structuredClone(getTextSpeakerInfo(speakerState, speaker));
18
+ const wall = structuredClone(state.wall);
19
+ const wallElement = structuredClone({ texts, tokens, uid, speaker, speakerInfo });
20
20
  await this.emit(this.EVENTS.TEXT_WALL.STATE_UPDATE, { wall: [...wall, wallElement] });
21
21
  await this.emit(this.EVENTS.TEXT_WALL.CHANGED, { wall: this.globalState["text.wall"].wall });
22
22
  };
@@ -12,7 +12,7 @@ export class TextWall extends ModuleCore {
12
12
  onStateUpdate = (payload = {}) => this.updateState(payload);
13
13
  onStateSet = async (payload) => {
14
14
  this.shared.isTextWallSetStateInProcess = true;
15
- await this.onSetStateClone(payload);
15
+ this.setClonedState(payload);
16
16
  await this.emit(this.EVENTS.TEXT_WALL.CHANGED, { wall: this.state.wall });
17
17
  this.shared.isTextWallSetStateInProcess = false;
18
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.text.wall",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,10 +28,10 @@ export class TextWallEmitBefore extends ModuleCore<
28
28
  const { texts, tokens, uid } = this.globalState.text;
29
29
  const speakerState = this.globalState["text.speaker"];
30
30
  const { speaker } = speakerState;
31
- const speakerInfo = await this.emitClone(getTextSpeakerInfo(speakerState, speaker));
31
+ const speakerInfo = structuredClone(getTextSpeakerInfo(speakerState, speaker));
32
32
 
33
- const wall = await this.emitClone<WallElement[]>(state.wall);
34
- const wallElement = await this.emitClone<WallElement>({ texts, tokens, uid, speaker, speakerInfo });
33
+ const wall = structuredClone(state.wall);
34
+ const wallElement = structuredClone({ texts, tokens, uid, speaker, speakerInfo });
35
35
 
36
36
  await this.emit(this.EVENTS.TEXT_WALL.STATE_UPDATE, { wall: [...wall, wallElement] });
37
37
  await this.emit(this.EVENTS.TEXT_WALL.CHANGED, { wall: this.globalState["text.wall"].wall });
@@ -30,7 +30,7 @@ export class TextWall extends ModuleCore<
30
30
  onStateSet = async (payload: ModuleGlobalStateRegistry) => {
31
31
  this.shared.isTextWallSetStateInProcess = true;
32
32
 
33
- await this.onSetStateClone(payload);
33
+ this.setClonedState(payload);
34
34
  await this.emit(this.EVENTS.TEXT_WALL.CHANGED, { wall: this.state.wall });
35
35
 
36
36
  this.shared.isTextWallSetStateInProcess = false;