@vnejs/plugins.views.screens.credits 0.2.1 → 0.2.3
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.js +6 -6
- package/dist/modules/{accept.d.ts → controller.accept.d.ts} +1 -1
- package/dist/modules/{accept.js → controller.accept.js} +1 -1
- package/dist/modules/controller.d.ts +3 -3
- package/dist/modules/controller.js +3 -3
- package/dist/modules/hide.controls.d.ts +1 -1
- package/dist/modules/hide.controls.js +1 -1
- package/dist/modules/hide.state.d.ts +1 -1
- package/dist/modules/hide.state.js +1 -1
- package/dist/modules/view.d.ts +2 -3
- package/dist/modules/view.js +2 -3
- package/package.json +1 -1
- package/src/index.ts +6 -6
- package/src/modules/{accept.ts → controller.accept.ts} +1 -1
- package/src/modules/controller.ts +4 -3
- package/src/modules/hide.controls.ts +1 -1
- package/src/modules/hide.state.ts +1 -6
- package/src/modules/view.ts +4 -10
- package/src/tests/accept.test.ts +9 -9
- package/src/tests/hide.controls.test.ts +10 -10
- package/src/tests/hide.state.test.ts +3 -3
- package/src/tests/setup.ts +1 -6
- package/src/view/index.tsx +1 -7
package/dist/index.js
CHANGED
|
@@ -2,16 +2,16 @@ import "@vnejs/contracts.views.screens.credits";
|
|
|
2
2
|
import { regPlugin } from "@vnejs/shared";
|
|
3
3
|
import { PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.screens.credits";
|
|
4
4
|
import { CreditsController } from "./modules/controller.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { CreditsControllerAccept } from "./modules/controller.accept.js";
|
|
6
|
+
import { CreditsHideControls } from "./modules/hide.controls.js";
|
|
7
|
+
import { CreditsHideState } from "./modules/hide.state.js";
|
|
8
8
|
import { Credits } from "./modules/credits.js";
|
|
9
9
|
import { CreditsView } from "./modules/view.js";
|
|
10
10
|
regPlugin(PLUGIN_NAME, { events: SUBSCRIBE_EVENTS, params: PARAMS }, [
|
|
11
11
|
CreditsController,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
CreditsControllerAccept,
|
|
13
|
+
CreditsHideControls,
|
|
14
|
+
CreditsHideState,
|
|
15
15
|
Credits,
|
|
16
16
|
CreditsView,
|
|
17
17
|
]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModuleControllerAccept } from "@vnejs/module.controller.accept";
|
|
2
2
|
import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams, CreditsPluginSettings } from "../types.js";
|
|
3
3
|
import type { CreditsPluginState } from "../utils/credits.js";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class CreditsControllerAccept extends ModuleControllerAccept<CreditsPluginEvents, CreditsPluginConstants, CreditsPluginSettings, CreditsPluginParams, CreditsPluginState> {
|
|
5
5
|
name: string;
|
|
6
6
|
EVENT_SHOW: "vne:credits:show";
|
|
7
7
|
EVENT_HIDE: "vne:credits:hide";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleControllerAccept } from "@vnejs/module.controller.accept";
|
|
2
|
-
export class
|
|
2
|
+
export class CreditsControllerAccept extends ModuleControllerAccept {
|
|
3
3
|
name = "credits.controller.accept";
|
|
4
4
|
EVENT_SHOW = this.EVENTS.CREDITS.SHOW;
|
|
5
5
|
EVENT_HIDE = this.EVENTS.CREDITS.HIDE;
|
|
@@ -3,9 +3,9 @@ import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams,
|
|
|
3
3
|
import type { CreditsPluginState } from "../utils/credits.js";
|
|
4
4
|
export declare class CreditsController extends ModuleController<CreditsPluginEvents, CreditsPluginConstants, CreditsPluginSettings, CreditsPluginParams, CreditsPluginState> {
|
|
5
5
|
name: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
EVENT_UPDATE_VIEW: "vne:credits:update";
|
|
7
|
+
CONTROLS: {};
|
|
8
|
+
CONTROLS_INDEX: number;
|
|
9
9
|
subscribe: () => void;
|
|
10
10
|
afterHide: () => undefined;
|
|
11
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ModuleController } from "@vnejs/module.components";
|
|
2
2
|
export class CreditsController extends ModuleController {
|
|
3
3
|
name = "credits.controller";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
EVENT_UPDATE_VIEW = this.EVENTS.CREDITS.UPDATE;
|
|
5
|
+
CONTROLS = {};
|
|
6
|
+
CONTROLS_INDEX = this.PARAMS.CREDITS.ZINDEX;
|
|
7
7
|
subscribe = () => {
|
|
8
8
|
this.on(this.EVENTS.CREDITS.SHOW, this.onShow);
|
|
9
9
|
this.on(this.EVENTS.CREDITS.HIDE, this.onHide);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModuleControllerHideOnControls } from "@vnejs/module.controller.hide.on.controls";
|
|
2
2
|
import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams, CreditsPluginSettings } from "../types.js";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class CreditsHideControls extends ModuleControllerHideOnControls<CreditsPluginEvents, CreditsPluginConstants, CreditsPluginSettings, CreditsPluginParams> {
|
|
4
4
|
name: string;
|
|
5
5
|
EVENT_SHOW: "vne:credits:show";
|
|
6
6
|
EVENT_HIDE: "vne:credits:hide";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleControllerHideOnControls } from "@vnejs/module.controller.hide.on.controls";
|
|
2
|
-
export class
|
|
2
|
+
export class CreditsHideControls extends ModuleControllerHideOnControls {
|
|
3
3
|
name = "credits.hide.controls";
|
|
4
4
|
EVENT_SHOW = this.EVENTS.CREDITS.SHOW;
|
|
5
5
|
EVENT_HIDE = this.EVENTS.CREDITS.HIDE;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModuleControllerHideOnState } from "@vnejs/module.controller.hide.on.state";
|
|
2
2
|
import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams, CreditsPluginSettings } from "../types.js";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class CreditsHideState extends ModuleControllerHideOnState<CreditsPluginEvents, CreditsPluginConstants, CreditsPluginSettings, CreditsPluginParams> {
|
|
4
4
|
name: string;
|
|
5
5
|
EVENT_HIDE: "vne:credits:hide";
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleControllerHideOnState } from "@vnejs/module.controller.hide.on.state";
|
|
2
|
-
export class
|
|
2
|
+
export class CreditsHideState extends ModuleControllerHideOnState {
|
|
3
3
|
name = "credits.hide.state";
|
|
4
4
|
EVENT_HIDE = this.EVENTS.CREDITS.HIDE;
|
|
5
5
|
}
|
package/dist/modules/view.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams,
|
|
|
3
3
|
import type { CreditsPluginState } from "../utils/credits.js";
|
|
4
4
|
export declare class CreditsView extends ModuleView<CreditsPluginEvents, CreditsPluginConstants, CreditsPluginSettings, CreditsPluginParams, CreditsPluginState> {
|
|
5
5
|
name: string;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
EVENT_UPDATE_VIEW: "vne:credits:update";
|
|
7
|
+
TRANSITION: number;
|
|
8
8
|
renderFunc: import("@vnejs/module.components").ViewRenderFunc<CreditsPluginState>;
|
|
9
|
-
updateHandler: (state?: CreditsPluginState | undefined) => Promise<void>;
|
|
10
9
|
}
|
package/dist/modules/view.js
CHANGED
|
@@ -2,8 +2,7 @@ import { ModuleView } from "@vnejs/module.components";
|
|
|
2
2
|
import { render } from "../view/index.js";
|
|
3
3
|
export class CreditsView extends ModuleView {
|
|
4
4
|
name = "credits.view";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
EVENT_UPDATE_VIEW = this.EVENTS.CREDITS.UPDATE;
|
|
6
|
+
TRANSITION = this.PARAMS.CREDITS.TRANSITION;
|
|
7
7
|
renderFunc = render;
|
|
8
|
-
updateHandler = this.onUpdateStoreComponent;
|
|
9
8
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,17 +4,17 @@ import { regPlugin } from "@vnejs/shared";
|
|
|
4
4
|
import { PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.screens.credits";
|
|
5
5
|
|
|
6
6
|
import { CreditsController } from "./modules/controller.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { CreditsControllerAccept } from "./modules/controller.accept.js";
|
|
8
|
+
import { CreditsHideControls } from "./modules/hide.controls.js";
|
|
9
|
+
import { CreditsHideState } from "./modules/hide.state.js";
|
|
10
10
|
import { Credits } from "./modules/credits.js";
|
|
11
11
|
import { CreditsView } from "./modules/view.js";
|
|
12
12
|
|
|
13
13
|
regPlugin(PLUGIN_NAME, { events: SUBSCRIBE_EVENTS, params: PARAMS }, [
|
|
14
14
|
CreditsController,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
CreditsControllerAccept,
|
|
16
|
+
CreditsHideControls,
|
|
17
|
+
CreditsHideState,
|
|
18
18
|
Credits,
|
|
19
19
|
CreditsView,
|
|
20
20
|
]);
|
|
@@ -3,7 +3,7 @@ import { ModuleControllerAccept } from "@vnejs/module.controller.accept";
|
|
|
3
3
|
import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams, CreditsPluginSettings } from "../types.js";
|
|
4
4
|
import type { CreditsPluginState } from "../utils/credits.js";
|
|
5
5
|
|
|
6
|
-
export class
|
|
6
|
+
export class CreditsControllerAccept extends ModuleControllerAccept<
|
|
7
7
|
CreditsPluginEvents,
|
|
8
8
|
CreditsPluginConstants,
|
|
9
9
|
CreditsPluginSettings,
|
|
@@ -12,9 +12,10 @@ export class CreditsController extends ModuleController<
|
|
|
12
12
|
> {
|
|
13
13
|
name = "credits.controller";
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
EVENT_UPDATE_VIEW = this.EVENTS.CREDITS.UPDATE;
|
|
16
|
+
|
|
17
|
+
CONTROLS = {};
|
|
18
|
+
CONTROLS_INDEX = this.PARAMS.CREDITS.ZINDEX;
|
|
18
19
|
|
|
19
20
|
subscribe = () => {
|
|
20
21
|
this.on(this.EVENTS.CREDITS.SHOW, this.onShow);
|
|
@@ -2,7 +2,7 @@ import { ModuleControllerHideOnControls } from "@vnejs/module.controller.hide.on
|
|
|
2
2
|
|
|
3
3
|
import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams, CreditsPluginSettings } from "../types.js";
|
|
4
4
|
|
|
5
|
-
export class
|
|
5
|
+
export class CreditsHideControls extends ModuleControllerHideOnControls<
|
|
6
6
|
CreditsPluginEvents,
|
|
7
7
|
CreditsPluginConstants,
|
|
8
8
|
CreditsPluginSettings,
|
|
@@ -2,12 +2,7 @@ import { ModuleControllerHideOnState } from "@vnejs/module.controller.hide.on.st
|
|
|
2
2
|
|
|
3
3
|
import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams, CreditsPluginSettings } from "../types.js";
|
|
4
4
|
|
|
5
|
-
export class
|
|
6
|
-
CreditsPluginEvents,
|
|
7
|
-
CreditsPluginConstants,
|
|
8
|
-
CreditsPluginSettings,
|
|
9
|
-
CreditsPluginParams
|
|
10
|
-
> {
|
|
5
|
+
export class CreditsHideState extends ModuleControllerHideOnState<CreditsPluginEvents, CreditsPluginConstants, CreditsPluginSettings, CreditsPluginParams> {
|
|
11
6
|
name = "credits.hide.state";
|
|
12
7
|
|
|
13
8
|
EVENT_HIDE = this.EVENTS.CREDITS.HIDE;
|
package/src/modules/view.ts
CHANGED
|
@@ -4,18 +4,12 @@ import { render } from "../view/index.js";
|
|
|
4
4
|
import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams, CreditsPluginSettings } from "../types.js";
|
|
5
5
|
import type { CreditsPluginState } from "../utils/credits.js";
|
|
6
6
|
|
|
7
|
-
export class CreditsView extends ModuleView<
|
|
8
|
-
CreditsPluginEvents,
|
|
9
|
-
CreditsPluginConstants,
|
|
10
|
-
CreditsPluginSettings,
|
|
11
|
-
CreditsPluginParams,
|
|
12
|
-
CreditsPluginState
|
|
13
|
-
> {
|
|
7
|
+
export class CreditsView extends ModuleView<CreditsPluginEvents, CreditsPluginConstants, CreditsPluginSettings, CreditsPluginParams, CreditsPluginState> {
|
|
14
8
|
name = "credits.view";
|
|
15
9
|
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
EVENT_UPDATE_VIEW = this.EVENTS.CREDITS.UPDATE;
|
|
11
|
+
|
|
12
|
+
TRANSITION = this.PARAMS.CREDITS.TRANSITION;
|
|
18
13
|
|
|
19
14
|
renderFunc = render;
|
|
20
|
-
updateHandler = this.onUpdateStoreComponent;
|
|
21
15
|
}
|
package/src/tests/accept.test.ts
CHANGED
|
@@ -2,17 +2,17 @@ import { beforeEach, describe, expect, it } from "vitest";
|
|
|
2
2
|
|
|
3
3
|
import { spyEvent } from "@vnejs/test-utils";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { CreditsControllerAccept } from "../modules/controller.accept.js";
|
|
6
6
|
import { CONTROLS_EVENTS, createCreditsTestModule, registerCreditsPluginVne, SUBSCRIBE_EVENTS } from "./setup.js";
|
|
7
7
|
|
|
8
|
-
describe("
|
|
8
|
+
describe("CreditsControllerAccept", () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
10
|
registerCreditsPluginVne();
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
it("SHOW pushes ACCEPT and INTERACT controls", async () => {
|
|
14
|
-
const { module, observer } = createCreditsTestModule(
|
|
15
|
-
const accept = module as
|
|
14
|
+
const { module, observer } = createCreditsTestModule(CreditsControllerAccept);
|
|
15
|
+
const accept = module as CreditsControllerAccept;
|
|
16
16
|
const push = spyEvent(observer, CONTROLS_EVENTS.PUSH);
|
|
17
17
|
|
|
18
18
|
await observer.emit(SUBSCRIBE_EVENTS.SHOW);
|
|
@@ -29,7 +29,7 @@ describe("CreditsAccept", () => {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
it("HIDE pops ACCEPT controls", async () => {
|
|
32
|
-
const { observer } = createCreditsTestModule(
|
|
32
|
+
const { observer } = createCreditsTestModule(CreditsControllerAccept);
|
|
33
33
|
const pop = spyEvent(observer, CONTROLS_EVENTS.POP);
|
|
34
34
|
|
|
35
35
|
await observer.emit(SUBSCRIBE_EVENTS.HIDE);
|
|
@@ -38,12 +38,12 @@ describe("CreditsAccept", () => {
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
it("ACCEPT and INTERACT emit CREDITS.HIDE", async () => {
|
|
41
|
-
const { module, observer } = createCreditsTestModule(
|
|
42
|
-
const accept = module as
|
|
41
|
+
const { module, observer } = createCreditsTestModule(CreditsControllerAccept);
|
|
42
|
+
const accept = module as CreditsControllerAccept;
|
|
43
43
|
const hide = spyEvent(observer, SUBSCRIBE_EVENTS.HIDE);
|
|
44
44
|
|
|
45
|
-
accept.
|
|
46
|
-
accept.
|
|
45
|
+
accept.CONTROLS[accept.CONST.CONTROLS.BUTTONS.ACCEPT]();
|
|
46
|
+
accept.CONTROLS[accept.CONST.CONTROLS.BUTTONS.INTERACT]();
|
|
47
47
|
await Promise.resolve();
|
|
48
48
|
await Promise.resolve();
|
|
49
49
|
|
|
@@ -2,17 +2,17 @@ import { beforeEach, describe, expect, it } from "vitest";
|
|
|
2
2
|
|
|
3
3
|
import { spyEvent } from "@vnejs/test-utils";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { CreditsHideControls } from "../modules/hide.controls.js";
|
|
6
6
|
import { CONTROLS_EVENTS, createCreditsTestModule, registerCreditsPluginVne, SUBSCRIBE_EVENTS } from "./setup.js";
|
|
7
7
|
|
|
8
|
-
describe("
|
|
8
|
+
describe("CreditsHideControls", () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
10
|
registerCreditsPluginVne();
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
it("SHOW pushes BACK, MENU and GAMEMENU controls", async () => {
|
|
14
|
-
const { module, observer } = createCreditsTestModule(
|
|
15
|
-
const hide = module as
|
|
14
|
+
const { module, observer } = createCreditsTestModule(CreditsHideControls);
|
|
15
|
+
const hide = module as CreditsHideControls;
|
|
16
16
|
const push = spyEvent(observer, CONTROLS_EVENTS.PUSH);
|
|
17
17
|
|
|
18
18
|
await observer.emit(SUBSCRIBE_EVENTS.SHOW);
|
|
@@ -30,7 +30,7 @@ describe("CreditsHideOnControls", () => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
it("HIDE pops hide.controls", async () => {
|
|
33
|
-
const { observer } = createCreditsTestModule(
|
|
33
|
+
const { observer } = createCreditsTestModule(CreditsHideControls);
|
|
34
34
|
const pop = spyEvent(observer, CONTROLS_EVENTS.POP);
|
|
35
35
|
|
|
36
36
|
await observer.emit(SUBSCRIBE_EVENTS.HIDE);
|
|
@@ -39,13 +39,13 @@ describe("CreditsHideOnControls", () => {
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
it("BACK, MENU and GAMEMENU emit CREDITS.HIDE", async () => {
|
|
42
|
-
const { module, observer } = createCreditsTestModule(
|
|
43
|
-
const hide = module as
|
|
42
|
+
const { module, observer } = createCreditsTestModule(CreditsHideControls);
|
|
43
|
+
const hide = module as CreditsHideControls;
|
|
44
44
|
const hideEvent = spyEvent(observer, SUBSCRIBE_EVENTS.HIDE);
|
|
45
45
|
|
|
46
|
-
hide.
|
|
47
|
-
hide.
|
|
48
|
-
hide.
|
|
46
|
+
hide.CONTROLS[hide.CONST.CONTROLS.BUTTONS.BACK]();
|
|
47
|
+
hide.CONTROLS[hide.CONST.CONTROLS.BUTTONS.MENU]();
|
|
48
|
+
hide.CONTROLS[hide.CONST.CONTROLS.BUTTONS.GAMEMENU]();
|
|
49
49
|
await Promise.resolve();
|
|
50
50
|
await Promise.resolve();
|
|
51
51
|
await Promise.resolve();
|
|
@@ -3,16 +3,16 @@ import { beforeEach, describe, expect, it } from "vitest";
|
|
|
3
3
|
import { SUBSCRIBE_EVENTS as STATE_EVENTS } from "@vnejs/contracts.core.state";
|
|
4
4
|
import { spyEvent } from "@vnejs/test-utils";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { CreditsHideState } from "../modules/hide.state.js";
|
|
7
7
|
import { createCreditsTestModule, registerCreditsPluginVne, SUBSCRIBE_EVENTS } from "./setup.js";
|
|
8
8
|
|
|
9
|
-
describe("
|
|
9
|
+
describe("CreditsHideState", () => {
|
|
10
10
|
beforeEach(() => {
|
|
11
11
|
registerCreditsPluginVne();
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
it("STATE.SET and STATE.CLEAR emit HIDE with isForce", async () => {
|
|
15
|
-
const { observer } = createCreditsTestModule(
|
|
15
|
+
const { observer } = createCreditsTestModule(CreditsHideState);
|
|
16
16
|
const hide = spyEvent(observer, SUBSCRIBE_EVENTS.HIDE);
|
|
17
17
|
|
|
18
18
|
await observer.emit(STATE_EVENTS.SET);
|
package/src/tests/setup.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { CONSTANTS as CONTROLS_CONST, PLUGIN_NAME as CONTROLS, SUBSCRIBE_EVENTS as CONTROLS_EVENTS } from "@vnejs/contracts.controls";
|
|
2
2
|
import { PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.screens.credits";
|
|
3
|
-
import {
|
|
4
|
-
createTestModule as baseCreateTestModule,
|
|
5
|
-
registerCoreVne,
|
|
6
|
-
registerVnePlugin,
|
|
7
|
-
stubSilentEvent,
|
|
8
|
-
} from "@vnejs/test-utils";
|
|
3
|
+
import { createTestModule as baseCreateTestModule, registerCoreVne, registerVnePlugin, stubSilentEvent } from "@vnejs/test-utils";
|
|
9
4
|
|
|
10
5
|
export const registerCreditsPluginVne = () => {
|
|
11
6
|
registerCoreVne();
|
package/src/view/index.tsx
CHANGED
|
@@ -5,13 +5,7 @@ import { Flex, Screen, ScrollContent, Text, createRenderFunc, useCallback, useMe
|
|
|
5
5
|
import type { CreditsPluginConstants, CreditsPluginEvents, CreditsPluginParams, CreditsPluginSettings } from "../types.js";
|
|
6
6
|
import type { CreditsPluginState } from "../utils/credits.js";
|
|
7
7
|
|
|
8
|
-
type CreditsComponentProps = ReactComponentProps<
|
|
9
|
-
CreditsPluginEvents,
|
|
10
|
-
CreditsPluginConstants,
|
|
11
|
-
CreditsPluginSettings,
|
|
12
|
-
CreditsPluginParams,
|
|
13
|
-
CreditsPluginState
|
|
14
|
-
>;
|
|
8
|
+
type CreditsComponentProps = ReactComponentProps<CreditsPluginEvents, CreditsPluginConstants, CreditsPluginSettings, CreditsPluginParams, CreditsPluginState>;
|
|
15
9
|
|
|
16
10
|
const renderLine = ({ text, props }: { text: string; props: Record<string, unknown> }, i: number) => (
|
|
17
11
|
<Text
|