narrat 2.0.11 → 2.0.12

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 (104) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +105 -105
  3. package/dist/app.vue.d.ts +96 -96
  4. package/dist/components/MainMenu.vue.d.ts +12 -12
  5. package/dist/components/Skills.vue.d.ts +22 -22
  6. package/dist/components/debug/debug-menu.vue.d.ts +48 -48
  7. package/dist/components/dialog-picture.vue.d.ts +9 -9
  8. package/dist/components/game-dialog.vue.d.ts +65 -65
  9. package/dist/components/hud.vue.d.ts +12 -12
  10. package/dist/components/inventory-ui.vue.d.ts +30 -30
  11. package/dist/components/loading-bar.vue.d.ts +10 -10
  12. package/dist/components/menu-buttons.vue.d.ts +26 -26
  13. package/dist/components/notification-toast.vue.d.ts +6 -6
  14. package/dist/components/quests-ui.vue.d.ts +20 -20
  15. package/dist/components/screen-layer.vue.d.ts +54 -0
  16. package/dist/components/screens.vue.d.ts +46 -46
  17. package/dist/components/utils/modal.vue.d.ts +6 -6
  18. package/dist/components/volume-controls.vue.d.ts +7 -7
  19. package/dist/config.d.ts +158 -158
  20. package/dist/constants.d.ts +1 -1
  21. package/dist/data/characters.json +62 -62
  22. package/dist/data/config.json +187 -184
  23. package/dist/data/example.rpy +369 -367
  24. package/dist/data/refactor.rpy +30 -30
  25. package/dist/defaultConfig.d.ts +2 -2
  26. package/dist/demo/demo.d.ts +1 -1
  27. package/dist/dialog-box.vue.d.ts +37 -37
  28. package/dist/exports/config.d.ts +1 -1
  29. package/dist/exports/display.d.ts +2 -2
  30. package/dist/exports/plugins.d.ts +20 -20
  31. package/dist/fonts/OpenDyslexic.ttf.svg +2326 -2326
  32. package/dist/img/backgrounds/test-layers.gif +0 -0
  33. package/dist/lib/lib.d.ts +15 -15
  34. package/dist/lib.css +1 -1
  35. package/dist/main.d.ts +5 -5
  36. package/dist/narrat.es.js +135 -85
  37. package/dist/narrat.es.js.map +1 -1
  38. package/dist/narrat.umd.js +71 -70
  39. package/dist/narrat.umd.js.map +1 -1
  40. package/dist/plugins/NarratPlugin.d.ts +11 -11
  41. package/dist/stores/audio-store.d.ts +12 -12
  42. package/dist/stores/dialog-store.d.ts +31 -31
  43. package/dist/stores/hud-stats-store.d.ts +22 -22
  44. package/dist/stores/inventory-store.d.ts +37 -37
  45. package/dist/stores/main-store.d.ts +339 -338
  46. package/dist/stores/notification-store.d.ts +12 -12
  47. package/dist/stores/quest-log.d.ts +39 -39
  48. package/dist/stores/rendering-store.d.ts +13 -13
  49. package/dist/stores/screens-store.d.ts +23 -22
  50. package/dist/stores/skills.d.ts +36 -36
  51. package/dist/stores/vm-store.d.ts +155 -155
  52. package/dist/types/app-types.d.ts +4 -4
  53. package/dist/types/character-types.d.ts +27 -27
  54. package/dist/types/dialog-box-types.d.ts +10 -10
  55. package/dist/types/game-save.d.ts +21 -21
  56. package/dist/types/parser.d.ts +93 -93
  57. package/dist/types/state.d.ts +3 -3
  58. package/dist/utils/ajax.d.ts +1 -1
  59. package/dist/utils/audio-loader.d.ts +13 -13
  60. package/dist/utils/characters.d.ts +5 -5
  61. package/dist/utils/data-helpers.d.ts +19 -19
  62. package/dist/utils/debounce.d.ts +14 -14
  63. package/dist/utils/error-handling.d.ts +3 -3
  64. package/dist/utils/helpers.d.ts +6 -6
  65. package/dist/utils/images-loader.d.ts +6 -6
  66. package/dist/utils/logger.d.ts +11 -11
  67. package/dist/utils/object-iterators.d.ts +8 -8
  68. package/dist/utils/promises.d.ts +1 -1
  69. package/dist/utils/randomId.d.ts +1 -1
  70. package/dist/utils/save-helpers.d.ts +3 -3
  71. package/dist/utils/skillchecks.d.ts +17 -17
  72. package/dist/utils/string-helpers.d.ts +3 -3
  73. package/dist/utils/time-helpers.d.ts +2 -2
  74. package/dist/vm/commands/arithmetic-commands.d.ts +17 -17
  75. package/dist/vm/commands/audio-commands.d.ts +8 -8
  76. package/dist/vm/commands/choice.d.ts +37 -37
  77. package/dist/vm/commands/clear_dialog.d.ts +2 -2
  78. package/dist/vm/commands/command-helpers.d.ts +2 -2
  79. package/dist/vm/commands/command-plugin.d.ts +43 -43
  80. package/dist/vm/commands/flow-commands.d.ts +14 -14
  81. package/dist/vm/commands/if.d.ts +10 -10
  82. package/dist/vm/commands/index.d.ts +2 -2
  83. package/dist/vm/commands/inventory-commands.d.ts +15 -15
  84. package/dist/vm/commands/logic-command.d.ts +42 -42
  85. package/dist/vm/commands/notify.d.ts +4 -4
  86. package/dist/vm/commands/quest-commands.d.ts +30 -30
  87. package/dist/vm/commands/screen-commands.d.ts +12 -8
  88. package/dist/vm/commands/set.d.ts +6 -6
  89. package/dist/vm/commands/skill-commands.d.ts +33 -33
  90. package/dist/vm/commands/stats-commands.d.ts +12 -12
  91. package/dist/vm/commands/string-commands.d.ts +9 -9
  92. package/dist/vm/commands/text-field.d.ts +7 -7
  93. package/dist/vm/commands/text.d.ts +13 -13
  94. package/dist/vm/commands/wait.d.ts +4 -4
  95. package/dist/vm/vm-helpers.d.ts +16 -16
  96. package/dist/vm/vm-parser.d.ts +19 -19
  97. package/dist/vm/vm-parser.test.d.ts +1 -1
  98. package/dist/vm/vm.d.ts +19 -19
  99. package/package.json +79 -79
  100. package/CHANGELOG.md +0 -844
  101. package/dist/.DS_Store +0 -0
  102. package/dist/img/.DS_Store +0 -0
  103. package/dist/music/.DS_Store +0 -0
  104. package/dist/sounds/.DS_Store +0 -0
