narrat 2.9.3 → 2.10.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 (152) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +136 -128
  3. package/dist/app.vue.d.ts +78 -78
  4. package/dist/components/MainMenu.vue.d.ts +7 -7
  5. package/dist/components/SkillsWindow.vue.d.ts +28 -28
  6. package/dist/components/StartMenu.vue.d.ts +46 -46
  7. package/dist/components/auto-play/AutoPlayFeedback.vue.d.ts +46 -46
  8. package/dist/components/debug/debug-menu.vue.d.ts +51 -51
  9. package/dist/components/dialog-picture.vue.d.ts +11 -11
  10. package/dist/components/engine-splash/engine-splash.vue.d.ts +54 -54
  11. package/dist/components/game-dialog.vue.d.ts +65 -65
  12. package/dist/components/game-splash/game-splash.vue.d.ts +46 -46
  13. package/dist/components/hud.vue.d.ts +20 -20
  14. package/dist/components/in-game.vue.d.ts +46 -46
  15. package/dist/components/inventory/inventory-section.vue.d.ts +61 -61
  16. package/dist/components/inventory/item-details.vue.d.ts +76 -76
  17. package/dist/components/inventory-ui.vue.d.ts +39 -39
  18. package/dist/components/loading-bar.vue.d.ts +10 -10
  19. package/dist/components/menu-buttons.vue.d.ts +46 -46
  20. package/dist/components/notification-toast.vue.d.ts +6 -6
  21. package/dist/components/quests/QuestDetails.vue.d.ts +64 -64
  22. package/dist/components/quests/QuestDisplay.vue.d.ts +64 -64
  23. package/dist/components/quests/quests-list-section.vue.d.ts +75 -75
  24. package/dist/components/quests-ui.vue.d.ts +22 -22
  25. package/dist/components/save-slots.vue.d.ts +79 -79
  26. package/dist/components/saves/save-slot-ui.vue.d.ts +108 -108
  27. package/dist/components/screen-layer.vue.d.ts +76 -76
  28. package/dist/components/screen-objects/screen-object.vue.d.ts +68 -0
  29. package/dist/components/screens.vue.d.ts +46 -46
  30. package/dist/components/tabs/TabsController.vue.d.ts +72 -72
  31. package/dist/components/tabs/tab-selector.vue.d.ts +82 -82
  32. package/dist/components/tooltips/tooltips-ui.vue.d.ts +46 -46
  33. package/dist/components/transitions/NarratTransition.vue.d.ts +97 -97
  34. package/dist/components/utils/alert-modal.vue.d.ts +82 -82
  35. package/dist/components/utils/floating-tooltip.vue.d.ts +62 -62
  36. package/dist/components/utils/modal-window.vue.d.ts +18 -18
  37. package/dist/components/utils/yes-no.vue.d.ts +106 -106
  38. package/dist/components/volume-controls.vue.d.ts +18 -18
  39. package/dist/config/audio-config.d.ts +58 -58
  40. package/dist/config/buttons-config.d.ts +68 -64
  41. package/dist/config/characters-config.d.ts +36 -0
  42. package/dist/config/common-config.d.ts +80 -80
  43. package/dist/config/config-input.d.ts +231 -213
  44. package/dist/config/config-output.d.ts +232 -212
  45. package/dist/config/items-config.d.ts +71 -71
  46. package/dist/config/layout-config.d.ts +26 -26
  47. package/dist/config/quests-config.d.ts +48 -48
  48. package/dist/config/screens-config.d.ts +133 -128
  49. package/dist/config/skills-config.d.ts +70 -70
  50. package/dist/config/tooltips-config.d.ts +15 -15
  51. package/dist/config.d.ts +182 -164
  52. package/dist/constants.d.ts +12 -12
  53. package/dist/demo/demo.d.ts +1 -1
  54. package/dist/dialog-box.vue.d.ts +71 -71
  55. package/dist/exports/components.d.ts +2 -2
  56. package/dist/exports/config.d.ts +1 -1
  57. package/dist/exports/display.d.ts +2 -2
  58. package/dist/exports/events.d.ts +1 -1
  59. package/dist/exports/others.d.ts +1 -1
  60. package/dist/exports/plugins.d.ts +47 -38
  61. package/dist/exports/stores.d.ts +11 -11
  62. package/dist/favicon.svg +30 -30
  63. package/dist/gamepad/gamepad.d.ts +1 -1
  64. package/dist/hooks/util-hooks.d.ts +1 -0
  65. package/dist/lib.d.ts +18 -18
  66. package/dist/main.d.ts +6 -6
  67. package/dist/menu-buttons/menu-buttons.d.ts +7 -7
  68. package/dist/narrat.es.js +15682 -15571
  69. package/dist/narrat.es.js.map +1 -1
  70. package/dist/narrat.umd.js +119 -119
  71. package/dist/narrat.umd.js.map +1 -1
  72. package/dist/plugins/NarratPlugin.d.ts +11 -11
  73. package/dist/stores/audio-store.d.ts +56 -56
  74. package/dist/stores/config-store.d.ts +6 -6
  75. package/dist/stores/dialog-store.d.ts +35 -35
  76. package/dist/stores/hud-stats-store.d.ts +20 -20
  77. package/dist/stores/inventory-store.d.ts +49 -49
  78. package/dist/stores/main-store.d.ts +1627 -1797
  79. package/dist/stores/menu-store.d.ts +45 -45
  80. package/dist/stores/notification-store.d.ts +15 -15
  81. package/dist/stores/quest-log.d.ts +37 -37
  82. package/dist/stores/rendering-store.d.ts +20 -19
  83. package/dist/stores/screen-objects-store.d.ts +67 -0
  84. package/dist/stores/screens-store.d.ts +34 -33
  85. package/dist/stores/skills.d.ts +39 -39
  86. package/dist/stores/tooltip-store.d.ts +18 -18
  87. package/dist/stores/vm-store.d.ts +181 -181
  88. package/dist/style.css +1 -1
  89. package/dist/types/app-types.d.ts +8 -9
  90. package/dist/types/dialog-box-types.d.ts +11 -11
  91. package/dist/types/game-save.d.ts +40 -40
  92. package/dist/types/parser.d.ts +93 -93
  93. package/dist/types/state.d.ts +3 -3
  94. package/dist/utils/InputsListener.d.ts +9 -9
  95. package/dist/utils/ajax.d.ts +2 -2
  96. package/dist/utils/audio-loader.d.ts +10 -10
  97. package/dist/utils/characters.d.ts +4 -5
  98. package/dist/utils/data-helpers.d.ts +31 -32
  99. package/dist/utils/data-helpers.test.d.ts +1 -1
  100. package/dist/utils/debounce.d.ts +14 -14
  101. package/dist/utils/error-handling.d.ts +4 -4
  102. package/dist/utils/getWindow.d.ts +1 -1
  103. package/dist/utils/helpers.d.ts +6 -6
  104. package/dist/utils/images-loader.d.ts +7 -7
  105. package/dist/utils/logger.d.ts +11 -11
  106. package/dist/utils/object-iterators.d.ts +9 -9
  107. package/dist/utils/promises.d.ts +1 -1
  108. package/dist/utils/randomId.d.ts +1 -1
  109. package/dist/utils/save-helpers.d.ts +16 -16
  110. package/dist/utils/skillchecks.d.ts +17 -17
  111. package/dist/utils/string-helpers.d.ts +5 -5
  112. package/dist/utils/time-helpers.d.ts +2 -2
  113. package/dist/utils/tooltip-utils.d.ts +2 -2
  114. package/dist/utils/transition.d.ts +21 -21
  115. package/dist/utils/type-utils.d.ts +2 -2
  116. package/dist/utils/typed-emitter.d.ts +18 -18
  117. package/dist/utils/viewport-utils.d.ts +3 -0
  118. package/dist/utils/vue-directives.d.ts +2 -2
  119. package/dist/vm/commands/arithmetic-commands.d.ts +23 -23
  120. package/dist/vm/commands/array-commands.d.ts +42 -42
  121. package/dist/vm/commands/audio-commands.d.ts +15 -15
  122. package/dist/vm/commands/choice.d.ts +38 -38
  123. package/dist/vm/commands/clear_dialog.d.ts +2 -2
  124. package/dist/vm/commands/command-helpers.d.ts +3 -3
  125. package/dist/vm/commands/command-plugin.d.ts +43 -43
  126. package/dist/vm/commands/flow-commands.d.ts +27 -27
  127. package/dist/vm/commands/if.d.ts +10 -10
  128. package/dist/vm/commands/index.d.ts +2 -2
  129. package/dist/vm/commands/inventory-commands.d.ts +15 -15
  130. package/dist/vm/commands/logic-command.d.ts +42 -42
  131. package/dist/vm/commands/math-commands.d.ts +30 -30
  132. package/dist/vm/commands/notify.d.ts +6 -6
  133. package/dist/vm/commands/quest-commands.d.ts +30 -30
  134. package/dist/vm/commands/random-commands.d.ts +13 -13
  135. package/dist/vm/commands/screen-commands.d.ts +18 -18
  136. package/dist/vm/commands/set.d.ts +6 -6
  137. package/dist/vm/commands/skill-commands.d.ts +33 -33
  138. package/dist/vm/commands/sprite-commands.d.ts +16 -9
  139. package/dist/vm/commands/stats-commands.d.ts +12 -12
  140. package/dist/vm/commands/string-commands.d.ts +9 -9
  141. package/dist/vm/commands/text-field.d.ts +7 -7
  142. package/dist/vm/commands/text.d.ts +14 -14
  143. package/dist/vm/commands/time-commands.d.ts +16 -16
  144. package/dist/vm/commands/util-commands.d.ts +4 -4
  145. package/dist/vm/commands/wait.d.ts +4 -4
  146. package/dist/vm/vm-helpers.d.ts +19 -19
  147. package/dist/vm/vm-parser.d.ts +19 -19
  148. package/dist/vm/vm-parser.test.d.ts +1 -1
  149. package/dist/vm/vm.d.ts +21 -21
  150. package/package.json +2 -2
  151. package/dist/stores/sprites-store.d.ts +0 -54
  152. package/dist/types/character-types.d.ts +0 -27
