narrat 2.10.7 → 2.10.8
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/dist/app.vue.d.ts +78 -78
- package/dist/components/MainMenu.vue.d.ts +7 -7
- package/dist/components/SkillsWindow.vue.d.ts +28 -28
- package/dist/components/StartMenu.vue.d.ts +46 -46
- package/dist/components/auto-play/AutoPlayFeedback.vue.d.ts +46 -46
- package/dist/components/debug/debug-menu.vue.d.ts +51 -51
- package/dist/components/dialog-picture.vue.d.ts +11 -11
- package/dist/components/engine-splash/engine-splash.vue.d.ts +54 -54
- package/dist/components/game-dialog.vue.d.ts +65 -65
- package/dist/components/game-splash/game-splash.vue.d.ts +46 -46
- package/dist/components/hud.vue.d.ts +20 -20
- package/dist/components/in-game.vue.d.ts +46 -46
- package/dist/components/inventory/inventory-section.vue.d.ts +61 -61
- package/dist/components/inventory/item-details.vue.d.ts +76 -76
- package/dist/components/inventory-ui.vue.d.ts +39 -39
- package/dist/components/loading-bar.vue.d.ts +10 -10
- package/dist/components/menu-buttons.vue.d.ts +46 -46
- package/dist/components/notification-toast.vue.d.ts +6 -6
- package/dist/components/quests/QuestDetails.vue.d.ts +64 -64
- package/dist/components/quests/QuestDisplay.vue.d.ts +64 -64
- package/dist/components/quests/quests-list-section.vue.d.ts +75 -75
- package/dist/components/quests-ui.vue.d.ts +22 -22
- package/dist/components/save-slots.vue.d.ts +79 -79
- package/dist/components/saves/save-slot-ui.vue.d.ts +108 -108
- package/dist/components/screen-layer.vue.d.ts +76 -76
- package/dist/components/screen-objects/screen-object.vue.d.ts +68 -68
- package/dist/components/screens.vue.d.ts +46 -46
- package/dist/components/tabs/TabsController.vue.d.ts +72 -72
- package/dist/components/tabs/tab-selector.vue.d.ts +82 -82
- package/dist/components/tooltips/tooltips-ui.vue.d.ts +46 -46
- package/dist/components/transitions/NarratTransition.vue.d.ts +97 -97
- package/dist/components/utils/alert-modal.vue.d.ts +82 -82
- package/dist/components/utils/floating-tooltip.vue.d.ts +62 -62
- package/dist/components/utils/modal-window.vue.d.ts +18 -18
- package/dist/components/utils/yes-no.vue.d.ts +106 -106
- package/dist/components/volume-controls.vue.d.ts +18 -18
- package/dist/config/audio-config.d.ts +58 -58
- package/dist/config/buttons-config.d.ts +68 -68
- package/dist/config/characters-config.d.ts +36 -36
- package/dist/config/common-config.d.ts +80 -80
- package/dist/config/config-input.d.ts +231 -231
- package/dist/config/config-output.d.ts +232 -232
- package/dist/config/items-config.d.ts +71 -71
- package/dist/config/layout-config.d.ts +26 -26
- package/dist/config/quests-config.d.ts +48 -48
- package/dist/config/screens-config.d.ts +133 -133
- package/dist/config/skills-config.d.ts +70 -70
- package/dist/config/tooltips-config.d.ts +15 -15
- package/dist/config.d.ts +182 -182
- package/dist/constants.d.ts +12 -12
- package/dist/demo/demo.d.ts +1 -1
- package/dist/dialog-box.vue.d.ts +71 -71
- package/dist/exports/components.d.ts +2 -2
- package/dist/exports/config.d.ts +2 -2
- package/dist/exports/display.d.ts +2 -2
- package/dist/exports/events.d.ts +1 -1
- package/dist/exports/inputs.d.ts +1 -1
- package/dist/exports/others.d.ts +1 -1
- package/dist/exports/plugins.d.ts +67 -67
- package/dist/exports/stores.d.ts +16 -16
- package/dist/exports/utils.d.ts +12 -12
- package/dist/gamepad/gamepad.d.ts +1 -1
- package/dist/hooks/util-hooks.d.ts +1 -1
- package/dist/inputs/Inputs.d.ts +61 -61
- package/dist/lib.d.ts +20 -20
- package/dist/main.d.ts +6 -6
- package/dist/menu-buttons/menu-buttons.d.ts +7 -7
- package/dist/narrat.es.js +5 -8
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +2 -2
- package/dist/narrat.umd.js.map +1 -1
- package/dist/plugins/NarratPlugin.d.ts +12 -12
- package/dist/stores/audio-store.d.ts +56 -56
- package/dist/stores/config-store.d.ts +6 -6
- package/dist/stores/dialog-store.d.ts +35 -35
- package/dist/stores/hud-stats-store.d.ts +20 -20
- package/dist/stores/inputs-store.d.ts +14 -14
- package/dist/stores/inventory-store.d.ts +49 -49
- package/dist/stores/main-store.d.ts +1637 -1637
- package/dist/stores/menu-store.d.ts +45 -45
- package/dist/stores/notification-store.d.ts +15 -15
- package/dist/stores/quest-log.d.ts +37 -37
- package/dist/stores/rendering-store.d.ts +20 -20
- package/dist/stores/screen-objects-store.d.ts +80 -80
- package/dist/stores/screens-store.d.ts +34 -34
- package/dist/stores/skills.d.ts +39 -39
- package/dist/stores/start-menu-store.d.ts +7 -7
- package/dist/stores/tooltip-store.d.ts +18 -18
- package/dist/stores/vm-store.d.ts +181 -181
- package/dist/types/app-types.d.ts +8 -8
- package/dist/types/dialog-box-types.d.ts +11 -11
- package/dist/types/game-save.d.ts +41 -41
- package/dist/types/parser.d.ts +93 -93
- package/dist/types/state.d.ts +3 -3
- package/dist/utils/InputsListener.d.ts +9 -9
- package/dist/utils/Vector2.d.ts +49 -49
- package/dist/utils/ajax.d.ts +2 -2
- package/dist/utils/audio-loader.d.ts +10 -10
- package/dist/utils/characters.d.ts +4 -4
- package/dist/utils/data-helpers.d.ts +35 -35
- package/dist/utils/data-helpers.test.d.ts +1 -1
- package/dist/utils/debounce.d.ts +14 -14
- package/dist/utils/error-handling.d.ts +4 -4
- package/dist/utils/gameloop.d.ts +10 -10
- package/dist/utils/getWindow.d.ts +1 -1
- package/dist/utils/helpers.d.ts +6 -6
- package/dist/utils/images-loader.d.ts +7 -7
- package/dist/utils/logger.d.ts +11 -11
- package/dist/utils/object-iterators.d.ts +9 -9
- package/dist/utils/promises.d.ts +1 -1
- package/dist/utils/randomId.d.ts +1 -1
- package/dist/utils/save-helpers.d.ts +16 -16
- package/dist/utils/skillchecks.d.ts +17 -17
- package/dist/utils/string-helpers.d.ts +5 -5
- package/dist/utils/time-helpers.d.ts +2 -2
- package/dist/utils/tooltip-utils.d.ts +2 -2
- package/dist/utils/transition.d.ts +21 -21
- package/dist/utils/type-utils.d.ts +2 -2
- package/dist/utils/typed-emitter.d.ts +18 -18
- package/dist/utils/viewport-utils.d.ts +3 -3
- package/dist/utils/vue-directives.d.ts +2 -2
- package/dist/vm/commands/arithmetic-commands.d.ts +23 -23
- package/dist/vm/commands/array-commands.d.ts +42 -42
- package/dist/vm/commands/audio-commands.d.ts +15 -15
- package/dist/vm/commands/choice.d.ts +38 -38
- package/dist/vm/commands/clear_dialog.d.ts +2 -2
- package/dist/vm/commands/command-helpers.d.ts +3 -3
- package/dist/vm/commands/command-plugin.d.ts +43 -43
- package/dist/vm/commands/flow-commands.d.ts +27 -27
- 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 +30 -30
- package/dist/vm/commands/notify.d.ts +6 -6
- package/dist/vm/commands/quest-commands.d.ts +30 -30
- package/dist/vm/commands/random-commands.d.ts +13 -13
- package/dist/vm/commands/screen-commands.d.ts +18 -18
- package/dist/vm/commands/set.d.ts +6 -6
- package/dist/vm/commands/skill-commands.d.ts +39 -39
- package/dist/vm/commands/sprite-commands.d.ts +16 -16
- 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 +14 -14
- package/dist/vm/commands/time-commands.d.ts +16 -16
- package/dist/vm/commands/util-commands.d.ts +4 -4
- package/dist/vm/commands/wait.d.ts +4 -4
- package/dist/vm/vm-helpers.d.ts +19 -19
- 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 +21 -21
- package/package.json +1 -1
|
@@ -1,67 +1,67 @@
|
|
|
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
|
-
pluginId: string;
|
|
32
|
-
onPageLoaded?: NarratLifecycleHook;
|
|
33
|
-
onNarratSetup?: NarratLifecycleHook;
|
|
34
|
-
onAppMounted?: NarratLifecycleHook;
|
|
35
|
-
onAssetsLoaded?: NarratLifecycleHook;
|
|
36
|
-
onGameSetup?: NarratLifecycleHook;
|
|
37
|
-
onGameStart?: NarratLifecycleHook;
|
|
38
|
-
onGameMounted?: NarratLifecycleHook;
|
|
39
|
-
onGameUnmounted?: NarratLifecycleHook;
|
|
40
|
-
customCommands?: CommandPlugin<T>[];
|
|
41
|
-
customStores?: CustomStores;
|
|
42
|
-
customMenuButtons?: CustomMenuButton[];
|
|
43
|
-
customMenuTabs?: CustomMenuTab[];
|
|
44
|
-
startMenuButtons?: CustomStartMenuButton[];
|
|
45
|
-
save?: () => any;
|
|
46
|
-
load?: (data: any) => void;
|
|
47
|
-
reset?: () => void;
|
|
48
|
-
loadingPromises?: Promise<any>[];
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Custom buttons that get added to the start menu (where the New Game etc buttons are)
|
|
52
|
-
* Action option is to provide a function to run on click
|
|
53
|
-
* popupComponent option is to provide a component to display in a modal window on click (for custom pieces of UI)
|
|
54
|
-
*/
|
|
55
|
-
export interface CustomStartMenuButton {
|
|
56
|
-
id: string;
|
|
57
|
-
text: string;
|
|
58
|
-
action?: () => void;
|
|
59
|
-
popupComponent?: {
|
|
60
|
-
name: string;
|
|
61
|
-
component: any;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
|
|
65
|
-
declare function addCommand<T>(command: CommandPlugin<T>): void;
|
|
66
|
-
export { CommandRunner };
|
|
67
|
-
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
|
+
pluginId: string;
|
|
32
|
+
onPageLoaded?: NarratLifecycleHook;
|
|
33
|
+
onNarratSetup?: NarratLifecycleHook;
|
|
34
|
+
onAppMounted?: NarratLifecycleHook;
|
|
35
|
+
onAssetsLoaded?: NarratLifecycleHook;
|
|
36
|
+
onGameSetup?: NarratLifecycleHook;
|
|
37
|
+
onGameStart?: NarratLifecycleHook;
|
|
38
|
+
onGameMounted?: NarratLifecycleHook;
|
|
39
|
+
onGameUnmounted?: NarratLifecycleHook;
|
|
40
|
+
customCommands?: CommandPlugin<T>[];
|
|
41
|
+
customStores?: CustomStores;
|
|
42
|
+
customMenuButtons?: CustomMenuButton[];
|
|
43
|
+
customMenuTabs?: CustomMenuTab[];
|
|
44
|
+
startMenuButtons?: CustomStartMenuButton[];
|
|
45
|
+
save?: () => any;
|
|
46
|
+
load?: (data: any) => void;
|
|
47
|
+
reset?: () => void;
|
|
48
|
+
loadingPromises?: Promise<any>[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Custom buttons that get added to the start menu (where the New Game etc buttons are)
|
|
52
|
+
* Action option is to provide a function to run on click
|
|
53
|
+
* popupComponent option is to provide a component to display in a modal window on click (for custom pieces of UI)
|
|
54
|
+
*/
|
|
55
|
+
export interface CustomStartMenuButton {
|
|
56
|
+
id: string;
|
|
57
|
+
text: string;
|
|
58
|
+
action?: () => void;
|
|
59
|
+
popupComponent?: {
|
|
60
|
+
name: string;
|
|
61
|
+
component: any;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
|
|
65
|
+
declare function addCommand<T>(command: CommandPlugin<T>): void;
|
|
66
|
+
export { CommandRunner };
|
|
67
|
+
export { CommandPlugin, NarratPlugin, registerPlugin, addCommand, generateParser, };
|
package/dist/exports/stores.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { useAudio } from '../stores/audio-store';
|
|
2
|
-
export { useConfig } from '../stores/config-store';
|
|
3
|
-
export { useDialogStore } from '../stores/dialog-store';
|
|
4
|
-
export { useHud } from '../stores/hud-stats-store';
|
|
5
|
-
export { useInputs } from '../stores/inputs-store';
|
|
6
|
-
export { useInventory } from '../stores/inventory-store';
|
|
7
|
-
export { useMain } from '../stores/main-store';
|
|
8
|
-
export { useMenu } from '../stores/menu-store';
|
|
9
|
-
export { useNotifications } from '../stores/notification-store';
|
|
10
|
-
export { useQuests } from '../stores/quest-log';
|
|
11
|
-
export { useRenderingStore } from '../stores/rendering-store';
|
|
12
|
-
export { useScreenObjects } from '../stores/screen-objects-store';
|
|
13
|
-
export { useScreens } from '../stores/screens-store';
|
|
14
|
-
export { useSkills } from '../stores/skills';
|
|
15
|
-
export { useTooltips } from '../stores/tooltip-store';
|
|
16
|
-
export { useVM } from '../stores/vm-store';
|
|
1
|
+
export { useAudio } from '../stores/audio-store';
|
|
2
|
+
export { useConfig } from '../stores/config-store';
|
|
3
|
+
export { useDialogStore } from '../stores/dialog-store';
|
|
4
|
+
export { useHud } from '../stores/hud-stats-store';
|
|
5
|
+
export { useInputs } from '../stores/inputs-store';
|
|
6
|
+
export { useInventory } from '../stores/inventory-store';
|
|
7
|
+
export { useMain } from '../stores/main-store';
|
|
8
|
+
export { useMenu } from '../stores/menu-store';
|
|
9
|
+
export { useNotifications } from '../stores/notification-store';
|
|
10
|
+
export { useQuests } from '../stores/quest-log';
|
|
11
|
+
export { useRenderingStore } from '../stores/rendering-store';
|
|
12
|
+
export { useScreenObjects } from '../stores/screen-objects-store';
|
|
13
|
+
export { useScreens } from '../stores/screens-store';
|
|
14
|
+
export { useSkills } from '../stores/skills';
|
|
15
|
+
export { useTooltips } from '../stores/tooltip-store';
|
|
16
|
+
export { useVM } from '../stores/vm-store';
|
package/dist/exports/utils.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { error, warning } from '../utils/error-handling';
|
|
2
|
-
export { processText, findVariable } from '../utils/string-helpers';
|
|
3
|
-
export { getFile, loadDataFile } from '../utils/ajax';
|
|
4
|
-
export { getWindow } from '../utils/getWindow';
|
|
5
|
-
export { InputsListener, inputEvents } from '../utils/InputsListener';
|
|
6
|
-
export type { InputEvents } from '../utils/InputsListener';
|
|
7
|
-
export { LogManager, logManager, logger } from '../utils/logger';
|
|
8
|
-
export { timeout } from '../utils/promises';
|
|
9
|
-
export { randomId } from '../utils/randomId';
|
|
10
|
-
export { Vec2 } from '../utils/Vector2';
|
|
11
|
-
export type { Vector2 } from '../utils/Vector2';
|
|
12
|
-
export { gameloop } from '../utils/gameloop';
|
|
1
|
+
export { error, warning } from '../utils/error-handling';
|
|
2
|
+
export { processText, findVariable } from '../utils/string-helpers';
|
|
3
|
+
export { getFile, loadDataFile } from '../utils/ajax';
|
|
4
|
+
export { getWindow } from '../utils/getWindow';
|
|
5
|
+
export { InputsListener, inputEvents } from '../utils/InputsListener';
|
|
6
|
+
export type { InputEvents } from '../utils/InputsListener';
|
|
7
|
+
export { LogManager, logManager, logger } from '../utils/logger';
|
|
8
|
+
export { timeout } from '../utils/promises';
|
|
9
|
+
export { randomId } from '../utils/randomId';
|
|
10
|
+
export { Vec2 } from '../utils/Vector2';
|
|
11
|
+
export type { Vector2 } from '../utils/Vector2';
|
|
12
|
+
export { gameloop } from '../utils/gameloop';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getGamepad(): Gamepad | null;
|
|
1
|
+
export declare function getGamepad(): Gamepad | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/inputs/Inputs.d.ts
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { Vector2 } from '../utils/Vector2';
|
|
2
|
-
export interface ButtonKeybind {
|
|
3
|
-
keyboardKey: string;
|
|
4
|
-
}
|
|
5
|
-
export interface AnalogKeybind {
|
|
6
|
-
left: string;
|
|
7
|
-
right: string;
|
|
8
|
-
up: string;
|
|
9
|
-
down: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ButtonAction {
|
|
12
|
-
id: string;
|
|
13
|
-
type: 'button';
|
|
14
|
-
action: 'press' | 'release';
|
|
15
|
-
keybinds: ButtonKeybind[];
|
|
16
|
-
}
|
|
17
|
-
export interface AnalogAction {
|
|
18
|
-
id: string;
|
|
19
|
-
type: 'analog';
|
|
20
|
-
keybinds: AnalogKeybind[];
|
|
21
|
-
}
|
|
22
|
-
export interface ButtonActionState {
|
|
23
|
-
active: boolean;
|
|
24
|
-
previous: boolean;
|
|
25
|
-
}
|
|
26
|
-
export interface AnalogDirectionState {
|
|
27
|
-
left: number;
|
|
28
|
-
right: number;
|
|
29
|
-
up: number;
|
|
30
|
-
down: number;
|
|
31
|
-
}
|
|
32
|
-
export interface AnalogActionState {
|
|
33
|
-
value: Vector2;
|
|
34
|
-
previous: Vector2;
|
|
35
|
-
fullState: AnalogDirectionState;
|
|
36
|
-
previousFullState: AnalogDirectionState;
|
|
37
|
-
}
|
|
38
|
-
export declare type Action = ButtonAction | AnalogAction;
|
|
39
|
-
export declare class Inputs {
|
|
40
|
-
gameActions: {
|
|
41
|
-
[key: string]: Action;
|
|
42
|
-
};
|
|
43
|
-
keyboardState: {
|
|
44
|
-
[key: string]: {
|
|
45
|
-
current: boolean;
|
|
46
|
-
previous: boolean;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
actions: {
|
|
50
|
-
[key: string]: ButtonActionState | AnalogActionState;
|
|
51
|
-
};
|
|
52
|
-
startListening(): void;
|
|
53
|
-
addAction(action: Action): void;
|
|
54
|
-
getAnalog(actionId: string): AnalogActionState;
|
|
55
|
-
getButton(actionId: string): ButtonActionState;
|
|
56
|
-
getKeyState(key: string): {
|
|
57
|
-
current: boolean;
|
|
58
|
-
previous: boolean;
|
|
59
|
-
};
|
|
60
|
-
update(): void;
|
|
61
|
-
}
|
|
1
|
+
import { Vector2 } from '../utils/Vector2';
|
|
2
|
+
export interface ButtonKeybind {
|
|
3
|
+
keyboardKey: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AnalogKeybind {
|
|
6
|
+
left: string;
|
|
7
|
+
right: string;
|
|
8
|
+
up: string;
|
|
9
|
+
down: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ButtonAction {
|
|
12
|
+
id: string;
|
|
13
|
+
type: 'button';
|
|
14
|
+
action: 'press' | 'release';
|
|
15
|
+
keybinds: ButtonKeybind[];
|
|
16
|
+
}
|
|
17
|
+
export interface AnalogAction {
|
|
18
|
+
id: string;
|
|
19
|
+
type: 'analog';
|
|
20
|
+
keybinds: AnalogKeybind[];
|
|
21
|
+
}
|
|
22
|
+
export interface ButtonActionState {
|
|
23
|
+
active: boolean;
|
|
24
|
+
previous: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface AnalogDirectionState {
|
|
27
|
+
left: number;
|
|
28
|
+
right: number;
|
|
29
|
+
up: number;
|
|
30
|
+
down: number;
|
|
31
|
+
}
|
|
32
|
+
export interface AnalogActionState {
|
|
33
|
+
value: Vector2;
|
|
34
|
+
previous: Vector2;
|
|
35
|
+
fullState: AnalogDirectionState;
|
|
36
|
+
previousFullState: AnalogDirectionState;
|
|
37
|
+
}
|
|
38
|
+
export declare type Action = ButtonAction | AnalogAction;
|
|
39
|
+
export declare class Inputs {
|
|
40
|
+
gameActions: {
|
|
41
|
+
[key: string]: Action;
|
|
42
|
+
};
|
|
43
|
+
keyboardState: {
|
|
44
|
+
[key: string]: {
|
|
45
|
+
current: boolean;
|
|
46
|
+
previous: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
actions: {
|
|
50
|
+
[key: string]: ButtonActionState | AnalogActionState;
|
|
51
|
+
};
|
|
52
|
+
startListening(): void;
|
|
53
|
+
addAction(action: Action): void;
|
|
54
|
+
getAnalog(actionId: string): AnalogActionState;
|
|
55
|
+
getButton(actionId: string): ButtonActionState;
|
|
56
|
+
getKeyState(key: string): {
|
|
57
|
+
current: boolean;
|
|
58
|
+
previous: boolean;
|
|
59
|
+
};
|
|
60
|
+
update(): void;
|
|
61
|
+
}
|
package/dist/lib.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import 'es6-promise/auto';
|
|
3
|
-
export * from './main';
|
|
4
|
-
export declare type Narrat = {
|
|
5
|
-
app: App;
|
|
6
|
-
};
|
|
7
|
-
declare global {
|
|
8
|
-
export interface Window {
|
|
9
|
-
narrat: Narrat;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export * from './exports/plugins';
|
|
13
|
-
export * from './exports/display';
|
|
14
|
-
export * from './exports/config';
|
|
15
|
-
export * from './exports/events';
|
|
16
|
-
export * from './exports/inputs';
|
|
17
|
-
export * from './exports/stores';
|
|
18
|
-
export * from './exports/others';
|
|
19
|
-
export * from './exports/components';
|
|
20
|
-
export * from './exports/utils';
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import 'es6-promise/auto';
|
|
3
|
+
export * from './main';
|
|
4
|
+
export declare type Narrat = {
|
|
5
|
+
app: App;
|
|
6
|
+
};
|
|
7
|
+
declare global {
|
|
8
|
+
export interface Window {
|
|
9
|
+
narrat: Narrat;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export * from './exports/plugins';
|
|
13
|
+
export * from './exports/display';
|
|
14
|
+
export * from './exports/config';
|
|
15
|
+
export * from './exports/events';
|
|
16
|
+
export * from './exports/inputs';
|
|
17
|
+
export * from './exports/stores';
|
|
18
|
+
export * from './exports/others';
|
|
19
|
+
export * from './exports/components';
|
|
20
|
+
export * from './exports/utils';
|
package/dist/main.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'es6-promise/auto';
|
|
2
|
-
import 'virtual:windi.css';
|
|
3
|
-
import './css/main.css';
|
|
4
|
-
import { AppOptionsInput } from './types/app-types';
|
|
5
|
-
export declare function startApp(optionsInput: AppOptionsInput): Promise<any>;
|
|
6
|
-
export declare function registerComponent(name: string, component: any): void;
|
|
1
|
+
import 'es6-promise/auto';
|
|
2
|
+
import 'virtual:windi.css';
|
|
3
|
+
import './css/main.css';
|
|
4
|
+
import { AppOptionsInput } from './types/app-types';
|
|
5
|
+
export declare function startApp(optionsInput: AppOptionsInput): Promise<any>;
|
|
6
|
+
export declare function registerComponent(name: string, component: any): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MenuState, MenuTabState } from '../stores/menu-store';
|
|
2
|
-
export declare function registerDefaultMenuButtons(app: any): void;
|
|
3
|
-
export declare function registerMenuButton(id: string, config: MenuState, components: {
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
}): void;
|
|
6
|
-
export declare function registerMenuTab(id: string, config: MenuTabState, component: any): void;
|
|
7
|
-
export declare function addMenuButtonsFromPlugins(): void;
|
|
1
|
+
import { MenuState, MenuTabState } from '../stores/menu-store';
|
|
2
|
+
export declare function registerDefaultMenuButtons(app: any): void;
|
|
3
|
+
export declare function registerMenuButton(id: string, config: MenuState, components: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}): void;
|
|
6
|
+
export declare function registerMenuTab(id: string, config: MenuTabState, component: any): void;
|
|
7
|
+
export declare function addMenuButtonsFromPlugins(): void;
|
package/dist/narrat.es.js
CHANGED
|
@@ -38459,7 +38459,7 @@ const vL = "gameSave", Qp = "###_--_~=:;_JUMP", aw = "###_--_~=:;_RETURN", Uee =
|
|
|
38459
38459
|
function Wee(t) {
|
|
38460
38460
|
return t === Qp || t === aw || t === Uee || t === Yp;
|
|
38461
38461
|
}
|
|
38462
|
-
const Kee = "2.10.
|
|
38462
|
+
const Kee = "2.10.8", Jee = new Date("2023-02-14T10:29:13.921Z"), Gee = 400, jy = 20, mL = "1.4.0";
|
|
38463
38463
|
let Zr;
|
|
38464
38464
|
function gL() {
|
|
38465
38465
|
if (Zr)
|
|
@@ -40483,13 +40483,10 @@ const Oo = hi("screenObjects", {
|
|
|
40483
40483
|
generateSaveData() {
|
|
40484
40484
|
return {
|
|
40485
40485
|
lastLabel: this.lastLabel,
|
|
40486
|
-
data: Fy(this.data, (t) => {
|
|
40487
|
-
|
|
40488
|
-
|
|
40489
|
-
|
|
40490
|
-
id: t.id
|
|
40491
|
-
};
|
|
40492
|
-
})
|
|
40486
|
+
data: Fy(this.data, (t) => sA(t) ? {
|
|
40487
|
+
_entityType: t._entityType,
|
|
40488
|
+
id: t.id
|
|
40489
|
+
} : t)
|
|
40493
40490
|
};
|
|
40494
40491
|
},
|
|
40495
40492
|
loadSaveData(t) {
|