@@ -1,31 +1,31 @@
1
- main:
2
- "hello world"
3
- set data.player.name "Alice"
4
- set data.player.rank "Beginner"
5
- run update_rank_text
6
- choice:
7
- "Yes or no?"
8
- "Yes" (== 1 2):
9
- talk player idle "You said yes"
10
- "no":
11
- talk player idle "You said no"
12
- roll bread_haggle haggling 70 "Try to haggle for bread":
13
- success:
14
- talk player idle "You haggled for bread"
15
- failure:
16
- talk player idle "You failed to haggle for bread"
17
- talk cat idle $data.player.rankText
18
- if (== (+ 1 3) 3)
19
- talk player idle "condition is true"
20
- else:
21
- talk player idle "condition is false"
22
- jump jump_test
23
-
24
- update_rank_text:
25
- set data.player.rankText "%{data.player.name} is a %{data.player.rank}."
26
-
27
- run_test:
28
- talk player idle "it's a function"
29
-
30
- jump_test:
1
+ main:
2
+ "hello world"
3
+ set data.player.name "Alice"
4
+ set data.player.rank "Beginner"
5
+ run update_rank_text
6
+ choice:
7
+ "Yes or no?"
8
+ "Yes" (== 1 2):
9
+ talk player idle "You said yes"
10
+ "no":
11
+ talk player idle "You said no"
12
+ roll bread_haggle haggling 70 "Try to haggle for bread":
13
+ success:
14
+ talk player idle "You haggled for bread"
15
+ failure:
16
+ talk player idle "You failed to haggle for bread"
17
+ talk cat idle $data.player.rankText
18
+ if (== (+ 1 3) 3)
19
+ talk player idle "condition is true"
20
+ else:
21
+ talk player idle "condition is false"
22
+ jump jump_test
23
+
24
+ update_rank_text:
25
+ set data.player.rankText "%{data.player.name} is a %{data.player.rank}."
26
+
27
+ run_test:
28
+ talk player idle "it's a function"
29
+
30
+ jump_test:
31
31
  talk player idle "you jumped"
@@ -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,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;
@@ -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 };