@novely/core 0.43.0 → 0.44.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/dist/index.d.ts +7 -3
- package/dist/index.global.js +2 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -602,6 +602,10 @@ type CustomHandlerFunctionParameters<L extends string, S extends State> = {
|
|
|
602
602
|
* Renderer Context
|
|
603
603
|
*/
|
|
604
604
|
rendererContext: Context;
|
|
605
|
+
/**
|
|
606
|
+
* Context key in which action is running
|
|
607
|
+
*/
|
|
608
|
+
contextKey: string;
|
|
605
609
|
/**
|
|
606
610
|
* Function to work with custom action's state
|
|
607
611
|
*/
|
|
@@ -733,7 +737,7 @@ type ActionInputSetupCleanup = () => void;
|
|
|
733
737
|
type ActionInputSetup = (input: HTMLInputElement) => ActionInputSetupCleanup | void;
|
|
734
738
|
type BackgroundImage = Record<string, string | NovelyAsset>;
|
|
735
739
|
type VoiceAction<L extends Lang> = (params: string | NovelyAsset | Partial<Record<L, string | NovelyAsset>>) => ValidAction;
|
|
736
|
-
type
|
|
740
|
+
type ActionChoiceChoiceObject<Languages extends Lang, S extends State> = {
|
|
737
741
|
title: TextContent<Languages, S>;
|
|
738
742
|
children: ValidAction[];
|
|
739
743
|
active?: ChoiceCheckFunction<Languages, S>;
|
|
@@ -809,7 +813,7 @@ type ActionProxy<Characters extends Record<string, Character>, Languages extends
|
|
|
809
813
|
type DefaultActionProxy = ActionProxy<Record<string, Character>, Lang, State>;
|
|
810
814
|
type GetActionParameters<T extends Capitalize<keyof DefaultActionProxy>> = Parameters<DefaultActionProxy[Uncapitalize<T>]>;
|
|
811
815
|
type VirtualActions<Characters extends Record<string, Character>, Languages extends Lang, S extends State> = {
|
|
812
|
-
choice: (question: TextContent<Languages, S>, ...choices:
|
|
816
|
+
choice: (question: TextContent<Languages, S>, ...choices: ActionChoiceChoiceObject<Languages, State>[]) => ValidAction;
|
|
813
817
|
say: (character: keyof Characters, content: TextContent<Languages, S>) => ValidAction;
|
|
814
818
|
};
|
|
815
819
|
|
|
@@ -970,4 +974,4 @@ declare const extendAction: <Part0 extends Record<string, (...args: any[]) => Va
|
|
|
970
974
|
*/
|
|
971
975
|
declare const asset: (...variants: string[]) => NovelyAsset;
|
|
972
976
|
|
|
973
|
-
export { type ActionInputOnInputMeta, type ActionInputSetup, type ActionInputSetupCleanup, type ActionProxy, type AllowedContent, type AudioHandle, type BackgroundImage, type BaseTranslationStrings, type Character, type CharacterAssetSizes, type CharacterHandle, type CharactersData, type ChoiceParams, type ConditionParams, type Context, type CoreData, type CustomActionHandle, type CustomHandler, type CustomHandlerFunctionGetFn, type CustomHandlerFunctionParameters, type CustomHandlerGetResult, type CustomHandlerGetResultDataFunction, type Data, type DeepPartial, type DefaultActionProxy, EN, type Emotions, type FunctionParams, type FunctionableValue, type GetActionParameters, type InputHandler, JP, KK, type Lang, type NovelyInit, type NovelyScreen, type NovelyStorage, type Path, type PluralType, type Pluralization, RU, type Renderer, type RendererInit, type RendererInitPreviewReturn, type Save, type Stack, type StackHolder, type State, type StateFunction, type StorageData, type StorageMeta, type Stored, type Story, type TextContent, type Thenable, type TranslationActions, type TypeEssentials, type TypewriterSpeed, type ValidAction, asset, extendAction, localStorageStorage, novely };
|
|
977
|
+
export { type ActionChoiceChoice, type ActionChoiceChoiceObject, type ActionInputOnInputMeta, type ActionInputSetup, type ActionInputSetupCleanup, type ActionProxy, type AllowedContent, type AudioHandle, type BackgroundImage, type BaseTranslationStrings, type Character, type CharacterAssetSizes, type CharacterHandle, type CharactersData, type ChoiceCheckFunction, type ChoiceParams, type ConditionParams, type Context, type CoreData, type CustomActionHandle, type CustomHandler, type CustomHandlerFunctionGetFn, type CustomHandlerFunctionParameters, type CustomHandlerGetResult, type CustomHandlerGetResultDataFunction, type Data, type DeepPartial, type DefaultActionProxy, EN, type Emotions, type FunctionParams, type FunctionableValue, type GetActionParameters, type InputHandler, JP, KK, type Lang, type NovelyInit, type NovelyScreen, type NovelyStorage, type Path, type PluralType, type Pluralization, RU, type Renderer, type RendererInit, type RendererInitPreviewReturn, type Save, type Stack, type StackHolder, type State, type StateFunction, type StorageData, type StorageMeta, type Stored, type Story, type TextContent, type Thenable, type TranslationActions, type TypeEssentials, type TypewriterSpeed, type ValidAction, asset, extendAction, localStorageStorage, novely };
|