narrat 2.16.0 → 2.17.0
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/README.md +3 -3
- package/dist/components/MainMenu.vue.d.ts +53 -6
- package/dist/components/settings/setting-widget.vue.d.ts +58 -0
- package/dist/components/settings/settings-menu.vue.d.ts +46 -0
- package/dist/config/config-input.d.ts +35 -0
- package/dist/config/config-output.d.ts +5 -0
- package/dist/config/layout-config.d.ts +1 -0
- package/dist/config/settings-config.d.ts +113 -0
- package/dist/config/skillchecks-config.d.ts +3 -0
- package/dist/config.d.ts +1 -0
- package/dist/dialog-box.vue.d.ts +3 -0
- package/dist/exports/plugins.d.ts +2 -0
- package/dist/main.d.ts +1 -0
- package/dist/narrat.es.js +11325 -11061
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +100 -100
- package/dist/narrat.umd.js.map +1 -1
- package/dist/stores/main-store.d.ts +213 -0
- package/dist/stores/settings-store.d.ts +93 -0
- package/dist/style.css +1 -1
- package/dist/types/game-save.d.ts +2 -0
- package/dist/utils/data-helpers.d.ts +9 -0
- package/dist/utils/save-helpers.d.ts +1 -1
- package/dist/vm/commands/settings-commands.d.ts +8 -0
- package/dist/vm/vm.d.ts +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Narrat is a game engine for making interactive narrative RPGs packed with featur
|
|
|
6
6
|
|
|
7
7
|
## Getting Started
|
|
8
8
|
|
|
9
|
-
Go to the [Getting Started Guide](https://docs.
|
|
9
|
+
Go to the [Getting Started Guide](https://docs.narrat.dev/guides/getting-started.html)
|
|
10
10
|
|
|
11
11
|
Try the engine directly in your browser (experimental, only works on desktop):
|
|
12
12
|
|
|
@@ -14,8 +14,8 @@ Try the engine directly in your browser (experimental, only works on desktop):
|
|
|
14
14
|
|
|
15
15
|
Or try editing the default narrat game easily:
|
|
16
16
|
|
|
17
|
-
[](https:///pr.new/github.com/liana-p/narrat-engine/edit/main/packages/narrat/examples/games/default/scripts/default.
|
|
17
|
+
[](https:///pr.new/github.com/liana-p/narrat-engine/edit/main/packages/narrat/examples/games/default/scripts/default.narrat)
|
|
18
18
|
|
|
19
19
|
With Codeflow you can test Narrat quickly without setting up an IDE
|
|
20
20
|
|
|
21
|
-
More info on the [narrat website](https://
|
|
21
|
+
More info on the [narrat website](https://narrat.dev). There is an [online demo](https://narrat.dev/demo/) available to try in the browser.
|
|
@@ -1,7 +1,54 @@
|
|
|
1
|
-
declare const _default:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (...args: any[]): {
|
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
6
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
8
|
+
$attrs: {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
$refs: {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
$slots: Readonly<{
|
|
15
|
+
[name: string]: import("vue").Slot | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
18
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
19
|
+
$emit: (event: "close", ...args: any[]) => void;
|
|
20
|
+
$el: any;
|
|
21
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
22
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], string, {}, {}, string> & {
|
|
24
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
25
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
26
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
33
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
34
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
35
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
36
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
37
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
38
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
39
|
+
};
|
|
40
|
+
$forceUpdate: () => void;
|
|
41
|
+
$nextTick: typeof import("vue").nextTick;
|
|
42
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
43
|
+
} & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
44
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
46
|
+
__isFragment?: undefined;
|
|
47
|
+
__isTeleport?: undefined;
|
|
48
|
+
__isSuspense?: undefined;
|
|
49
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
50
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
52
|
+
$slots: {};
|
|
53
|
+
});
|
|
7
54
|
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface SettingWidgetProps {
|
|
2
|
+
settingId: string;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: {
|
|
5
|
+
new (...args: any[]): {
|
|
6
|
+
$: import("vue").ComponentInternalInstance;
|
|
7
|
+
$data: {};
|
|
8
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SettingWidgetProps>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
9
|
+
$attrs: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
$refs: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
$slots: Readonly<{
|
|
16
|
+
[name: string]: import("vue").Slot | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
19
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
20
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
21
|
+
$el: any;
|
|
22
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SettingWidgetProps>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
|
|
23
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
24
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
25
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
26
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
33
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
34
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
35
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
36
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
37
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
38
|
+
};
|
|
39
|
+
$forceUpdate: () => void;
|
|
40
|
+
$nextTick: typeof import("vue").nextTick;
|
|
41
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
42
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SettingWidgetProps>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
43
|
+
__isFragment?: undefined;
|
|
44
|
+
__isTeleport?: undefined;
|
|
45
|
+
__isSuspense?: undefined;
|
|
46
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SettingWidgetProps>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
47
|
+
$slots: {};
|
|
48
|
+
});
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
51
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
52
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
53
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
54
|
+
} : {
|
|
55
|
+
type: import('vue').PropType<T[K]>;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (...args: any[]): {
|
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
6
|
+
$attrs: {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
$refs: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
$slots: Readonly<{
|
|
13
|
+
[name: string]: import("vue").Slot | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
16
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
17
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
18
|
+
$el: any;
|
|
19
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
|
|
20
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
21
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
22
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
23
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
24
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
25
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
26
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
33
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
34
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
35
|
+
};
|
|
36
|
+
$forceUpdate: () => void;
|
|
37
|
+
$nextTick: typeof import("vue").nextTick;
|
|
38
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
39
|
+
} & Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
40
|
+
__isFragment?: undefined;
|
|
41
|
+
__isTeleport?: undefined;
|
|
42
|
+
__isSuspense?: undefined;
|
|
43
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
44
|
+
$slots: {};
|
|
45
|
+
});
|
|
46
|
+
export default _default;
|
|
@@ -13,6 +13,7 @@ export declare const ConfigInputSchema: import("@sinclair/typebox").TObject<{
|
|
|
13
13
|
dialogBottomPadding: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
|
|
14
14
|
minTextWidth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
15
15
|
verticalLayoutThreshold: import("@sinclair/typebox").TNumber;
|
|
16
|
+
defaultFontSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
16
17
|
portraits: import("@sinclair/typebox").TObject<{
|
|
17
18
|
width: import("@sinclair/typebox").TNumber;
|
|
18
19
|
height: import("@sinclair/typebox").TNumber;
|
|
@@ -28,6 +29,39 @@ export declare const ConfigInputSchema: import("@sinclair/typebox").TObject<{
|
|
|
28
29
|
}>>;
|
|
29
30
|
}>;
|
|
30
31
|
}>;
|
|
32
|
+
settings: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
33
|
+
customSettings: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
34
|
+
name: import("@sinclair/typebox").TString;
|
|
35
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
36
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
37
|
+
type: import("@sinclair/typebox").TLiteral<"number">;
|
|
38
|
+
defaultValue: import("@sinclair/typebox").TNumber;
|
|
39
|
+
step: import("@sinclair/typebox").TNumber;
|
|
40
|
+
minValue: import("@sinclair/typebox").TNumber;
|
|
41
|
+
maxValue: import("@sinclair/typebox").TNumber;
|
|
42
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
43
|
+
name: import("@sinclair/typebox").TString;
|
|
44
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
45
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
46
|
+
type: import("@sinclair/typebox").TLiteral<"integer">;
|
|
47
|
+
defaultValue: import("@sinclair/typebox").TNumber;
|
|
48
|
+
step: import("@sinclair/typebox").TNumber;
|
|
49
|
+
minValue: import("@sinclair/typebox").TNumber;
|
|
50
|
+
maxValue: import("@sinclair/typebox").TNumber;
|
|
51
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
52
|
+
name: import("@sinclair/typebox").TString;
|
|
53
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
54
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
55
|
+
type: import("@sinclair/typebox").TLiteral<"boolean">;
|
|
56
|
+
defaultValue: import("@sinclair/typebox").TBoolean;
|
|
57
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
58
|
+
name: import("@sinclair/typebox").TString;
|
|
59
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
60
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
61
|
+
type: import("@sinclair/typebox").TLiteral<"string">;
|
|
62
|
+
defaultValue: import("@sinclair/typebox").TString;
|
|
63
|
+
}>]>]>>>;
|
|
64
|
+
}>>;
|
|
31
65
|
gameFlow: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
32
66
|
labelToJumpOnScriptEnd: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
33
67
|
}>>;
|
|
@@ -129,6 +163,7 @@ export declare const ConfigInputSchema: import("@sinclair/typebox").TObject<{
|
|
|
129
163
|
showDifficultyWithoutModifiers: import("@sinclair/typebox").TBoolean;
|
|
130
164
|
finalRollIsHighest: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
131
165
|
finalRollIsLowest: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
166
|
+
failOnRollsEqualToThreshold: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
132
167
|
}>;
|
|
133
168
|
skillChecks: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
134
169
|
skill: import("@sinclair/typebox").TString;
|
|
@@ -10,6 +10,7 @@ import { LayoutConfig } from './layout-config';
|
|
|
10
10
|
import { TooltipsConfig } from './tooltips-config';
|
|
11
11
|
import { AchievementsConfig } from './achievements-config';
|
|
12
12
|
import { SkillChecksConfig } from './skillchecks-config';
|
|
13
|
+
import { SettingsConfig } from './settings-config';
|
|
13
14
|
export interface Config {
|
|
14
15
|
baseAssetsPath: string;
|
|
15
16
|
baseDataPath: string;
|
|
@@ -19,6 +20,7 @@ export interface Config {
|
|
|
19
20
|
[key: string]: string;
|
|
20
21
|
};
|
|
21
22
|
layout: LayoutConfig;
|
|
23
|
+
settings: SettingsConfig;
|
|
22
24
|
gameFlow: {
|
|
23
25
|
labelToJumpOnScriptEnd?: string;
|
|
24
26
|
};
|
|
@@ -51,6 +53,7 @@ export declare const defaultConfig: {
|
|
|
51
53
|
images: {};
|
|
52
54
|
layout: {
|
|
53
55
|
minTextWidth?: number | undefined;
|
|
56
|
+
defaultFontSize?: number | undefined;
|
|
54
57
|
backgrounds: {
|
|
55
58
|
width: number;
|
|
56
59
|
height: number;
|
|
@@ -72,6 +75,7 @@ export declare const defaultConfig: {
|
|
|
72
75
|
height: number;
|
|
73
76
|
};
|
|
74
77
|
};
|
|
78
|
+
settings: {};
|
|
75
79
|
gameFlow: {};
|
|
76
80
|
dialogPanel: {
|
|
77
81
|
overlayMode: boolean;
|
|
@@ -152,6 +156,7 @@ export declare const defaultConfig: {
|
|
|
152
156
|
extraDicePerLevel?: number | undefined;
|
|
153
157
|
finalRollIsHighest?: boolean | undefined;
|
|
154
158
|
finalRollIsLowest?: boolean | undefined;
|
|
159
|
+
failOnRollsEqualToThreshold?: boolean | undefined;
|
|
155
160
|
diceRange: [number, number];
|
|
156
161
|
diceCount: number;
|
|
157
162
|
difficultyText: [number, string][];
|
|
@@ -7,6 +7,7 @@ export declare const LayoutConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
7
7
|
dialogBottomPadding: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
|
|
8
8
|
minTextWidth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
9
9
|
verticalLayoutThreshold: import("@sinclair/typebox").TNumber;
|
|
10
|
+
defaultFontSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
10
11
|
portraits: import("@sinclair/typebox").TObject<{
|
|
11
12
|
width: import("@sinclair/typebox").TNumber;
|
|
12
13
|
height: import("@sinclair/typebox").TNumber;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Static } from '@sinclair/typebox';
|
|
2
|
+
export declare const CustomSettingGenericSchema: import("@sinclair/typebox").TObject<{
|
|
3
|
+
name: import("@sinclair/typebox").TString;
|
|
4
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const CustomSettingsNumberSchema: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
7
|
+
name: import("@sinclair/typebox").TString;
|
|
8
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
10
|
+
type: import("@sinclair/typebox").TLiteral<"number">;
|
|
11
|
+
defaultValue: import("@sinclair/typebox").TNumber;
|
|
12
|
+
step: import("@sinclair/typebox").TNumber;
|
|
13
|
+
minValue: import("@sinclair/typebox").TNumber;
|
|
14
|
+
maxValue: import("@sinclair/typebox").TNumber;
|
|
15
|
+
}>]>;
|
|
16
|
+
export type CustomSettingsNumber = Static<typeof CustomSettingsNumberSchema>;
|
|
17
|
+
export declare const CustomSettingsIntegerSchema: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
18
|
+
name: import("@sinclair/typebox").TString;
|
|
19
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
20
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
21
|
+
type: import("@sinclair/typebox").TLiteral<"integer">;
|
|
22
|
+
defaultValue: import("@sinclair/typebox").TNumber;
|
|
23
|
+
step: import("@sinclair/typebox").TNumber;
|
|
24
|
+
minValue: import("@sinclair/typebox").TNumber;
|
|
25
|
+
maxValue: import("@sinclair/typebox").TNumber;
|
|
26
|
+
}>]>;
|
|
27
|
+
export type CustomSettingsInteger = Static<typeof CustomSettingsIntegerSchema>;
|
|
28
|
+
export declare const CustomSettingsBooleanSchema: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
29
|
+
name: import("@sinclair/typebox").TString;
|
|
30
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
31
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
32
|
+
type: import("@sinclair/typebox").TLiteral<"boolean">;
|
|
33
|
+
defaultValue: import("@sinclair/typebox").TBoolean;
|
|
34
|
+
}>]>;
|
|
35
|
+
export type CustomSettingsBoolean = Static<typeof CustomSettingsBooleanSchema>;
|
|
36
|
+
export declare const CustomSettingsStringSchema: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
37
|
+
name: import("@sinclair/typebox").TString;
|
|
38
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
39
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
40
|
+
type: import("@sinclair/typebox").TLiteral<"string">;
|
|
41
|
+
defaultValue: import("@sinclair/typebox").TString;
|
|
42
|
+
}>]>;
|
|
43
|
+
export type CustomSettingsString = Static<typeof CustomSettingsStringSchema>;
|
|
44
|
+
export declare const CustomSettingSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
45
|
+
name: import("@sinclair/typebox").TString;
|
|
46
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
47
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
48
|
+
type: import("@sinclair/typebox").TLiteral<"number">;
|
|
49
|
+
defaultValue: import("@sinclair/typebox").TNumber;
|
|
50
|
+
step: import("@sinclair/typebox").TNumber;
|
|
51
|
+
minValue: import("@sinclair/typebox").TNumber;
|
|
52
|
+
maxValue: import("@sinclair/typebox").TNumber;
|
|
53
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
54
|
+
name: import("@sinclair/typebox").TString;
|
|
55
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
56
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
57
|
+
type: import("@sinclair/typebox").TLiteral<"integer">;
|
|
58
|
+
defaultValue: import("@sinclair/typebox").TNumber;
|
|
59
|
+
step: import("@sinclair/typebox").TNumber;
|
|
60
|
+
minValue: import("@sinclair/typebox").TNumber;
|
|
61
|
+
maxValue: import("@sinclair/typebox").TNumber;
|
|
62
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
63
|
+
name: import("@sinclair/typebox").TString;
|
|
64
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
65
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
66
|
+
type: import("@sinclair/typebox").TLiteral<"boolean">;
|
|
67
|
+
defaultValue: import("@sinclair/typebox").TBoolean;
|
|
68
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
69
|
+
name: import("@sinclair/typebox").TString;
|
|
70
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
71
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
72
|
+
type: import("@sinclair/typebox").TLiteral<"string">;
|
|
73
|
+
defaultValue: import("@sinclair/typebox").TString;
|
|
74
|
+
}>]>]>;
|
|
75
|
+
export type CustomSetting = Static<typeof CustomSettingSchema>;
|
|
76
|
+
export declare function isSettingNumber(setting: CustomSetting): setting is CustomSettingsNumber;
|
|
77
|
+
export declare function isSettingInteger(setting: CustomSetting): setting is CustomSettingsInteger;
|
|
78
|
+
export declare function isSettingBoolean(setting: CustomSetting): setting is CustomSettingsBoolean;
|
|
79
|
+
export declare function isSettingString(setting: CustomSetting): setting is CustomSettingsString;
|
|
80
|
+
export declare const SettingsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
81
|
+
customSettings: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
82
|
+
name: import("@sinclair/typebox").TString;
|
|
83
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
84
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
85
|
+
type: import("@sinclair/typebox").TLiteral<"number">;
|
|
86
|
+
defaultValue: import("@sinclair/typebox").TNumber;
|
|
87
|
+
step: import("@sinclair/typebox").TNumber;
|
|
88
|
+
minValue: import("@sinclair/typebox").TNumber;
|
|
89
|
+
maxValue: import("@sinclair/typebox").TNumber;
|
|
90
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
91
|
+
name: import("@sinclair/typebox").TString;
|
|
92
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
93
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
94
|
+
type: import("@sinclair/typebox").TLiteral<"integer">;
|
|
95
|
+
defaultValue: import("@sinclair/typebox").TNumber;
|
|
96
|
+
step: import("@sinclair/typebox").TNumber;
|
|
97
|
+
minValue: import("@sinclair/typebox").TNumber;
|
|
98
|
+
maxValue: import("@sinclair/typebox").TNumber;
|
|
99
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
100
|
+
name: import("@sinclair/typebox").TString;
|
|
101
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
102
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
103
|
+
type: import("@sinclair/typebox").TLiteral<"boolean">;
|
|
104
|
+
defaultValue: import("@sinclair/typebox").TBoolean;
|
|
105
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
106
|
+
name: import("@sinclair/typebox").TString;
|
|
107
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
108
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
109
|
+
type: import("@sinclair/typebox").TLiteral<"string">;
|
|
110
|
+
defaultValue: import("@sinclair/typebox").TString;
|
|
111
|
+
}>]>]>>>;
|
|
112
|
+
}>;
|
|
113
|
+
export type SettingsConfig = Static<typeof SettingsConfigSchema>;
|
|
@@ -11,6 +11,7 @@ export declare const SkillCheckOptionsConfigSchema: import("@sinclair/typebox").
|
|
|
11
11
|
showDifficultyWithoutModifiers: import("@sinclair/typebox").TBoolean;
|
|
12
12
|
finalRollIsHighest: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
13
13
|
finalRollIsLowest: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
14
|
+
failOnRollsEqualToThreshold: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
14
15
|
}>;
|
|
15
16
|
export type SkillCheckOptionsConfig = Static<typeof SkillCheckOptionsConfigSchema>;
|
|
16
17
|
export declare const SkillCheckConfigSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -34,6 +35,7 @@ export declare const SkillChecksInputConfigSchema: import("@sinclair/typebox").T
|
|
|
34
35
|
showDifficultyWithoutModifiers: import("@sinclair/typebox").TBoolean;
|
|
35
36
|
finalRollIsHighest: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
36
37
|
finalRollIsLowest: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
38
|
+
failOnRollsEqualToThreshold: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
37
39
|
}>;
|
|
38
40
|
skillChecks: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
39
41
|
skill: import("@sinclair/typebox").TString;
|
|
@@ -57,6 +59,7 @@ export declare const SkillChecksConfigSchema: import("@sinclair/typebox").TObjec
|
|
|
57
59
|
showDifficultyWithoutModifiers: import("@sinclair/typebox").TBoolean;
|
|
58
60
|
finalRollIsHighest: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
59
61
|
finalRollIsLowest: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
62
|
+
failOnRollsEqualToThreshold: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
60
63
|
}>;
|
|
61
64
|
skillChecks: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
62
65
|
skill: import("@sinclair/typebox").TString;
|
package/dist/config.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare function skillChecksConfig(): {
|
|
|
25
25
|
extraDicePerLevel?: number | undefined;
|
|
26
26
|
finalRollIsHighest?: boolean | undefined;
|
|
27
27
|
finalRollIsLowest?: boolean | undefined;
|
|
28
|
+
failOnRollsEqualToThreshold?: boolean | undefined;
|
|
28
29
|
diceRange: [number, number];
|
|
29
30
|
diceCount: number;
|
|
30
31
|
difficultyText: [number, string][];
|
package/dist/dialog-box.vue.d.ts
CHANGED
|
@@ -38,11 +38,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
38
|
text(): string;
|
|
39
39
|
choices(): DialogChoice[] | undefined;
|
|
40
40
|
skipping(): boolean;
|
|
41
|
+
autoPlay(): boolean;
|
|
41
42
|
canInteract(): boolean;
|
|
42
43
|
paused: () => boolean;
|
|
43
44
|
}, {
|
|
44
45
|
clearListeners(): void;
|
|
45
46
|
keyboardEvent(e: KeyboardEvent): void;
|
|
47
|
+
dialogClick(): void;
|
|
46
48
|
next(): void;
|
|
47
49
|
chooseOption(choice: DialogChoice | number): void;
|
|
48
50
|
finishLine(): void;
|
|
@@ -53,6 +55,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
55
|
addHtmlTag(tag: RegExpExecArray): number;
|
|
54
56
|
startTextAnimation(): void;
|
|
55
57
|
startSkip(): void;
|
|
58
|
+
startAutoPlay(): void;
|
|
56
59
|
updateTextAnimation(): void;
|
|
57
60
|
endTextAnimation({ unmounted, pressedSpace, }?: {
|
|
58
61
|
unmounted?: boolean | undefined;
|
|
@@ -3,6 +3,7 @@ import { CommandPlugin, generateParser } from '../vm/commands/command-plugin';
|
|
|
3
3
|
import type { CommandRunner } from '../vm/commands/command-plugin';
|
|
4
4
|
import { StoreDefinition } from 'pinia';
|
|
5
5
|
import { MenuState, MenuTabState } from '../stores/menu-store';
|
|
6
|
+
import { CustomSetting } from '../config/settings-config';
|
|
6
7
|
export type NarratLifecycleHook = <T extends [...any[]]>(...args: T) => void;
|
|
7
8
|
export interface NarratCustomStoreActions {
|
|
8
9
|
save?: () => any;
|
|
@@ -42,6 +43,7 @@ export type NarratPluginObject<T> = {
|
|
|
42
43
|
customMenuButtons?: CustomMenuButton[];
|
|
43
44
|
customMenuTabs?: CustomMenuTab[];
|
|
44
45
|
startMenuButtons?: CustomStartMenuButton[];
|
|
46
|
+
customSettings?: Record<string, CustomSetting>;
|
|
45
47
|
save?: () => any;
|
|
46
48
|
load?: (data: any) => void;
|
|
47
49
|
reset?: () => void;
|
package/dist/main.d.ts
CHANGED