@vnejs/plugins.text.wall 0.2.0 → 0.2.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.
@@ -5,7 +5,7 @@ import type { TextWallPluginConstants, TextWallPluginEvents, TextWallPluginParam
5
5
  export declare class TextWall extends ModuleCore<TextWallPluginEvents, TextWallPluginConstants, TextWallPluginSettings, TextWallPluginParams, ModuleGlobalStateTextWall> {
6
6
  name: string;
7
7
  subscribe: () => void;
8
- init: () => void;
8
+ postinject: () => void;
9
9
  onStateUpdate: (payload: Partial<ModuleGlobalStateTextWall>) => void;
10
10
  onStateSet: (payload: ModuleGlobalStateRegistry) => Promise<void>;
11
11
  onStateClear: () => Promise<unknown[] | undefined>;
@@ -6,7 +6,7 @@ export class TextWall extends ModuleCore {
6
6
  this.on(this.EVENTS.STATE.CLEAR, this.onStateClear);
7
7
  this.on(this.EVENTS.STATE.SET, this.onStateSet);
8
8
  };
9
- init = () => {
9
+ postinject = () => {
10
10
  this.shared.isTextWallSetStateInProcess = false;
11
11
  };
12
12
  onStateUpdate = (payload) => this.updateState(payload);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.text.wall",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@ export class TextWall extends ModuleCore<
21
21
  this.on(this.EVENTS.STATE.SET, this.onStateSet);
22
22
  };
23
23
 
24
- init = () => {
24
+ postinject = () => {
25
25
  this.shared.isTextWallSetStateInProcess = false;
26
26
  };
27
27
 
@@ -25,13 +25,11 @@ export const createTextWallTestModule = <T extends Parameters<typeof baseCreateT
25
25
  const { state: optionState, ...rest } = options;
26
26
  const result = baseCreateTestModule(ModuleClass, {
27
27
  ...rest,
28
- state:
29
- optionState ??
30
- {
31
- ...createCoreGlobalState(),
32
- text: { uid: "1", texts: [{ text: "line", args: {} }], tokens: [], speaker: "hero" },
33
- "text.speaker": { speaker: "hero", args: {}, speakersInfo: { hero: {} } },
34
- },
28
+ state: optionState ?? {
29
+ ...createCoreGlobalState(),
30
+ "text": { uid: "1", texts: [{ text: "line", args: {} }], tokens: [], speaker: "hero" },
31
+ "text.speaker": { speaker: "hero", args: {}, speakersInfo: { hero: {} } },
32
+ },
35
33
  });
36
34
 
37
35
  const observer = result.module.observer ?? result.observer;