create-pixi-vn 1.7.6 → 1.7.7

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 (35) hide show
  1. package/package.json +1 -1
  2. package/template-nqtr-react-vite-muijoy/src/hooks/useQueryInterface.ts +14 -7
  3. package/template-nqtr-react-vite-muijoy/src/labels/variousActionsLabels.ts +4 -4
  4. package/template-nqtr-react-vite-muijoy-ink/.vscode/settings.json +5 -0
  5. package/template-nqtr-react-vite-muijoy-ink/src/hooks/useQueryInterface.ts +14 -7
  6. package/template-nqtr-react-vite-muijoy-ink/src/ink/variousActionsLabels.ink +3 -0
  7. package/template-nqtr-react-vite-muijoy-ink/src/labels/variousActionsLabels.ts +2 -2
  8. package/template-nqtr-react-vite-muijoy-ink-tauri/.vscode/settings.json +5 -0
  9. package/template-nqtr-react-vite-muijoy-ink-tauri/src/hooks/useQueryInterface.ts +14 -7
  10. package/template-nqtr-react-vite-muijoy-ink-tauri/src/ink/variousActionsLabels.ink +3 -0
  11. package/template-nqtr-react-vite-muijoy-ink-tauri/src/labels/variousActionsLabels.ts +2 -2
  12. package/template-nqtr-react-vite-muijoy-tauri/src/hooks/useQueryInterface.ts +14 -7
  13. package/template-nqtr-react-vite-muijoy-tauri/src/labels/variousActionsLabels.ts +4 -4
  14. package/template-react-vite-muijoy/src/hooks/useQueryInterface.ts +14 -7
  15. package/template-react-vite-muijoy-ink/.vscode/settings.json +5 -0
  16. package/template-react-vite-muijoy-ink/src/hooks/useQueryInterface.ts +14 -7
  17. package/template-react-vite-muijoy-ink/src/ink/start.ink +4 -3
  18. package/template-react-vite-muijoy-ink-tauri/.vscode/settings.json +5 -0
  19. package/template-react-vite-muijoy-ink-tauri/src/hooks/useQueryInterface.ts +14 -7
  20. package/template-react-vite-muijoy-ink-tauri/src/ink/start.ink +4 -3
  21. package/template-react-vite-muijoy-tauri/src/hooks/useQueryInterface.ts +14 -7
  22. package/template-story-react-vite-muijoy/src/hooks/useQueryInterface.ts +14 -7
  23. package/template-story-react-vite-muijoy-ink/.vscode/settings.json +5 -0
  24. package/template-story-react-vite-muijoy-ink/src/hooks/useQueryInterface.ts +14 -7
  25. package/template-story-react-vite-muijoy-ink/src/ink/start.ink +4 -3
  26. package/template-story-react-vite-muijoy-ink-tauri/.vscode/settings.json +5 -0
  27. package/template-story-react-vite-muijoy-ink-tauri/src/hooks/useQueryInterface.ts +14 -7
  28. package/template-story-react-vite-muijoy-ink-tauri/src/ink/start.ink +4 -3
  29. package/template-story-react-vite-muijoy-tauri/src/hooks/useQueryInterface.ts +14 -7
  30. package/template-nqtr-react-vite-muijoy-ink/src/main.ink +0 -2
  31. package/template-nqtr-react-vite-muijoy-ink-tauri/src/main.ink +0 -2
  32. package/template-react-vite-muijoy-ink/src/main.ink +0 -2
  33. package/template-react-vite-muijoy-ink-tauri/src/main.ink +0 -2
  34. package/template-story-react-vite-muijoy-ink/src/main.ink +0 -2
  35. package/template-story-react-vite-muijoy-ink-tauri/src/main.ink +0 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-pixi-vn",
3
3
  "description": "Create a new Pixi’VN project",
