narrat 2.0.11 → 2.0.13-test-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/LICENSE +21 -21
- package/README.md +120 -105
- package/dist/app.vue.d.ts +96 -96
- package/dist/components/MainMenu.vue.d.ts +12 -12
- package/dist/components/Skills.vue.d.ts +22 -22
- package/dist/components/debug/debug-menu.vue.d.ts +48 -48
- package/dist/components/dialog-picture.vue.d.ts +9 -9
- package/dist/components/game-dialog.vue.d.ts +65 -65
- package/dist/components/hud.vue.d.ts +14 -12
- package/dist/components/inventory-ui.vue.d.ts +30 -30
- package/dist/components/loading-bar.vue.d.ts +10 -10
- package/dist/components/menu-buttons.vue.d.ts +26 -26
- package/dist/components/notification-toast.vue.d.ts +6 -6
- package/dist/components/quests-ui.vue.d.ts +20 -20
- package/dist/components/screen-layer.vue.d.ts +54 -0
- package/dist/components/screens.vue.d.ts +46 -46
- package/dist/components/utils/modal.vue.d.ts +6 -6
- package/dist/components/volume-controls.vue.d.ts +7 -7
- package/dist/config.d.ts +165 -158
- package/dist/constants.d.ts +1 -1
- package/dist/defaultConfig.d.ts +2 -2
- package/dist/demo/demo.d.ts +1 -1
- package/dist/dialog-box.vue.d.ts +37 -37
- package/dist/exports/config.d.ts +1 -1
- package/dist/exports/display.d.ts +2 -2
- package/dist/exports/plugins.d.ts +20 -20
- package/dist/img/backgrounds/rpg.png +0 -0
- package/dist/img/backgrounds/test-layers.gif +0 -0
- package/dist/img/enemies/goblin.png +0 -0
- package/dist/img/enemies/skeleton.png +0 -0
- package/dist/img/enemies/slime.png +0 -0
- package/dist/img/levels/cave.png +0 -0
- package/dist/img/levels/dungeon.png +0 -0
- package/dist/img/levels/dungeon_F.png +0 -0
- package/dist/img/levels/dungeon_FL.png +0 -0
- package/dist/img/levels/dungeon_FR.png +0 -0
- package/dist/img/levels/dungeon_FRL.png +0 -0
- package/dist/img/levels/dungeon_LR.png +0 -0
- package/dist/img/levels/grass.png +0 -0
- package/dist/img/players/wizard.png +0 -0
- package/dist/img/ui/front.png +0 -0
- package/dist/img/ui/left.png +0 -0
- package/dist/img/ui/right.png +0 -0
- package/dist/img/ui/start.png +0 -0
- package/dist/lib/lib.d.ts +15 -15
- package/dist/main.d.ts +5 -5
- package/dist/narrat.es.js +30732 -33089
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +92 -103
- package/dist/narrat.umd.js.map +1 -1
- package/dist/plugins/NarratPlugin.d.ts +11 -11
- package/dist/stores/audio-store.d.ts +12 -12
- package/dist/stores/dialog-store.d.ts +31 -31
- package/dist/stores/hud-stats-store.d.ts +22 -22
- package/dist/stores/inventory-store.d.ts +37 -37
- package/dist/stores/main-store.d.ts +347 -338
- package/dist/stores/notification-store.d.ts +12 -12
- package/dist/stores/quest-log.d.ts +39 -39
- package/dist/stores/rendering-store.d.ts +13 -13
- package/dist/stores/screens-store.d.ts +23 -22
- package/dist/stores/skills.d.ts +40 -36
- package/dist/stores/vm-store.d.ts +155 -155
- package/dist/{lib.css → style.css} +1 -1
- package/dist/types/app-types.d.ts +5 -4
- package/dist/types/character-types.d.ts +27 -27
- package/dist/types/dialog-box-types.d.ts +10 -10
- package/dist/types/game-save.d.ts +21 -21
- package/dist/types/parser.d.ts +93 -93
- package/dist/types/state.d.ts +3 -3
- package/dist/utils/ajax.d.ts +1 -1
- package/dist/utils/audio-loader.d.ts +13 -13
- package/dist/utils/characters.d.ts +5 -5
- package/dist/utils/data-helpers.d.ts +19 -19
- package/dist/utils/debounce.d.ts +14 -14
- package/dist/utils/error-handling.d.ts +3 -3
- package/dist/utils/helpers.d.ts +6 -6
- package/dist/utils/images-loader.d.ts +6 -6
- package/dist/utils/logger.d.ts +11 -11
- package/dist/utils/object-iterators.d.ts +8 -8
- package/dist/utils/promises.d.ts +1 -1
- package/dist/utils/randomId.d.ts +1 -1
- package/dist/utils/save-helpers.d.ts +3 -3
- package/dist/utils/skillchecks.d.ts +17 -17
- package/dist/utils/string-helpers.d.ts +3 -3
- package/dist/utils/time-helpers.d.ts +2 -2
- package/dist/vm/commands/arithmetic-commands.d.ts +23 -17
- package/dist/vm/commands/audio-commands.d.ts +8 -8
- package/dist/vm/commands/choice.d.ts +37 -37
- package/dist/vm/commands/clear_dialog.d.ts +2 -2
- package/dist/vm/commands/command-helpers.d.ts +3 -2
- package/dist/vm/commands/command-plugin.d.ts +43 -43
- package/dist/vm/commands/flow-commands.d.ts +17 -14
- package/dist/vm/commands/if.d.ts +10 -10
- package/dist/vm/commands/index.d.ts +2 -2
- package/dist/vm/commands/inventory-commands.d.ts +15 -15
- package/dist/vm/commands/logic-command.d.ts +42 -42
- package/dist/vm/commands/math-commands.d.ts +14 -0
- package/dist/vm/commands/notify.d.ts +4 -4
- package/dist/vm/commands/quest-commands.d.ts +30 -30
- package/dist/vm/commands/random-commands.d.ts +10 -0
- package/dist/vm/commands/screen-commands.d.ts +12 -8
- package/dist/vm/commands/set.d.ts +6 -6
- package/dist/vm/commands/skill-commands.d.ts +45 -33
- package/dist/vm/commands/stats-commands.d.ts +12 -12
- package/dist/vm/commands/string-commands.d.ts +9 -9
- package/dist/vm/commands/text-field.d.ts +7 -7
- package/dist/vm/commands/text.d.ts +13 -13
- package/dist/vm/commands/wait.d.ts +4 -4
- package/dist/vm/vm-helpers.d.ts +18 -16
- package/dist/vm/vm-parser.d.ts +19 -19
- package/dist/vm/vm-parser.test.d.ts +1 -1
- package/dist/vm/vm.d.ts +18 -19
- package/package.json +82 -79
- package/CHANGELOG.md +0 -844
- package/dist/.DS_Store +0 -0
- package/dist/audio/click.ogg +0 -0
- package/dist/audio/failure.ogg +0 -0
- package/dist/audio/game_start.ogg +0 -0
- package/dist/audio/success.wav +0 -0
- package/dist/audio.7z +0 -0
- package/dist/data/characters.json +0 -62
- package/dist/data/config.json +0 -184
- package/dist/data/example.rpy +0 -367
- package/dist/data/refactor.rpy +0 -31
- package/dist/fonts/OpenDyslexic.ttf.eot +0 -0
- package/dist/fonts/OpenDyslexic.ttf.svg +0 -2326
- package/dist/fonts/OpenDyslexic.ttf.woff +0 -0
- package/dist/img/.DS_Store +0 -0
- package/dist/img/characters/music_cat.jpeg +0 -0
- package/dist/music/.DS_Store +0 -0
- package/dist/music/calm.mp3 +0 -0
- package/dist/sounds/.DS_Store +0 -0
package/dist/config.d.ts
CHANGED
|
@@ -1,158 +1,165 @@
|
|
|
1
|
-
export declare function setConfig(conf: Config): void;
|
|
2
|
-
export declare function getConfig(): Config;
|
|
3
|
-
export declare function getSkillConfig(id: string): SkillData;
|
|
4
|
-
export declare function getImageUrl(imageKeyOrUrl: string): string;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
[key: string]:
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
[key: string]:
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
[key: string]: AudioConfig;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
[key: string]:
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
[key: string]:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
[key: string]:
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
[key: string]:
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
export interface
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
export interface
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
1
|
+
export declare function setConfig(conf: Config): void;
|
|
2
|
+
export declare function getConfig(): Config;
|
|
3
|
+
export declare function getSkillConfig(id: string): SkillData;
|
|
4
|
+
export declare function getImageUrl(imageKeyOrUrl: string): string;
|
|
5
|
+
export declare function getAssetUrl(assetPath: string): string;
|
|
6
|
+
export declare function getButtonConfig(button: string): ButtonConfig;
|
|
7
|
+
export declare function getItemConfig(id: string): ItemData;
|
|
8
|
+
export declare function getQuestConfig(questId: string): QuestData;
|
|
9
|
+
export declare function getObjectiveConfig(quest: string, objectiveId: string): ObjectiveData;
|
|
10
|
+
export interface AppOptions {
|
|
11
|
+
baseAssetsPath?: string;
|
|
12
|
+
logging: boolean;
|
|
13
|
+
debug: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface Config {
|
|
16
|
+
baseAssetsPath?: string;
|
|
17
|
+
gameTitle: string;
|
|
18
|
+
images: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
layout: {
|
|
22
|
+
backgrounds: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
dialogBottomPadding: number;
|
|
27
|
+
minTextWidth: number;
|
|
28
|
+
mobileDialogHeightPercentage: number;
|
|
29
|
+
verticalLayoutThreshold: number;
|
|
30
|
+
portraits: {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
screens: {
|
|
36
|
+
[key: string]: ScreenConfig;
|
|
37
|
+
};
|
|
38
|
+
buttons: {
|
|
39
|
+
[key: string]: ButtonConfig;
|
|
40
|
+
};
|
|
41
|
+
skills: {
|
|
42
|
+
[key: string]: SkillData;
|
|
43
|
+
};
|
|
44
|
+
skillOptions: {
|
|
45
|
+
xpPerLevel: number;
|
|
46
|
+
};
|
|
47
|
+
skillChecks: {
|
|
48
|
+
rollRange: number;
|
|
49
|
+
skillMultiplier: number;
|
|
50
|
+
failureChance: number;
|
|
51
|
+
difficultyText: Array<[number, string]>;
|
|
52
|
+
};
|
|
53
|
+
scripts: string[];
|
|
54
|
+
audio: {
|
|
55
|
+
[key: string]: AudioConfig;
|
|
56
|
+
};
|
|
57
|
+
audioOptions: {
|
|
58
|
+
volume: number;
|
|
59
|
+
defaultMusic?: string;
|
|
60
|
+
musicFadeInTime: number;
|
|
61
|
+
musicFadeInDelay: number;
|
|
62
|
+
musicFadeOutTime: number;
|
|
63
|
+
};
|
|
64
|
+
sound?: {
|
|
65
|
+
[key: string]: AudioConfig;
|
|
66
|
+
};
|
|
67
|
+
music?: {
|
|
68
|
+
[key: string]: AudioConfig;
|
|
69
|
+
};
|
|
70
|
+
notifications: {
|
|
71
|
+
timeOnScreen: number;
|
|
72
|
+
alsoPrintInDialogue?: boolean;
|
|
73
|
+
};
|
|
74
|
+
hudStats: {
|
|
75
|
+
[key: string]: HudStatConfig;
|
|
76
|
+
};
|
|
77
|
+
items: {
|
|
78
|
+
[key: string]: ItemData;
|
|
79
|
+
};
|
|
80
|
+
interactionTags: {
|
|
81
|
+
[key: string]: {
|
|
82
|
+
onlyInteractOutsideOfScripts: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
quests: {
|
|
86
|
+
[key: string]: QuestData;
|
|
87
|
+
};
|
|
88
|
+
audioTriggers: {
|
|
89
|
+
[key: string]: string;
|
|
90
|
+
};
|
|
91
|
+
menuButtons: {
|
|
92
|
+
[key: string]: MenuButtonData;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export interface ScreenConfig {
|
|
96
|
+
background: string;
|
|
97
|
+
buttons: Array<string | InlineButtonConfig>;
|
|
98
|
+
}
|
|
99
|
+
export interface MenuButtonData {
|
|
100
|
+
text: string;
|
|
101
|
+
}
|
|
102
|
+
export interface QuestData {
|
|
103
|
+
title: string;
|
|
104
|
+
description: string;
|
|
105
|
+
objectives: {
|
|
106
|
+
[key: string]: ObjectiveData;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export interface ObjectiveData {
|
|
110
|
+
description: string;
|
|
111
|
+
hidden?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface ItemData {
|
|
114
|
+
name: string;
|
|
115
|
+
description: string;
|
|
116
|
+
icon: string;
|
|
117
|
+
onUse?: {
|
|
118
|
+
action: 'jump' | 'run';
|
|
119
|
+
label: string;
|
|
120
|
+
};
|
|
121
|
+
tag?: string;
|
|
122
|
+
}
|
|
123
|
+
export interface HudStatConfig {
|
|
124
|
+
name: string;
|
|
125
|
+
icon: string;
|
|
126
|
+
startingValue: number;
|
|
127
|
+
minValue?: number;
|
|
128
|
+
maxValue?: number;
|
|
129
|
+
}
|
|
130
|
+
export interface AudioConfig {
|
|
131
|
+
src: string;
|
|
132
|
+
path?: string;
|
|
133
|
+
volume?: number;
|
|
134
|
+
rate?: number;
|
|
135
|
+
html5?: boolean;
|
|
136
|
+
}
|
|
137
|
+
export interface MusicConfig extends AudioConfig {
|
|
138
|
+
loop?: boolean;
|
|
139
|
+
}
|
|
140
|
+
export interface ButtonConfig {
|
|
141
|
+
enabled: boolean;
|
|
142
|
+
background?: string;
|
|
143
|
+
text?: string;
|
|
144
|
+
position: {
|
|
145
|
+
left: number;
|
|
146
|
+
top: number;
|
|
147
|
+
width?: number;
|
|
148
|
+
height?: number;
|
|
149
|
+
};
|
|
150
|
+
anchor?: {
|
|
151
|
+
x: number;
|
|
152
|
+
y: number;
|
|
153
|
+
};
|
|
154
|
+
action: string;
|
|
155
|
+
}
|
|
156
|
+
export interface InlineButtonConfig extends ButtonConfig {
|
|
157
|
+
id: string;
|
|
158
|
+
}
|
|
159
|
+
export interface SkillData {
|
|
160
|
+
name: string;
|
|
161
|
+
description: string;
|
|
162
|
+
startingLevel: number;
|
|
163
|
+
hidden?: boolean;
|
|
164
|
+
icon: string;
|
|
165
|
+
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SAVE_FILE = "gameSave";
|
|
1
|
+
export declare const SAVE_FILE = "gameSave";
|
package/dist/defaultConfig.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Config } from './config';
|
|
2
|
-
export declare const defaultConfig: Config;
|
|
1
|
+
import { Config } from './config';
|
|
2
|
+
export declare const defaultConfig: Config;
|
package/dist/demo/demo.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/dialog-box.vue.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { DialogChoice } from './stores/dialog-store';
|
|
3
|
-
import { DialogStyle } from './types/character-types';
|
|
4
|
-
import { DialogBoxParameters } from './types/dialog-box-types';
|
|
5
|
-
declare const _default: import("vue").DefineComponent<{
|
|
6
|
-
options: {
|
|
7
|
-
type: PropType<DialogBoxParameters>;
|
|
8
|
-
required: true;
|
|
9
|
-
};
|
|
10
|
-
active: BooleanConstructor;
|
|
11
|
-
}, unknown, {
|
|
12
|
-
playerText: string;
|
|
13
|
-
passed: boolean;
|
|
14
|
-
}, {
|
|
15
|
-
preText(): string;
|
|
16
|
-
style(): DialogStyle;
|
|
17
|
-
dialogBoxStyle(): any;
|
|
18
|
-
titleStyle(): any;
|
|
19
|
-
textStyle(): any;
|
|
20
|
-
choices(): DialogChoice[] | undefined;
|
|
21
|
-
canInteract(): boolean;
|
|
22
|
-
paused: () => boolean;
|
|
23
|
-
}, {
|
|
24
|
-
chooseOption(choice: DialogChoice | number): void;
|
|
25
|
-
dialogStyle(choice: DialogChoice): any;
|
|
26
|
-
dialogClass(choice: DialogChoice): "strike-anim" | undefined;
|
|
27
|
-
submitText(): void;
|
|
28
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
-
options: {
|
|
30
|
-
type: PropType<DialogBoxParameters>;
|
|
31
|
-
required: true;
|
|
32
|
-
};
|
|
33
|
-
active: BooleanConstructor;
|
|
34
|
-
}>>, {
|
|
35
|
-
active: boolean;
|
|
36
|
-
}>;
|
|
37
|
-
export default _default;
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { DialogChoice } from './stores/dialog-store';
|
|
3
|
+
import { DialogStyle } from './types/character-types';
|
|
4
|
+
import { DialogBoxParameters } from './types/dialog-box-types';
|
|
5
|
+
declare const _default: import("vue").DefineComponent<{
|
|
6
|
+
options: {
|
|
7
|
+
type: PropType<DialogBoxParameters>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
active: BooleanConstructor;
|
|
11
|
+
}, unknown, {
|
|
12
|
+
playerText: string;
|
|
13
|
+
passed: boolean;
|
|
14
|
+
}, {
|
|
15
|
+
preText(): string;
|
|
16
|
+
style(): DialogStyle;
|
|
17
|
+
dialogBoxStyle(): any;
|
|
18
|
+
titleStyle(): any;
|
|
19
|
+
textStyle(): any;
|
|
20
|
+
choices(): DialogChoice[] | undefined;
|
|
21
|
+
canInteract(): boolean;
|
|
22
|
+
paused: () => boolean;
|
|
23
|
+
}, {
|
|
24
|
+
chooseOption(choice: DialogChoice | number): void;
|
|
25
|
+
dialogStyle(choice: DialogChoice): any;
|
|
26
|
+
dialogClass(choice: DialogChoice): "strike-anim" | undefined;
|
|
27
|
+
submitText(): void;
|
|
28
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
options: {
|
|
30
|
+
type: PropType<DialogBoxParameters>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
active: BooleanConstructor;
|
|
34
|
+
}>>, {
|
|
35
|
+
active: boolean;
|
|
36
|
+
}>;
|
|
37
|
+
export default _default;
|
package/dist/exports/config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getConfig } from '../config';
|
|
1
|
+
export { getConfig } from '../config';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { aspectRatioFit } from '../utils/helpers';
|
|
2
|
-
export { aspectRatioFit };
|
|
1
|
+
import { aspectRatioFit } from '../utils/helpers';
|
|
2
|
+
export { aspectRatioFit };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { NarratPlugin } from '../plugins/NarratPlugin';
|
|
2
|
-
import { CommandPlugin, generateParser } from '../vm/commands/command-plugin';
|
|
3
|
-
import type { CommandRunner } from '../vm/commands/command-plugin';
|
|
4
|
-
export declare type NarratLifecycleHook = <T extends [...any[]]>(...args: T) => void;
|
|
5
|
-
declare type NarratPluginObject<T> = {
|
|
6
|
-
onPageLoaded?: NarratLifecycleHook;
|
|
7
|
-
onNarratSetup?: NarratLifecycleHook;
|
|
8
|
-
onAppMounted?: NarratLifecycleHook;
|
|
9
|
-
onAssetsLoaded?: NarratLifecycleHook;
|
|
10
|
-
onGameSetup?: NarratLifecycleHook;
|
|
11
|
-
onGameStart?: NarratLifecycleHook;
|
|
12
|
-
onGameMounted?: NarratLifecycleHook;
|
|
13
|
-
onGameUnmounted?: NarratLifecycleHook;
|
|
14
|
-
customCommands?: CommandPlugin<T>[];
|
|
15
|
-
};
|
|
16
|
-
declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
|
|
17
|
-
declare function addCommand<T>(command: CommandPlugin<T>): void;
|
|
18
|
-
export { CommandRunner };
|
|
19
|
-
export { CommandPlugin, NarratPlugin, registerPlugin, addCommand, generateParser, };
|
|
20
|
-
export type { NarratPluginObject };
|
|
1
|
+
import { NarratPlugin } from '../plugins/NarratPlugin';
|
|
2
|
+
import { CommandPlugin, generateParser } from '../vm/commands/command-plugin';
|
|
3
|
+
import type { CommandRunner } from '../vm/commands/command-plugin';
|
|
4
|
+
export declare type NarratLifecycleHook = <T extends [...any[]]>(...args: T) => void;
|
|
5
|
+
declare type NarratPluginObject<T> = {
|
|
6
|
+
onPageLoaded?: NarratLifecycleHook;
|
|
7
|
+
onNarratSetup?: NarratLifecycleHook;
|
|
8
|
+
onAppMounted?: NarratLifecycleHook;
|
|
9
|
+
onAssetsLoaded?: NarratLifecycleHook;
|
|
10
|
+
onGameSetup?: NarratLifecycleHook;
|
|
11
|
+
onGameStart?: NarratLifecycleHook;
|
|
12
|
+
onGameMounted?: NarratLifecycleHook;
|
|
13
|
+
onGameUnmounted?: NarratLifecycleHook;
|
|
14
|
+
customCommands?: CommandPlugin<T>[];
|
|
15
|
+
};
|
|
16
|
+
declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
|
|
17
|
+
declare function addCommand<T>(command: CommandPlugin<T>): void;
|
|
18
|
+
export { CommandRunner };
|
|
19
|
+
export { CommandPlugin, NarratPlugin, registerPlugin, addCommand, generateParser, };
|
|
20
|
+
export type { NarratPluginObject };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/lib/lib.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import 'es6-promise/auto';
|
|
3
|
-
import './/../sass/main.css';
|
|
4
|
-
export * from '../main';
|
|
5
|
-
export declare type Narrat = {
|
|
6
|
-
app: App;
|
|
7
|
-
};
|
|
8
|
-
declare global {
|
|
9
|
-
export interface Window {
|
|
10
|
-
narrat: Narrat;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export * from '../exports/plugins';
|
|
14
|
-
export * from '../exports/display';
|
|
15
|
-
export * from '../exports/config';
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import 'es6-promise/auto';
|
|
3
|
+
import './/../sass/main.css';
|
|
4
|
+
export * from '../main';
|
|
5
|
+
export declare type Narrat = {
|
|
6
|
+
app: App;
|
|
7
|
+
};
|
|
8
|
+
declare global {
|
|
9
|
+
export interface Window {
|
|
10
|
+
narrat: Narrat;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export * from '../exports/plugins';
|
|
14
|
+
export * from '../exports/display';
|
|
15
|
+
export * from '../exports/config';
|
package/dist/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import 'es6-promise/auto';
|
|
2
|
-
import './/sass/main.css';
|
|
3
|
-
import { GameConfig } from './types/app-types';
|
|
4
|
-
import { AppOptions } from './config';
|
|
5
|
-
export declare function startApp(config: GameConfig, options: AppOptions): Promise<void>;
|
|
1
|
+
import 'es6-promise/auto';
|
|
2
|
+
import './/sass/main.css';
|
|
3
|
+
import { GameConfig } from './types/app-types';
|
|
4
|
+
import { AppOptions } from './config';
|
|
5
|
+
export declare function startApp(config: GameConfig, options: AppOptions): Promise<void>;
|