narrat 2.2.19 → 2.3.0-rc-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/{Skills.vue.d.ts → SkillsWindow.vue.d.ts} +0 -0
- package/dist/components/menu-buttons.vue.d.ts +45 -17
- package/dist/components/notification-toast.vue.d.ts +1 -1
- package/dist/components/utils/{modal.vue.d.ts → modal-window.vue.d.ts} +0 -0
- package/dist/constants.d.ts +2 -0
- package/dist/exports/components.d.ts +2 -0
- package/dist/exports/events.d.ts +1 -0
- package/dist/exports/others.d.ts +1 -0
- package/dist/exports/plugins.d.ts +20 -2
- package/dist/exports/stores.d.ts +11 -0
- package/dist/lib.d.ts +4 -0
- package/dist/main.d.ts +2 -1
- package/dist/menu-buttons/menu-buttons.d.ts +4 -0
- package/dist/narrat.es.js +8557 -8032
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +73 -73
- package/dist/narrat.umd.js.map +1 -1
- package/dist/stores/menu-store.d.ts +36 -0
- package/dist/style.css +1 -1
- package/dist/utils/type-utils.d.ts +1 -0
- package/dist/vm/vm.d.ts +4 -1
- package/package.json +7 -7
|
File without changes
|
|
@@ -6,21 +6,49 @@ export interface ButtonConf {
|
|
|
6
6
|
cssClass?: string;
|
|
7
7
|
text: string;
|
|
8
8
|
}
|
|
9
|
-
declare const _default:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
declare const _default: {
|
|
10
|
+
new (...args: any[]): {
|
|
11
|
+
$: import("vue").ComponentInternalInstance;
|
|
12
|
+
$data: {};
|
|
13
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
14
|
+
$attrs: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
$refs: {
|
|
18
|
+
[x: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
$slots: Readonly<{
|
|
21
|
+
[name: string]: import("vue").Slot | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
24
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
25
|
+
$emit: ((event: string, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
26
|
+
$el: any;
|
|
27
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {}> & {
|
|
28
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
33
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
34
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
35
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
36
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
37
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
38
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
39
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
40
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
41
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
42
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
43
|
+
};
|
|
44
|
+
$forceUpdate: () => void;
|
|
45
|
+
$nextTick: typeof import("vue").nextTick;
|
|
46
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
47
|
+
} & Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
48
|
+
__isFragment?: undefined;
|
|
49
|
+
__isTeleport?: undefined;
|
|
50
|
+
__isSuspense?: undefined;
|
|
51
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
52
|
+
$slots: {};
|
|
53
|
+
});
|
|
26
54
|
export default _default;
|
|
File without changes
|
package/dist/constants.d.ts
CHANGED
|
@@ -6,3 +6,5 @@ export declare const OK_SIGNAL = "###_--_~=:;_OK";
|
|
|
6
6
|
export declare const STOP_SIGNAL = "###_--_~=:;_STOP";
|
|
7
7
|
export declare type ReturnSignal = typeof JUMP_SIGNAL | typeof RETURN_SIGNAL | typeof OK_SIGNAL | typeof STOP_SIGNAL;
|
|
8
8
|
export declare function isReturnSignal(s: string): s is ReturnSignal;
|
|
9
|
+
export declare const VERSION: string;
|
|
10
|
+
export declare const BUILD_DATE: Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { inputEvents } from '../utils/InputsListener';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { registerMenuButton } from '../menu-buttons/menu-buttons';
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { NarratPlugin } from '../plugins/NarratPlugin';
|
|
2
2
|
import { CommandPlugin, generateParser } from '../vm/commands/command-plugin';
|
|
3
3
|
import type { CommandRunner } from '../vm/commands/command-plugin';
|
|
4
|
+
import { StoreDefinition } from 'pinia';
|
|
5
|
+
import { MenuButtonState } from '../stores/menu-store';
|
|
4
6
|
export declare type NarratLifecycleHook = <T extends [...any[]]>(...args: T) => void;
|
|
5
|
-
|
|
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> = {
|
|
6
23
|
onPageLoaded?: NarratLifecycleHook;
|
|
7
24
|
onNarratSetup?: NarratLifecycleHook;
|
|
8
25
|
onAppMounted?: NarratLifecycleHook;
|
|
@@ -12,9 +29,10 @@ declare type NarratPluginObject<T> = {
|
|
|
12
29
|
onGameMounted?: NarratLifecycleHook;
|
|
13
30
|
onGameUnmounted?: NarratLifecycleHook;
|
|
14
31
|
customCommands?: CommandPlugin<T>[];
|
|
32
|
+
customStores?: CustomStores;
|
|
33
|
+
customMenuButtons?: CustomMenuButton[];
|
|
15
34
|
};
|
|
16
35
|
declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
|
|
17
36
|
declare function addCommand<T>(command: CommandPlugin<T>): void;
|
|
18
37
|
export { CommandRunner };
|
|
19
38
|
export { CommandPlugin, NarratPlugin, registerPlugin, addCommand, generateParser, };
|
|
20
|
-
export type { NarratPluginObject };
|
|
@@ -0,0 +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';
|
package/dist/lib.d.ts
CHANGED
|
@@ -12,3 +12,7 @@ declare global {
|
|
|
12
12
|
export * from './exports/plugins';
|
|
13
13
|
export * from './exports/display';
|
|
14
14
|
export * from './exports/config';
|
|
15
|
+
export * from './exports/events';
|
|
16
|
+
export * from './exports/stores';
|
|
17
|
+
export * from './exports/others';
|
|
18
|
+
export * from './exports/components';
|
package/dist/main.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ import 'virtual:windi.css';
|
|
|
3
3
|
import './css/main.css';
|
|
4
4
|
import { AppOptionsInput } from './types/app-types';
|
|
5
5
|
import { AppOptionsDeprecated } from './config';
|
|
6
|
-
export declare function startApp(optionsInput: AppOptionsInput, optionsOld?: AppOptionsDeprecated): Promise<
|
|
6
|
+
export declare function startApp(optionsInput: AppOptionsInput, optionsOld?: AppOptionsDeprecated): Promise<any>;
|
|
7
|
+
export declare function registerComponent(name: string, component: any): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MenuButtonState } from '../stores/menu-store';
|
|
2
|
+
export declare function registerDefaultMenuButtons(app: any): void;
|
|
3
|
+
export declare function registerMenuButton(config: MenuButtonState, component: any): void;
|
|
4
|
+
export declare function addMenuButtonsFromPlugins(): void;
|