4
- "version": "1.7.6",
4
+ "version": "1.7.7",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0",
7
7
  "author": "DRincs-Productions",
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -102,8 +104,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
102
104
  queryFn: async () => {
103
105
  const promises = stepHistory.narrativeHistory.map(async (step) => {
104
106
  let character = step.dialogue?.character;
107
+ let icon: string | undefined;
108
+ let characterName: string | undefined;
105
109
  if (typeof character === "string") {
106
- character = new Character(character, { name: t(character) });
110
+ characterName = t(character);
111
+ } else {
112
+ characterName = character?.name
113
+ ? character.name + (character.surname ? " " + character.surname : "")
114
+ : undefined;
115
+ icon = character?.icon;
107
116
  }
108
117
  let text = step.dialogue?.text;
109
118
  if (Array.isArray(text)) {
@@ -112,11 +121,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
112
121
  text = t(text);
113
122
  }
114
123
  return {
115
- character: character?.name
116
- ? character.name + (character.surname ? " " + character.surname : "")
117
- : undefined,
124
+ character: characterName,
118
125
  text: text || "",
119
- icon: character?.icon,
126
+ icon: icon,
120
127
  choices: step.choices,
121
128
  inputValue: step.inputValue,
122
129
  };
@@ -26,7 +26,7 @@ export const orderProductLabel = newLabel(ORDER_PRODUCT_LABEL_KEY, [
26
26
  (props) => {
27
27
  narration.dialogue = { character: mc, text: `Here's R****, for $1. Just the thing for me.` };
28
28
  mcRoom.removeActivity(orderProduct);
29
- aliceQuest.completeCurrentStageAndGoNext(props);
29
+ aliceQuest.goNext(props);
30
30
  },
31
31
  ]);
32
32
 
@@ -37,7 +37,7 @@ export const takeKeyLabel = newLabel(TAKE_KEY_LABEL_KEY, [
37
37
  text: `Are these the car keys?! Well... I should try to access the car!`,
38
38
  };
39
39
  terrace.removeActivity(takeProduct);
40
- aliceQuest.completeCurrentStageAndGoNext(props);
40
+ aliceQuest.goNext(props);
41
41
  },
42
42
  ]);
43
43
 
@@ -75,7 +75,7 @@ export const talkAliceQuest = newLabel(
75
75
  narration.dialogue = { character: alice, text: "Thanks" };
76
76
  },
77
77
  (props) => {
78
- aliceQuest.completeCurrentStageAndGoNext(props);
78
+ aliceQuest.goNext(props);
79
79
  narration.goNext(props);
80
80
  },
81
81
  ];
@@ -109,7 +109,7 @@ export const talkAliceQuest = newLabel(
109
109
  narration.dialogue = { character: alice, text: "Thank you, I can finally read something new." };
110
110
  },
111
111
  (props) => {
112
- aliceQuest.completeCurrentStageAndGoNext(props);
112
+ aliceQuest.goNext(props);
113
113
  narration.goNext(props);
114
114
  },
115
115
  ];
@@ -55,6 +55,11 @@
55
55
  "javascriptreact",
56
56
  "typescriptreact",
57
57
  ],
58
+ // ink
59
+ "ink.mainFile": "start.ink",
60
+ "ink.rootFolder": "src/ink",
61
+ "ink.markup": "Markdown",
62
+ "ink.engine": "pixi-vn",
58
63
  // olther
59
64
  "extensions.ignoreRecommendations": false,
60
65
  "workbench.editor.enablePreview": true,
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -102,8 +104,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
102
104
  queryFn: async () => {
103
105
  const promises = stepHistory.narrativeHistory.map(async (step) => {
104
106
  let character = step.dialogue?.character;
107
+ let icon: string | undefined;
108
+ let characterName: string | undefined;
105
109
  if (typeof character === "string") {
106
- character = new Character(character, { name: t(character) });
110
+ characterName = t(character);
111
+ } else {
112
+ characterName = character?.name
113
+ ? character.name + (character.surname ? " " + character.surname : "")
114
+ : undefined;
115
+ icon = character?.icon;
107
116
  }
108
117
  let text = step.dialogue?.text;
109
118
  if (Array.isArray(text)) {
@@ -112,11 +121,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
112
121
  text = t(text);
113
122
  }
114
123
  return {
115
- character: character?.name
116
- ? character.name + (character.surname ? " " + character.surname : "")
117
- : undefined,
124
+ character: characterName,
118
125
  text: text || "",
119
- icon: character?.icon,
126
+ icon: icon,
120
127
  choices: step.choices,
121
128
  inputValue: step.inputValue,
122
129
  };
@@ -9,6 +9,7 @@ alice: zZz zZz ...
9
9
  + Try waking up
10
10
  alice: [mc]!!!! What are you doing?!!
11
11
  alice: Get out of here! Now!
12
+ -> DONE
12
13
  + Leave her alone
13
14
  -> DONE
14
15
 
@@ -17,8 +18,10 @@ mc: OK! Let's see, let's look for a book....
17
18
  mc: Here's R****, for $1. Just the thing for me.
18
19
  # remove activity order_product room mc_room
19
20
  # complete queststage aliceQuest
21
+ -> DONE
20
22
 
21
23
  === TakeKeyLabel ===
22
24
  mc: Are these the car keys?! Well... I should try to access the car!
23
25
  # remove activity take_product room terrace
24
26
  # complete queststage aliceQuest
27
+ -> DONE
@@ -26,7 +26,7 @@ export const talkAliceQuest = newLabel(
26
26
  narration.dialogue = { character: alice, text: "Thanks" };
27
27
  },
28
28
  (props) => {
29
- aliceQuest.completeCurrentStageAndGoNext(props);
29
+ aliceQuest.goNext(props);
30
30
  narration.goNext(props);
31
31
  },
32
32
  ];
@@ -60,7 +60,7 @@ export const talkAliceQuest = newLabel(
60
60
  narration.dialogue = { character: alice, text: "Thank you, I can finally read something new." };
61
61
  },
62
62
  (props) => {
63
- aliceQuest.completeCurrentStageAndGoNext(props);
63
+ aliceQuest.goNext(props);
64
64
  narration.goNext(props);
65
65
  },
66
66
  ];
@@ -55,6 +55,11 @@
55
55
  "javascriptreact",
56
56
  "typescriptreact",
57
57
  ],
