narrat 2.3.0 → 2.3.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.
Files changed (115) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +128 -128
  3. package/dist/app.vue.d.ts +94 -91
  4. package/dist/components/MainMenu.vue.d.ts +12 -12
  5. package/dist/components/{SkillsWindow.vue.d.ts → Skills.vue.d.ts} +22 -22
  6. package/dist/components/StartMenu.vue.d.ts +46 -46
  7. package/dist/components/debug/debug-menu.vue.d.ts +48 -48
  8. package/dist/components/dialog-picture.vue.d.ts +9 -11
  9. package/dist/components/engine-splash/engine-splash.vue.d.ts +54 -54
  10. package/dist/components/game-dialog.vue.d.ts +65 -65
  11. package/dist/components/game-splash/game-splash.vue.d.ts +46 -46
  12. package/dist/components/hud.vue.d.ts +14 -14
  13. package/dist/components/in-game.vue.d.ts +46 -46
  14. package/dist/components/inventory-ui.vue.d.ts +30 -30
  15. package/dist/components/loading-bar.vue.d.ts +10 -10
  16. package/dist/components/menu-buttons.vue.d.ts +26 -54
  17. package/dist/components/notification-toast.vue.d.ts +6 -6
  18. package/dist/components/quests-ui.vue.d.ts +20 -20
  19. package/dist/components/save-slots.vue.d.ts +79 -79
  20. package/dist/components/saves/save-slot.vue.d.ts +108 -108
  21. package/dist/components/screen-layer.vue.d.ts +76 -76
  22. package/dist/components/screens.vue.d.ts +46 -46
  23. package/dist/components/transitions/NarratTransition.vue.d.ts +101 -101
  24. package/dist/components/utils/alert-modal.vue.d.ts +82 -82
  25. package/dist/components/utils/{modal-window.vue.d.ts → modal.vue.d.ts} +18 -18
  26. package/dist/components/utils/yes-no.vue.d.ts +106 -106
  27. package/dist/components/volume-controls.vue.d.ts +18 -18
  28. package/dist/config.d.ts +181 -194
  29. package/dist/constants.d.ts +8 -10
  30. package/dist/defaultConfig.d.ts +2 -2
  31. package/dist/demo/demo.d.ts +1 -1
  32. package/dist/dialog-box.vue.d.ts +41 -41
  33. package/dist/exports/config.d.ts +1 -1
  34. package/dist/exports/display.d.ts +2 -2
  35. package/dist/exports/plugins.d.ts +20 -38
  36. package/dist/favicon.svg +30 -30
  37. package/dist/lib.d.ts +14 -18
  38. package/dist/main.d.ts +6 -7
  39. package/dist/narrat.es.js +8419 -8981
  40. package/dist/narrat.es.js.map +1 -1
  41. package/dist/narrat.umd.js +73 -73
  42. package/dist/narrat.umd.js.map +1 -1
  43. package/dist/plugins/NarratPlugin.d.ts +11 -11
  44. package/dist/stores/audio-store.d.ts +48 -48
  45. package/dist/stores/dialog-store.d.ts +32 -32
  46. package/dist/stores/hud-stats-store.d.ts +22 -22
  47. package/dist/stores/inventory-store.d.ts +37 -37
  48. package/dist/stores/main-store.d.ts +822 -813
  49. package/dist/stores/notification-store.d.ts +15 -15
  50. package/dist/stores/quest-log.d.ts +39 -39
  51. package/dist/stores/rendering-store.d.ts +13 -13
  52. package/dist/stores/screens-store.d.ts +35 -35
  53. package/dist/stores/skills.d.ts +40 -40
  54. package/dist/stores/vm-store.d.ts +180 -180
  55. package/dist/style.css +1 -1
  56. package/dist/types/app-types.d.ts +5 -9
  57. package/dist/types/character-types.d.ts +27 -27
  58. package/dist/types/dialog-box-types.d.ts +11 -11
  59. package/dist/types/game-save.d.ts +36 -36
  60. package/dist/types/parser.d.ts +93 -93
  61. package/dist/types/state.d.ts +3 -3
  62. package/dist/utils/InputsListener.d.ts +9 -9
  63. package/dist/utils/ajax.d.ts +1 -1
  64. package/dist/utils/audio-loader.d.ts +10 -10
  65. package/dist/utils/characters.d.ts +5 -5
  66. package/dist/utils/data-helpers.d.ts +25 -28
  67. package/dist/utils/debounce.d.ts +14 -14
  68. package/dist/utils/error-handling.d.ts +3 -3
  69. package/dist/utils/helpers.d.ts +6 -6
  70. package/dist/utils/images-loader.d.ts +6 -6
  71. package/dist/utils/logger.d.ts +11 -11
  72. package/dist/utils/object-iterators.d.ts +8 -8
  73. package/dist/utils/promises.d.ts +1 -1
  74. package/dist/utils/randomId.d.ts +1 -1
  75. package/dist/utils/save-helpers.d.ts +18 -18
  76. package/dist/utils/skillchecks.d.ts +17 -17
  77. package/dist/utils/string-helpers.d.ts +3 -3
  78. package/dist/utils/time-helpers.d.ts +2 -2
  79. package/dist/utils/transition.d.ts +15 -15
  80. package/dist/utils/type-utils.d.ts +1 -2
  81. package/dist/utils/typed-emitter.d.ts +18 -18
  82. package/dist/vm/commands/arithmetic-commands.d.ts +23 -23
  83. package/dist/vm/commands/audio-commands.d.ts +15 -15
  84. package/dist/vm/commands/choice.d.ts +37 -37
  85. package/dist/vm/commands/clear_dialog.d.ts +2 -2
  86. package/dist/vm/commands/command-helpers.d.ts +3 -3
  87. package/dist/vm/commands/command-plugin.d.ts +43 -43
  88. package/dist/vm/commands/flow-commands.d.ts +24 -24
  89. package/dist/vm/commands/if.d.ts +10 -10
  90. package/dist/vm/commands/index.d.ts +2 -2
  91. package/dist/vm/commands/inventory-commands.d.ts +15 -15
  92. package/dist/vm/commands/logic-command.d.ts +42 -42
  93. package/dist/vm/commands/math-commands.d.ts +30 -30
  94. package/dist/vm/commands/notify.d.ts +6 -6
  95. package/dist/vm/commands/quest-commands.d.ts +30 -30
  96. package/dist/vm/commands/random-commands.d.ts +10 -10
  97. package/dist/vm/commands/screen-commands.d.ts +15 -15
  98. package/dist/vm/commands/set.d.ts +6 -6
  99. package/dist/vm/commands/skill-commands.d.ts +30 -30
  100. package/dist/vm/commands/stats-commands.d.ts +12 -12
  101. package/dist/vm/commands/string-commands.d.ts +9 -9
  102. package/dist/vm/commands/text-field.d.ts +7 -7
  103. package/dist/vm/commands/text.d.ts +14 -14
  104. package/dist/vm/commands/wait.d.ts +4 -4
  105. package/dist/vm/vm-helpers.d.ts +18 -18
  106. package/dist/vm/vm-parser.d.ts +19 -19
  107. package/dist/vm/vm-parser.test.d.ts +1 -1
  108. package/dist/vm/vm.d.ts +18 -21
  109. package/package.json +1 -1
  110. package/dist/exports/components.d.ts +0 -2
  111. package/dist/exports/events.d.ts +0 -1
  112. package/dist/exports/others.d.ts +0 -1
  113. package/dist/exports/stores.d.ts +0 -11
  114. package/dist/menu-buttons/menu-buttons.d.ts +0 -4
  115. package/dist/stores/menu-store.d.ts +0 -36
