@vnejs/plugins.views.scenario.interface 0.1.25 → 0.1.27
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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/modules/controller.js +1 -1
- package/dist/modules/interface.js +1 -1
- package/dist/types.d.ts +6 -6
- package/dist/utils/interface.d.ts +2 -2
- package/dist/view/components/tokens.hook.d.ts +1 -1
- package/package.json +3 -3
- package/src/index.ts +2 -2
- package/src/modules/controller.ts +1 -1
- package/src/modules/interface.ts +1 -1
- package/src/types.ts +6 -6
- package/src/utils/interface.ts +2 -2
- package/src/view/components/InterfaceViewWall.tsx +2 -2
- package/src/view/components/tokens.hook.ts +1 -1
- package/src/view/index.tsx +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "@vnejs/
|
|
1
|
+
import "@vnejs/contracts.views.scenario.interface";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "@vnejs/
|
|
1
|
+
import "@vnejs/contracts.views.scenario.interface";
|
|
2
2
|
import { regPlugin } from "@vnejs/shared";
|
|
3
|
-
import { PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/
|
|
3
|
+
import { PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.scenario.interface";
|
|
4
4
|
import { InterfaceController } from "./modules/controller.js";
|
|
5
5
|
import { Interface } from "./modules/interface.js";
|
|
6
6
|
import { InterfaceView } from "./modules/view.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleController } from "@vnejs/module.components";
|
|
2
|
-
import { CONSTANTS as ControlsConstants } from "@vnejs/
|
|
2
|
+
import { CONSTANTS as ControlsConstants } from "@vnejs/contracts.controls";
|
|
3
3
|
export class InterfaceController extends ModuleController {
|
|
4
4
|
name = "interface.controller";
|
|
5
5
|
isStateChangeInProcess = false;
|
|
@@ -17,7 +17,7 @@ export class Interface extends ModuleCore {
|
|
|
17
17
|
};
|
|
18
18
|
init = () => this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.name, handler: this.onLineExec });
|
|
19
19
|
onLineExec = async ({ line = "" } = {}) => {
|
|
20
|
-
const isForce =
|
|
20
|
+
const isForce = this.shared.viewForceAnimationSources.isNotEmpty();
|
|
21
21
|
const [action = "", execArg = ""] = tokenizeExecLine(line);
|
|
22
22
|
if (action === "show")
|
|
23
23
|
await this.emit(this.EVENTS.INTERFACE.SHOW, { isForce });
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ModuleComponentsConstants, ModuleComponentsEvents, ModuleComponentsParams, ModuleComponentsSettings } from "@vnejs/module.components";
|
|
2
2
|
import type { ReactComponentProps } from "@vnejs/uis.react";
|
|
3
|
-
import type { Constants as ControlsConstants, PluginName as ControlsPluginName } from "@vnejs/
|
|
4
|
-
import type { PluginName as InteractPluginName, SubscribeEvents as InteractSubscribeEvents } from "@vnejs/
|
|
5
|
-
import type { PluginName as ScenarioPluginName, SubscribeEvents as ScenarioSubscribeEvents } from "@vnejs/
|
|
6
|
-
import type { PluginName as StatePluginName, SubscribeEvents as StateSubscribeEvents } from "@vnejs/
|
|
7
|
-
import type { PluginName as TextPluginName, Params as TextParams, SubscribeEvents as TextSubscribeEvents } from "@vnejs/
|
|
8
|
-
import type { Params, PluginName, SubscribeEvents } from "@vnejs/
|
|
3
|
+
import type { Constants as ControlsConstants, PluginName as ControlsPluginName } from "@vnejs/contracts.controls";
|
|
4
|
+
import type { PluginName as InteractPluginName, SubscribeEvents as InteractSubscribeEvents } from "@vnejs/contracts.core.interact";
|
|
5
|
+
import type { PluginName as ScenarioPluginName, SubscribeEvents as ScenarioSubscribeEvents } from "@vnejs/contracts.core.scenario";
|
|
6
|
+
import type { PluginName as StatePluginName, SubscribeEvents as StateSubscribeEvents } from "@vnejs/contracts.core.state";
|
|
7
|
+
import type { PluginName as TextPluginName, Params as TextParams, SubscribeEvents as TextSubscribeEvents } from "@vnejs/contracts.text";
|
|
8
|
+
import type { Params, PluginName, SubscribeEvents } from "@vnejs/contracts.views.scenario.interface";
|
|
9
9
|
import type { InterfacePluginState } from "./utils/interface.js";
|
|
10
10
|
export type InterfacePluginEvents = ModuleComponentsEvents & Record<PluginName, SubscribeEvents> & Record<ScenarioPluginName, ScenarioSubscribeEvents> & Record<StatePluginName, StateSubscribeEvents> & Record<TextPluginName, TextSubscribeEvents> & Record<InteractPluginName, InteractSubscribeEvents>;
|
|
11
11
|
export type InterfacePluginConstants = ModuleComponentsConstants & Record<ControlsPluginName, ControlsConstants>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ModuleControllerState } from "@vnejs/module.components";
|
|
2
|
-
import type { TokenizedChar, WallElement } from "@vnejs/
|
|
3
|
-
import type { InterfaceModuleState } from "@vnejs/
|
|
2
|
+
import type { TokenizedChar, WallElement } from "@vnejs/contracts.text";
|
|
3
|
+
import type { InterfaceModuleState } from "@vnejs/contracts.views.scenario.interface";
|
|
4
4
|
export type { InterfaceModuleState };
|
|
5
5
|
export type InterfacePluginState = ModuleControllerState & InterfaceModuleState & {
|
|
6
6
|
isFast?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TokenizedChar } from "@vnejs/
|
|
1
|
+
import type { TokenizedChar } from "@vnejs/contracts.text";
|
|
2
2
|
export declare const useTokensHook: (isShow: boolean, tokens: TokenizedChar[], tokensVisible: number, uid: string) => {
|
|
3
3
|
isShowTokens: boolean;
|
|
4
4
|
realTokensVisible: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.views.scenario.interface",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"author": "",
|
|
31
31
|
"license": "ISC",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@vnejs/
|
|
33
|
+
"@vnejs/contracts.views.scenario.interface": "~0.1.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@vnejs/helpers": "~0.1.0",
|
|
37
37
|
"@vnejs/module.core": "~0.1.0",
|
|
38
38
|
"@vnejs/module.components": "~0.1.0",
|
|
39
|
-
"@vnejs/
|
|
39
|
+
"@vnejs/contracts.text": "~0.1.0",
|
|
40
40
|
"@vnejs/shared": "~0.1.0",
|
|
41
41
|
"@vnejs/uis.react": "~0.1.0",
|
|
42
42
|
"@vnejs/uis.utils": "~0.1.0"
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "@vnejs/
|
|
1
|
+
import "@vnejs/contracts.views.scenario.interface";
|
|
2
2
|
|
|
3
3
|
import { regPlugin } from "@vnejs/shared";
|
|
4
|
-
import { PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/
|
|
4
|
+
import { PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.scenario.interface";
|
|
5
5
|
|
|
6
6
|
import { InterfaceController } from "./modules/controller.js";
|
|
7
7
|
import { Interface } from "./modules/interface.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModuleController } from "@vnejs/module.components";
|
|
2
2
|
import type { ControlsPopPayload, ControlsPushPayload } from "@vnejs/module.components";
|
|
3
|
-
import { CONSTANTS as ControlsConstants } from "@vnejs/
|
|
3
|
+
import { CONSTANTS as ControlsConstants } from "@vnejs/contracts.controls";
|
|
4
4
|
|
|
5
5
|
import type { InterfacePluginConstants, InterfacePluginEvents, InterfacePluginParams, InterfacePluginSettings } from "../types.js";
|
|
6
6
|
import type { InterfaceForcePayload, InterfacePluginState } from "../utils/interface.js";
|
package/src/modules/interface.ts
CHANGED
|
@@ -34,7 +34,7 @@ export class Interface extends ModuleCore<InterfacePluginEvents, InterfacePlugin
|
|
|
34
34
|
init = () => this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.name, handler: this.onLineExec });
|
|
35
35
|
|
|
36
36
|
onLineExec = async ({ line = "" }: LineExecHandlerArg = {}) => {
|
|
37
|
-
const isForce =
|
|
37
|
+
const isForce = this.shared.viewForceAnimationSources.isNotEmpty();
|
|
38
38
|
|
|
39
39
|
const [action = "", execArg = ""] = tokenizeExecLine(line);
|
|
40
40
|
|
package/src/types.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ModuleComponentsConstants, ModuleComponentsEvents, ModuleComponentsParams, ModuleComponentsSettings } from "@vnejs/module.components";
|
|
2
2
|
import type { ReactComponentProps } from "@vnejs/uis.react";
|
|
3
|
-
import type { Constants as ControlsConstants, PluginName as ControlsPluginName } from "@vnejs/
|
|
4
|
-
import type { PluginName as InteractPluginName, SubscribeEvents as InteractSubscribeEvents } from "@vnejs/
|
|
5
|
-
import type { PluginName as ScenarioPluginName, SubscribeEvents as ScenarioSubscribeEvents } from "@vnejs/
|
|
6
|
-
import type { PluginName as StatePluginName, SubscribeEvents as StateSubscribeEvents } from "@vnejs/
|
|
7
|
-
import type { PluginName as TextPluginName, Params as TextParams, SubscribeEvents as TextSubscribeEvents } from "@vnejs/
|
|
8
|
-
import type { Params, PluginName, SubscribeEvents } from "@vnejs/
|
|
3
|
+
import type { Constants as ControlsConstants, PluginName as ControlsPluginName } from "@vnejs/contracts.controls";
|
|
4
|
+
import type { PluginName as InteractPluginName, SubscribeEvents as InteractSubscribeEvents } from "@vnejs/contracts.core.interact";
|
|
5
|
+
import type { PluginName as ScenarioPluginName, SubscribeEvents as ScenarioSubscribeEvents } from "@vnejs/contracts.core.scenario";
|
|
6
|
+
import type { PluginName as StatePluginName, SubscribeEvents as StateSubscribeEvents } from "@vnejs/contracts.core.state";
|
|
7
|
+
import type { PluginName as TextPluginName, Params as TextParams, SubscribeEvents as TextSubscribeEvents } from "@vnejs/contracts.text";
|
|
8
|
+
import type { Params, PluginName, SubscribeEvents } from "@vnejs/contracts.views.scenario.interface";
|
|
9
9
|
|
|
10
10
|
import type { InterfacePluginState } from "./utils/interface.js";
|
|
11
11
|
|
package/src/utils/interface.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ModuleControllerState } from "@vnejs/module.components";
|
|
2
|
-
import type { TokenizedChar, WallElement } from "@vnejs/
|
|
3
|
-
import type { InterfaceModuleState } from "@vnejs/
|
|
2
|
+
import type { TokenizedChar, WallElement } from "@vnejs/contracts.text";
|
|
3
|
+
import type { InterfaceModuleState } from "@vnejs/contracts.views.scenario.interface";
|
|
4
4
|
|
|
5
5
|
export type { InterfaceModuleState };
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { TextSpeakerInfo, TokenizedChar, WallElement } from "@vnejs/
|
|
1
|
+
import type { TextSpeakerInfo, TokenizedChar, WallElement } from "@vnejs/contracts.text";
|
|
2
2
|
import { Flex, PositionBox, Scrollbar, SmoothText, Text, useMemo } from "@vnejs/uis.react";
|
|
3
3
|
|
|
4
|
-
import type { Params as InterfaceContractParams } from "@vnejs/
|
|
4
|
+
import type { Params as InterfaceContractParams } from "@vnejs/contracts.views.scenario.interface";
|
|
5
5
|
|
|
6
6
|
import type { InterfaceViewProps } from "../../types.js";
|
|
7
7
|
import { useTokensHook } from "./tokens.hook.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TokenizedChar } from "@vnejs/
|
|
1
|
+
import type { TokenizedChar } from "@vnejs/contracts.text";
|
|
2
2
|
import { flushSync, useEffect, useMemo, useState } from "@vnejs/uis.react";
|
|
3
3
|
|
|
4
4
|
export const useTokensHook = (isShow: boolean, tokens: TokenizedChar[], tokensVisible: number, uid: string) => {
|
package/src/view/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ViewRenderFunc } from "@vnejs/module.components";
|
|
2
|
-
import type { TextSpeakerInfo } from "@vnejs/
|
|
2
|
+
import type { TextSpeakerInfo } from "@vnejs/contracts.text";
|
|
3
3
|
import type { ReactComponentProps } from "@vnejs/uis.react";
|
|
4
4
|
import { Screen, createRenderFunc, useCallback, useIsForceHook, useMemo, useStoreState } from "@vnejs/uis.react";
|
|
5
5
|
|