narraleaf-react 0.0.1-beta.1 → 0.0.1-beta.3

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.
Files changed (52) hide show
  1. package/dist/game/nlcore/action/action.d.ts +3 -3
  2. package/dist/game/nlcore/action/actionTypes.d.ts +12 -12
  3. package/dist/game/nlcore/action/actionable.d.ts +1 -1
  4. package/dist/game/nlcore/action/actions.d.ts +15 -15
  5. package/dist/game/nlcore/action/constructable.d.ts +2 -2
  6. package/dist/game/nlcore/action/logicAction.d.ts +12 -12
  7. package/dist/game/nlcore/action/tree/actionTree.d.ts +1 -1
  8. package/dist/game/nlcore/common/Utils.d.ts +3 -3
  9. package/dist/game/nlcore/common/elements.d.ts +4 -4
  10. package/dist/game/nlcore/common/game.d.ts +2 -2
  11. package/dist/game/nlcore/common/player.d.ts +3 -3
  12. package/dist/game/nlcore/common/position.d.ts +1 -1
  13. package/dist/game/nlcore/common/transition.d.ts +4 -4
  14. package/dist/game/nlcore/common/types.d.ts +1 -1
  15. package/dist/game/nlcore/elements/condition.d.ts +4 -4
  16. package/dist/game/nlcore/elements/control.d.ts +2 -2
  17. package/dist/game/nlcore/elements/image.d.ts +6 -6
  18. package/dist/game/nlcore/elements/menu.d.ts +4 -4
  19. package/dist/game/nlcore/elements/scene.d.ts +9 -9
  20. package/dist/game/nlcore/elements/script.d.ts +3 -3
  21. package/dist/game/nlcore/elements/sound.d.ts +2 -2
  22. package/dist/game/nlcore/elements/srcManager.d.ts +3 -3
  23. package/dist/game/nlcore/elements/story.d.ts +3 -3
  24. package/dist/game/nlcore/elements/text.d.ts +2 -2
  25. package/dist/game/nlcore/elements/transform/position.d.ts +1 -1
  26. package/dist/game/nlcore/elements/transform/transform.d.ts +11 -6
  27. package/dist/game/nlcore/elements/transform/type.d.ts +2 -2
  28. package/dist/game/nlcore/elements/transition/base.d.ts +1 -1
  29. package/dist/game/nlcore/elements/transition/dissolve.d.ts +2 -2
  30. package/dist/game/nlcore/elements/transition/fade.d.ts +2 -2
  31. package/dist/game/nlcore/elements/transition/fadeIn.d.ts +4 -4
  32. package/dist/game/nlcore/elements/transition/type.d.ts +1 -1
  33. package/dist/game/nlcore/game.d.ts +4 -4
  34. package/dist/game/nlcore/store/storable.d.ts +1 -1
  35. package/dist/game/nlcore/types.d.ts +1 -1
  36. package/dist/game/player/elements/Player.d.ts +2 -2
  37. package/dist/game/player/elements/image/Image.d.ts +2 -2
  38. package/dist/game/player/elements/menu/Menu.d.ts +2 -2
  39. package/dist/game/player/elements/menu/Sentence.d.ts +1 -1
  40. package/dist/game/player/elements/preload/Preload.d.ts +2 -2
  41. package/dist/game/player/elements/say/Say.d.ts +1 -1
  42. package/dist/game/player/elements/scene/BackgroundTransition.d.ts +2 -2
  43. package/dist/game/player/elements/scene/Scene.d.ts +2 -2
  44. package/dist/game/player/gameState.d.ts +10 -10
  45. package/dist/game/player/lib/Motion.d.ts +4 -0
  46. package/dist/game/player/lib/Preloaded.d.ts +4 -4
  47. package/dist/game/player/provider/game-state.d.ts +1 -1
  48. package/dist/game/player/provider/preloaded.d.ts +1 -1
  49. package/dist/index.d.ts +2 -2
  50. package/dist/index.js +10 -21072
  51. package/package.json +4 -4
  52. package/dist/index.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { LogicAction } from "./logicAction";
2
- import { ContentNode } from "../action/tree/actionTree";
2
+ import { ContentNode } from "@core/action/tree/actionTree";
3
3
  import type { CalledActionResult } from "@core/gameTypes";
