@vnejs/plugins.compatibility.text-autoread 0.1.1 → 0.1.2
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 +10 -0
- package/dist/index.js +13 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.js +1 -0
- package/package.json +30 -6
- package/{index.js → src/index.ts} +5 -2
- package/src/types.ts +13 -0
- package/tsconfig.json +6 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Module } from "@vnejs/module";
|
|
2
|
+
import type { AutoreadSourcePayload } from "@vnejs/plugins.scenario.autoread.contract";
|
|
3
|
+
import type { PluginConstants, PluginEvents, PluginParams, PluginSettings } from "./types.js";
|
|
4
|
+
export declare class CompatibilityTextAutoread extends Module<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
|
|
5
|
+
name: string;
|
|
6
|
+
sourceArg: AutoreadSourcePayload;
|
|
7
|
+
subscribe: () => void;
|
|
8
|
+
onTextEmit: () => Promise<unknown[]> | undefined;
|
|
9
|
+
onTextEmitEnd: () => Promise<unknown[]> | undefined;
|
|
10
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Module } from "@vnejs/module";
|
|
2
|
+
import { regModule } from "@vnejs/shared";
|
|
3
|
+
export class CompatibilityTextAutoread extends Module {
|
|
4
|
+
name = "compatibility.text_autoread";
|
|
5
|
+
sourceArg = { source: this.name };
|
|
6
|
+
subscribe = () => {
|
|
7
|
+
this.on(this.EVENTS.TEXT.EMIT, this.onTextEmit);
|
|
8
|
+
this.on(this.EVENTS.TEXT.EMIT_END, this.onTextEmitEnd);
|
|
9
|
+
};
|
|
10
|
+
onTextEmit = () => this.emit(this.EVENTS.AUTOREAD.PUSH, this.sourceArg);
|
|
11
|
+
onTextEmitEnd = () => this.emit(this.EVENTS.AUTOREAD.POP, this.sourceArg);
|
|
12
|
+
}
|
|
13
|
+
regModule(CompatibilityTextAutoread);
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VnePluginConstantsMapRegistry, VnePluginEventsMapRegistry, VnePluginParamsMapRegistry, VnePluginSettingsMapRegistry } from "@vnejs/shared";
|
|
2
|
+
import type { PluginName as AutoreadPluginName, SubscribeEvents as AutoreadSubscribeEvents } from "@vnejs/plugins.scenario.autoread.contract";
|
|
3
|
+
import type { PluginName as TextPluginName, SubscribeEvents as TextSubscribeEvents } from "@vnejs/plugins.text.contract";
|
|
4
|
+
export type PluginEvents = VnePluginEventsMapRegistry & Record<TextPluginName, TextSubscribeEvents> & Record<AutoreadPluginName, AutoreadSubscribeEvents>;
|
|
5
|
+
export type PluginConstants = VnePluginConstantsMapRegistry;
|
|
6
|
+
export type PluginSettings = VnePluginSettingsMapRegistry;
|
|
7
|
+
export type PluginParams = VnePluginParamsMapRegistry;
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,17 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.compatibility.text-autoread",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.1.2",
|
|
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
|
+
],
|
|
5
20
|
"scripts": {
|
|
6
21
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
22
|
+
"build": "npx @vnejs/monorepo package",
|
|
7
23
|
"publish:major:plugin": "npm run publish:major",
|
|
8
24
|
"publish:minor:plugin": "npm run publish:minor",
|
|
9
25
|
"publish:patch:plugin": "npm run publish:patch",
|
|
10
|
-
"publish:major": "
|
|
11
|
-
"publish:minor": "
|
|
12
|
-
"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"
|
|
13
29
|
},
|
|
14
30
|
"author": "",
|
|
15
31
|
"license": "ISC",
|
|
16
|
-
"
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@vnejs/module": "~0.0.1",
|
|
34
|
+
"@vnejs/plugins.scenario.autoread.contract": "~0.0.1",
|
|
35
|
+
"@vnejs/plugins.text.contract": "~0.0.1",
|
|
36
|
+
"@vnejs/shared": "~0.0.9"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@vnejs/configs.ts-common": "~0.0.1"
|
|
40
|
+
}
|
|
17
41
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Module } from "@vnejs/module";
|
|
2
|
+
import type { AutoreadSourcePayload } from "@vnejs/plugins.scenario.autoread.contract";
|
|
2
3
|
import { regModule } from "@vnejs/shared";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
import type { PluginConstants, PluginEvents, PluginParams, PluginSettings } from "./types.js";
|
|
6
|
+
|
|
7
|
+
export class CompatibilityTextAutoread extends Module<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
|
|
5
8
|
name = "compatibility.text_autoread";
|
|
6
9
|
|
|
7
|
-
sourceArg = { source: this.name };
|
|
10
|
+
sourceArg: AutoreadSourcePayload = { source: this.name };
|
|
8
11
|
|
|
9
12
|
subscribe = () => {
|
|
10
13
|
this.on(this.EVENTS.TEXT.EMIT, this.onTextEmit);
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { VnePluginConstantsMapRegistry, VnePluginEventsMapRegistry, VnePluginParamsMapRegistry, VnePluginSettingsMapRegistry } from "@vnejs/shared";
|
|
2
|
+
import type { PluginName as AutoreadPluginName, SubscribeEvents as AutoreadSubscribeEvents } from "@vnejs/plugins.scenario.autoread.contract";
|
|
3
|
+
import type { PluginName as TextPluginName, SubscribeEvents as TextSubscribeEvents } from "@vnejs/plugins.text.contract";
|
|
4
|
+
|
|
5
|
+
export type PluginEvents = VnePluginEventsMapRegistry &
|
|
6
|
+
Record<TextPluginName, TextSubscribeEvents> &
|
|
7
|
+
Record<AutoreadPluginName, AutoreadSubscribeEvents>;
|
|
8
|
+
|
|
9
|
+
export type PluginConstants = VnePluginConstantsMapRegistry;
|
|
10
|
+
|
|
11
|
+
export type PluginSettings = VnePluginSettingsMapRegistry;
|
|
12
|
+
|
|
13
|
+
export type PluginParams = VnePluginParamsMapRegistry;
|