UNPKG

narraleaf-react

Version:

A React visual novel player framework

19 lines (18 loc) 621 B
/** * Represents the context of a dialog, containing information about its completion status * and the text content. */ export type DialogContext = { /** Whether the dialog has finished displaying */ done: boolean; /** The text content of the dialog */ text: string; /** Whether the dialog is the narrator */ isNarrator: boolean; }; /** * A custom hook that provides access to the current dialog's state and content. * It retrieves the dialog information from the sentence context and processes * the words to generate the final text. */ export declare function useDialog(): DialogContext;