narraleaf-react
Version:
A React visual novel player framework
53 lines (52 loc) • 5.95 kB
TypeScript
import type { Character } from "../elements/character";
import type { Scene } from "../elements/scene";
import type { Story } from "../elements/story";
import type { Image } from "../elements/displayable/image";
import type { Condition } from "../elements/condition";
import type { Script } from "../elements/script";
import type { Menu } from "../elements/menu";
import { StringKeyOf, Values } from "../../../util/data";
import { TypedAction } from "../action/actions";
import { Sound } from "../elements/sound";
import { Control } from "../elements/control";
import { CharacterActionContentType, CharacterActionTypes, ConditionActionContentType, ConditionActionTypes, ControlActionContentType, DisplayableActionContentType, DisplayableActionTypes, ImageActionContentType, ImageActionTypes, LayerActionContentType, LayerActionTypes, MenuActionContentType, MenuActionTypes, PersistentActionContentType, PersistentActionTypes, SceneActionContentType, SceneActionTypes, ScriptActionContentType, ScriptActionTypes, SoundActionContentType, StoryActionContentType, StoryActionTypes, TextActionContentType, VideoActionContentType, VideoActionTypes } from "../action/actionTypes";
import { CharacterAction } from "../action/actions/characterAction";
import { SceneAction } from "../action/actions/sceneAction";
import { StoryAction } from "../action/actions/storyAction";
import { ImageAction } from "../action/actions/imageAction";
import { ConditionAction } from "../action/actions/conditionAction";
import { ScriptAction } from "../action/actions/scriptAction";
import { MenuAction } from "../action/actions/menuAction";
import { SoundAction } from "../action/actions/soundAction";
import { ControlAction } from "../action/actions/controlAction";
import { Text } from "../elements/displayable/text";
import { TextAction } from "../action/actions/textAction";
import { Displayable as AbstractDisplayable } from "../elements/displayable/displayable";
import { DisplayableAction } from "../action/actions/displayableAction";
import { Persistent } from "../elements/persistent";
import { PersistentAction } from "../action/actions/persistentAction";
import { ServiceSkeleton } from "../elements/service";
import { ServiceAction, ServiceActionContentType } from "../action/serviceAction";
import { Layer } from "../elements/layer";
import { LayerAction } from "../action/actions/layerAction";
import { ExposedStateType } from "../../player/type";
import { Video } from "../elements/video";
import { VideoAction } from "../action/actions/videoAction";
export interface LogicActionInterface {
DisplayableElements: Text | Image | Layer | AbstractDisplayable<any, any>;
DisplayableExposed: ExposedStateType.image | ExposedStateType.layer | ExposedStateType.text;
GameElement: Character | Scene | Story | Image | Condition | Script | Menu | Sound | Control | Text | AbstractDisplayable<any, any> | Persistent<any> | ServiceSkeleton | Video;
Actions: TypedAction | CharacterAction | ConditionAction | ImageAction | SceneAction | ScriptAction | StoryAction | MenuAction | SoundAction | ControlAction | TextAction | DisplayableAction | PersistentAction | ServiceAction | LayerAction | VideoAction;
ActionTypes: Values<typeof CharacterActionTypes> | Values<typeof ConditionActionTypes> | Values<typeof ImageActionTypes> | Values<typeof SceneActionTypes> | Values<typeof ScriptActionTypes> | Values<typeof StoryActionTypes> | Values<typeof MenuActionTypes> | Values<typeof SoundAction.ActionTypes> | Values<typeof ControlAction.ActionTypes> | Values<typeof TextAction.ActionTypes> | Values<typeof DisplayableActionTypes> | Values<typeof PersistentActionTypes> | StringKeyOf<ServiceActionContentType> | Values<typeof LayerActionTypes> | Values<typeof VideoActionTypes>;
ActionContents: CharacterActionContentType & ConditionActionContentType & ImageActionContentType & SceneActionContentType & ScriptActionContentType & StoryActionContentType & MenuActionContentType & SoundActionContentType & ControlActionContentType & TextActionContentType & DisplayableActionContentType & PersistentActionContentType & ServiceActionContentType & LayerActionContentType & VideoActionContentType;
}
export declare const LogicAction: {};
export declare namespace LogicAction {
type DisplayableElements = Text | Image | Layer | AbstractDisplayable<any, any>;
type DisplayableExposed = ExposedStateType.image | ExposedStateType.layer | ExposedStateType.text;
type GameElement = Character | Scene | Story | Image | Condition | Script | Menu | Sound | Control | Text | AbstractDisplayable<any, any> | Persistent<any> | ServiceSkeleton | Video;
type Actions = TypedAction | CharacterAction | ConditionAction | ImageAction | SceneAction | ScriptAction | StoryAction | MenuAction | SoundAction | ControlAction | TextAction | DisplayableAction | PersistentAction | ServiceAction | LayerAction | VideoAction;
type ActionTypes = Values<typeof CharacterActionTypes> | Values<typeof ConditionActionTypes> | Values<typeof ImageActionTypes> | Values<typeof SceneActionTypes> | Values<typeof ScriptActionTypes> | Values<typeof StoryActionTypes> | Values<typeof MenuActionTypes> | Values<typeof SoundAction.ActionTypes> | Values<typeof ControlAction.ActionTypes> | Values<typeof TextAction.ActionTypes> | Values<typeof DisplayableActionTypes> | Values<typeof PersistentActionTypes> | StringKeyOf<ServiceActionContentType> | Values<typeof LayerActionTypes> | Values<typeof VideoActionTypes>;
type ActionContents = CharacterActionContentType & ConditionActionContentType & ImageActionContentType & SceneActionContentType & ScriptActionContentType & StoryActionContentType & MenuActionContentType & SoundActionContentType & ControlActionContentType & TextActionContentType & DisplayableActionContentType & PersistentActionContentType & ServiceActionContentType & LayerActionContentType & VideoActionContentType;
}
export type LogicAction = typeof LogicAction;