package/dist/config.d.ts CHANGED
@@ -1,164 +1,182 @@
1
- import { AppOptions } from './types/app-types';
2
- import { Config } from './config/config-output';
3
- import { ScreenConfig } from './config/screens-config';
4
- import { ButtonConfig } from './config/buttons-config';
5
- import { ConfigInput } from './config/config-input';
6
- export declare function setupConfig(configInput: ConfigInput): Promise<Config>;
7
- export declare function loadConfig(options: AppOptions): Promise<Config>;
8
- export declare function getConfig(): Config;
9
- export declare function audioConfig(): import("./config/audio-config").AudioConfig;
10
- export declare function skillsConfig(): {
11
- skills: Record<string, {
12
- hidden?: boolean | undefined;
13
- description: string;
14
- name: string;
15
- startingLevel: number;
16
- icon: string;
17
- }>;
18
- skillChecks: {
19
- rollRange: number;
20
- skillMultiplier: number;
21
- failureChance: number;
22
- difficultyText: [number, string][];
23
- };
24
- skillOptions: {
25
- xpPerLevel: number;
26
- notifyLevelUp: boolean;
27
- };
28
- };
29
- export declare function itemsConfig(): {
30
- items: Record<string, {
31
- onUse?: {
32
- label: string;
33
- action: string;
34
- } | undefined;
35
- tag?: string | undefined;
36
- category?: string | undefined;
37
- showIfEmpty?: boolean | undefined;
38
- description: string;
39
- name: string;
40
- icon: string;
41
- }>;
42
- categories: {
43
- title: string;
44
- id: string;
45
- }[];
46
- };
47
- export declare function questsConfig(): {
48
- quests: Record<string, {
49
- category?: string | undefined;
50
- title: string;
51
- description: string;
52
- objectives: Record<string, {
53
- hidden?: boolean | undefined;
54
- description: string;
55
- }>;
56
- }>;
57
- categories: {
58
- title: string;
59
- id: string;
60
- }[];
61
- };
62
- export declare function screensConfig(): {
63
- screens: Record<string, {
64
- buttons?: (string | ({
65
- anchor?: {
66
- x: number;
67
- y: number;
68
- } | undefined;
69
- text?: string | undefined;
70
- action?: string | undefined;
71
- tag?: string | undefined;
72
- cssClass?: string | undefined;
73
- background?: string | undefined;
74
- actionType?: string | undefined;
75
- enabled: boolean;
76
- position: {
77
- width?: number | undefined;
78
- height?: number | undefined;
79
- left: number;
80
- top: number;
81
- };
82
- } & {
83
- id: string;
84
- }))[] | undefined;
85
- background: string;
86
- }>;
87
- };
88
- export declare function buttonsConfig(): {
89
- buttons: Record<string, {
90
- anchor?: {
91
- x: number;
92
- y: number;
93
- } | undefined;
94
- text?: string | undefined;
95
- action?: string | undefined;
96
- tag?: string | undefined;
97
- cssClass?: string | undefined;
98
- background?: string | undefined;
99
- actionType?: string | undefined;
100
- enabled: boolean;
101
- position: {
102
- width?: number | undefined;
103
- height?: number | undefined;
104
- left: number;
105
- top: number;
106
- };
107
- }>;
108
- };
109
- export declare function tooltipsConfig(): {
110
- options: {
111
- delay?: number | undefined;
112
- width: number;
113
- keywordsPrefix: string;
114
- };
115
- tooltips: {
116
- title: string;
117
- description: string;
118
- keywords: string[];
119
- }[];
120
- };
121
- export declare function getTooltipConfig(keyword: string): {
122
- title: string;
123
- description: string;
124
- keywords: string[];
125
- } | null;
126
- export declare function getSkillConfig(id: string): {
127
- hidden?: boolean | undefined;
128
- description: string;
129
- name: string;
130
- startingLevel: number;
131
- icon: string;
132
- };
133
- export declare function getImageUrl(imageKeyOrUrl: string): string;
134
- export declare function getAssetUrl(assetPath: string): string;
135
- export declare function getSplitConfigUrl(basePath: string, url: string): string;
136
- export declare function getDataUrl(dataPath: string): string;
137
- export declare function getButtonConfig(button: string): ButtonConfig;
138
- export declare function getScreenConfig(screen: string): ScreenConfig;
139
- export declare function getItemConfig(id: string): {
140
- onUse?: {
141
- label: string;
142
- action: string;
143
- } | undefined;
144
- tag?: string | undefined;
145
- category?: string | undefined;
146
- showIfEmpty?: boolean | undefined;
147
- description: string;
148
- name: string;
149
- icon: string;
150
- };
151
- export declare function getQuestConfig(questId: string): {
152
- category?: string | undefined;
153
- title: string;
154
- description: string;
155
- objectives: Record<string, {
156
- hidden?: boolean | undefined;
157
- description: string;
158
- }>;
159
- };
160
- export declare function getObjectiveConfig(quest: string, objectiveId: string): {
161
- hidden?: boolean | undefined;
162
- description: string;
163
- };
164
- export declare function getDialogPanelWidth(): number;
1
+ import { AppOptions } from './types/app-types';
2
+ import { Config } from './config/config-output';
3
+ import { ScreenConfig } from './config/screens-config';
4
+ import { ButtonConfig } from './config/buttons-config';
5
+ import { ConfigInput } from './config/config-input';
6
+ export declare function setupConfig(configInput: ConfigInput): Promise<Config>;
7
+ export declare function loadConfig(options: AppOptions): Promise<Config>;
8
+ export declare function getConfig(): Config;
9
+ export declare function audioConfig(): import("./config/audio-config").AudioConfig;
10
+ export declare function skillsConfig(): {
11
+ skills: Record<string, {
12
+ hidden?: boolean | undefined;
13
+ description: string;
14
+ name: string;
15
+ startingLevel: number;
16
+ icon: string;
17
+ }>;
18
+ skillChecks: {
19
+ rollRange: number;
20
+ skillMultiplier: number;
21
+ failureChance: number;
22
+ difficultyText: [number, string][];
23
+ };
24
+ skillOptions: {
25
+ xpPerLevel: number;
26
+ notifyLevelUp: boolean;
27
+ };
28
+ };
29
+ export declare function itemsConfig(): {
30
+ items: Record<string, {
31
+ onUse?: {
32
+ label: string;
33
+ action: string;
34
+ } | undefined;
35
+ tag?: string | undefined;
36
+ category?: string | undefined;
37
+ showIfEmpty?: boolean | undefined;
38
+ description: string;
39
+ name: string;
40
+ icon: string;
41
+ }>;
42
+ categories: {
43
+ title: string;
44
+ id: string;
45
+ }[];
46
+ };
47
+ export declare function questsConfig(): {
48
+ quests: Record<string, {
49
+ category?: string | undefined;
50
+ title: string;
51
+ description: string;
52
+ objectives: Record<string, {
53
+ hidden?: boolean | undefined;
54
+ description: string;
55
+ }>;
56
+ }>;
57
+ categories: {
58
+ title: string;
59
+ id: string;
60
+ }[];
61
+ };
62
+ export declare function screensConfig(): {
63
+ screens: Record<string, {
64
+ buttons?: (string | ({
65
+ anchor?: {
66
+ x: number;
67
+ y: number;
68
+ } | undefined;
69
+ text?: string | undefined;
70
+ action?: string | undefined;
71
+ tag?: string | undefined;
72
+ cssClass?: string | undefined;
73
+ background?: string | undefined;
74
+ actionType?: string | undefined;
75
+ scriptClickable?: boolean | undefined;
76
+ enabled: boolean;
77
+ position: {
78
+ width?: number | undefined;
79
+ height?: number | undefined;
80
+ left: number;
81
+ top: number;
82
+ };
83
+ } & {
84
+ id: string;
85
+ }))[] | undefined;
86
+ background: string;
87
+ }>;
88
+ };
89
+ export declare function buttonsConfig(): {
90
+ clickableDuringScriptsByDefault?: boolean | undefined;
91
+ buttons: Record<string, {
92
+ anchor?: {
93
+ x: number;
94
+ y: number;
95
+ } | undefined;
96
+ text?: string | undefined;
97
+ action?: string | undefined;
98
+ tag?: string | undefined;
99
+ cssClass?: string | undefined;
100
+ background?: string | undefined;
101
+ actionType?: string | undefined;
102
+ scriptClickable?: boolean | undefined;
103
+ enabled: boolean;
104
+ position: {
105
+ width?: number | undefined;
106
+ height?: number | undefined;
107
+ left: number;
108
+ top: number;
109
+ };
110
+ }>;
111
+ };
112
+ export declare function tooltipsConfig(): {
113
+ options: {
114
+ delay?: number | undefined;
115
+ width: number;
116
+ keywordsPrefix: string;
117
+ };
118
+ tooltips: {
119
+ title: string;
120
+ description: string;
121
+ keywords: string[];
122
+ }[];
123
+ };
124
+ export declare function charactersConfig(): {
125
+ config: {
126
+ imagesPath: string;
127
+ };
128
+ characters: Record<string, {
129
+ style?: {
130
+ color?: string | undefined;
131
+ boxCss?: Record<string, any> | undefined;
132
+ nameCss?: Record<string, any> | undefined;
133
+ textCss?: Record<string, any> | undefined;
134
+ } | undefined;
135
+ sprites?: Record<string, string> | undefined;
136
+ name: string;
137
+ }>;
138
+ };
139
+ export declare function getTooltipConfig(keyword: string): {
140
+ title: string;
141
+ description: string;
142
+ keywords: string[];
143
+ } | null;
144
+ export declare function getSkillConfig(id: string): {
145
+ hidden?: boolean | undefined;
146
+ description: string;
147
+ name: string;
148
+ startingLevel: number;
149
+ icon: string;
150
+ };
151
+ export declare function getImageUrl(imageKeyOrUrl: string): string;
152
+ export declare function getAssetUrl(assetPath: string): string;
153
+ export declare function getSplitConfigUrl(basePath: string, url: string): string;
154
+ export declare function getDataUrl(dataPath: string): string;
155
+ export declare function getButtonConfig(button: string): ButtonConfig;
156
+ export declare function getScreenConfig(screen: string): ScreenConfig;
157
+ export declare function getItemConfig(id: string): {
158
+ onUse?: {
159
+ label: string;
160
+ action: string;
161
+ } | undefined;
162
+ tag?: string | undefined;
163
+ category?: string | undefined;
164
+ showIfEmpty?: boolean | undefined;
165
+ description: string;
166
+ name: string;
167
+ icon: string;
168
+ };
169
+ export declare function getQuestConfig(questId: string): {
170
+ category?: string | undefined;
171
+ title: string;
172
+ description: string;
173
+ objectives: Record<string, {
174
+ hidden?: boolean | undefined;
175
+ description: string;
176
+ }>;
177
+ };
178
+ export declare function getObjectiveConfig(quest: string, objectiveId: string): {
179
+ hidden?: boolean | undefined;
180
+ description: string;
181
+ };
182
+ export declare function getDialogPanelWidth(): number;
@@ -1,12 +1,12 @@
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;
11
- export declare const DEFAULT_DIALOG_WIDTH = 400;
12
- export declare const DEFAULT_TEXT_SPEED = 20;
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;
11
+ export declare const DEFAULT_DIALOG_WIDTH = 400;
12
+ export declare const DEFAULT_TEXT_SPEED = 20;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,71 +1,71 @@
1
- /// <reference types="node" />
2
- import { PropType } from 'vue';
3
- import { DialogChoice } from './stores/dialog-store';
4
- import { DialogStyle } from './types/character-types';
5
- import { DialogBoxParameters } from './types/dialog-box-types';
6
- export interface TextAnimation {
7
- text: string;
8
- index: number;
9
- startTime: number;
10
- timer: NodeJS.Timer | null;
11
- skippedChars: number;
12
- tags: RegExpExecArray[];
13
- finished: boolean;
14
- }
15
- declare const _default: import("vue").DefineComponent<{
16
- options: {
17
- type: PropType<DialogBoxParameters>;
18
- required: true;
19
- };
20
- active: BooleanConstructor;
21
- }, unknown, {
22
- playerText: string;
23
- passed: boolean;
24
- timeout: any;
25
- textAnimation: TextAnimation | null;
26
- mounted: boolean;
27
- autoTimer: NodeJS.Timer | null;
28
- skipTimer: NodeJS.Timer | null;
29
- nextLineTimer: NodeJS.Timer | null;
30
- }, {
31
- preText(): string;
32
- style(): DialogStyle;
33
- dialogBoxStyle(): any;
34
- isBasicChoice(): boolean;
35
- dialogBoxClass(): false | "dialog-box-followup";
36
- titleStyle(): any;
37
- textStyle(): any;
38
- text(): string;
39
- choices(): DialogChoice[] | undefined;
40
- skipping(): boolean;
41
- canInteract(): boolean;
42
- paused: () => boolean;
43
- }, {
44
- clearListeners(): void;
45
- keyboardEvent(e: KeyboardEvent): void;
46
- next(): void;
47
- chooseOption(choice: DialogChoice | number): void;
48
- finishLine(): void;
49
- dialogStyle(choice: DialogChoice): any;
50
- dialogClass(choice: DialogChoice): "strike-anim" | undefined;
51
- submitText(): void;
52
- addTextSection(start: number, end: number): number;
53
- addHtmlTag(tag: RegExpExecArray): number;
54
- startTextAnimation(): void;
55
- startSkip(): void;
56
- updateTextAnimation(): void;
57
- endTextAnimation({ unmounted, pressedSpace, }?: {
58
- unmounted?: boolean | undefined;
59
- pressedSpace?: boolean | undefined;
60
- }): void;
61
- registerKeyboardShortcuts(): void;
62
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
63
- options: {
64
- type: PropType<DialogBoxParameters>;
65
- required: true;
66
- };
67
- active: BooleanConstructor;
68
- }>>, {
69
- active: boolean;
70
- }>;
71
- export default _default;
1
+ /// <reference types="node" />
2
+ import { PropType } from 'vue';
3
+ import { DialogStyleConfig } from './config/characters-config';
4
+ import { DialogChoice } from './stores/dialog-store';
5
+ import { DialogBoxParameters } from './types/dialog-box-types';
6
+ export interface TextAnimation {
7
+ text: string;
8
+ index: number;
9
+ startTime: number;
10
+ timer: NodeJS.Timer | null;
11
+ skippedChars: number;
12
+ tags: RegExpExecArray[];
13
+ finished: boolean;
14
+ }
15
+ declare const _default: import("vue").DefineComponent<{
16
+ options: {
17
+ type: PropType<DialogBoxParameters>;
18
+ required: true;
19
+ };
20
+ active: BooleanConstructor;
21
+ }, unknown, {
22
+ playerText: string;
23
+ passed: boolean;
24
+ timeout: any;
25
+ textAnimation: TextAnimation | null;
26
+ mounted: boolean;
27
+ autoTimer: NodeJS.Timer | null;
28
+ skipTimer: NodeJS.Timer | null;
29
+ nextLineTimer: NodeJS.Timer | null;
30
+ }, {
31
+ preText(): string;
32
+ style(): DialogStyleConfig;
33
+ dialogBoxStyle(): any;
34
+ isBasicChoice(): boolean;
35
+ dialogBoxClass(): false | "dialog-box-followup";
36
+ titleStyle(): any;
37
+ textStyle(): any;
38
+ text(): string;
39
+ choices(): DialogChoice[] | undefined;
40
+ skipping(): boolean;
41
+ canInteract(): boolean;
42
+ paused: () => boolean;
43
+ }, {
44
+ clearListeners(): void;
45
+ keyboardEvent(e: KeyboardEvent): void;
46
+ next(): void;
47
+ chooseOption(choice: DialogChoice | number): void;
48
+ finishLine(): void;
49
+ dialogStyle(choice: DialogChoice): any;
50
+ dialogClass(choice: DialogChoice): "strike-anim" | undefined;
51
+ submitText(): void;
52
+ addTextSection(start: number, end: number): number;
53
+ addHtmlTag(tag: RegExpExecArray): number;
54
+ startTextAnimation(): void;
55
+ startSkip(): void;
56
+ updateTextAnimation(): void;
57
+ endTextAnimation({ unmounted, pressedSpace, }?: {
58
+ unmounted?: boolean | undefined;
59
+ pressedSpace?: boolean | undefined;
60
+ }): void;
61
+ registerKeyboardShortcuts(): void;
62
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
63
+ options: {
64
+ type: PropType<DialogBoxParameters>;
65
+ required: true;
66
+ };
67
+ active: BooleanConstructor;
68
+ }>>, {
69
+ active: boolean;
70
+ }>;
71
+ export default _default;
@@ -1,2 +1,2 @@
1
- import ModalWindow from '../components/utils/modal-window.vue';
2
- export { ModalWindow };
1
+ import ModalWindow from '../components/utils/modal-window.vue';
2
+ export { ModalWindow };
@@ -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 +1 @@
1
- export { inputEvents } from '../utils/InputsListener';
1
+ export { inputEvents } from '../utils/InputsListener';
@@ -1 +1 @@
1
- export { registerMenuButton } from '../menu-buttons/menu-buttons';
1
+ export { registerMenuButton } from '../menu-buttons/menu-buttons';
@@ -1,38 +1,47 @@
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 { MenuState } 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: MenuState;
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
+ import { StoreDefinition } from 'pinia';
5
+ import { MenuState, MenuTabState } 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
+ menuId: string;
20
+ config: MenuState;
21
+ components: {
22
+ [key: string]: any;
23
+ };
24
+ }
25
+ export interface CustomMenuTab {
26
+ menuId: string;
27
+ config: MenuTabState;
28
+ component: any;
29
+ }
30
+ export declare type NarratPluginObject<T> = {
31
+ onPageLoaded?: NarratLifecycleHook;
32
+ onNarratSetup?: NarratLifecycleHook;
33
+ onAppMounted?: NarratLifecycleHook;
34
+ onAssetsLoaded?: NarratLifecycleHook;
35
+ onGameSetup?: NarratLifecycleHook;
36
+ onGameStart?: NarratLifecycleHook;
37
+ onGameMounted?: NarratLifecycleHook;
38
+ onGameUnmounted?: NarratLifecycleHook;
39
+ customCommands?: CommandPlugin<T>[];
40
+ customStores?: CustomStores;
41
+ customMenuButtons?: CustomMenuButton[];
42
+ customMenuTabs?: CustomMenuTab[];
43
+ };
44
+ declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
45
+ declare function addCommand<T>(command: CommandPlugin<T>): void;
46
+ export { CommandRunner };
47
+ export { CommandPlugin, NarratPlugin, registerPlugin, addCommand, generateParser, };
@@ -1,11 +1,11 @@
1
- export { useMain } from '../stores/main-store';
2
- export { useAudio } from '../stores/audio-store';
3
- export { useDialogStore } from '../stores/dialog-store';
4
- export { useHud } from '../stores/hud-stats-store';
5
- export { useInventory } from '../stores/inventory-store';
6
- export { useNotifications } from '../stores/notification-store';
7
- export { useQuests } from '../stores/quest-log';
8
- export { useRenderingStore } from '../stores/rendering-store';
9
- export { useScreens } from '../stores/screens-store';
10
- export { useSkills } from '../stores/skills';
11
- export { useVM } from '../stores/vm-store';
1
+ export { useMain } from '../stores/main-store';
2
+ export { useAudio } from '../stores/audio-store';
3
+ export { useDialogStore } from '../stores/dialog-store';
4
+ export { useHud } from '../stores/hud-stats-store';
5
+ export { useInventory } from '../stores/inventory-store';
6
+ export { useNotifications } from '../stores/notification-store';
7
+ export { useQuests } from '../stores/quest-log';
8
+ export { useRenderingStore } from '../stores/rendering-store';
9
+ export { useScreens } from '../stores/screens-store';
10
+ export { useSkills } from '../stores/skills';
11
+ export { useVM } from '../stores/vm-store';