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

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
2
  import type { InterfacePluginConstants, InterfacePluginEvents, InterfacePluginParams, InterfacePluginSettings } from "../types.js";
3
- import type { InterfaceForcePayload, InterfaceLineExecPayload, InterfaceModuleState, InterfaceSpeakerChangedPayload, InterfaceTextChangedPayload, InterfaceViewPayload } from "../utils/interface.js";
3
+ import type { InterfaceForcePayload, InterfaceModuleState, InterfaceSpeakerChangedPayload, InterfaceTextChangedPayload, InterfaceViewPayload } from "../utils/interface.js";
4
+ import type { LineExecHandlerArg } from "@vnejs/plugins.core.scenario.contract";
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.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,12 +4,12 @@ import { tokenizeExecLine } from "@vnejs/helpers";
4
4
  import type { InterfacePluginConstants, InterfacePluginEvents, InterfacePluginParams, InterfacePluginSettings } from "../types.js";
5
5
  import type {
6
6
  InterfaceForcePayload,
7
- InterfaceLineExecPayload,
8
7
  InterfaceModuleState,
9
8
  InterfaceSpeakerChangedPayload,
10
9
  InterfaceTextChangedPayload,
11
10
  InterfaceViewPayload,
12
11
  } from "../utils/interface.js";
12
+ import type { LineExecHandlerArg } from "@vnejs/plugins.core.scenario.contract";
13
13
 
14
14
  export class Interface extends Module<InterfacePluginEvents, InterfacePluginConstants, InterfacePluginSettings, InterfacePluginParams, InterfaceModuleState> {
15
15
  name = "interface";
@@ -32,7 +32,7 @@ export class Interface extends Module<InterfacePluginEvents, InterfacePluginCons
32
32
 
33
33
  init = () => this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.name, handler: this.onLineExec });
34
34
 
35
- onLineExec = async ({ line = "" }: InterfaceLineExecPayload = {}) => {
35
+ onLineExec = async ({ line = "" }: LineExecHandlerArg = {}) => {
36
36
  const isForce = Boolean(this.shared.viewForceAnimationSources.length);
37
37
 
38
38
  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
  };