58
+ // ink
59
+ "ink.mainFile": "start.ink",
60
+ "ink.rootFolder": "src/ink",
61
+ "ink.markup": "Markdown",
62
+ "ink.engine": "pixi-vn",
58
63
  // olther
59
64
  "extensions.ignoreRecommendations": false,
60
65
  "workbench.editor.enablePreview": true,
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -102,8 +104,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
102
104
  queryFn: async () => {
103
105
  const promises = stepHistory.narrativeHistory.map(async (step) => {
104
106
  let character = step.dialogue?.character;
107
+ let icon: string | undefined;
108
+ let characterName: string | undefined;
105
109
  if (typeof character === "string") {
106
- character = new Character(character, { name: t(character) });
110
+ characterName = t(character);
111
+ } else {
112
+ characterName = character?.name
113
+ ? character.name + (character.surname ? " " + character.surname : "")
114
+ : undefined;
115
+ icon = character?.icon;
107
116
  }
108
117
  let text = step.dialogue?.text;
109
118
  if (Array.isArray(text)) {
@@ -112,11 +121,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
112
121
  text = t(text);
113
122
  }
114
123
  return {
115
- character: character?.name
116
- ? character.name + (character.surname ? " " + character.surname : "")
117
- : undefined,
124
+ character: characterName,
118
125
  text: text || "",
119
- icon: character?.icon,
126
+ icon: icon,
120
127
  choices: step.choices,
121
128
  inputValue: step.inputValue,
122
129
  };
@@ -9,6 +9,7 @@ alice: zZz zZz ...
9
9
  + Try waking up
10
10
  alice: [mc]!!!! What are you doing?!!
11
11
  alice: Get out of here! Now!
12
+ -> DONE
12
13
  + Leave her alone
13
14
  -> DONE
14
15
 
@@ -17,8 +18,10 @@ mc: OK! Let's see, let's look for a book....
17
18
  mc: Here's R****, for $1. Just the thing for me.
18
19
  # remove activity order_product room mc_room
19
20
  # complete queststage aliceQuest
21
+ -> DONE
20
22
 
21
23
  === TakeKeyLabel ===
22
24
  mc: Are these the car keys?! Well... I should try to access the car!
23
25
  # remove activity take_product room terrace
24
26
  # complete queststage aliceQuest
27
+ -> DONE
@@ -26,7 +26,7 @@ export const talkAliceQuest = newLabel(
26
26
  narration.dialogue = { character: alice, text: "Thanks" };
27
27
  },
28
28
  (props) => {
29
- aliceQuest.completeCurrentStageAndGoNext(props);
29
+ aliceQuest.goNext(props);
30
30
  narration.goNext(props);
31
31
  },
32
32
  ];
@@ -60,7 +60,7 @@ export const talkAliceQuest = newLabel(
60
60
  narration.dialogue = { character: alice, text: "Thank you, I can finally read something new." };
61
61
  },
62
62
  (props) => {
63
- aliceQuest.completeCurrentStageAndGoNext(props);
63
+ aliceQuest.goNext(props);
64
64
  narration.goNext(props);
65
65
  },
66
66
  ];
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -102,8 +104,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
102
104
  queryFn: async () => {
103
105
  const promises = stepHistory.narrativeHistory.map(async (step) => {
104
106
  let character = step.dialogue?.character;
107
+ let icon: string | undefined;
108
+ let characterName: string | undefined;
105
109
  if (typeof character === "string") {
106
- character = new Character(character, { name: t(character) });
110
+ characterName = t(character);
111
+ } else {
112
+ characterName = character?.name
113
+ ? character.name + (character.surname ? " " + character.surname : "")
114
+ : undefined;
115
+ icon = character?.icon;
107
116
  }
108
117
  let text = step.dialogue?.text;
109
118
  if (Array.isArray(text)) {
@@ -112,11 +121,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
112
121
  text = t(text);
113
122
  }
114
123
  return {
115
- character: character?.name
116
- ? character.name + (character.surname ? " " + character.surname : "")
117
- : undefined,
124
+ character: characterName,
118
125
  text: text || "",
119
- icon: character?.icon,
126
+ icon: icon,
120
127
  choices: step.choices,
121
128
  inputValue: step.inputValue,
122
129
  };
@@ -26,7 +26,7 @@ export const orderProductLabel = newLabel(ORDER_PRODUCT_LABEL_KEY, [
26
26
  (props) => {
27
27
  narration.dialogue = { character: mc, text: `Here's R****, for $1. Just the thing for me.` };
28
28
  mcRoom.removeActivity(orderProduct);
29
- aliceQuest.completeCurrentStageAndGoNext(props);
29
+ aliceQuest.goNext(props);
30
30
  },
31
31
  ]);
32
32
 
@@ -37,7 +37,7 @@ export const takeKeyLabel = newLabel(TAKE_KEY_LABEL_KEY, [
37
37
  text: `Are these the car keys?! Well... I should try to access the car!`,
38
38
  };
39
39
  terrace.removeActivity(takeProduct);
40
- aliceQuest.completeCurrentStageAndGoNext(props);
40
+ aliceQuest.goNext(props);
41
41
  },
42
42
  ]);
43
43
 
@@ -75,7 +75,7 @@ export const talkAliceQuest = newLabel(
75
75
  narration.dialogue = { character: alice, text: "Thanks" };
76
76
  },
77
77
  (props) => {
78
- aliceQuest.completeCurrentStageAndGoNext(props);
78
+ aliceQuest.goNext(props);
79
79
  narration.goNext(props);
80
80
  },
81
81
  ];
@@ -109,7 +109,7 @@ export const talkAliceQuest = newLabel(
109
109
  narration.dialogue = { character: alice, text: "Thank you, I can finally read something new." };
110
110
  },
111
111
  (props) => {
112
- aliceQuest.completeCurrentStageAndGoNext(props);
112
+ aliceQuest.goNext(props);
113
113
  narration.goNext(props);
114
114
  },
115
115
  ];
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -102,8 +104,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
102
104
  queryFn: async () => {
103
105
  const promises = stepHistory.narrativeHistory.map(async (step) => {
104
106
  let character = step.dialogue?.character;
107
+ let icon: string | undefined;
108
+ let characterName: string | undefined;
105
109
  if (typeof character === "string") {
106
- character = new Character(character, { name: t(character) });
110
+ characterName = t(character);
111
+ } else {
112
+ characterName = character?.name
113
+ ? character.name + (character.surname ? " " + character.surname : "")
114
+ : undefined;
115
+ icon = character?.icon;
107
116
  }
108
117
  let text = step.dialogue?.text;
109
118
  if (Array.isArray(text)) {
@@ -112,11 +121,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
112
121
  text = t(text);
113
122
  }
114
123
  return {
115
- character: character?.name
116
- ? character.name + (character.surname ? " " + character.surname : "")
117
- : undefined,
124
+ character: characterName,
118
125
  text: text || "",
119
- icon: character?.icon,
126
+ icon: icon,
120
127
  choices: step.choices,
121
128
  inputValue: step.inputValue,
122
129
  };
@@ -55,6 +55,11 @@
55
55
  "javascriptreact",
56
56
  "typescriptreact",
57
57
  ],
58
+ // ink
59
+ "ink.mainFile": "start.ink",
60
+ "ink.rootFolder": "src/ink",
61
+ "ink.markup": "Markdown",
62
+ "ink.engine": "pixi-vn",
58
63
  // olther
59
64
  "extensions.ignoreRecommendations": false,
60
65
  "workbench.editor.enablePreview": true,
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -102,8 +104,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
102
104
  queryFn: async () => {
103
105
  const promises = stepHistory.narrativeHistory.map(async (step) => {
104
106
  let character = step.dialogue?.character;
107
+ let icon: string | undefined;
108
+ let characterName: string | undefined;
105
109
  if (typeof character === "string") {
106
- character = new Character(character, { name: t(character) });
110
+ characterName = t(character);
111
+ } else {
112
+ characterName = character?.name
113
+ ? character.name + (character.surname ? " " + character.surname : "")
114
+ : undefined;
115
+ icon = character?.icon;
107
116
  }
108
117
  let text = step.dialogue?.text;
109
118
  if (Array.isArray(text)) {
@@ -112,11 +121,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
112
121
  text = t(text);
113
122
  }
114
123
  return {
115
- character: character?.name
116
- ? character.name + (character.surname ? " " + character.surname : "")
117
- : undefined,
124
+ character: characterName,
118
125
  text: text || "",
119
- icon: character?.icon,
126
+ icon: icon,
120
127
  choices: step.choices,
121
128
  inputValue: step.inputValue,
122
129
  };
@@ -1,3 +1,4 @@
1
+ -> start
1
2
  === start ===
2
3
  # lazyload bundle m01 fm01 fm02
3
4
 
@@ -40,7 +41,7 @@ james: I know you're both watching, come on out already!
40
41
  # show imagecontainer steph [fm02-body fm02-eyes-nervous fm02-mouth-nervous00] xAlign 0.8 yAlign 1 with movein direction left ease easeInOut
41
42
  sly: I just wanted to see what the new guy was like.
42
43
  # show imagecontainer sly [fm01-body fm01-eyes-upset fm01-mouth-smile01]
43
- <><span class="inline-block motion-translate-y-loop-25">Hey</span>, you, [mc]- be nice to our little brother,
44
+ <><span className="inline-block motion-translate-y-loop-25">Hey</span>, you, [mc]- be nice to our little brother,
44
45
  # show imagecontainer sly [fm01-body fm01-eyes-smile fm01-mouth-grin00]
45
46
  <>or you'll have to deal with *us*.
46
47
  # show imagecontainer james [m01-body m01-eyes-smile m01-mouth-neutral00]
@@ -97,7 +98,7 @@ sly: It's just a handshake...
97
98
  # show imagecontainer james [m01-body m01-eyes-smile m01-mouth-grin00]
98
99
  # show imagecontainer sly [fm01-body fm01-eyes-upset fm01-mouth-serious00]
99
100
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-upset01]
100
- steph: <span class="inline-block animate-wave">Then just give it to him!</span>
101
+ steph: <span className="inline-block animate-wave">Then just give it to him!</span>
101
102
  # show imagecontainer james [m01-body m01-eyes-concern m01-mouth-smile01]
102
103
  # show imagecontainer sly [fm01-body fm01-eyes-smile fm01-mouth-serious00]
103
104
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-upset00]
@@ -174,7 +175,7 @@ steph: [sly]!
174
175
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-nervous00]
175
176
  # remove image steph with moveout direction left ease easeInOut
176
177
  [steph_fullname] goes through the opposite door,
177
- # call animation_01
178
+ <- animation_01
178
179
  <>and returns with a HUGE tinfoil-covered platter.
179
180
 
180
181
  # show imagecontainer james [m01-body m01-eyes-concern m01-mouth-smile01]
@@ -55,6 +55,11 @@
55
55
  "javascriptreact",
56
56
  "typescriptreact",
57
57
  ],
58
+ // ink
59
+ "ink.mainFile": "start.ink",
60
+ "ink.rootFolder": "src/ink",
61
+ "ink.markup": "Markdown",
62
+ "ink.engine": "pixi-vn",
58
63
  // olther
59
64
  "extensions.ignoreRecommendations": false,
60
65
  "workbench.editor.enablePreview": true,
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -102,8 +104,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
102
104
  queryFn: async () => {
103
105
  const promises = stepHistory.narrativeHistory.map(async (step) => {
104
106
  let character = step.dialogue?.character;
107
+ let icon: string | undefined;
108
+ let characterName: string | undefined;
105
109
  if (typeof character === "string") {
106
- character = new Character(character, { name: t(character) });
110
+ characterName = t(character);
111
+ } else {
112
+ characterName = character?.name
113
+ ? character.name + (character.surname ? " " + character.surname : "")
114
+ : undefined;
115
+ icon = character?.icon;
107
116
  }
108
117
  let text = step.dialogue?.text;
109
118
  if (Array.isArray(text)) {
@@ -112,11 +121,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
112
121
  text = t(text);
113
122
  }
114
123
  return {
115
- character: character?.name
116
- ? character.name + (character.surname ? " " + character.surname : "")
117
- : undefined,
124
+ character: characterName,
118
125
  text: text || "",
119
- icon: character?.icon,
126
+ icon: icon,
120
127
  choices: step.choices,
121
128
  inputValue: step.inputValue,
122
129
  };
@@ -1,3 +1,4 @@
1
+ -> start
1
2
  === start ===
2
3
  # lazyload bundle m01 fm01 fm02
3
4
 
@@ -40,7 +41,7 @@ james: I know you're both watching, come on out already!
40
41
  # show imagecontainer steph [fm02-body fm02-eyes-nervous fm02-mouth-nervous00] xAlign 0.8 yAlign 1 with movein direction left ease easeInOut
41
42
  sly: I just wanted to see what the new guy was like.
42
43
  # show imagecontainer sly [fm01-body fm01-eyes-upset fm01-mouth-smile01]
43
- <><span class="inline-block motion-translate-y-loop-25">Hey</span>, you, [mc]- be nice to our little brother,
44
+ <><span className="inline-block motion-translate-y-loop-25">Hey</span>, you, [mc]- be nice to our little brother,
44
45
  # show imagecontainer sly [fm01-body fm01-eyes-smile fm01-mouth-grin00]
45
46
  <>or you'll have to deal with *us*.
46
47
  # show imagecontainer james [m01-body m01-eyes-smile m01-mouth-neutral00]
@@ -97,7 +98,7 @@ sly: It's just a handshake...
97
98
  # show imagecontainer james [m01-body m01-eyes-smile m01-mouth-grin00]
98
99
  # show imagecontainer sly [fm01-body fm01-eyes-upset fm01-mouth-serious00]
99
100
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-upset01]
100
- steph: <span class="inline-block animate-wave">Then just give it to him!</span>
101
+ steph: <span className="inline-block animate-wave">Then just give it to him!</span>
101
102
  # show imagecontainer james [m01-body m01-eyes-concern m01-mouth-smile01]
102
103
  # show imagecontainer sly [fm01-body fm01-eyes-smile fm01-mouth-serious00]
103
104
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-upset00]
@@ -174,7 +175,7 @@ steph: [sly]!
174
175
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-nervous00]
175
176
  # remove image steph with moveout direction left ease easeInOut
176
177
  [steph_fullname] goes through the opposite door,
177
- # call animation_01
178
+ <- animation_01
178
179
  <>and returns with a HUGE tinfoil-covered platter.
179
180
 
180
181
  # show imagecontainer james [m01-body m01-eyes-concern m01-mouth-smile01]
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -102,8 +104,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
102
104
  queryFn: async () => {
103
105
  const promises = stepHistory.narrativeHistory.map(async (step) => {
104
106
  let character = step.dialogue?.character;
107
+ let icon: string | undefined;
108
+ let characterName: string | undefined;
105
109
  if (typeof character === "string") {
106
- character = new Character(character, { name: t(character) });
110
+ characterName = t(character);
111
+ } else {
112
+ characterName = character?.name
113
+ ? character.name + (character.surname ? " " + character.surname : "")
114
+ : undefined;
115
+ icon = character?.icon;
107
116
  }
108
117
  let text = step.dialogue?.text;
109
118
  if (Array.isArray(text)) {
@@ -112,11 +121,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
112
121
  text = t(text);
113
122
  }
114
123
  return {
115
- character: character?.name
116
- ? character.name + (character.surname ? " " + character.surname : "")
117
- : undefined,
124
+ character: characterName,
118
125
  text: text || "",
119
- icon: character?.icon,
126
+ icon: icon,
120
127
  choices: step.choices,
121
128
  inputValue: step.inputValue,
122
129
  };
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -140,8 +142,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
140
142
  queryFn: async () => {
141
143
  const promises = stepHistory.narrativeHistory.map(async (step) => {
142
144
  let character = step.dialogue?.character;
145
+ let icon: string | undefined;
146
+ let characterName: string | undefined;
143
147
  if (typeof character === "string") {
144
- character = new Character(character, { name: t(character) });
148
+ characterName = t(character);
149
+ } else {
150
+ characterName = character?.name
151
+ ? character.name + (character.surname ? " " + character.surname : "")
152
+ : undefined;
153
+ icon = character?.icon;
145
154
  }
146
155
  let text = step.dialogue?.text;
147
156
  if (Array.isArray(text)) {
@@ -150,11 +159,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
150
159
  text = t(text);
151
160
  }
152
161
  return {
153
- character: character?.name
154
- ? character.name + (character.surname ? " " + character.surname : "")
155
- : undefined,
162
+ character: characterName,
156
163
  text: text || "",
157
- icon: character?.icon,
164
+ icon: icon,
158
165
  choices: step.choices,
159
166
  inputValue: step.inputValue,
160
167
  };
@@ -55,6 +55,11 @@
55
55
  "javascriptreact",
56
56
  "typescriptreact",
57
57
  ],
58
+ // ink
59
+ "ink.mainFile": "start.ink",
60
+ "ink.rootFolder": "src/ink",
61
+ "ink.markup": "Markdown",
62
+ "ink.engine": "pixi-vn",
58
63
  // olther
59
64
  "extensions.ignoreRecommendations": false,
60
65
  "workbench.editor.enablePreview": true,
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -140,8 +142,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
140
142
  queryFn: async () => {
141
143
  const promises = stepHistory.narrativeHistory.map(async (step) => {
142
144
  let character = step.dialogue?.character;
145
+ let icon: string | undefined;
146
+ let characterName: string | undefined;
143
147
  if (typeof character === "string") {
144
- character = new Character(character, { name: t(character) });
148
+ characterName = t(character);
149
+ } else {
150
+ characterName = character?.name
151
+ ? character.name + (character.surname ? " " + character.surname : "")
152
+ : undefined;
153
+ icon = character?.icon;
145
154
  }
146
155
  let text = step.dialogue?.text;
147
156
  if (Array.isArray(text)) {
@@ -150,11 +159,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
150
159
  text = t(text);
151
160
  }
152
161
  return {
153
- character: character?.name
154
- ? character.name + (character.surname ? " " + character.surname : "")
155
- : undefined,
162
+ character: characterName,
156
163
  text: text || "",
157
- icon: character?.icon,
164
+ icon: icon,
158
165
  choices: step.choices,
159
166
  inputValue: step.inputValue,
160
167
  };
@@ -1,3 +1,4 @@
1
+ -> start
1
2
  === start ===
2
3
  # lazyload bundle m01 fm01 fm02
3
4
 
@@ -40,7 +41,7 @@ james: I know you're both watching, come on out already!
40
41
  # show imagecontainer steph [fm02-body fm02-eyes-nervous fm02-mouth-nervous00] xAlign 0.8 yAlign 1 with movein direction left ease easeInOut
41
42
  sly: I just wanted to see what the new guy was like.
42
43
  # show imagecontainer sly [fm01-body fm01-eyes-upset fm01-mouth-smile01]
43
- <><span class="inline-block motion-translate-y-loop-25">Hey</span>, you, [mc]- be nice to our little brother,
44
+ <><span className="inline-block motion-translate-y-loop-25">Hey</span>, you, [mc]- be nice to our little brother,
44
45
  # show imagecontainer sly [fm01-body fm01-eyes-smile fm01-mouth-grin00]
45
46
  <>or you'll have to deal with *us*.
46
47
  # show imagecontainer james [m01-body m01-eyes-smile m01-mouth-neutral00]
@@ -97,7 +98,7 @@ sly: It's just a handshake...
97
98
  # show imagecontainer james [m01-body m01-eyes-smile m01-mouth-grin00]
98
99
  # show imagecontainer sly [fm01-body fm01-eyes-upset fm01-mouth-serious00]
99
100
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-upset01]
100
- steph: <span class="inline-block animate-wave">Then just give it to him!</span>
101
+ steph: <span className="inline-block animate-wave">Then just give it to him!</span>
101
102
  # show imagecontainer james [m01-body m01-eyes-concern m01-mouth-smile01]
102
103
  # show imagecontainer sly [fm01-body fm01-eyes-smile fm01-mouth-serious00]
103
104
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-upset00]
@@ -174,7 +175,7 @@ steph: [sly]!
174
175
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-nervous00]
175
176
  # remove image steph with moveout direction left ease easeInOut
176
177
  [steph_fullname] goes through the opposite door,
177
- # call animation_01
178
+ <- animation_01
178
179
  <>and returns with a HUGE tinfoil-covered platter.
179
180
 
180
181
  # show imagecontainer james [m01-body m01-eyes-concern m01-mouth-smile01]
@@ -55,6 +55,11 @@
55
55
  "javascriptreact",
56
56
  "typescriptreact",
57
57
  ],
58
+ // ink
59
+ "ink.mainFile": "start.ink",
60
+ "ink.rootFolder": "src/ink",
61
+ "ink.markup": "Markdown",
62
+ "ink.engine": "pixi-vn",
58
63
  // olther
59
64
  "extensions.ignoreRecommendations": false,
60
65
  "workbench.editor.enablePreview": true,
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -140,8 +142,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
140
142
  queryFn: async () => {
141
143
  const promises = stepHistory.narrativeHistory.map(async (step) => {
142
144
  let character = step.dialogue?.character;
145
+ let icon: string | undefined;
146
+ let characterName: string | undefined;
143
147
  if (typeof character === "string") {
144
- character = new Character(character, { name: t(character) });
148
+ characterName = t(character);
149
+ } else {
150
+ characterName = character?.name
151
+ ? character.name + (character.surname ? " " + character.surname : "")
152
+ : undefined;
153
+ icon = character?.icon;
145
154
  }
146
155
  let text = step.dialogue?.text;
147
156
  if (Array.isArray(text)) {
@@ -150,11 +159,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
150
159
  text = t(text);
151
160
  }
152
161
  return {
153
- character: character?.name
154
- ? character.name + (character.surname ? " " + character.surname : "")
155
- : undefined,
162
+ character: characterName,
156
163
  text: text || "",
157
- icon: character?.icon,
164
+ icon: icon,
158
165
  choices: step.choices,
159
166
  inputValue: step.inputValue,
160
167
  };
@@ -1,3 +1,4 @@
1
+ -> start
1
2
  === start ===
2
3
  # lazyload bundle m01 fm01 fm02
3
4
 
@@ -40,7 +41,7 @@ james: I know you're both watching, come on out already!
40
41
  # show imagecontainer steph [fm02-body fm02-eyes-nervous fm02-mouth-nervous00] xAlign 0.8 yAlign 1 with movein direction left ease easeInOut
41
42
  sly: I just wanted to see what the new guy was like.
42
43
  # show imagecontainer sly [fm01-body fm01-eyes-upset fm01-mouth-smile01]
43
- <><span class="inline-block motion-translate-y-loop-25">Hey</span>, you, [mc]- be nice to our little brother,
44
+ <><span className="inline-block motion-translate-y-loop-25">Hey</span>, you, [mc]- be nice to our little brother,
44
45
  # show imagecontainer sly [fm01-body fm01-eyes-smile fm01-mouth-grin00]
45
46
  <>or you'll have to deal with *us*.
46
47
  # show imagecontainer james [m01-body m01-eyes-smile m01-mouth-neutral00]
@@ -97,7 +98,7 @@ sly: It's just a handshake...
97
98
  # show imagecontainer james [m01-body m01-eyes-smile m01-mouth-grin00]
98
99
  # show imagecontainer sly [fm01-body fm01-eyes-upset fm01-mouth-serious00]
99
100
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-upset01]
100
- steph: <span class="inline-block animate-wave">Then just give it to him!</span>
101
+ steph: <span className="inline-block animate-wave">Then just give it to him!</span>
101
102
  # show imagecontainer james [m01-body m01-eyes-concern m01-mouth-smile01]
102
103
  # show imagecontainer sly [fm01-body fm01-eyes-smile fm01-mouth-serious00]
103
104
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-upset00]
@@ -174,7 +175,7 @@ steph: [sly]!
174
175
  # show imagecontainer steph [fm02-body fm02-eyes-upset fm02-mouth-nervous00]
175
176
  # remove image steph with moveout direction left ease easeInOut
176
177
  [steph_fullname] goes through the opposite door,
177
- # call animation_01
178
+ <- animation_01
178
179
  <>and returns with a HUGE tinfoil-covered platter.
179
180
 
180
181
  # show imagecontainer james [m01-body m01-eyes-concern m01-mouth-smile01]
@@ -1,7 +1,6 @@
1
1
  import { CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { useTranslation } from "react-i18next";
4
- import Character from "../models/Character";
5
4
 
6
5
  export const INTERFACE_DATA_USE_QUEY_KEY = "interface_data_use_quey_key";
7
6
 
@@ -60,7 +59,10 @@ export function useQueryDialogue() {
60
59
  }
61
60
  let character = dialogue?.character;
62
61
  if (typeof character === "string") {
63
- character = new Character(character, { name: t(character) });
62
+ character = {
63
+ id: character,
64
+ name: t(character),
65
+ } as CharacterInterface;
64
66
  }
65
67
 
66
68
  let prevData = queryClient.getQueryData<DialogueModel>(queryKey) || {};
@@ -140,8 +142,15 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
140
142
  queryFn: async () => {
141
143
  const promises = stepHistory.narrativeHistory.map(async (step) => {
142
144
  let character = step.dialogue?.character;
145
+ let icon: string | undefined;
146
+ let characterName: string | undefined;
143
147
  if (typeof character === "string") {
144
- character = new Character(character, { name: t(character) });
148
+ characterName = t(character);
149
+ } else {
150
+ characterName = character?.name
151
+ ? character.name + (character.surname ? " " + character.surname : "")
152
+ : undefined;
153
+ icon = character?.icon;
145
154
  }
146
155
  let text = step.dialogue?.text;
147
156
  if (Array.isArray(text)) {
@@ -150,11 +159,9 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
150
159
  text = t(text);
151
160
  }
152
161
  return {
153
- character: character?.name
154
- ? character.name + (character.surname ? " " + character.surname : "")
155
- : undefined,
162
+ character: characterName,
156
163
  text: text || "",
157
- icon: character?.icon,
164
+ icon: icon,
158
165
  choices: step.choices,
159
166
  inputValue: step.inputValue,
160
167
  };
@@ -1,2 +0,0 @@
1
- INCLUDE ink/start.ink
2
- -> start
@@ -1,2 +0,0 @@
1
- INCLUDE ink/start.ink
2
- -> start
@@ -1,2 +0,0 @@
1
- INCLUDE ink/start.ink
2
- -> start
@@ -1,2 +0,0 @@
1
- INCLUDE ink/start.ink
2
- -> start
@@ -1,2 +0,0 @@
1
- INCLUDE ink/start.ink
2
- -> start
@@ -1,2 +0,0 @@
1
- INCLUDE ink/start.ink
2
- -> start