@vnejs/plugins.views.screens.intro 0.1.10 → 0.1.11

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,12 +1,12 @@
1
1
  import { Module } from "@vnejs/module";
2
2
  import type { IntroPluginConstants, IntroPluginEvents, IntroPluginParams, IntroPluginSettings } from "../types.js";
3
- import type { IntroLineExecPayload } from "../utils/intro.js";
3
+ import type { LineExecHandlerArg } from "@vnejs/plugins.core.scenario.contract";
4
4
  export declare class Intro extends Module<IntroPluginEvents, IntroPluginConstants, IntroPluginSettings, IntroPluginParams> {
5
5
  name: string;
6
6
  isShowed: boolean;
7
7
  subscribe: () => void;
8
8
  init: () => Promise<unknown[]> | undefined;
9
- onLineExec: ({ keywords }?: IntroLineExecPayload) => Promise<unknown[]> | undefined;
9
+ onLineExec: ({ keywords }?: LineExecHandlerArg) => Promise<unknown[]> | undefined;
10
10
  onIntroClick: () => Promise<void>;
11
11
  onIntroInteract: () => Promise<void>;
12
12
  onIntroSkip: () => void;
@@ -4,6 +4,3 @@ export type IntroPluginState = {
4
4
  bgSrc?: string;
5
5
  locs?: Record<string, string>;
6
6
  };
7
- export type IntroLineExecPayload = {
8
- keywords?: string[];
9
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.views.screens.intro",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  import { Module } from "@vnejs/module";
2
2
 
3
3
  import type { IntroPluginConstants, IntroPluginEvents, IntroPluginParams, IntroPluginSettings } from "../types.js";
4
- import type { IntroLineExecPayload } from "../utils/intro.js";
4
+ import type { LineExecHandlerArg } from "@vnejs/plugins.core.scenario.contract";
5
5
 
6
6
  export class Intro extends Module<IntroPluginEvents, IntroPluginConstants, IntroPluginSettings, IntroPluginParams> {
7
7
  name = "intro";
@@ -15,7 +15,7 @@ export class Intro extends Module<IntroPluginEvents, IntroPluginConstants, Intro
15
15
  };
16
16
  init = () => this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.name, handler: this.onLineExec });
17
17
 
18
- onLineExec = ({ keywords = [] }: IntroLineExecPayload = {}) => {
18
+ onLineExec = ({ keywords = [] }: LineExecHandlerArg = {}) => {
19
19
  if (keywords.includes(this.CONST.SCENARIO.LINE_KEYWORDS.SKIP_IF_POSSIBLE) && this.isShowed) return void this.emitSkip();
20
20
 
21
21
  this.isShowed = true;
@@ -4,7 +4,3 @@ export type IntroPluginState = {
4
4
  bgSrc?: string;
5
5
  locs?: Record<string, string>;
6
6
  };
7
-
8
- export type IntroLineExecPayload = {
9
- keywords?: string[];
10
- };