narrat 0.9.2 → 0.10.0
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/CHANGELOG.md +273 -0
- package/LICENSE +21 -21
- package/README.md +30 -30
- package/lib/app.vue.d.ts +2 -1
- package/lib/components/MainMenu.vue.d.ts +1 -0
- package/lib/components/Skills.vue.d.ts +4 -0
- package/lib/dialog-box.vue.d.ts +1 -0
- package/lib/index.esm.js +400 -122
- package/lib/index.js +399 -121
- package/lib/utils/logger.d.ts +9 -5
- package/lib/utils/skillchecks.d.ts +18 -0
- package/package.json +85 -84
package/lib/utils/logger.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
declare class
|
|
1
|
+
declare class LogManager {
|
|
2
2
|
debug: boolean;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
logger: {
|
|
4
|
+
[key: string]: (...args: any[]) => void;
|
|
5
|
+
};
|
|
6
|
+
setupDebugger(debug: boolean): void;
|
|
6
7
|
}
|
|
7
|
-
export declare const
|
|
8
|
+
export declare const logManager: LogManager;
|
|
9
|
+
export declare const logger: {
|
|
10
|
+
[key: string]: (...args: any[]) => void;
|
|
11
|
+
};
|
|
8
12
|
export {};
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
import { SkillCheckParams } from '@/renpy/renpy-helpers';
|
|
1
2
|
import { SkillCheckState } from '@/types/vuex';
|
|
2
3
|
import { State } from 'vue';
|
|
3
4
|
import { ActionContext } from 'vuex';
|
|
4
5
|
export declare function createSkillCheckState(): SkillCheckState;
|
|
5
6
|
export declare function getSkillCheckState(ctx: ActionContext<State, State>, skillCheckId: string): SkillCheckState;
|
|
7
|
+
export declare function getSkillCheckDifficultyScore(value: number, level: number): number;
|
|
8
|
+
export declare function getSkillCheckDifficultyText(value: number, level: number): string;
|
|
9
|
+
export declare function getSkillCheckText({ context, skill, skillCheckId, value, }: {
|
|
10
|
+
context: ActionContext<State, State>;
|
|
11
|
+
skill: string;
|
|
12
|
+
skillCheckId: string;
|
|
13
|
+
value: number;
|
|
14
|
+
}): {
|
|
15
|
+
difficultyText: string;
|
|
16
|
+
allowed: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function getPassiveSkillCheckText(ctx: ActionContext<State, State>, success: boolean, params: SkillCheckParams): string;
|
|
19
|
+
export declare function calculateSkillCheckRoll(state: State, skill: string): {
|
|
20
|
+
roll: number;
|
|
21
|
+
unmodifiedRoll: number;
|
|
22
|
+
};
|
|
23
|
+
export declare function resolveSkillCheck(state: State, params: SkillCheckParams): boolean;
|
package/package.json
CHANGED
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "narrat",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "narrat narrative engine",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"module": "lib/index.esm.js",
|
|
7
|
-
"files": [
|
|
8
|
-
"lib/"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
-
"start": "snowpack dev",
|
|
13
|
-
"version": "npm run build",
|
|
14
|
-
"build": "cross-env NODE_ENV=production rollup -c",
|
|
15
|
-
"build-demo": "snowpack build",
|
|
16
|
-
"lint": "eslint src --ext=.js,.jsx,.ts,.tsx",
|
|
17
|
-
"preversion": "npm run build && npm run lint",
|
|
18
|
-
"postversion": "git push && git push --tags"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"game"
|
|
22
|
-
],
|
|
23
|
-
"author": "Liana Pigeot <liana.pigeot@protonmail.com>",
|
|
24
|
-
"license": "MIT",
|
|
25
|
-
"devDependencies": {
|
|
26
|
-
"@babel/core": "^7.12.10",
|
|
27
|
-
"@babel/preset-env": "^7.12.11",
|
|
28
|
-
"@rollup/plugin-commonjs": "^16.0.0",
|
|
29
|
-
"@rollup/plugin-node-resolve": "^10.0.0",
|
|
30
|
-
"@rollup/plugin-typescript": "^8.2.5",
|
|
31
|
-
"@snowpack/plugin-postcss": "^1.4.3",
|
|
32
|
-
"@snowpack/plugin-sass": "^1.4.0",
|
|
33
|
-
"@snowpack/plugin-typescript": "^1.2.1",
|
|
34
|
-
"@snowpack/plugin-vue": "^2.6.2",
|
|
35
|
-
"@types/howler": "^2.2.3",
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^4.28.3",
|
|
37
|
-
"@typescript-eslint/parser": "^4.28.3",
|
|
38
|
-
"@vue/compiler-sfc": "^3.0.4",
|
|
39
|
-
"babel-loader": "^8.2.2",
|
|
40
|
-
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
|
41
|
-
"babel-preset-vue": "^2.0.2",
|
|
42
|
-
"cross-env": "^7.0.3",
|
|
43
|
-
"css-loader": "^5.0.1",
|
|
44
|
-
"es6-promise": "^4.2.8",
|
|
45
|
-
"eslint": "^7.30.0",
|
|
46
|
-
"eslint-config-airbnb-base": "^14.2.1",
|
|
47
|
-
"eslint-config-prettier": "^8.3.0",
|
|
48
|
-
"eslint-config-standard": "^16.0.3",
|
|
49
|
-
"eslint-import-resolver-typescript": "^2.4.0",
|
|
50
|
-
"eslint-plugin-import": "^2.23.4",
|
|
51
|
-
"eslint-plugin-node": "^11.1.0",
|
|
52
|
-
"eslint-plugin-promise": "^5.1.0",
|
|
53
|
-
"eslint-plugin-vue": "^7.13.0",
|
|
54
|
-
"postcss": "^8.2.1",
|
|
55
|
-
"postcss-cli": "^8.3.1",
|
|
56
|
-
"prettier": "2.3.2",
|
|
57
|
-
"rollup": "^2.35.1",
|
|
58
|
-
"rollup-plugin-analyzer": "^4.0.0",
|
|
59
|
-
"rollup-plugin-inject-process-env": "^1.3.1",
|
|
60
|
-
"rollup-plugin-paths": "^0.0.4",
|
|
61
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
62
|
-
"rollup-plugin-postcss": "^4.0.0",
|
|
63
|
-
"rollup-plugin-typescript2": "^0.30.0",
|
|
64
|
-
"rollup-plugin-version-injector": "^1.3.0",
|
|
65
|
-
"rollup-plugin-vue": "^6.0.0-beta.11",
|
|
66
|
-
"snowpack": "^3.8.6",
|
|
67
|
-
"tailwindcss": "^2.0.2",
|
|
68
|
-
"typescript": "^4.2.3",
|
|
69
|
-
"vue": "^3.2.2",
|
|
70
|
-
"vuex": "^4.0.0-rc.2"
|
|
71
|
-
},
|
|
72
|
-
"peerDependencies": {
|
|
73
|
-
"es6-promise": "^4.2.8",
|
|
74
|
-
"vue": "^3.0.4",
|
|
75
|
-
"vuex": "^4.0.0-rc.2"
|
|
76
|
-
},
|
|
77
|
-
"dependencies": {
|
|
78
|
-
"autoprefixer": "^10.2.6",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "narrat",
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"description": "narrat narrative engine",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "lib/index.esm.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib/"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"start": "snowpack dev",
|
|
13
|
+
"version": "npm run build",
|
|
14
|
+
"build": "cross-env NODE_ENV=production rollup -c",
|
|
15
|
+
"build-demo": "snowpack build",
|
|
16
|
+
"lint": "eslint src --ext=.js,.jsx,.ts,.tsx",
|
|
17
|
+
"preversion": "npm run build && npm run lint",
|
|
18
|
+
"postversion": "git push && git push --tags"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"game"
|
|
22
|
+
],
|
|
23
|
+
"author": "Liana Pigeot <liana.pigeot@protonmail.com>",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@babel/core": "^7.12.10",
|
|
27
|
+
"@babel/preset-env": "^7.12.11",
|
|
28
|
+
"@rollup/plugin-commonjs": "^16.0.0",
|
|
29
|
+
"@rollup/plugin-node-resolve": "^10.0.0",
|
|
30
|
+
"@rollup/plugin-typescript": "^8.2.5",
|
|
31
|
+
"@snowpack/plugin-postcss": "^1.4.3",
|
|
32
|
+
"@snowpack/plugin-sass": "^1.4.0",
|
|
33
|
+
"@snowpack/plugin-typescript": "^1.2.1",
|
|
34
|
+
"@snowpack/plugin-vue": "^2.6.2",
|
|
35
|
+
"@types/howler": "^2.2.3",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^4.28.3",
|
|
37
|
+
"@typescript-eslint/parser": "^4.28.3",
|
|
38
|
+
"@vue/compiler-sfc": "^3.0.4",
|
|
39
|
+
"babel-loader": "^8.2.2",
|
|
40
|
+
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
|
41
|
+
"babel-preset-vue": "^2.0.2",
|
|
42
|
+
"cross-env": "^7.0.3",
|
|
43
|
+
"css-loader": "^5.0.1",
|
|
44
|
+
"es6-promise": "^4.2.8",
|
|
45
|
+
"eslint": "^7.30.0",
|
|
46
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
|
47
|
+
"eslint-config-prettier": "^8.3.0",
|
|
48
|
+
"eslint-config-standard": "^16.0.3",
|
|
49
|
+
"eslint-import-resolver-typescript": "^2.4.0",
|
|
50
|
+
"eslint-plugin-import": "^2.23.4",
|
|
51
|
+
"eslint-plugin-node": "^11.1.0",
|
|
52
|
+
"eslint-plugin-promise": "^5.1.0",
|
|
53
|
+
"eslint-plugin-vue": "^7.13.0",
|
|
54
|
+
"postcss": "^8.2.1",
|
|
55
|
+
"postcss-cli": "^8.3.1",
|
|
56
|
+
"prettier": "2.3.2",
|
|
57
|
+
"rollup": "^2.35.1",
|
|
58
|
+
"rollup-plugin-analyzer": "^4.0.0",
|
|
59
|
+
"rollup-plugin-inject-process-env": "^1.3.1",
|
|
60
|
+
"rollup-plugin-paths": "^0.0.4",
|
|
61
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
62
|
+
"rollup-plugin-postcss": "^4.0.0",
|
|
63
|
+
"rollup-plugin-typescript2": "^0.30.0",
|
|
64
|
+
"rollup-plugin-version-injector": "^1.3.0",
|
|
65
|
+
"rollup-plugin-vue": "^6.0.0-beta.11",
|
|
66
|
+
"snowpack": "^3.8.6",
|
|
67
|
+
"tailwindcss": "^2.0.2",
|
|
68
|
+
"typescript": "^4.2.3",
|
|
69
|
+
"vue": "^3.2.2",
|
|
70
|
+
"vuex": "^4.0.0-rc.2"
|
|
71
|
+
},
|
|
72
|
+
"peerDependencies": {
|
|
73
|
+
"es6-promise": "^4.2.8",
|
|
74
|
+
"vue": "^3.0.4",
|
|
75
|
+
"vuex": "^4.0.0-rc.2"
|
|
76
|
+
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"autoprefixer": "^10.2.6",
|
|
79
|
+
"deepmerge": "^4.2.2",
|
|
80
|
+
"fuse.js": "^6.6.2",
|
|
81
|
+
"howler": "^2.2.3",
|
|
82
|
+
"svelte-jsoneditor": "^0.3.58",
|
|
83
|
+
"vue3-mq": "^3.0.0"
|
|
84
|
+
}
|
|
85
|
+
}
|