narrat 2.10.0 → 2.10.1

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 CHANGED
@@ -1,6 +1,14 @@
1
1
  # 🚀 Narrat
2
2
 
3
- ![example workflow](https://github.com/liana-p/narrat-engine/actions/workflows/main.yml/badge.svg)
3
+ ![example workflow](https://github.com/liana-p/narrat-engine/actions/workflows/main.yml/badge.svg) [![Netlify Status](https://api.netlify.com/api/v1/badges/55d4b9ba-62b7-4c43-86ce-8bc2aaf98643/deploy-status)](https://app.netlify.com/sites/ornate-pie-561978/deploys)
4
+
5
+ Work on the engine directly in Codeflow:
6
+
7
+ [![Open in Codeflow](./docs/open-in-codeflow.svg)](https://pr.new/liana-p/narrat-engine)
8
+
9
+ Or try editing the default narrat game easily:
10
+
11
+ [![Try editing the default game](./docs/open-in-codeflow.svg)](https:///pr.new/github.com/liana-p/narrat-engine/edit/main/packages/narrat/examples/games/default/scripts/default.nar)
4
12
 
5
13
  Narrat is a game engine for making interactive narrative RPGs packed with features.. Create your game by editing with a Simple scripting syntax. It supports Skills with skill check rolls, an Items inventory, and has a Quests System. The script system is very powerful and allows branching choices, functions, variables and conditions.
6
14
 
@@ -2,7 +2,7 @@ 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
4
  import { StoreDefinition } from 'pinia';
5
- import { MenuState } from '../stores/menu-store';
5
+ import { MenuState, MenuTabState } from '../stores/menu-store';
6
6
  export declare type NarratLifecycleHook = <T extends [...any[]]>(...args: T) => void;
7
7
  export interface NarratCustomStoreActions {
8
8
  save?: () => any;
@@ -16,7 +16,15 @@ export interface CustomStores {
16
16
  [key: string]: UseCustomStore;
17
17
  }
18
18
  export interface CustomMenuButton {
19
+ menuId: string;
19
20
  config: MenuState;
21
+ components: {
22
+ [key: string]: any;
23
+ };
24
+ }
25
+ export interface CustomMenuTab {
26
+ menuId: string;
27
+ config: MenuTabState;
20
28
  component: any;
21
29
  }
22
30
  export declare type NarratPluginObject<T> = {
@@ -31,6 +39,7 @@ export declare type NarratPluginObject<T> = {
31
39
  customCommands?: CommandPlugin<T>[];
32
40
  customStores?: CustomStores;
33
41
  customMenuButtons?: CustomMenuButton[];
42
+ customMenuTabs?: CustomMenuTab[];
34
43
  };
35
44
  declare function registerPlugin<T>(plugin: NarratPluginObject<T>): void;
36
45
  declare function addCommand<T>(command: CommandPlugin<T>): void;