@novely/core 0.45.2 → 0.46.0-next.0

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 CHANGED
@@ -40,6 +40,8 @@ declare const RU: {
40
40
  MusicVolume: string;
41
41
  SoundVolume: string;
42
42
  VoiceVolume: string;
43
+ Close: string;
44
+ DialogOverview: string;
43
45
  };
44
46
  type BaseTranslationStrings = keyof typeof RU;
45
47
  declare const EN: Record<BaseTranslationStrings, string>;
@@ -52,7 +54,7 @@ declare const KK: Record<BaseTranslationStrings, string>;
52
54
  */
53
55
  declare const JP: Record<BaseTranslationStrings, string>;
54
56
 
55
- interface CharacterHandle {
57
+ type CharacterHandle = {
56
58
  canvas: HTMLCanvasElement;
57
59
  ctx: CanvasRenderingContext2D;
58
60
  emotion: (emotion: string, render: boolean) => void;
@@ -60,7 +62,7 @@ interface CharacterHandle {
60
62
  remove: (className?: string, style?: string, duration?: number, restoring?: boolean) => Promise<void>;
61
63
  animate: (classes: string[]) => void;
62
64
  emotions: Record<string, HTMLImageElement[]>;
63
- }
65
+ };
64
66
  type CustomActionHandle = {
65
67
  /**
66
68
  * Function to remove custom action from screen (and from your state if any completely)
@@ -230,6 +232,7 @@ type RendererInit<$Language extends Lang, $Characters extends Record<string, Cha
230
232
  getCharacterColor: (character: string) => string;
231
233
  getCharacterAssets: (character: string, emotion: string) => string[];
232
234
  getResourseType: (url: string) => Promise<'image' | 'audio' | 'other'>;
235
+ getDialogOverview: () => DialogOverview;
233
236
  };
234
237
 
235
238
  type LocalStorageStorageSettings = {
@@ -260,7 +263,7 @@ type Data = Record<string, any>;
260
263
  type SaveDate = number;
261
264
  type SaveType = 'manual' | 'auto';
262
265
  type SaveMeta = [date: SaveDate, type: SaveType];
263
- type Save<S extends State = State> = [path: Path, state: S, meta: SaveMeta];
266
+ type Save<S extends State = State> = [path: Path, state: S, meta: SaveMeta, state_snapshots: S[]];
264
267
  type Lang = string;
265
268
  type TypewriterSpeed = 'Slow' | 'Medium' | 'Fast' | 'Auto';
266
269
  type SoundVolume = number;
@@ -553,6 +556,21 @@ type TypeEssentials<$Lang extends Lang, $State extends State, $Data extends Data
553
556
  readonly d: $Data | null;
554
557
  readonly c: $Characters | null;
555
558
  };
559
+ type DialogOverviewEntry = {
560
+ /**
561
+ * Link to character voice
562
+ */
563
+ voice: string | undefined;
564
+ /**
565
+ * Character name
566
+ */
567
+ name: string;
568
+ /**
569
+ * Text that character says
570
+ */
571
+ text: string;
572
+ };
573
+ type DialogOverview = DialogOverviewEntry[];
556
574
 
557
575
  type Name<$Lang extends Lang> = string | Record<$Lang, string>;
558
576
  type Emotions<Emotion extends string = string> = Record<Emotion, string | NovelyAsset | (string | NovelyAsset)[]>;