@vnejs/plugins.views.scenario.interface 0.1.17 → 0.1.19

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.
@@ -1,11 +1,12 @@
1
1
  import { Module, type ModuleGlobalStateRegistry } from "@vnejs/module";
2
+ import type { LineExecHandlerArg } from "@vnejs/plugins.core.scenario.contract";
2
3
  import type { InterfacePluginConstants, InterfacePluginEvents, InterfacePluginParams, InterfacePluginSettings } from "../types.js";
3
- import type { InterfaceForcePayload, InterfaceLineExecPayload, InterfaceModuleState, InterfaceSpeakerChangedPayload, InterfaceTextChangedPayload, InterfaceViewPayload } from "../utils/interface.js";
4
+ import type { InterfaceForcePayload, InterfaceModuleState, InterfaceSpeakerChangedPayload, InterfaceTextChangedPayload, InterfaceViewPayload } from "../utils/interface.js";
4
5
  export declare class Interface extends Module<InterfacePluginEvents, InterfacePluginConstants, InterfacePluginSettings, InterfacePluginParams, InterfaceModuleState> {
5
6
  name: string;
6
7
  subscribe: () => void;
7
8
  init: () => Promise<unknown[]> | undefined;
8
- onLineExec: ({ line }?: InterfaceLineExecPayload) => Promise<void>;
9
+ onLineExec: ({ line }?: LineExecHandlerArg) => Promise<void>;
9
10
  onInteract: () => Promise<unknown[]> | undefined;
10
11
  onShow: ({ isForce }?: InterfaceForcePayload) => false | Promise<unknown[] | undefined>;
11
12
  onHide: ({ isForce }?: InterfaceForcePayload) => false | Promise<unknown[] | undefined>;
@@ -14,9 +14,6 @@ export type InterfacePluginState = ModuleControllerState & InterfaceModuleState
14
14
  color?: string;
15
15
  opacity?: number;
16
16
  };
17
- export type InterfaceLineExecPayload = {
18
- line?: string;
19
- };
20
17
  export type InterfaceForcePayload = {
21
18
  isForce?: boolean;
22
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.views.scenario.interface",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,10 +1,11 @@
1
1
  import { Module, type ModuleGlobalStateRegistry } from "@vnejs/module";
2
2
  import { tokenizeExecLine } from "@vnejs/helpers";
3
3
 
4
+ import type { LineExecHandlerArg } from "@vnejs/plugins.core.scenario.contract";
5
+
4
6
  import type { InterfacePluginConstants, InterfacePluginEvents, InterfacePluginParams, InterfacePluginSettings } from "../types.js";
5
7
  import type {
6
8
  InterfaceForcePayload,
7
- InterfaceLineExecPayload,
8
9
  InterfaceModuleState,
9
10
  InterfaceSpeakerChangedPayload,
10
11
  InterfaceTextChangedPayload,
@@ -32,7 +33,7 @@ export class Interface extends Module<InterfacePluginEvents, InterfacePluginCons
32
33
 
33
34
  init = () => this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.name, handler: this.onLineExec });
34
35
 
35
- onLineExec = async ({ line = "" }: InterfaceLineExecPayload = {}) => {
36
+ onLineExec = async ({ line = "" }: LineExecHandlerArg = {}) => {
36
37
  const isForce = Boolean(this.shared.viewForceAnimationSources.length);
37
38
 
38
39
  const [action = "", execArg = ""] = tokenizeExecLine(line);
@@ -18,10 +18,6 @@ export type InterfacePluginState = ModuleControllerState &
18
18
  opacity?: number;
19
19
  };
20
20
 
21
- export type InterfaceLineExecPayload = {
22
- line?: string;
23
- };
24
-
25
21
  export type InterfaceForcePayload = {
26
22
  isForce?: boolean;
27
23
  };