@vnejs/plugins.bridges.plugins.controllers.scenario.qte.plugins.controllers.scenario.interface 0.0.0-stage → 0.2.10

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.
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { regPlugin } from "@vnejs/registry";
2
+ import { PLUGIN_NAME } from "@vnejs/contracts.bridges.plugins.controllers.scenario.qte.plugins.controllers.scenario.interface";
3
+ import { BridgePluginQteViewPluginInterface } from "./modules/bridge_plugin_qte_view_plugin_interface.js";
4
+ regPlugin(PLUGIN_NAME, {}, [BridgePluginQteViewPluginInterface]);
@@ -0,0 +1,7 @@
1
+ import { ModuleCore } from "@vnejs/module.core";
2
+ import type { PluginConstants, PluginEvents, PluginParams, PluginSettings } from "../types.js";
3
+ export declare class BridgePluginQteViewPluginInterface extends ModuleCore<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
4
+ name: string;
5
+ subscribe: () => void;
6
+ onQteViewShow: () => undefined;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { ModuleCore } from "@vnejs/module.core";
2
+ export class BridgePluginQteViewPluginInterface extends ModuleCore {
3
+ name = "bridge_plugin_qte_view_plugin_interface";
4
+ subscribe = () => {
5
+ this.on(this.EVENTS.QTE_VIEW.SHOW, this.onQteViewShow, { priority: this.CONST.COMPONENTS.LIFECYCLE_PRIORITY.SHOW.BEFORE });
6
+ };
7
+ onQteViewShow = () => void this.emit(this.EVENTS.INTERFACE.HIDE);
8
+ }
@@ -0,0 +1,7 @@
1
+ import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
2
+ import type { PluginName as InterfacePluginName, SubscribeEvents as InterfaceSubscribeEvents } from "@vnejs/contracts.controllers.scenario.interface";
3
+ import type { PluginName as QteViewPluginName, SubscribeEvents as QteViewSubscribeEvents } from "@vnejs/contracts.controllers.scenario.qte";
4
+ export type PluginEvents = ModuleCoreEvents & Record<QteViewPluginName, QteViewSubscribeEvents> & Record<InterfacePluginName, InterfaceSubscribeEvents>;
5
+ export type PluginConstants = ModuleCoreConstants;
6
+ export type PluginSettings = ModuleCoreSettings;
7
+ export type PluginParams = ModuleCoreParams;
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.bridges.plugins.controllers.scenario.qte.plugins.controllers.scenario.interface",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.10",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "src",
18
+ "tsconfig.json"
19
+ ],
20
+ "scripts": {
21
+ "test": "npx @vnejs/monorepo test",
22
+ "build": "npx @vnejs/monorepo package",
23
+ "publish:major:plugin": "npm run publish:major",
24
+ "publish:minor:plugin": "npm run publish:minor",
25
+ "publish:patch:plugin": "npm run publish:patch",
26
+ "publish:major": "npx @vnejs/monorepo publish major --access public",
27
+ "publish:minor": "npx @vnejs/monorepo publish minor --access public",
28
+ "publish:patch": "npx @vnejs/monorepo publish patch --access public"
29
+ },
30
+ "author": "",
31
+ "license": "ISC",
32
+ "peerDependencies": {
33
+ "@vnejs/module.core": "~0.2.0",
34
+ "@vnejs/contracts.controllers.scenario.qte": "~0.2.0",
35
+ "@vnejs/contracts.controllers.scenario.interface": "~0.2.0",
36
+ "@vnejs/registry": "~0.2.0",
37
+ "@vnejs/contracts.bridges.plugins.controllers.scenario.qte.plugins.controllers.scenario.interface": "~0.2.0"
38
+ },
39
+ "devDependencies": {
40
+ "@vnejs/configs.ts-common": "~0.2.0",
41
+ "@vnejs/configs.vitest": "~0.2.0",
42
+ "@vnejs/test-utils": "~0.2.0",
43
+ "@vnejs/contracts.controllers.scenario.qte": "~0.2.0",
44
+ "@vnejs/contracts.controllers.scenario.interface": "~0.2.0",
45
+ "@vnejs/module.core": "~0.2.0",
46
+ "@vnejs/registry": "~0.2.0",
47
+ "@vnejs/contracts.bridges.plugins.controllers.scenario.qte.plugins.controllers.scenario.interface": "~0.2.0"
48
+ }
49
+ }
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { regPlugin } from "@vnejs/registry";
2
+
3
+ import { PLUGIN_NAME } from "@vnejs/contracts.bridges.plugins.controllers.scenario.qte.plugins.controllers.scenario.interface";
4
+
5
+ import { BridgePluginQteViewPluginInterface } from "./modules/bridge_plugin_qte_view_plugin_interface.js";
6
+
7
+ regPlugin(PLUGIN_NAME, {}, [BridgePluginQteViewPluginInterface]);
@@ -0,0 +1,13 @@
1
+ import { ModuleCore } from "@vnejs/module.core";
2
+
3
+ import type { PluginConstants, PluginEvents, PluginParams, PluginSettings } from "../types.js";
4
+
5
+ export class BridgePluginQteViewPluginInterface extends ModuleCore<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
6
+ name = "bridge_plugin_qte_view_plugin_interface";
7
+
8
+ subscribe = () => {
9
+ this.on(this.EVENTS.QTE_VIEW.SHOW, this.onQteViewShow, { priority: this.CONST.COMPONENTS.LIFECYCLE_PRIORITY.SHOW.BEFORE });
10
+ };
11
+
12
+ onQteViewShow = () => void this.emit(this.EVENTS.INTERFACE.HIDE);
13
+ }
@@ -0,0 +1,20 @@
1
+ import { beforeEach, describe, expect, it } from "vitest";
2
+
3
+ import { spyEvent } from "@vnejs/test-utils";
4
+
5
+ import { BridgePluginQteViewPluginInterface } from "../modules/bridge_plugin_qte_view_plugin_interface.js";
6
+
7
+ import { createCompatibilityTestModule, INTERFACE_EVENTS, QTE_EVENTS, registerCompatibilityVne } from "./setup.js";
8
+
9
+ describe("BridgePluginQteViewPluginInterface", () => {
10
+ beforeEach(() => registerCompatibilityVne());
11
+
12
+ it("QTE_VIEW.SHOW emits INTERFACE.HIDE", async () => {
13
+ const { observer } = createCompatibilityTestModule(BridgePluginQteViewPluginInterface);
14
+ const hide = spyEvent(observer, INTERFACE_EVENTS.HIDE);
15
+
16
+ await observer.emit(QTE_EVENTS.SHOW);
17
+
18
+ expect(hide).toHaveBeenCalledOnce();
19
+ });
20
+ });
@@ -0,0 +1,17 @@
1
+ import { createTestModule as baseCreateTestModule, registerCoreVne, registerVnePlugin } from "@vnejs/test-utils";
2
+
3
+ import { SUBSCRIBE_EVENTS as INTERFACE_EVENTS, PLUGIN_NAME as INTERFACE } from "@vnejs/contracts.controllers.scenario.interface";
4
+ import { PARAMS as QTE_VIEW_PARAMS, PLUGIN_NAME as QTE_VIEW, SUBSCRIBE_EVENTS as QTE_VIEW_EVENTS } from "@vnejs/contracts.controllers.scenario.qte";
5
+
6
+ export const registerCompatibilityVne = () => {
7
+ registerCoreVne();
8
+ registerVnePlugin(QTE_VIEW, { events: QTE_VIEW_EVENTS, params: QTE_VIEW_PARAMS });
9
+ registerVnePlugin(INTERFACE, { events: INTERFACE_EVENTS });
10
+ };
11
+
12
+ export const createCompatibilityTestModule = <T extends Parameters<typeof baseCreateTestModule>[0]>(
13
+ ModuleClass: T,
14
+ options: Parameters<typeof baseCreateTestModule>[1] = {},
15
+ ) => baseCreateTestModule(ModuleClass, options);
16
+
17
+ export { QTE_VIEW_EVENTS as QTE_EVENTS, INTERFACE_EVENTS };
package/src/types.ts ADDED
@@ -0,0 +1,12 @@
1
+ import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
2
+
3
+ import type { PluginName as InterfacePluginName, SubscribeEvents as InterfaceSubscribeEvents } from "@vnejs/contracts.controllers.scenario.interface";
4
+ import type { PluginName as QteViewPluginName, SubscribeEvents as QteViewSubscribeEvents } from "@vnejs/contracts.controllers.scenario.qte";
5
+
6
+ export type PluginEvents = ModuleCoreEvents & Record<QteViewPluginName, QteViewSubscribeEvents> & Record<InterfacePluginName, InterfaceSubscribeEvents>;
7
+
8
+ export type PluginConstants = ModuleCoreConstants;
9
+
10
+ export type PluginSettings = ModuleCoreSettings;
11
+
12
+ export type PluginParams = ModuleCoreParams;
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@vnejs/configs.ts-common/tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist"
6
+ },
7
+ "include": ["src/**/*.ts"],
8
+ "exclude": ["dist", "node_modules", "src/tests"]
9
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.