@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 =
|
|
18
|
-
const wall =
|
|
19
|
-
const wallElement =
|
|
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
|
};
|
package/dist/modules/wall.js
CHANGED
|
@@ -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
|
-
|
|
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
|
@@ -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 =
|
|
31
|
+
const speakerInfo = structuredClone(getTextSpeakerInfo(speakerState, speaker));
|
|
32
32
|
|
|
33
|
-
const wall =
|
|
34
|
-
const wallElement =
|
|
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 });
|
package/src/modules/wall.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class TextWall extends ModuleCore<
|
|
|
30
30
|
onStateSet = async (payload: ModuleGlobalStateRegistry) => {
|
|
31
31
|
this.shared.isTextWallSetStateInProcess = true;
|
|
32
32
|
|
|
33
|
-
|
|
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;
|