4
- import { Awaitable } from "../../../util/data";
5
- import { GameState } from "../../player/gameState";
4
+ import { Awaitable } from "@lib/util/data";
5
+ import { GameState } from "@player/gameState";
6
6
  export declare class Action<ContentNodeType = any, Callee = LogicAction.GameElement> {
7
7
  static ActionTypes: {
8
8
  action: string;
@@ -1,15 +1,15 @@
1
- import { LogicAction } from "../action/logicAction";
2
- import type { Story } from "../elements/story";
3
- import type { ConditionData } from "../elements/condition";
4
- import { Background, CommonImage } from "../types";
5
- import { Transform } from "../elements/transform/transform";
6
- import type { Scene } from "../elements/scene";
7
- import type { Sentence } from "../elements/text";
8
- import type { MenuData } from "../elements/menu";
9
- import { Awaitable } from "../../../util/data";
10
- import { ITransition } from "../elements/transition/type";
11
- import type { Sound } from "../elements/sound";
12
- import type { Script } from "../elements/script";
1
+ import { LogicAction } from "@core/action/logicAction";
2
+ import type { Story } from "@core/elements/story";
3
+ import type { ConditionData } from "@core/elements/condition";
4
+ import { Background, CommonImage } from "@core/types";
5
+ import { Transform } from "@core/elements/transform/transform";
6
+ import type { Scene } from "@core/elements/scene";
7
+ import type { Sentence } from "@core/elements/text";
8
+ import type { MenuData } from "@core/elements/menu";
9
+ import { Awaitable } from "@lib/util/data";
10
+ import { ITransition } from "@core/elements/transition/type";
11
+ import type { Sound } from "@core/elements/sound";
12
+ import type { Script } from "@core/elements/script";
13
13
  export declare const CharacterActionTypes: {
14
14
  readonly say: "character:say";
15
15
  readonly action: "character:action";
@@ -1,4 +1,4 @@
1
- import { LogicAction } from "../action/logicAction";
1
+ import { LogicAction } from "@core/action/logicAction";
2
2
  export declare class Actionable<StateData extends Record<string, any> = Record<string, any>> {
3
3
  static IdPrefixes: {
4
4
  readonly Actionable: "actionable";
@@ -1,19 +1,19 @@
1
- import { ContentNode } from "../action/tree/actionTree";
2
- import { Awaitable } from "../../../util/data";
3
- import { Image } from "../elements/image";
4
- import { LogicAction } from "../action/logicAction";
5
- import { Action } from "../action/action";
6
- import type { Character } from "../elements/text";
7
- import type { Scene } from "../elements/scene";
8
- import type { Story } from "../elements/story";
9
- import type { Script } from "../elements/script";
10
- import type { Menu } from "../elements/menu";
11
- import type { Condition } from "../elements/condition";
1
+ import { ContentNode } from "@core/action/tree/actionTree";
2
+ import { Awaitable } from "@lib/util/data";
3
+ import { Image } from "@core/elements/image";
4
+ import { LogicAction } from "@core/action/logicAction";
5
+ import { Action } from "@core/action/action";
6
+ import type { Character } from "@core/elements/text";
7
+ import type { Scene } from "@core/elements/scene";
8
+ import type { Story } from "@core/elements/story";
9
+ import type { Script } from "@core/elements/script";
10
+ import type { Menu } from "@core/elements/menu";
11
+ import type { Condition } from "@core/elements/condition";
12
12
  import type { CalledActionResult } from "@core/gameTypes";
13
- import { GameState } from "../../player/gameState";
14
- import type { Sound } from "../elements/sound";
15
- import { Control } from "../elements/control";
16
- import { CharacterActionContentType, CharacterActionTypes, ConditionActionContentType, ConditionActionTypes, ControlActionContentType, ControlActionTypes, ImageActionContentType, ImageActionTypes, MenuActionContentType, MenuActionTypes, SceneActionContentType, SceneActionTypes, ScriptActionContentType, ScriptActionTypes, SoundActionContentType, SoundActionTypes, StoryActionContentType, StoryActionTypes } from "../action/actionTypes";
13
+ import { GameState } from "@player/gameState";
14
+ import type { Sound } from "@core/elements/sound";
15
+ import { Control } from "@core/elements/control";
16
+ import { CharacterActionContentType, CharacterActionTypes, ConditionActionContentType, ConditionActionTypes, ControlActionContentType, ControlActionTypes, ImageActionContentType, ImageActionTypes, MenuActionContentType, MenuActionTypes, SceneActionContentType, SceneActionTypes, ScriptActionContentType, ScriptActionTypes, SoundActionContentType, SoundActionTypes, StoryActionContentType, StoryActionTypes } from "@core/action/actionTypes";
17
17
  export declare class TypedAction<ContentType extends Record<string, any> = Record<string, any>, T extends keyof ContentType & string = keyof ContentType & string, Callee extends LogicAction.GameElement = LogicAction.GameElement> extends Action<ContentType[T], Callee> {
18
18
  callee: Callee;
19
19
  constructor(callee: Callee, type: any, contentNode: ContentNode<ContentType[T]>);
@@ -1,5 +1,5 @@
1
- import { ContentNode, RenderableNode, RootNode } from "../action/tree/actionTree";
2
- import { LogicAction } from "../action/logicAction";
1
+ import { ContentNode, RenderableNode, RootNode } from "@core/action/tree/actionTree";
2
+ import { LogicAction } from "@core/action/logicAction";
3
3
  export declare class Constructable<T extends typeof Constructable = any, TAction extends LogicAction.Actions = LogicAction.Actions, CAction extends LogicAction.Actions = LogicAction.Actions> {
4
4
  static targetAction: any;
5
5
  private readonly actions;
@@ -1,15 +1,15 @@
1
- import type { Character } from "../elements/text";
2
- import type { Scene } from "../elements/scene";
3
- import type { Story } from "../elements/story";
4
- import type { Image } from "../elements/image";
5
- import type { Condition } from "../elements/condition";
6
- import type { Script } from "../elements/script";
7
- import type { Menu } from "../elements/menu";
8
- import { Values } from "../../../util/data";
9
- import { CharacterAction, ConditionAction, ControlAction, ImageAction, MenuAction, SceneAction, ScriptAction, SoundAction, StoryAction, TypedAction } from "../action/actions";
10
- import { Sound } from "../elements/sound";
11
- import { Control } from "../elements/control";
12
- import { CharacterActionContentType, CharacterActionTypes, ConditionActionContentType, ConditionActionTypes, ControlActionContentType, ImageActionContentType, ImageActionTypes, MenuActionContentType, MenuActionTypes, SceneActionContentType, SceneActionTypes, ScriptActionContentType, ScriptActionTypes, SoundActionContentType, StoryActionContentType, StoryActionTypes } from "../action/actionTypes";
1
+ import type { Character } from "@core/elements/text";
2
+ import type { Scene } from "@core/elements/scene";
3
+ import type { Story } from "@core/elements/story";
4
+ import type { Image } from "@core/elements/image";
5
+ import type { Condition } from "@core/elements/condition";
6
+ import type { Script } from "@core/elements/script";
7
+ import type { Menu } from "@core/elements/menu";
8
+ import { Values } from "@lib/util/data";
9
+ import { CharacterAction, ConditionAction, ControlAction, ImageAction, MenuAction, SceneAction, ScriptAction, SoundAction, StoryAction, TypedAction } from "@core/action/actions";
10
+ import { Sound } from "@core/elements/sound";
11
+ import { Control } from "@core/elements/control";
12
+ import { CharacterActionContentType, CharacterActionTypes, ConditionActionContentType, ConditionActionTypes, ControlActionContentType, ImageActionContentType, ImageActionTypes, MenuActionContentType, MenuActionTypes, SceneActionContentType, SceneActionTypes, ScriptActionContentType, ScriptActionTypes, SoundActionContentType, StoryActionContentType, StoryActionTypes } from "@core/action/actionTypes";
13
13
  export declare namespace LogicAction {
14
14
  type GameElement = Character | Scene | Story | Image | Condition | Script | Menu | Sound | Control;
15
15
  type Actions = (TypedAction | CharacterAction | ConditionAction | ImageAction | SceneAction | ScriptAction | StoryAction | MenuAction | SoundAction | ControlAction);
@@ -1,4 +1,4 @@
1
- import { LogicAction } from "../../action/logicAction";
1
+ import { LogicAction } from "@core/action/logicAction";
2
2
  export declare enum NodeType {
3
3
  TreeNode = "TreeNode",
4
4
  ContentNode = "ContentNode"
@@ -1,6 +1,6 @@
1
- import type { Background, NextJSStaticImageData } from "../types";
2
- import type { Scene } from "../elements/scene";
3
- import type { Image } from "../elements/image";
1
+ import type { Background, NextJSStaticImageData } from "@core/types";
2
+ import type { Scene } from "@core/elements/scene";
3
+ import type { Image } from "@core/elements/image";
4
4
  export declare class Utils {
5
5
  static srcToString(src: string | NextJSStaticImageData): string;
6
6
  static staticImageDataToSrc(image: NextJSStaticImageData | string): string;
@@ -1,13 +1,13 @@
1
1
  import { Character, Sentence, Word } from "../elements/text";
2
2
  import { Condition, Lambda } from "../elements/condition";
3
- import { Control } from "../elements/control";
4
- import { Game } from "../game";
3
+ import { Control } from "@core/elements/control";
4
+ import { Game } from "@core/game";
5
5
  import { Image } from "../elements/image";
6
6
  import { Menu } from "../elements/menu";
7
7
  import { Scene } from "../elements/scene";
8
8
  import { Script } from "../elements/script";
9
- import { Sound, SoundType } from "../elements/sound";
9
+ import { Sound, SoundType } from "@core/elements/sound";
10
10
  import { Story } from "../elements/story";
11
- import { Transform } from "../elements/transform/transform";
11
+ import { Transform } from "@core/elements/transform/transform";
12
12
  import { Utils } from "./Utils";
13
13
  export { Character, Condition, Control, Game, Image, Lambda, Menu, Scene, Script, Sentence, Sound, SoundType, Story, Transform, Utils, Word };
@@ -1,3 +1,3 @@
1
- import { LiveGame } from "../game";
2
- import { GameState } from "../../player/gameState";
1
+ import { LiveGame } from "@core/game";
2
+ import { GameState } from "@player/gameState";
3
3
  export { LiveGame, GameState };
@@ -1,4 +1,4 @@
1
- import Player from "../../player/elements/Player";
2
- import GameProviders from "../../player/provider/providers";
3
- import { GameState } from "../../player/gameState";
1
+ import Player from "@player/elements/Player";
2
+ import GameProviders from "@player/provider/providers";
3
+ import { GameState } from "@player/gameState";
4
4
  export { GameProviders, Player, GameState, };
@@ -1,2 +1,2 @@
1
- import { Align, CommonPosition, Coord2D, CommonPositionType } from "../elements/transform/position";
1
+ import { Align, CommonPosition, Coord2D, CommonPositionType } from "@core/elements/transform/position";
2
2
  export { Align, CommonPosition, Coord2D, CommonPositionType };
@@ -1,6 +1,6 @@
1
- import { ITransition } from "../elements/transition/type";
2
- import { Fade } from "../elements/transition/fade";
3
- import { FadeIn } from "../elements/transition/fadeIn";
4
- import { Dissolve } from "../elements/transition/dissolve";
1
+ import { ITransition } from "@core/elements/transition/type";
2
+ import { Fade } from "@core/elements/transition/fade";
3
+ import { FadeIn } from "@core/elements/transition/fadeIn";
4
+ import { Dissolve } from "@core/elements/transition/dissolve";
5
5
  export { Fade, FadeIn, Dissolve };
6
6
  export type { ITransition };
@@ -1,2 +1,2 @@
1
- import { TransformDefinitions } from "../elements/transform/type";
1
+ import { TransformDefinitions } from "@core/elements/transform/type";
2
2
  export type { TransformDefinitions, };
@@ -1,7 +1,7 @@
1
- import { RenderableNode } from "../action/tree/actionTree";
2
- import { LogicAction } from "../action/logicAction";
3
- import { Actionable } from "../action/actionable";
4
- import { GameState } from "../../player/gameState";
1
+ import { RenderableNode } from "@core/action/tree/actionTree";
2
+ import { LogicAction } from "@core/action/logicAction";
3
+ import { Actionable } from "@core/action/actionable";
4
+ import { GameState } from "@player/gameState";
5
5
  export type ConditionConfig = {};
6
6
  interface LambdaCtx {
7
7
  gameState: GameState;
@@ -1,5 +1,5 @@
1
- import { Actionable } from "../action/actionable";
2
- import { LogicAction } from "../action/logicAction";
1
+ import { Actionable } from "@core/action/actionable";
2
+ import { LogicAction } from "@core/action/logicAction";
3
3
  import Actions = LogicAction.Actions;
4
4
  export declare class Control extends Actionable {
5
5
  /**
@@ -1,12 +1,12 @@
1
- import { CommonImage, NextJSStaticImageData, StaticImageData } from "../types";
2
- import { DeepPartial, EventDispatcher } from "../../../util/data";
1
+ import { CommonImage, NextJSStaticImageData, StaticImageData } from "@core/types";
2
+ import { DeepPartial, EventDispatcher } from "@lib/util/data";
3
3
  import { Transform } from "./transform/transform";
4
- import { ImageAction } from "../action/actions";
5
- import { Actionable } from "../action/actionable";
6
- import type { TransformDefinitions } from "../elements/transform/type";
4
+ import { ImageAction } from "@core/action/actions";
5
+ import { Actionable } from "@core/action/actionable";
6
+ import type { TransformDefinitions } from "@core/elements/transform/type";
7
7
  import React from "react";
8
8
  import { AnimationScope } from "framer-motion";
9
- import { ITransition } from "../elements/transition/type";
9
+ import { ITransition } from "@core/elements/transition/type";
10
10
  export type ImageConfig = {
11
11
  src: string | NextJSStaticImageData;
12
12
  display: boolean;
@@ -1,8 +1,8 @@
1
1
  import { Sentence, Word } from "./text";
2
- import { RenderableNode } from "../action/tree/actionTree";
3
- import { LogicAction } from "../action/logicAction";
4
- import { MenuAction } from "../action/actions";
5
- import { Actionable } from "../action/actionable";
2
+ import { RenderableNode } from "@core/action/tree/actionTree";
3
+ import { LogicAction } from "@core/action/logicAction";
4
+ import { MenuAction } from "@core/action/actions";
5
+ import { Actionable } from "@core/action/actionable";
6
6
  import Actions = LogicAction.Actions;
7
7
  export type MenuConfig = {};
8
8
  export type MenuChoice = {
@@ -1,13 +1,13 @@
1
1
  import { Constructable } from "../action/constructable";
2
- import { Awaitable, DeepPartial, EventDispatcher } from "../../../util/data";
3
- import { Background, CommonImage } from "../types";
4
- import { LogicAction } from "../action/logicAction";
5
- import { SceneAction } from "../action/actions";
6
- import { Transform } from "../elements/transform/transform";
7
- import { ITransition } from "../elements/transition/type";
8
- import { SrcManager } from "../elements/srcManager";
9
- import { Sound, SoundDataRaw } from "../elements/sound";
10
- import { TransformDefinitions } from "../elements/transform/type";
2
+ import { Awaitable, DeepPartial, EventDispatcher } from "@lib/util/data";
3
+ import { Background, CommonImage } from "@core/types";
4
+ import { LogicAction } from "@core/action/logicAction";
5
+ import { SceneAction } from "@core/action/actions";
6
+ import { Transform } from "@core/elements/transform/transform";
7
+ import { ITransition } from "@core/elements/transition/type";
8
+ import { SrcManager } from "@core/elements/srcManager";
9
+ import { Sound, SoundDataRaw } from "@core/elements/sound";
10
+ import { TransformDefinitions } from "@core/elements/transform/type";
11
11
  import Actions = LogicAction.Actions;
12
12
  import ImageTransformProps = TransformDefinitions.ImageTransformProps;
13
13
  export type SceneConfig = {
@@ -1,6 +1,6 @@
1
- import { LogicAction } from "../action/logicAction";
2
- import { Actionable } from "../action/actionable";
3
- import { GameState } from "../../player/gameState";
1
+ import { LogicAction } from "@core/action/logicAction";
2
+ import { Actionable } from "@core/action/actionable";
3
+ import { GameState } from "@player/gameState";
4
4
  import Actions = LogicAction.Actions;
5
5
  export interface ScriptCtx {
6
6
  script: Script;
@@ -1,5 +1,5 @@
1
- import { Actionable } from "../action/actionable";
2
- import { DeepPartial } from "../../../util/data";
1
+ import { Actionable } from "@core/action/actionable";
2
+ import { DeepPartial } from "@lib/util/data";
3
3
  import * as Howler from "howler";
4
4
  import { HowlOptions } from "howler";
5
5
  export declare enum SoundType {
@@ -1,6 +1,6 @@
1
- import { Sound } from "../elements/sound";
2
- import { Image } from "../elements/image";
3
- import { StaticImageData } from "../types";
1
+ import { Sound } from "@core/elements/sound";
2
+ import { Image } from "@core/elements/image";
3
+ import { StaticImageData } from "@core/types";
4
4
  export type SrcType = "image" | "video" | "audio";
5
5
  export type Src = {
6
6
  type: "image";
@@ -1,8 +1,8 @@
1
1
  import { Constructable } from "../action/constructable";
2
2
  import { LogicAction } from "../game";
3
- import { SceneAction, StoryAction } from "../action/actions";
4
- import { RawData, RenderableNode } from "../action/tree/actionTree";
5
- import { Scene } from "../elements/scene";
3
+ import { SceneAction, StoryAction } from "@core/action/actions";
4
+ import { RawData, RenderableNode } from "@core/action/tree/actionTree";
5
+ import { Scene } from "@core/elements/scene";
6
6
  export type StoryConfig = {};
7
7
  export type ElementStateRaw = Record<string, any>;
8
8
  export type NodeChildIdMap = Map<string, string>;
@@ -1,5 +1,5 @@
1
- import { Color } from "../types";
2
- import { Actionable } from "../action/actionable";
1
+ import { Color } from "@core/types";
2
+ import { Actionable } from "@core/action/actionable";
3
3
  export type SentenceConfig = {
4
4
  pause?: boolean | number;
5
5
  } & Color;
@@ -1,4 +1,4 @@
1
- import { CSSProps } from "../../elements/transition/type";
1
+ import { CSSProps } from "@core/elements/transition/type";
2
2
  export declare enum CommonPositionType {
3
3
  Left = 0,
4
4
  Center = 1,
@@ -1,10 +1,10 @@
1
- import type { Background, CommonImage, CommonImagePosition } from "../../types";
1
+ import type { Background, CommonImage, CommonImagePosition } from "@core/types";
2
2
  import type { AnimationPlaybackControls, DOMKeyframesDefinition, DynamicAnimationOptions } from "framer-motion";
3
- import { DeepPartial } from "../../../../util/data";
4
- import { GameState } from "../../../player/gameState";
3
+ import { DeepPartial } from "@lib/util/data";
4
+ import { GameState } from "@player/gameState";
5
5
  import { TransformDefinitions } from "./type";
6
6
  import { Align, Coord2D, IPosition } from "./position";
7
- import { CSSProps } from "../../elements/transition/type";
7
+ import { CSSProps } from "@core/elements/transition/type";
8
8
  import Sequence = TransformDefinitions.Sequence;
9
9
  import SequenceProps = TransformDefinitions.SequenceProps;
10
10
  export type Transformers = "position" | "opacity" | "scale" | "rotation" | "display" | "src" | "backgroundColor" | "backgroundOpacity" | "transform";
@@ -62,9 +62,12 @@ export declare class Transform<T extends TransformDefinitions.Types = TransformD
62
62
  * return <div ref={scope} />
63
63
  * ```
64
64
  */
65
- animate<U extends Element = any>({ scope, animate }: {
65
+ animate<U extends Element = any>({ scope, animate, overwrites }: {
66
66
  scope: TransformDefinitions.FramerAnimationScope<U>;
67
67
  animate: TransformDefinitions.FramerAnimate;
68
+ overwrites?: Partial<{
69
+ [K in Transformers]?: TransformHandler<any>;
70
+ }>;
68
71
  }, gameState: GameState, state: SequenceProps<T>, after?: (state: DeepPartial<T>) => void): Promise<void>;
69
72
  /**
70
73
  * @example
@@ -88,7 +91,9 @@ export declare class Transform<T extends TransformDefinitions.Types = TransformD
88
91
  * ```
89
92
  */
90
93
  overwrite<T extends keyof TransformersMap = any>(key: T, transformer: TransformHandler<TransformersMap[T]>): this;
91
- propToCSS(state: GameState, prop: DeepPartial<T>): DOMKeyframesDefinition;
94
+ propToCSS(state: GameState, prop: DeepPartial<T>, overwrites?: Partial<{
95
+ [K in Transformers]?: TransformHandler<any>;
96
+ }>): DOMKeyframesDefinition;
92
97
  optionsToFramerMotionOptions(options?: Partial<TransformDefinitions.CommonTransformProps>): DynamicAnimationOptions | void;
93
98
  propToCSSTransform(state: GameState, prop: Record<string, any>): string;
94
99
  setControl(control: AnimationPlaybackControls | null): this;
@@ -1,5 +1,5 @@
1
- import { Background, CommonImage } from "../../types";
2
- import { DeepPartial } from "../../../../util/data";
1
+ import { Background, CommonImage } from "@core/types";
2
+ import { DeepPartial } from "@lib/util/data";
3
3
  import type { AnimationPlaybackControls, AnimationScope, AnimationSequence, DOMKeyframesDefinition, DynamicAnimationOptions, ElementOrSelector, MotionValue, ValueAnimationTransition } from "framer-motion";
4
4
  export declare namespace TransformDefinitions {
5
5
  type BezierDefinition = [number, number, number, number];
@@ -1,4 +1,4 @@
1
- import { EventDispatcher } from "../../../../util/data";
1
+ import { EventDispatcher } from "@lib/util/data";
2
2
  import { ElementProp, EventTypes, ITransition } from "./type";
3
3
  import { AnimationPlaybackControls, ValueAnimationTransition } from "framer-motion";
4
4
  export declare class Base<T extends ElementProp> implements ITransition<T> {
@@ -1,7 +1,7 @@
1
1
  import { ElementProp, ITransition } from "./type";
2
2
  import { Base } from "./base";
3
- import { Scene } from "../../elements/scene";
4
- import { NextJSStaticImageData } from "../../types";
3
+ import { Scene } from "@core/elements/scene";
4
+ import { NextJSStaticImageData } from "@core/types";
5
5
  export type DissolveElementProps = {
6
6
  opacity: number;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { ElementProp, ITransition } from "./type";
2
2
  import { Base } from "./base";
3
- import { Scene } from "../../elements/scene";
4
- import { StaticImageData } from "../../types";
3
+ import { Scene } from "@core/elements/scene";
4
+ import { StaticImageData } from "@core/types";
5
5
  export type FadeElementProps = {
6
6
  opacity: number;
7
7
  };
@@ -1,7 +1,7 @@
1
- import { ElementProp, ITransition } from "../../elements/transition/type";
2
- import { Base } from "../../elements/transition/base";
3
- import { Scene } from "../../elements/scene";
4
- import { StaticImageData } from "../../types";
1
+ import { ElementProp, ITransition } from "@core/elements/transition/type";
2
+ import { Base } from "@core/elements/transition/base";
3
+ import { Scene } from "@core/elements/scene";
4
+ import { StaticImageData } from "@core/types";
5
5
  type FadeInProps = {
6
6
  style?: {
7
7
  opacity: number;
@@ -1,4 +1,4 @@
1
- import type { EventDispatcher } from "../../../../util/data";
1
+ import type { EventDispatcher } from "@lib/util/data";
2
2
  import React from "react";
3
3
  import { DOMKeyframesDefinition } from "framer-motion";
4
4
  export type ElementProp<T extends Element = Element, U extends React.HTMLAttributes<T> = React.HTMLAttributes<T>> = React.JSX.IntrinsicAttributes & React.ClassAttributes<T> & React.HTMLAttributes<T> & U;
@@ -1,9 +1,9 @@
1
1
  import type { CalledActionResult, GameConfig, GameSettings, SavedGame } from "./gameTypes";
2
- import { Awaitable, DeepPartial } from "../../util/data";
3
- import { Storable } from "./store/storable";
2
+ import { Awaitable, DeepPartial } from "@lib/util/data";
3
+ import { Storable } from "@core/store/storable";
4
4
  import { Story } from "./elements/story";
5
- import { LogicAction } from "./action/logicAction";
6
- import { GameState } from "../player/gameState";
5
+ import { LogicAction } from "@core/action/logicAction";
6
+ import { GameState } from "@player/gameState";
7
7
  declare const IdManager_base: {
8
8
  new (): {};
9
9
  _instance: {} | null;
@@ -1,4 +1,4 @@
1
- import { BaseStorableTypeName, NameSpaceContent, StorableData, StorableType, WrappedStorableData } from "../store/type";
1
+ import { BaseStorableTypeName, NameSpaceContent, StorableData, StorableType, WrappedStorableData } from "@core/store/type";
2
2
  export declare class Namespace<T extends NameSpaceContent<keyof T>> {
3
3
  name: string;
4
4
  key: string;
@@ -1,4 +1,4 @@
1
- import { IPosition } from "./elements/transform/position";
1
+ import { IPosition } from "@core/elements/transform/position";
2
2
  export type color = string | {
3
3
  r: number;
4
4
  g: number;
@@ -2,8 +2,8 @@ import "client-only";
2
2
  import "@player/lib/styles/style.css";
3
3
  import clsx from "clsx";
4
4
  import React from "react";
5
- import { Story } from "../../nlcore/elements/story";
6
- import { Game } from "../../nlcore/game";
5
+ import { Story } from "@core/elements/story";
6
+ import { Game } from "@core/game";
7
7
  export default function Player({ story, onReady, width, height, className, }: Readonly<{
8
8
  story: Story;
9
9
  onReady?: (game: Game) => void;
@@ -1,6 +1,6 @@
1
- import { Image as GameImage } from "../../../nlcore/elements/image";
1
+ import { Image as GameImage } from "@core/elements/image";
2
2
  import React from "react";
3
- import { GameState } from "../../gameState";
3
+ import { GameState } from "@player/gameState";
4
4
  export default function Image({ image, state, onAnimationEnd }: Readonly<{
5
5
  image: GameImage;
6
6
  state: GameState;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { Choice } from "../../../nlcore/elements/menu";
3
- import { Sentence } from "../../../nlcore/elements/text";
2
+ import { Choice } from "@core/elements/menu";
3
+ import { Sentence } from "@core/elements/text";
4
4
  export default function Menu({ prompt, choices, afterChoose, }: Readonly<{
5
5
  prompt: Sentence;
6
6
  choices: Choice[];
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Sentence } from "../../../nlcore/elements/text";
2
+ import { Sentence } from "@core/elements/text";
3
3
  export default function ColoredSentence({ sentence, }: Readonly<{
4
4
  sentence: Sentence;
5
5
  }>): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { GameState } from "../../gameState";
2
- import { SrcManager } from "../../../nlcore/elements/srcManager";
1
+ import { GameState } from "@player/gameState";
2
+ import { SrcManager } from "@core/elements/srcManager";
3
3
  export declare function Preload({ state, srcManager }: Readonly<{
4
4
  state: GameState;
5
5
  srcManager: SrcManager;
@@ -1,4 +1,4 @@
1
- import { Sentence } from "../../../nlcore/elements/text";
1
+ import { Sentence } from "@core/elements/text";
2
2
  import React from "react";
3
3
  export default function Say({ action, onClick, useTypeEffect, className, }: Readonly<{
4
4
  action: {
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { Scene as GameScene } from "../../../nlcore/elements/scene";
3
- import { GameState } from "../../gameState";
2
+ import { Scene as GameScene } from "@core/elements/scene";
3
+ import { GameState } from "@player/gameState";
4
4
  export default function BackgroundTransition({ scene, props, state }: {
5
5
  scene: GameScene;
6
6
  props: Record<string, any>;
@@ -1,6 +1,6 @@
1
- import { Scene as GameScene } from "../../../nlcore/elements/scene";
1
+ import { Scene as GameScene } from "@core/elements/scene";
2
2
  import React from "react";
3
- import { GameState } from "../../gameState";
3
+ import { GameState } from "@player/gameState";
4
4
  export default function Scene({ scene, state, children, className }: Readonly<{
5
5
  scene: GameScene;
6
6
  state: GameState;
@@ -1,15 +1,15 @@
1
1
  import { CalledActionResult } from "@core/gameTypes";
2
- import { EventDispatcher } from "../../util/data";
3
- import { Character, Sentence } from "../nlcore/elements/text";
4
- import { Choice, MenuData } from "../nlcore/elements/menu";
5
- import { Image, ImageEventTypes } from "../nlcore/elements/image";
6
- import { Scene } from "../nlcore/elements/scene";
7
- import { Sound } from "../nlcore/elements/sound";
2
+ import { EventDispatcher } from "@lib/util/data";
3
+ import { Character, Sentence } from "@core/elements/text";
4
+ import { Choice, MenuData } from "@core/elements/menu";
5
+ import { Image, ImageEventTypes } from "@core/elements/image";
6
+ import { Scene } from "@core/elements/scene";
7
+ import { Sound } from "@core/elements/sound";
8
8
  import * as Howler from "howler";
9
- import { SrcManager } from "../nlcore/elements/srcManager";
10
- import { LogicAction } from "../nlcore/action/logicAction";
11
- import { Storable } from "../nlcore/store/storable";
12
- import { Game } from "../nlcore/game";
9
+ import { SrcManager } from "@core/elements/srcManager";
10
+ import { LogicAction } from "@core/action/logicAction";
11
+ import { Storable } from "@core/store/storable";
12
+ import { Game } from "@core/game";
13
13
  type Clickable<T, U = undefined> = {
14
14
  action: T;
15
15
  onClick: U extends undefined ? () => void : (arg0: U) => void;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export default function Motion({ children }: Readonly<{
3
+ children: React.ReactNode;
4
+ }>): React.JSX.Element;
@@ -1,7 +1,7 @@
1
- import { Sound } from "../../nlcore/elements/sound";
2
- import { Src } from "../../nlcore/elements/srcManager";
3
- import { EventDispatcher } from "../../../util/data";
4
- import { Image } from "../../nlcore/elements/image";
1
+ import { Sound } from "@core/elements/sound";
2
+ import { Src } from "@core/elements/srcManager";
3
+ import { EventDispatcher } from "@lib/util/data";
4
+ import { Image } from "@core/elements/image";
5
5
  export type PreloadedSrcTypes = "image" | "audio" | "video";
6
6
  export type PreloadedSrc<T extends PreloadedSrcTypes = any> = ({
7
7
  type: "image";