@@ -1,18 +1,18 @@
1
- import { AudioModeKey } from '../stores/audio-store';
2
- declare const _default: import("vue").DefineComponent<{}, {}, {
3
- muted: boolean;
4
- volumes: {
5
- mode: 'master' | AudioModeKey;
6
- volume: number;
7
- }[];
8
- modeNames: {
9
- master: string;
10
- music: string;
11
- ambiant: string;
12
- sound: string;
13
- };
14
- }, {}, {
15
- changeVolume(mode: 'master' | AudioModeKey, event: Event): void;
16
- toggleMute(): void;
17
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
18
- export default _default;
1
+ import { AudioModeKey } from '../stores/audio-store';
2
+ declare const _default: import("vue").DefineComponent<{}, {}, {
3
+ muted: boolean;
4
+ volumes: {
5
+ mode: 'master' | AudioModeKey;
6
+ volume: number;
7
+ }[];
8
+ modeNames: {
9
+ master: string;
10
+ music: string;
11
+ ambiant: string;
12
+ sound: string;
13
+ };
14
+ }, {}, {
15
+ changeVolume(mode: 'master' | AudioModeKey, event: Event): void;
16
+ toggleMute(): void;
17
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
18
+ export default _default;
package/dist/config.d.ts CHANGED
@@ -1,194 +1,181 @@
1
- import { TransitionSettings } from './utils/transition';
2
- export declare function setConfig(conf: Config): void;
3
- export declare function getConfig(): Config;
4
- export declare function getSkillConfig(id: string): SkillData;
5
- export declare function getImageUrl(imageKeyOrUrl: string): string;
6
- export declare function getAssetUrl(assetPath: string): string;
7
- export declare function getDataUrl(dataPath: string): string;
8
- export declare function getButtonConfig(button: string): ButtonConfig;
9
- export declare function getItemConfig(id: string): ItemData;
10
- export declare function getQuestConfig(questId: string): QuestData;
11
- export declare function getObjectiveConfig(quest: string, objectiveId: string): ObjectiveData;
12
- export interface AppOptionsDeprecated {
13
- logging: boolean;
14
- debug: boolean;
15
- }
16
- export interface Config {
17
- baseAssetsPath?: string;
18
- baseDataPath?: string;
19
- gameTitle: string;
20
- images: {
21
- [key: string]: string;
22
- };
23
- layout: {
24
- backgrounds: {
25
- width: number;
26
- height: number;
27
- };
28
- dialogBottomPadding: number;
29
- minTextWidth: number;
30
- mobileDialogHeightPercentage: number;
31
- verticalLayoutThreshold: number;
32
- portraits: {
33
- width: number;
34
- height: number;
35
- };
36
- };
37
- gameFlow: {
38
- labelToJumpOnScriptEnd?: string;
39
- };
40
- splashScreens: {
41
- engineSplashScreen?: {
42
- skip?: boolean;
43
- fadeDuration?: number;
44
- timeBeforeFadeout?: number;
45
- overrideText?: string;
46
- overrideLogo?: string;
47
- };
48
- gameSplashScreen?: {
49
- startButtonText?: string;
50
- };
51
- };
52
- screens: {
53
- [key: string]: ScreenConfig;
54
- };
55
- buttons: {
56
- [key: string]: ButtonConfig;
57
- };
58
- skills: {
59
- [key: string]: SkillData;
60
- };
61
- skillOptions: {
62
- xpPerLevel: number;
63
- notifyLevelUp: boolean;
64
- };
65
- skillChecks: {
66
- rollRange: number;
67
- skillMultiplier: number;
68
- failureChance: number;
69
- difficultyText: Array<[number, string]>;
70
- };
71
- scripts: string[];
72
- audio: {
73
- [key: string]: AudioConfig;
74
- };
75
- audioOptions: {
76
- volume: number;
77
- defaultMusic?: string;
78
- musicFadeInTime: number;
79
- musicFadeInDelay: number;
80
- musicFadeOutTime: number;
81
- };
82
- sound?: {
83
- [key: string]: AudioConfig;
84
- };
85
- music?: {
86
- [key: string]: AudioConfig;
87
- };
88
- notifications: {
89
- timeOnScreen: number;
90
- alsoPrintInDialogue?: boolean;
91
- };
92
- hudStats: {
93
- [key: string]: HudStatConfig;
94
- };
95
- items: {
96
- [key: string]: ItemData;
97
- };
98
- interactionTags: {
99
- [key: string]: {
100
- onlyInteractOutsideOfScripts: boolean;
101
- };
102
- };
103
- quests: {
104
- [key: string]: QuestData;
105
- };
106
- transitions: {
107
- [key: string]: TransitionSettings;
108
- };
109
- audioTriggers: {
110
- [key: string]: string;
111
- };
112
- menuButtons: {
113
- [key: string]: MenuButtonData;
114
- };
115
- debugging: {
116
- showScriptFinishedMessage?: boolean;
117
- };
118
- saves: {
119
- mode: 'game-slots' | 'manual';
120
- };
121
- }
122
- export interface ScreenConfig {
123
- background: string;
124
- buttons: Array<string | InlineButtonConfig>;
125
- }
126
- export interface MenuButtonData {
127
- text: string;
128
- }
129
- export interface QuestData {
130
- title: string;
131
- description: string;
132
- objectives: {
133
- [key: string]: ObjectiveData;
134
- };
135
- }
136
- export interface ObjectiveData {
137
- description: string;
138
- hidden?: boolean;
139
- }
140
- export interface ItemData {
141
- name: string;
142
- description: string;
143
- icon: string;
144
- onUse?: {
145
- action: 'jump' | 'run';
146
- label: string;
147
- };
148
- tag?: string;
149
- }
150
- export interface HudStatConfig {
151
- name: string;
152
- icon: string;
153
- startingValue: number;
154
- minValue?: number;
155
- maxValue?: number;
156
- }
157
- export interface AudioConfig {
158
- src: string;
159
- path?: string;
160
- volume?: number;
161
- rate?: number;
162
- html5?: boolean;
163
- }
164
- export interface MusicConfig extends AudioConfig {
165
- loop?: boolean;
166
- }
167
- export interface ButtonConfig {
168
- enabled: boolean;
169
- background?: string;
170
- text?: string;
171
- position: {
172
- left: number;
173
- top: number;
174
- width?: number;
175
- height?: number;
176
- };
177
- anchor?: {
178
- x: number;
179
- y: number;
180
- };
181
- action: string;
182
- actionType?: 'jump' | 'run';
183
- tag?: string;
184
- }
185
- export interface InlineButtonConfig extends ButtonConfig {
186
- id: string;
187
- }
188
- export interface SkillData {
189
- name: string;
190
- description: string;
191
- startingLevel: number;
192
- hidden?: boolean;
193
- icon: string;
194
- }
1
+ import { TransitionSettings } from './utils/transition';
2
+ export declare function setConfig(conf: Config): void;
3
+ export declare function getConfig(): Config;
4
+ export declare function getSkillConfig(id: string): SkillData;
5
+ export declare function getImageUrl(imageKeyOrUrl: string): string;
6
+ export declare function getAssetUrl(assetPath: string): string;
7
+ export declare function getButtonConfig(button: string): ButtonConfig;
8
+ export declare function getItemConfig(id: string): ItemData;
9
+ export declare function getQuestConfig(questId: string): QuestData;
10
+ export declare function getObjectiveConfig(quest: string, objectiveId: string): ObjectiveData;
11
+ export interface AppOptions {
12
+ baseAssetsPath?: string;
13
+ logging: boolean;
14
+ debug: boolean;
15
+ }
16
+ export interface Config {
17
+ baseAssetsPath?: string;
18
+ gameTitle: string;
19
+ images: {
20
+ [key: string]: string;
21
+ };
22
+ layout: {
23
+ backgrounds: {
24
+ width: number;
25
+ height: number;
26
+ };
27
+ dialogBottomPadding: number;
28
+ minTextWidth: number;
29
+ mobileDialogHeightPercentage: number;
30
+ verticalLayoutThreshold: number;
31
+ portraits: {
32
+ width: number;
33
+ height: number;
34
+ };
35
+ };
36
+ gameFlow: {
37
+ labelToJumpOnScriptEnd?: string;
38
+ };
39
+ screens: {
40
+ [key: string]: ScreenConfig;
41
+ };
42
+ buttons: {
43
+ [key: string]: ButtonConfig;
44
+ };
45
+ skills: {
46
+ [key: string]: SkillData;
47
+ };
48
+ skillOptions: {
49
+ xpPerLevel: number;
50
+ notifyLevelUp: boolean;
51
+ };
52
+ skillChecks: {
53
+ rollRange: number;
54
+ skillMultiplier: number;
55
+ failureChance: number;
56
+ difficultyText: Array<[number, string]>;
57
+ };
58
+ scripts: string[];
59
+ audio: {
60
+ [key: string]: AudioConfig;
61
+ };
62
+ audioOptions: {
63
+ volume: number;
64
+ defaultMusic?: string;
65
+ musicFadeInTime: number;
66
+ musicFadeInDelay: number;
67
+ musicFadeOutTime: number;
68
+ };
69
+ sound?: {
70
+ [key: string]: AudioConfig;
71
+ };
72
+ music?: {
73
+ [key: string]: AudioConfig;
74
+ };
75
+ notifications: {
76
+ timeOnScreen: number;
77
+ alsoPrintInDialogue?: boolean;
78
+ };
79
+ hudStats: {
80
+ [key: string]: HudStatConfig;
81
+ };
82
+ items: {
83
+ [key: string]: ItemData;
84
+ };
85
+ interactionTags: {
86
+ [key: string]: {
87
+ onlyInteractOutsideOfScripts: boolean;
88
+ };
89
+ };
90
+ quests: {
91
+ [key: string]: QuestData;
92
+ };
93
+ transitions: {
94
+ [key: string]: TransitionSettings;
95
+ };
96
+ audioTriggers: {
97
+ [key: string]: string;
98
+ };
99
+ menuButtons: {
100
+ [key: string]: MenuButtonData;
101
+ };
102
+ debugging: {
103
+ showScriptFinishedMessage?: boolean;
104
+ };
105
+ saves: {
106
+ mode: 'game-slots' | 'manual';
107
+ };
108
+ }
109
+ export interface ScreenConfig {
110
+ background: string;
111
+ buttons: Array<string | InlineButtonConfig>;
112
+ }
113
+ export interface MenuButtonData {
114
+ text: string;
115
+ }
116
+ export interface QuestData {
117
+ title: string;
118
+ description: string;
119
+ objectives: {
120
+ [key: string]: ObjectiveData;
121
+ };
122
+ }
123
+ export interface ObjectiveData {
124
+ description: string;
125
+ hidden?: boolean;
126
+ }
127
+ export interface ItemData {
128
+ name: string;
129
+ description: string;
130
+ icon: string;
131
+ onUse?: {
132
+ action: 'jump' | 'run';
133
+ label: string;
134
+ };
135
+ tag?: string;
136
+ }
137
+ export interface HudStatConfig {
138
+ name: string;
139
+ icon: string;
140
+ startingValue: number;
141
+ minValue?: number;
142
+ maxValue?: number;
143
+ }
144
+ export interface AudioConfig {
145
+ src: string;
146
+ path?: string;
147
+ volume?: number;
148
+ rate?: number;
149
+ html5?: boolean;
150
+ }
151
+ export interface MusicConfig extends AudioConfig {
152
+ loop?: boolean;
153
+ }
154
+ export interface ButtonConfig {
155
+ enabled: boolean;
156
+ background?: string;
157
+ text?: string;
158
+ position: {
159
+ left: number;
160
+ top: number;
161
+ width?: number;
162
+ height?: number;
163
+ };
164
+ anchor?: {
165
+ x: number;
166
+ y: number;
167
+ };
168
+ action: string;
169
+ actionType?: 'jump' | 'run';
170
+ tag?: string;
171
+ }
172
+ export interface InlineButtonConfig extends ButtonConfig {
173
+ id: string;
174
+ }
175
+ export interface SkillData {
176
+ name: string;
177
+ description: string;
178
+ startingLevel: number;
179
+ hidden?: boolean;
180
+ icon: string;
181
+ }
@@ -1,10 +1,8 @@
1
- export declare const SAVE_FILE = "gameSave";
2
- export declare const PRE_SIGNAL = "###_--_~=:;";
3
- export declare const JUMP_SIGNAL = "###_--_~=:;_JUMP";
4
- export declare const RETURN_SIGNAL = "###_--_~=:;_RETURN";
5
- export declare const OK_SIGNAL = "###_--_~=:;_OK";
6
- export declare const STOP_SIGNAL = "###_--_~=:;_STOP";
7
- export declare type ReturnSignal = typeof JUMP_SIGNAL | typeof RETURN_SIGNAL | typeof OK_SIGNAL | typeof STOP_SIGNAL;
8
- export declare function isReturnSignal(s: string): s is ReturnSignal;
9
- export declare const VERSION: string;
10
- export declare const BUILD_DATE: Date;
1
+ export declare const SAVE_FILE = "gameSave";
2
+ export declare const PRE_SIGNAL = "###_--_~=:;";
3
+ export declare const JUMP_SIGNAL = "###_--_~=:;_JUMP";
4
+ export declare const RETURN_SIGNAL = "###_--_~=:;_RETURN";
5
+ export declare const OK_SIGNAL = "###_--_~=:;_OK";
6
+ export declare const STOP_SIGNAL = "###_--_~=:;_STOP";
7
+ export declare type ReturnSignal = typeof JUMP_SIGNAL | typeof RETURN_SIGNAL | typeof OK_SIGNAL | typeof STOP_SIGNAL;
8
+ export declare function isReturnSignal(s: string): s is ReturnSignal;
@@ -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;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,41 +1,41 @@
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
- listener: any;
15
- timeout: any;
16
- }, {
17
- preText(): string;
18
- style(): DialogStyle;
19
- dialogBoxStyle(): any;
20
- titleStyle(): any;
21
- textStyle(): any;
22
- choices(): DialogChoice[] | undefined;
23
- canInteract(): boolean;
24
- paused: () => boolean;
25
- }, {
26
- clearListeners(): void;
27
- chooseOption(choice: DialogChoice | number): void;
28
- finishLine(): void;
29
- dialogStyle(choice: DialogChoice): any;
30
- dialogClass(choice: DialogChoice): "strike-anim" | undefined;
31
- submitText(): void;
32
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
- options: {
34
- type: PropType<DialogBoxParameters>;
35
- required: true;
36
- };
37
- active: BooleanConstructor;
38
- }>>, {
39
- active: boolean;
40
- }>;
41
- 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
+ listener: any;
15
+ timeout: any;
16
+ }, {
17
+ preText(): string;
18
+ style(): DialogStyle;
19
+ dialogBoxStyle(): any;
20
+ titleStyle(): any;
21
+ textStyle(): any;
22
+ choices(): DialogChoice[] | undefined;
23
+ canInteract(): boolean;
24
+ paused: () => boolean;
25
+ }, {
26
+ clearListeners(): void;
27
+ chooseOption(choice: DialogChoice | number): void;
28
+ finishLine(): void;
29
+ dialogStyle(choice: DialogChoice): any;
30
+ dialogClass(choice: DialogChoice): "strike-anim" | undefined;
31
+ submitText(): void;
32
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
+ options: {
34
+ type: PropType<DialogBoxParameters>;
35
+ required: true;
36
+ };
37
+ active: BooleanConstructor;
38
+ }>>, {
39
+ active: boolean;
40
+ }>;
41
+ export default _default;
@@ -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,38 +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
- import { StoreDefinition } from 'pinia';
5
- import { MenuButtonState } from '../stores/menu-store';
6
- export declare type NarratLifecycleHook = <T extends [...any[]]>(...args: T) => void;
7
- export interface NarratCustomStoreActions {
8
- save?: () => any;
9
- load?: (data: any) => void;
10
- setup?: () => Promise<void>;
11
- start?: () => void;
12
- reset: () => void;
13
- }
14
- export declare type UseCustomStore = StoreDefinition<string, any, any, NarratCustomStoreActions>;
15
- export interface CustomStores {
16
- [key: string]: UseCustomStore;
17
- }
18
- export interface CustomMenuButton {
19
- config: MenuButtonState;
20
- component: any;
21
- }
22
- export declare type NarratPluginObject<T> = {
23
- onPageLoaded?: NarratLifecycleHook;
24
- onNarratSetup?: NarratLifecycleHook;
25
- onAppMounted?: NarratLifecycleHook;
26
- onAssetsLoaded?: NarratLifecycleHook;
27
- onGameSetup?: NarratLifecycleHook;
28
- onGameStart?: NarratLifecycleHook;
29
- onGameMounted?: NarratLifecycleHook;
30
- onGameUnmounted?: NarratLifecycleHook;
31
- customCommands?: CommandPlugin<T>[];
32
- customStores?: CustomStores;
33
- customMenuButtons?: CustomMenuButton[];
34
- };
35
- declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
36
- declare function addCommand<T>(command: CommandPlugin<T>): void;
37
- export { CommandRunner };
38
- export { CommandPlugin, NarratPlugin, registerPlugin, addCommand, generateParser, };
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 };