narrat 3.10.2 → 3.10.4

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.
@@ -14,10 +14,13 @@ export interface InputsStoreState {
14
14
  baseInputListener: InputListener;
15
15
  inGameInputListener: InputListener | null;
16
16
  inputMode: InputMode;
17
+ isTyping: boolean;
17
18
  }
18
19
  export declare const useInputs: import("pinia").StoreDefinition<"inputs", InputsStoreState, {}, {
19
20
  setupInputs(): void;
20
21
  createInGameInputListener(): void;
22
+ startTyping(): void;
23
+ stopTyping(): void;
21
24
  removeInGameInputListener(): void;
22
25
  listenToContainerInputs(): void;
23
26
  listenToBaseNarratInputs(): void;
@@ -527,10 +527,7 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
527
527
  slots: number;
528
528
  mode: string;
529
529
  } | undefined;
530
- hotkeys?: {
531
- debugMenu?: string | undefined;
532
- jumpMenu?: string | undefined;
533
- } | undefined;
530
+ hotkeys?: Record<string, string | boolean> | undefined;
534
531
  gameTitle: string;
535
532
  saveFileName: string;
536
533
  layout: {
@@ -1195,10 +1192,7 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
1195
1192
  slots: number;
1196
1193
  mode: string;
1197
1194
  } | undefined;
1198
- hotkeys?: {
1199
- debugMenu?: string | undefined;
1200
- jumpMenu?: string | undefined;
1201
- } | undefined;
1195
+ hotkeys?: Record<string, string | boolean> | undefined;
1202
1196
  gameTitle: string;
1203
1197
  saveFileName: string;
1204
1198
  layout: {
@@ -1863,10 +1857,7 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
1863
1857
  slots: number;
1864
1858
  mode: string;
1865
1859
  } | undefined;
1866
- hotkeys?: {
1867
- debugMenu?: string | undefined;
1868
- jumpMenu?: string | undefined;
1869
- } | undefined;
1860
+ hotkeys?: Record<string, string | boolean> | undefined;
1870
1861
  gameTitle: string;
1871
1862
  saveFileName: string;
1872
1863
  layout: {
@@ -2531,10 +2522,7 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
2531
2522
  slots: number;
2532
2523
  mode: string;
2533
2524
  } | undefined;
2534
- hotkeys?: {
2535
- debugMenu?: string | undefined;
2536
- jumpMenu?: string | undefined;
2537
- } | undefined;
2525
+ hotkeys?: Record<string, string | boolean> | undefined;
2538
2526
  gameTitle: string;
2539
2527
  saveFileName: string;
2540
2528
  layout: {
@@ -489,10 +489,7 @@ export declare function getModifiableDataPinia(): {
489
489
  slots: number;
490
490
  mode: string;
491
491
  } | undefined;
492
- hotkeys?: {
493
- debugMenu?: string | undefined;
494
- jumpMenu?: string | undefined;
495
- } | undefined;
492
+ hotkeys?: Record<string, string | boolean> | undefined;
496
493
  gameTitle: string;
497
494
  saveFileName: string;
498
495
  layout: {
@@ -5,7 +5,7 @@ export interface IfOptions {
5
5
  }
6
6
  export interface ElseIfOptions {
7
7
  branch: Parser.Branch;
8
- condition: Parser.ParsedExpression;
8
+ condition: Parser.Arg;
9
9
  }
10
10
  export interface IfStaticOptions {
11
11
  success: Parser.Branch;
@@ -13,6 +13,7 @@ export interface ParserContext {
13
13
  export declare function parseScript(script: NarratScript): Parser.ParsedScript;
14
14
  export declare function parseScriptFunction(errorHandler: ParserErrorHandler, code: string, fileName: string): Parser.ParsedScript;
15
15
  export declare function parseExpression(ctx: ParserContext, line: Parser.Line, expression: Parser.Expression): Parser.ParsedExpression;
16
+ export declare function parseArgument(ctx: ParserContext, line: Parser.Line, argument: Parser.Expression | Parser.Primitive): Parser.Arg;
16
17
  export declare function parseCodeLine(ctx: ParserContext, codeToProcess: string): Parser.Expression;
17
18
  export declare function parseCodeLineIntoTokens(code: string): Parser.Primitive[];
18
19
  export declare function splitIntoTokens(code: string): Parser.Primitive[];
package/dist/vm/vm.d.ts CHANGED
@@ -22,5 +22,6 @@ export declare class VM {
22
22
  export declare const vm: VM;
23
23
  export declare function runCommand(expression: Parser.ParsedExpression, choices?: DialogChoice[]): Promise<any>;
24
24
  export declare function generateCommand(expr: Parser.ParsedExpression, choices?: DialogChoice[]): Promise<Parser.Command>;
25
+ export declare function readVariable(arg: string): any;
25
26
  export declare function runExpression<ReturnType = any>(expr: Parser.ParsedExpression, choices?: DialogChoice[]): Promise<ReturnType>;
26
27
  export declare function playerAnswered(choice: string | number): Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "narrat",
3
- "version": "3.10.2",
3
+ "version": "3.10.4",
4
4
  "description": "narrat narrative engine",
5
5
  "main": "dist/narrat.umd.js",
6
6
  "module": "dist/narrat.es.js",