@vnejs/contracts.rpg.skills 0.1.1
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/const.d.ts +2 -0
- package/dist/const.js +1 -0
- package/dist/events.d.ts +7 -0
- package/dist/events.js +6 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +8 -0
- package/dist/params.d.ts +18 -0
- package/dist/params.js +9 -0
- package/package.json +35 -0
- package/src/const.ts +3 -0
- package/src/events.ts +8 -0
- package/src/index.ts +37 -0
- package/src/params.ts +26 -0
- package/tsconfig.json +9 -0
package/dist/const.d.ts
ADDED
package/dist/const.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CONSTANTS = {};
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const SUBSCRIBE_EVENTS: {
|
|
2
|
+
readonly EMIT: "vne:skills:emit";
|
|
3
|
+
readonly EMIT_START: "vne:skills:emit_start";
|
|
4
|
+
readonly EMIT_FINISH: "vne:skills:emit_finish";
|
|
5
|
+
readonly CHECK: "vne:skills:check";
|
|
6
|
+
};
|
|
7
|
+
export type SubscribeEvents = typeof SUBSCRIBE_EVENTS;
|
package/dist/events.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "@vnejs/module";
|
|
2
|
+
import "@vnejs/shared";
|
|
3
|
+
import { CONSTANTS } from "./const.js";
|
|
4
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
5
|
+
import { PARAMS } from "./params.js";
|
|
6
|
+
export declare const PLUGIN_NAME: "SKILLS";
|
|
7
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
8
|
+
export { CONSTANTS };
|
|
9
|
+
export type { Constants } from "./const.js";
|
|
10
|
+
export { SUBSCRIBE_EVENTS };
|
|
11
|
+
export type { SubscribeEvents } from "./events.js";
|
|
12
|
+
export { PARAMS, TYPES } from "./params.js";
|
|
13
|
+
export type { Params, SkillInfo, SkillType, SkillTypes } from "./params.js";
|
|
14
|
+
export type SkillsEmitPayload = {
|
|
15
|
+
id?: string;
|
|
16
|
+
unit?: string;
|
|
17
|
+
target?: string;
|
|
18
|
+
};
|
|
19
|
+
export type SkillsEmitLifecyclePayload = {
|
|
20
|
+
skillId?: string;
|
|
21
|
+
unit?: string;
|
|
22
|
+
target?: string;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
declare module "@vnejs/shared" {
|
|
26
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {
|
|
27
|
+
}
|
|
28
|
+
interface VnePluginConstantsMap extends Record<typeof PLUGIN_NAME, typeof CONSTANTS> {
|
|
29
|
+
}
|
|
30
|
+
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {
|
|
31
|
+
}
|
|
32
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "@vnejs/module";
|
|
2
|
+
import "@vnejs/shared";
|
|
3
|
+
import { CONSTANTS } from "./const.js";
|
|
4
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
5
|
+
export const PLUGIN_NAME = "SKILLS";
|
|
6
|
+
export { CONSTANTS };
|
|
7
|
+
export { SUBSCRIBE_EVENTS };
|
|
8
|
+
export { PARAMS, TYPES } from "./params.js";
|
package/dist/params.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Widen } from "@vnejs/shared";
|
|
2
|
+
export interface SkillTypes {
|
|
3
|
+
DAMAGE: "damage";
|
|
4
|
+
HEAL: "heal";
|
|
5
|
+
}
|
|
6
|
+
export declare const TYPES: SkillTypes;
|
|
7
|
+
export type SkillType = SkillTypes[keyof SkillTypes];
|
|
8
|
+
export type SkillInfo = {
|
|
9
|
+
type: SkillType;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
declare const PARAMS_DEFAULT: {
|
|
13
|
+
TYPES: SkillTypes;
|
|
14
|
+
ITEMS: Record<string, SkillInfo>;
|
|
15
|
+
};
|
|
16
|
+
export type Params = Widen<typeof PARAMS_DEFAULT>;
|
|
17
|
+
export declare const PARAMS: Params;
|
|
18
|
+
export {};
|
package/dist/params.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vnejs/contracts.rpg.skills",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Contracts for @vnejs/plugins.rpg.skills",
|
|
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
|
+
"build": "npx @vnejs/monorepo package",
|
|
22
|
+
"publish:major": "npx @vnejs/monorepo publish major --access public",
|
|
23
|
+
"publish:minor": "npx @vnejs/monorepo publish minor --access public",
|
|
24
|
+
"publish:patch": "npx @vnejs/monorepo publish patch --access public"
|
|
25
|
+
},
|
|
26
|
+
"author": "",
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@vnejs/module": "~0.1.0",
|
|
30
|
+
"@vnejs/shared": "~0.1.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@vnejs/configs.ts-common": "~0.1.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/src/const.ts
ADDED
package/src/events.ts
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "@vnejs/module";
|
|
2
|
+
import "@vnejs/shared";
|
|
3
|
+
|
|
4
|
+
import { CONSTANTS } from "./const.js";
|
|
5
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
6
|
+
import { PARAMS } from "./params.js";
|
|
7
|
+
|
|
8
|
+
export const PLUGIN_NAME = "SKILLS" as const;
|
|
9
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
10
|
+
|
|
11
|
+
export { CONSTANTS };
|
|
12
|
+
export type { Constants } from "./const.js";
|
|
13
|
+
export { SUBSCRIBE_EVENTS };
|
|
14
|
+
export type { SubscribeEvents } from "./events.js";
|
|
15
|
+
export { PARAMS, TYPES } from "./params.js";
|
|
16
|
+
export type { Params, SkillInfo, SkillType, SkillTypes } from "./params.js";
|
|
17
|
+
|
|
18
|
+
export type SkillsEmitPayload = {
|
|
19
|
+
id?: string;
|
|
20
|
+
unit?: string;
|
|
21
|
+
target?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type SkillsEmitLifecyclePayload = {
|
|
25
|
+
skillId?: string;
|
|
26
|
+
unit?: string;
|
|
27
|
+
target?: string;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare module "@vnejs/shared" {
|
|
32
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
|
|
33
|
+
|
|
34
|
+
interface VnePluginConstantsMap extends Record<typeof PLUGIN_NAME, typeof CONSTANTS> {}
|
|
35
|
+
|
|
36
|
+
interface VnePluginParamsMap extends Record<typeof PLUGIN_NAME, typeof PARAMS> {}
|
|
37
|
+
}
|
package/src/params.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Widen } from "@vnejs/shared";
|
|
2
|
+
|
|
3
|
+
export interface SkillTypes {
|
|
4
|
+
DAMAGE: "damage";
|
|
5
|
+
HEAL: "heal";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const TYPES: SkillTypes = {
|
|
9
|
+
DAMAGE: "damage",
|
|
10
|
+
HEAL: "heal",
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type SkillType = SkillTypes[keyof SkillTypes];
|
|
14
|
+
|
|
15
|
+
export type SkillInfo = {
|
|
16
|
+
type: SkillType;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const PARAMS_DEFAULT = {
|
|
21
|
+
TYPES,
|
|
22
|
+
ITEMS: {} as Record<string, SkillInfo>,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type Params = Widen<typeof PARAMS_DEFAULT>;
|
|
26
|
+
export const PARAMS: Params = PARAMS_DEFAULT;
|