@novely/core 0.44.0 → 0.44.2
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 +5 -5
- package/dist/index.global.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -737,7 +737,7 @@ type ActionInputSetupCleanup = () => void;
|
|
|
737
737
|
type ActionInputSetup = (input: HTMLInputElement) => ActionInputSetupCleanup | void;
|
|
738
738
|
type BackgroundImage = Record<string, string | NovelyAsset>;
|
|
739
739
|
type VoiceAction<L extends Lang> = (params: string | NovelyAsset | Partial<Record<L, string | NovelyAsset>>) => ValidAction;
|
|
740
|
-
type
|
|
740
|
+
type ActionChoiceChoiceObject<Languages extends Lang, S extends State> = {
|
|
741
741
|
title: TextContent<Languages, S>;
|
|
742
742
|
children: ValidAction[];
|
|
743
743
|
active?: ChoiceCheckFunction<Languages, S>;
|
|
@@ -812,9 +812,9 @@ type ActionProxy<Characters extends Record<string, Character>, Languages extends
|
|
|
812
812
|
};
|
|
813
813
|
type DefaultActionProxy = ActionProxy<Record<string, Character>, Lang, State>;
|
|
814
814
|
type GetActionParameters<T extends Capitalize<keyof DefaultActionProxy>> = Parameters<DefaultActionProxy[Uncapitalize<T>]>;
|
|
815
|
-
type VirtualActions
|
|
816
|
-
choice: (question: TextContent
|
|
817
|
-
say: (character: keyof Characters, content: TextContent
|
|
815
|
+
type VirtualActions<$Characters extends Record<string, Character>, $Lang extends Lang, $State extends State> = {
|
|
816
|
+
choice: (question: TextContent<$Lang, $State>, ...choices: ActionChoiceChoiceObject<$Lang, $State>[]) => ValidAction;
|
|
817
|
+
say: (character: keyof $Characters, content: TextContent<$Lang, $State>) => ValidAction;
|
|
818
818
|
};
|
|
819
819
|
|
|
820
820
|
type ConditionParams<T> = T extends TypeEssentials<any, infer $State, any, any> ? $State : never;
|
|
@@ -974,4 +974,4 @@ declare const extendAction: <Part0 extends Record<string, (...args: any[]) => Va
|
|
|
974
974
|
*/
|
|
975
975
|
declare const asset: (...variants: string[]) => NovelyAsset;
|
|
976
976
|
|
|
977
|
-
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 };
|