create-pixi-vn 2.0.9 → 2.0.10
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/package.json +1 -1
- package/template-react-vite-muijoy/.vscode/launch.json +9 -0
- package/template-react-vite-muijoy/package-lock.json +6 -4
- package/template-react-vite-muijoy/package.json +1 -0
- package/template-react-vite-muijoy/src/components/loading.tsx +5 -44
- package/template-react-vite-muijoy/src/components/menus/settings/about.tsx +1 -1
- package/template-react-vite-muijoy/src/components/quick-tools.tsx +1 -1
- package/template-react-vite-muijoy/src/components/screens/narration/narration-cards.tsx +2 -3
- package/template-react-vite-muijoy/src/lib/query/narration-query.ts +5 -1
- package/template-react-vite-muijoy/src/lib/utils/assets-utility.ts +1 -1
- package/template-react-vite-muijoy-ink/.vscode/launch.json +9 -0
- package/template-react-vite-muijoy-ink/package-lock.json +9 -8
- package/template-react-vite-muijoy-ink/package.json +1 -0
- package/template-react-vite-muijoy-ink/src/components/loading.tsx +5 -44
- package/template-react-vite-muijoy-ink/src/components/menus/settings/about.tsx +1 -1
- package/template-react-vite-muijoy-ink/src/components/quick-tools.tsx +1 -1
- package/template-react-vite-muijoy-ink/src/components/screens/narration/narration-cards.tsx +2 -3
- package/template-react-vite-muijoy-ink/src/lib/query/narration-query.ts +5 -1
- package/template-react-vite-muijoy-ink/src/lib/utils/assets-utility.ts +1 -1
- package/template-react-vite-muijoy-ink-tauri/.vscode/launch.json +9 -0
- package/template-react-vite-muijoy-ink-tauri/package-lock.json +1 -0
- package/template-react-vite-muijoy-ink-tauri/package.json +1 -0
- package/template-react-vite-muijoy-ink-tauri/src/components/loading.tsx +5 -44
- package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/about.tsx +1 -1
- package/template-react-vite-muijoy-ink-tauri/src/components/quick-tools.tsx +1 -1
- package/template-react-vite-muijoy-ink-tauri/src/components/screens/narration/narration-cards.tsx +2 -3
- package/template-react-vite-muijoy-ink-tauri/src/lib/query/narration-query.ts +5 -1
- package/template-react-vite-muijoy-ink-tauri/src/lib/utils/assets-utility.ts +1 -1
- package/template-react-vite-muijoy-tauri/.vscode/launch.json +9 -0
- package/template-react-vite-muijoy-tauri/package-lock.json +6 -4
- package/template-react-vite-muijoy-tauri/package.json +1 -0
- package/template-react-vite-muijoy-tauri/src/components/loading.tsx +5 -44
- package/template-react-vite-muijoy-tauri/src/components/menus/settings/about.tsx +1 -1
- package/template-react-vite-muijoy-tauri/src/components/quick-tools.tsx +1 -1
- package/template-react-vite-muijoy-tauri/src/components/screens/narration/narration-cards.tsx +2 -3
- package/template-react-vite-muijoy-tauri/src/lib/query/narration-query.ts +5 -1
- package/template-react-vite-muijoy-tauri/src/lib/utils/assets-utility.ts +1 -1
package/package.json
CHANGED
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
"preLaunchTask": "Start Vite Dev Server",
|
|
11
11
|
"postDebugTask": "Stop Vite Dev Server"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Debug Game (Chrome)",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"type": "chrome",
|
|
17
|
+
"url": "http://localhost:5173",
|
|
18
|
+
"webRoot": "${workspaceFolder}",
|
|
19
|
+
"preLaunchTask": "Start Vite Dev Server",
|
|
20
|
+
"postDebugTask": "Stop Vite Dev Server"
|
|
21
|
+
},
|
|
13
22
|
{
|
|
14
23
|
"name": "Debug Game Preview",
|
|
15
24
|
"request": "launch",
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
"license": "GPL-3.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@base-ui/react": "^1.5.0",
|
|
13
|
-
"@drincs/pixi-vn": "^1.8.
|
|
13
|
+
"@drincs/pixi-vn": "^1.8.13",
|
|
14
14
|
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
15
15
|
"@tailwindcss/vite": "^4.3.0",
|
|
16
|
+
"@tanstack/hotkeys": "^0.8.0",
|
|
16
17
|
"@tanstack/react-devtools": "^0.10.5",
|
|
17
18
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
18
19
|
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
"i18next-chained-backend": "^5.0.4",
|
|
35
36
|
"i18next-resources-to-backend": "^1.2.1",
|
|
36
37
|
"lucide-react": "^1.17.0",
|
|
38
|
+
"motion": "^12.38.0",
|
|
37
39
|
"next-themes": "^0.4.6",
|
|
38
40
|
"react": "^19.2.6",
|
|
39
41
|
"react-color-palette": "^7.3.1",
|
|
@@ -2113,9 +2115,9 @@
|
|
|
2113
2115
|
}
|
|
2114
2116
|
},
|
|
2115
2117
|
"node_modules/@drincs/pixi-vn": {
|
|
2116
|
-
"version": "1.8.
|
|
2117
|
-
"resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-1.8.
|
|
2118
|
-
"integrity": "sha512-
|
|
2118
|
+
"version": "1.8.13",
|
|
2119
|
+
"resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-1.8.13.tgz",
|
|
2120
|
+
"integrity": "sha512-UFo1cUYmy3FSgqKqjHkA5NpTXSwjk24WMZAkGe9tgoVLcexi1d+TmhJGSt1VloPjw/hHwYKaip2vyrmBACZ1fA==",
|
|
2119
2121
|
"license": "LGPL-2.1",
|
|
2120
2122
|
"workspaces": [
|
|
2121
2123
|
"sandbox"
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"@drincs/pixi-vn": "^1.8.13",
|
|
23
23
|
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
24
24
|
"@tailwindcss/vite": "^4.3.0",
|
|
25
|
+
"@tanstack/hotkeys": "^0.8.0",
|
|
25
26
|
"@tanstack/react-devtools": "^0.10.5",
|
|
26
27
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
27
28
|
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Spinner } from "@/components/ui/spinner";
|
|
2
|
-
import { motion } from "motion/react";
|
|
3
2
|
|
|
4
3
|
export function PendingComponent() {
|
|
5
4
|
return (
|
|
@@ -12,49 +11,11 @@ export function PendingComponent() {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export function AnimatedDots() {
|
|
15
|
-
const dots = [
|
|
16
|
-
{ id: "dot-1", char: "." },
|
|
17
|
-
{ id: "dot-2", char: "." },
|
|
18
|
-
{ id: "dot-3", char: "." },
|
|
19
|
-
]; // I caratteri da animare
|
|
20
|
-
|
|
21
14
|
return (
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
initial="closed"
|
|
28
|
-
animate="open"
|
|
29
|
-
>
|
|
30
|
-
{dots.map((dot) => (
|
|
31
|
-
<motion.span
|
|
32
|
-
key={dot.id}
|
|
33
|
-
initial={{ y: 0 }}
|
|
34
|
-
variants={{
|
|
35
|
-
open: {
|
|
36
|
-
y: 5,
|
|
37
|
-
transition: {
|
|
38
|
-
repeat: Infinity,
|
|
39
|
-
duration: 0.5,
|
|
40
|
-
ease: "easeInOut",
|
|
41
|
-
repeatType: "reverse",
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
closed: {
|
|
45
|
-
y: 0,
|
|
46
|
-
transition: {
|
|
47
|
-
repeat: Infinity,
|
|
48
|
-
duration: 0.5,
|
|
49
|
-
ease: "easeInOut",
|
|
50
|
-
repeatType: "reverse",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}}
|
|
54
|
-
>
|
|
55
|
-
{dot.char}
|
|
56
|
-
</motion.span>
|
|
57
|
-
))}
|
|
58
|
-
</motion.span>
|
|
15
|
+
<span className="flex pointer-events-none select-none">
|
|
16
|
+
<span className="animate-bounce [animation-delay:0s]">.</span>
|
|
17
|
+
<span className="animate-bounce [animation-delay:0.2s]">.</span>
|
|
18
|
+
<span className="animate-bounce [animation-delay:0.4s]">.</span>
|
|
19
|
+
</span>
|
|
59
20
|
);
|
|
60
21
|
}
|
|
@@ -19,7 +19,7 @@ export function About() {
|
|
|
19
19
|
<span className="font-medium text-muted-foreground">
|
|
20
20
|
{t("powered_by")}{" "}
|
|
21
21
|
<a
|
|
22
|
-
href="https://pixi-vn.
|
|
22
|
+
href="https://pixi-vn.com"
|
|
23
23
|
target="_blank"
|
|
24
24
|
rel="noopener noreferrer"
|
|
25
25
|
className="underline hover:text-foreground"
|
|
@@ -27,7 +27,7 @@ export function QuickTools() {
|
|
|
27
27
|
const autoEnabled = useSelector(AutoSettings.store, (state) => state.enabled);
|
|
28
28
|
const queryClient = useQueryClient();
|
|
29
29
|
const { data: lastSave = null } = useQueryLastSave();
|
|
30
|
-
const { data: canGoBack =
|
|
30
|
+
const { data: canGoBack = false } = useQueryCanGoBack();
|
|
31
31
|
const nextStepLoading = useSelector(GameStatus.store, (state) => state.loading);
|
|
32
32
|
const { goBack } = useNarrationFunctions();
|
|
33
33
|
const { openAlertDialog } = useAlertDialog();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnimatedDots } from "@/components/loading";
|
|
2
2
|
import { QuickTools } from "@/components/quick-tools";
|
|
3
|
-
import { AspectRatio } from "@/components/ui/aspect-ratio";
|
|
4
3
|
import { Card, CardContent } from "@/components/ui/card";
|
|
5
4
|
import { Image } from "@/components/ui/image";
|
|
6
5
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
|
|
@@ -127,8 +126,8 @@ export function Text({ paragraphRef }: { paragraphRef: RefObject<HTMLDivElement
|
|
|
127
126
|
|
|
128
127
|
export function CharacterIcon({ alt, icon }: { icon: string; alt: string }) {
|
|
129
128
|
return (
|
|
130
|
-
<
|
|
129
|
+
<div className="h-full w-full">
|
|
131
130
|
<Image src={icon} layout="fullWidth" alt={alt} className="h-full w-full object-cover" />
|
|
132
|
-
</
|
|
131
|
+
</div>
|
|
133
132
|
);
|
|
134
133
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { INTERFACE_DATA_USE_QUERY_KEY } from "@/constants";
|
|
2
2
|
import { type CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
|
|
3
|
-
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { keepPreviousData, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
|
|
6
6
|
const CAN_GO_BACK_USE_QUERY_KEY = "can_go_back_use_query_key";
|
|
@@ -24,6 +24,7 @@ export function useQueryChoiceMenuOptions() {
|
|
|
24
24
|
? t(option.text)
|
|
25
25
|
: option.text.map((text) => t(text)).join(" "),
|
|
26
26
|
})) || [],
|
|
27
|
+
placeholderData: keepPreviousData,
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -36,6 +37,7 @@ export function useQueryInputValue<T>() {
|
|
|
36
37
|
type: narration.inputType,
|
|
37
38
|
currentValue: narration.inputValue as T | undefined,
|
|
38
39
|
}),
|
|
40
|
+
placeholderData: keepPreviousData,
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -86,6 +88,7 @@ export function useQueryDialogue() {
|
|
|
86
88
|
character: character,
|
|
87
89
|
};
|
|
88
90
|
},
|
|
91
|
+
placeholderData: keepPreviousData,
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
|
|
@@ -144,5 +147,6 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
|
|
|
144
147
|
);
|
|
145
148
|
});
|
|
146
149
|
},
|
|
150
|
+
placeholderData: keepPreviousData,
|
|
147
151
|
});
|
|
148
152
|
}
|
|
@@ -8,7 +8,7 @@ let assetsInitialized = false;
|
|
|
8
8
|
/**
|
|
9
9
|
* Define all the assets that will be used in the game.
|
|
10
10
|
* This function will be called before the game starts.
|
|
11
|
-
* You can read more about assets management in the documentation: https://pixi-vn.
|
|
11
|
+
* You can read more about assets management in the documentation: https://pixi-vn.com/start/assets-management.html
|
|
12
12
|
*/
|
|
13
13
|
export async function defineAssets() {
|
|
14
14
|
if (!assetsInitialized) {
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
"preLaunchTask": "Start Vite Dev Server",
|
|
11
11
|
"postDebugTask": "Stop Vite Dev Server"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Debug Game (Chrome)",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"type": "chrome",
|
|
17
|
+
"url": "http://localhost:5173",
|
|
18
|
+
"webRoot": "${workspaceFolder}",
|
|
19
|
+
"preLaunchTask": "Start Vite Dev Server",
|
|
20
|
+
"postDebugTask": "Stop Vite Dev Server"
|
|
21
|
+
},
|
|
13
22
|
{
|
|
14
23
|
"name": "Debug Game Preview",
|
|
15
24
|
"request": "launch",
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
"license": "GPL-3.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@base-ui/react": "^1.5.0",
|
|
13
|
-
"@drincs/pixi-vn": "^1.8.
|
|
14
|
-
"@drincs/pixi-vn-ink": "^1.0.
|
|
13
|
+
"@drincs/pixi-vn": "^1.8.13",
|
|
14
|
+
"@drincs/pixi-vn-ink": "^1.0.5",
|
|
15
15
|
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
16
16
|
"@tailwindcss/vite": "^4.3.0",
|
|
17
|
+
"@tanstack/hotkeys": "^0.8.0",
|
|
17
18
|
"@tanstack/react-devtools": "^0.10.5",
|
|
18
19
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
19
20
|
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
@@ -2115,9 +2116,9 @@
|
|
|
2115
2116
|
}
|
|
2116
2117
|
},
|
|
2117
2118
|
"node_modules/@drincs/pixi-vn": {
|
|
2118
|
-
"version": "1.8.
|
|
2119
|
-
"resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-1.8.
|
|
2120
|
-
"integrity": "sha512-
|
|
2119
|
+
"version": "1.8.13",
|
|
2120
|
+
"resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-1.8.13.tgz",
|
|
2121
|
+
"integrity": "sha512-UFo1cUYmy3FSgqKqjHkA5NpTXSwjk24WMZAkGe9tgoVLcexi1d+TmhJGSt1VloPjw/hHwYKaip2vyrmBACZ1fA==",
|
|
2121
2122
|
"license": "LGPL-2.1",
|
|
2122
2123
|
"workspaces": [
|
|
2123
2124
|
"sandbox"
|
|
@@ -2142,9 +2143,9 @@
|
|
|
2142
2143
|
}
|
|
2143
2144
|
},
|
|
2144
2145
|
"node_modules/@drincs/pixi-vn-ink": {
|
|
2145
|
-
"version": "1.0.
|
|
2146
|
-
"resolved": "https://registry.npmjs.org/@drincs/pixi-vn-ink/-/pixi-vn-ink-1.0.
|
|
2147
|
-
"integrity": "sha512-
|
|
2146
|
+
"version": "1.0.5",
|
|
2147
|
+
"resolved": "https://registry.npmjs.org/@drincs/pixi-vn-ink/-/pixi-vn-ink-1.0.5.tgz",
|
|
2148
|
+
"integrity": "sha512-oYp4xkp2MQJHebyDfnD90U3dtSZ/9ARwMehg1OvMwR7MRbpske9NNM6OJ9ijA68j/1TPJP/LUuDPpdNmDQwcRQ==",
|
|
2148
2149
|
"license": "LGPL-2.1",
|
|
2149
2150
|
"workspaces": [
|
|
2150
2151
|
"playground"
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@drincs/pixi-vn-ink": "^1.0.5",
|
|
24
24
|
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
25
25
|
"@tailwindcss/vite": "^4.3.0",
|
|
26
|
+
"@tanstack/hotkeys": "^0.8.0",
|
|
26
27
|
"@tanstack/react-devtools": "^0.10.5",
|
|
27
28
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
28
29
|
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Spinner } from "@/components/ui/spinner";
|
|
2
|
-
import { motion } from "motion/react";
|
|
3
2
|
|
|
4
3
|
export function PendingComponent() {
|
|
5
4
|
return (
|
|
@@ -12,49 +11,11 @@ export function PendingComponent() {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export function AnimatedDots() {
|
|
15
|
-
const dots = [
|
|
16
|
-
{ id: "dot-1", char: "." },
|
|
17
|
-
{ id: "dot-2", char: "." },
|
|
18
|
-
{ id: "dot-3", char: "." },
|
|
19
|
-
]; // I caratteri da animare
|
|
20
|
-
|
|
21
14
|
return (
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
initial="closed"
|
|
28
|
-
animate="open"
|
|
29
|
-
>
|
|
30
|
-
{dots.map((dot) => (
|
|
31
|
-
<motion.span
|
|
32
|
-
key={dot.id}
|
|
33
|
-
initial={{ y: 0 }}
|
|
34
|
-
variants={{
|
|
35
|
-
open: {
|
|
36
|
-
y: 5,
|
|
37
|
-
transition: {
|
|
38
|
-
repeat: Infinity,
|
|
39
|
-
duration: 0.5,
|
|
40
|
-
ease: "easeInOut",
|
|
41
|
-
repeatType: "reverse",
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
closed: {
|
|
45
|
-
y: 0,
|
|
46
|
-
transition: {
|
|
47
|
-
repeat: Infinity,
|
|
48
|
-
duration: 0.5,
|
|
49
|
-
ease: "easeInOut",
|
|
50
|
-
repeatType: "reverse",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}}
|
|
54
|
-
>
|
|
55
|
-
{dot.char}
|
|
56
|
-
</motion.span>
|
|
57
|
-
))}
|
|
58
|
-
</motion.span>
|
|
15
|
+
<span className="flex pointer-events-none select-none">
|
|
16
|
+
<span className="animate-bounce [animation-delay:0s]">.</span>
|
|
17
|
+
<span className="animate-bounce [animation-delay:0.2s]">.</span>
|
|
18
|
+
<span className="animate-bounce [animation-delay:0.4s]">.</span>
|
|
19
|
+
</span>
|
|
59
20
|
);
|
|
60
21
|
}
|
|
@@ -19,7 +19,7 @@ export function About() {
|
|
|
19
19
|
<span className="font-medium text-muted-foreground">
|
|
20
20
|
{t("powered_by")}{" "}
|
|
21
21
|
<a
|
|
22
|
-
href="https://pixi-vn.
|
|
22
|
+
href="https://pixi-vn.com"
|
|
23
23
|
target="_blank"
|
|
24
24
|
rel="noopener noreferrer"
|
|
25
25
|
className="underline hover:text-foreground"
|
|
@@ -27,7 +27,7 @@ export function QuickTools() {
|
|
|
27
27
|
const autoEnabled = useSelector(AutoSettings.store, (state) => state.enabled);
|
|
28
28
|
const queryClient = useQueryClient();
|
|
29
29
|
const { data: lastSave = null } = useQueryLastSave();
|
|
30
|
-
const { data: canGoBack =
|
|
30
|
+
const { data: canGoBack = false } = useQueryCanGoBack();
|
|
31
31
|
const nextStepLoading = useSelector(GameStatus.store, (state) => state.loading);
|
|
32
32
|
const { goBack } = useNarrationFunctions();
|
|
33
33
|
const { openAlertDialog } = useAlertDialog();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnimatedDots } from "@/components/loading";
|
|
2
2
|
import { QuickTools } from "@/components/quick-tools";
|
|
3
|
-
import { AspectRatio } from "@/components/ui/aspect-ratio";
|
|
4
3
|
import { Card, CardContent } from "@/components/ui/card";
|
|
5
4
|
import { Image } from "@/components/ui/image";
|
|
6
5
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
|
|
@@ -127,8 +126,8 @@ export function Text({ paragraphRef }: { paragraphRef: RefObject<HTMLDivElement
|
|
|
127
126
|
|
|
128
127
|
export function CharacterIcon({ alt, icon }: { icon: string; alt: string }) {
|
|
129
128
|
return (
|
|
130
|
-
<
|
|
129
|
+
<div className="h-full w-full">
|
|
131
130
|
<Image src={icon} layout="fullWidth" alt={alt} className="h-full w-full object-cover" />
|
|
132
|
-
</
|
|
131
|
+
</div>
|
|
133
132
|
);
|
|
134
133
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { INTERFACE_DATA_USE_QUERY_KEY } from "@/constants";
|
|
2
2
|
import { type CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
|
|
3
|
-
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { keepPreviousData, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
|
|
6
6
|
const CAN_GO_BACK_USE_QUERY_KEY = "can_go_back_use_query_key";
|
|
@@ -24,6 +24,7 @@ export function useQueryChoiceMenuOptions() {
|
|
|
24
24
|
? t(option.text)
|
|
25
25
|
: option.text.map((text) => t(text)).join(" "),
|
|
26
26
|
})) || [],
|
|
27
|
+
placeholderData: keepPreviousData,
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -36,6 +37,7 @@ export function useQueryInputValue<T>() {
|
|
|
36
37
|
type: narration.inputType,
|
|
37
38
|
currentValue: narration.inputValue as T | undefined,
|
|
38
39
|
}),
|
|
40
|
+
placeholderData: keepPreviousData,
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -86,6 +88,7 @@ export function useQueryDialogue() {
|
|
|
86
88
|
character: character,
|
|
87
89
|
};
|
|
88
90
|
},
|
|
91
|
+
placeholderData: keepPreviousData,
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
|
|
@@ -144,5 +147,6 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
|
|
|
144
147
|
);
|
|
145
148
|
});
|
|
146
149
|
},
|
|
150
|
+
placeholderData: keepPreviousData,
|
|
147
151
|
});
|
|
148
152
|
}
|
|
@@ -8,7 +8,7 @@ let assetsInitialized = false;
|
|
|
8
8
|
/**
|
|
9
9
|
* Define all the assets that will be used in the game.
|
|
10
10
|
* This function will be called before the game starts.
|
|
11
|
-
* You can read more about assets management in the documentation: https://pixi-vn.
|
|
11
|
+
* You can read more about assets management in the documentation: https://pixi-vn.com/start/assets-management.html
|
|
12
12
|
*/
|
|
13
13
|
export async function defineAssets() {
|
|
14
14
|
if (!assetsInitialized) {
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
"preLaunchTask": "Start Vite Dev Server",
|
|
11
11
|
"postDebugTask": "Stop Vite Dev Server"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Debug Game (Chrome)",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"type": "chrome",
|
|
17
|
+
"url": "http://localhost:5173",
|
|
18
|
+
"webRoot": "${workspaceFolder}",
|
|
19
|
+
"preLaunchTask": "Start Vite Dev Server",
|
|
20
|
+
"postDebugTask": "Stop Vite Dev Server"
|
|
21
|
+
},
|
|
13
22
|
{
|
|
14
23
|
"type": "lldb",
|
|
15
24
|
"request": "launch",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"@drincs/pixi-vn-ink": "^1.0.5",
|
|
15
15
|
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
16
16
|
"@tailwindcss/vite": "^4.3.0",
|
|
17
|
+
"@tanstack/hotkeys": "^0.8.0",
|
|
17
18
|
"@tanstack/react-devtools": "^0.10.5",
|
|
18
19
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
19
20
|
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@drincs/pixi-vn-ink": "^1.0.5",
|
|
29
29
|
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
30
30
|
"@tailwindcss/vite": "^4.3.0",
|
|
31
|
+
"@tanstack/hotkeys": "^0.8.0",
|
|
31
32
|
"@tanstack/react-devtools": "^0.10.5",
|
|
32
33
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
33
34
|
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Spinner } from "@/components/ui/spinner";
|
|
2
|
-
import { motion } from "motion/react";
|
|
3
2
|
|
|
4
3
|
export function PendingComponent() {
|
|
5
4
|
return (
|
|
@@ -12,49 +11,11 @@ export function PendingComponent() {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export function AnimatedDots() {
|
|
15
|
-
const dots = [
|
|
16
|
-
{ id: "dot-1", char: "." },
|
|
17
|
-
{ id: "dot-2", char: "." },
|
|
18
|
-
{ id: "dot-3", char: "." },
|
|
19
|
-
]; // I caratteri da animare
|
|
20
|
-
|
|
21
14
|
return (
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
initial="closed"
|
|
28
|
-
animate="open"
|
|
29
|
-
>
|
|
30
|
-
{dots.map((dot) => (
|
|
31
|
-
<motion.span
|
|
32
|
-
key={dot.id}
|
|
33
|
-
initial={{ y: 0 }}
|
|
34
|
-
variants={{
|
|
35
|
-
open: {
|
|
36
|
-
y: 5,
|
|
37
|
-
transition: {
|
|
38
|
-
repeat: Infinity,
|
|
39
|
-
duration: 0.5,
|
|
40
|
-
ease: "easeInOut",
|
|
41
|
-
repeatType: "reverse",
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
closed: {
|
|
45
|
-
y: 0,
|
|
46
|
-
transition: {
|
|
47
|
-
repeat: Infinity,
|
|
48
|
-
duration: 0.5,
|
|
49
|
-
ease: "easeInOut",
|
|
50
|
-
repeatType: "reverse",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}}
|
|
54
|
-
>
|
|
55
|
-
{dot.char}
|
|
56
|
-
</motion.span>
|
|
57
|
-
))}
|
|
58
|
-
</motion.span>
|
|
15
|
+
<span className="flex pointer-events-none select-none">
|
|
16
|
+
<span className="animate-bounce [animation-delay:0s]">.</span>
|
|
17
|
+
<span className="animate-bounce [animation-delay:0.2s]">.</span>
|
|
18
|
+
<span className="animate-bounce [animation-delay:0.4s]">.</span>
|
|
19
|
+
</span>
|
|
59
20
|
);
|
|
60
21
|
}
|
|
@@ -19,7 +19,7 @@ export function About() {
|
|
|
19
19
|
<span className="font-medium text-muted-foreground">
|
|
20
20
|
{t("powered_by")}{" "}
|
|
21
21
|
<a
|
|
22
|
-
href="https://pixi-vn.
|
|
22
|
+
href="https://pixi-vn.com"
|
|
23
23
|
target="_blank"
|
|
24
24
|
rel="noopener noreferrer"
|
|
25
25
|
className="underline hover:text-foreground"
|
|
@@ -27,7 +27,7 @@ export function QuickTools() {
|
|
|
27
27
|
const autoEnabled = useSelector(AutoSettings.store, (state) => state.enabled);
|
|
28
28
|
const queryClient = useQueryClient();
|
|
29
29
|
const { data: lastSave = null } = useQueryLastSave();
|
|
30
|
-
const { data: canGoBack =
|
|
30
|
+
const { data: canGoBack = false } = useQueryCanGoBack();
|
|
31
31
|
const nextStepLoading = useSelector(GameStatus.store, (state) => state.loading);
|
|
32
32
|
const { goBack } = useNarrationFunctions();
|
|
33
33
|
const { openAlertDialog } = useAlertDialog();
|
package/template-react-vite-muijoy-ink-tauri/src/components/screens/narration/narration-cards.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnimatedDots } from "@/components/loading";
|
|
2
2
|
import { QuickTools } from "@/components/quick-tools";
|
|
3
|
-
import { AspectRatio } from "@/components/ui/aspect-ratio";
|
|
4
3
|
import { Card, CardContent } from "@/components/ui/card";
|
|
5
4
|
import { Image } from "@/components/ui/image";
|
|
6
5
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
|
|
@@ -127,8 +126,8 @@ export function Text({ paragraphRef }: { paragraphRef: RefObject<HTMLDivElement
|
|
|
127
126
|
|
|
128
127
|
export function CharacterIcon({ alt, icon }: { icon: string; alt: string }) {
|
|
129
128
|
return (
|
|
130
|
-
<
|
|
129
|
+
<div className="h-full w-full">
|
|
131
130
|
<Image src={icon} layout="fullWidth" alt={alt} className="h-full w-full object-cover" />
|
|
132
|
-
</
|
|
131
|
+
</div>
|
|
133
132
|
);
|
|
134
133
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { INTERFACE_DATA_USE_QUERY_KEY } from "@/constants";
|
|
2
2
|
import { type CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
|
|
3
|
-
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { keepPreviousData, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
|
|
6
6
|
const CAN_GO_BACK_USE_QUERY_KEY = "can_go_back_use_query_key";
|
|
@@ -24,6 +24,7 @@ export function useQueryChoiceMenuOptions() {
|
|
|
24
24
|
? t(option.text)
|
|
25
25
|
: option.text.map((text) => t(text)).join(" "),
|
|
26
26
|
})) || [],
|
|
27
|
+
placeholderData: keepPreviousData,
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -36,6 +37,7 @@ export function useQueryInputValue<T>() {
|
|
|
36
37
|
type: narration.inputType,
|
|
37
38
|
currentValue: narration.inputValue as T | undefined,
|
|
38
39
|
}),
|
|
40
|
+
placeholderData: keepPreviousData,
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -86,6 +88,7 @@ export function useQueryDialogue() {
|
|
|
86
88
|
character: character,
|
|
87
89
|
};
|
|
88
90
|
},
|
|
91
|
+
placeholderData: keepPreviousData,
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
|
|
@@ -144,5 +147,6 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
|
|
|
144
147
|
);
|
|
145
148
|
});
|
|
146
149
|
},
|
|
150
|
+
placeholderData: keepPreviousData,
|
|
147
151
|
});
|
|
148
152
|
}
|
|
@@ -8,7 +8,7 @@ let assetsInitialized = false;
|
|
|
8
8
|
/**
|
|
9
9
|
* Define all the assets that will be used in the game.
|
|
10
10
|
* This function will be called before the game starts.
|
|
11
|
-
* You can read more about assets management in the documentation: https://pixi-vn.
|
|
11
|
+
* You can read more about assets management in the documentation: https://pixi-vn.com/start/assets-management.html
|
|
12
12
|
*/
|
|
13
13
|
export async function defineAssets() {
|
|
14
14
|
if (!assetsInitialized) {
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
"preLaunchTask": "Start Vite Dev Server",
|
|
11
11
|
"postDebugTask": "Stop Vite Dev Server"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Debug Game (Chrome)",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"type": "chrome",
|
|
17
|
+
"url": "http://localhost:5173",
|
|
18
|
+
"webRoot": "${workspaceFolder}",
|
|
19
|
+
"preLaunchTask": "Start Vite Dev Server",
|
|
20
|
+
"postDebugTask": "Stop Vite Dev Server"
|
|
21
|
+
},
|
|
13
22
|
{
|
|
14
23
|
"type": "lldb",
|
|
15
24
|
"request": "launch",
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
"license": "GPL-3.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@base-ui/react": "^1.5.0",
|
|
13
|
-
"@drincs/pixi-vn": "^1.8.
|
|
13
|
+
"@drincs/pixi-vn": "^1.8.13",
|
|
14
14
|
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
15
15
|
"@tailwindcss/vite": "^4.3.0",
|
|
16
|
+
"@tanstack/hotkeys": "^0.8.0",
|
|
16
17
|
"@tanstack/react-devtools": "^0.10.5",
|
|
17
18
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
18
19
|
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"i18next-chained-backend": "^5.0.4",
|
|
37
38
|
"i18next-resources-to-backend": "^1.2.1",
|
|
38
39
|
"lucide-react": "^1.17.0",
|
|
40
|
+
"motion": "^12.38.0",
|
|
39
41
|
"next-themes": "^0.4.6",
|
|
40
42
|
"react": "^19.2.6",
|
|
41
43
|
"react-color-palette": "^7.3.1",
|
|
@@ -2117,9 +2119,9 @@
|
|
|
2117
2119
|
}
|
|
2118
2120
|
},
|
|
2119
2121
|
"node_modules/@drincs/pixi-vn": {
|
|
2120
|
-
"version": "1.8.
|
|
2121
|
-
"resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-1.8.
|
|
2122
|
-
"integrity": "sha512-
|
|
2122
|
+
"version": "1.8.13",
|
|
2123
|
+
"resolved": "https://registry.npmjs.org/@drincs/pixi-vn/-/pixi-vn-1.8.13.tgz",
|
|
2124
|
+
"integrity": "sha512-UFo1cUYmy3FSgqKqjHkA5NpTXSwjk24WMZAkGe9tgoVLcexi1d+TmhJGSt1VloPjw/hHwYKaip2vyrmBACZ1fA==",
|
|
2123
2125
|
"license": "LGPL-2.1",
|
|
2124
2126
|
"workspaces": [
|
|
2125
2127
|
"sandbox"
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"@drincs/pixi-vn": "^1.8.13",
|
|
28
28
|
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
29
29
|
"@tailwindcss/vite": "^4.3.0",
|
|
30
|
+
"@tanstack/hotkeys": "^0.8.0",
|
|
30
31
|
"@tanstack/react-devtools": "^0.10.5",
|
|
31
32
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
32
33
|
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Spinner } from "@/components/ui/spinner";
|
|
2
|
-
import { motion } from "motion/react";
|
|
3
2
|
|
|
4
3
|
export function PendingComponent() {
|
|
5
4
|
return (
|
|
@@ -12,49 +11,11 @@ export function PendingComponent() {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export function AnimatedDots() {
|
|
15
|
-
const dots = [
|
|
16
|
-
{ id: "dot-1", char: "." },
|
|
17
|
-
{ id: "dot-2", char: "." },
|
|
18
|
-
{ id: "dot-3", char: "." },
|
|
19
|
-
]; // I caratteri da animare
|
|
20
|
-
|
|
21
14
|
return (
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
initial="closed"
|
|
28
|
-
animate="open"
|
|
29
|
-
>
|
|
30
|
-
{dots.map((dot) => (
|
|
31
|
-
<motion.span
|
|
32
|
-
key={dot.id}
|
|
33
|
-
initial={{ y: 0 }}
|
|
34
|
-
variants={{
|
|
35
|
-
open: {
|
|
36
|
-
y: 5,
|
|
37
|
-
transition: {
|
|
38
|
-
repeat: Infinity,
|
|
39
|
-
duration: 0.5,
|
|
40
|
-
ease: "easeInOut",
|
|
41
|
-
repeatType: "reverse",
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
closed: {
|
|
45
|
-
y: 0,
|
|
46
|
-
transition: {
|
|
47
|
-
repeat: Infinity,
|
|
48
|
-
duration: 0.5,
|
|
49
|
-
ease: "easeInOut",
|
|
50
|
-
repeatType: "reverse",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}}
|
|
54
|
-
>
|
|
55
|
-
{dot.char}
|
|
56
|
-
</motion.span>
|
|
57
|
-
))}
|
|
58
|
-
</motion.span>
|
|
15
|
+
<span className="flex pointer-events-none select-none">
|
|
16
|
+
<span className="animate-bounce [animation-delay:0s]">.</span>
|
|
17
|
+
<span className="animate-bounce [animation-delay:0.2s]">.</span>
|
|
18
|
+
<span className="animate-bounce [animation-delay:0.4s]">.</span>
|
|
19
|
+
</span>
|
|
59
20
|
);
|
|
60
21
|
}
|
|
@@ -19,7 +19,7 @@ export function About() {
|
|
|
19
19
|
<span className="font-medium text-muted-foreground">
|
|
20
20
|
{t("powered_by")}{" "}
|
|
21
21
|
<a
|
|
22
|
-
href="https://pixi-vn.
|
|
22
|
+
href="https://pixi-vn.com"
|
|
23
23
|
target="_blank"
|
|
24
24
|
rel="noopener noreferrer"
|
|
25
25
|
className="underline hover:text-foreground"
|
|
@@ -27,7 +27,7 @@ export function QuickTools() {
|
|
|
27
27
|
const autoEnabled = useSelector(AutoSettings.store, (state) => state.enabled);
|
|
28
28
|
const queryClient = useQueryClient();
|
|
29
29
|
const { data: lastSave = null } = useQueryLastSave();
|
|
30
|
-
const { data: canGoBack =
|
|
30
|
+
const { data: canGoBack = false } = useQueryCanGoBack();
|
|
31
31
|
const nextStepLoading = useSelector(GameStatus.store, (state) => state.loading);
|
|
32
32
|
const { goBack } = useNarrationFunctions();
|
|
33
33
|
const { openAlertDialog } = useAlertDialog();
|
package/template-react-vite-muijoy-tauri/src/components/screens/narration/narration-cards.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnimatedDots } from "@/components/loading";
|
|
2
2
|
import { QuickTools } from "@/components/quick-tools";
|
|
3
|
-
import { AspectRatio } from "@/components/ui/aspect-ratio";
|
|
4
3
|
import { Card, CardContent } from "@/components/ui/card";
|
|
5
4
|
import { Image } from "@/components/ui/image";
|
|
6
5
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
|
|
@@ -127,8 +126,8 @@ export function Text({ paragraphRef }: { paragraphRef: RefObject<HTMLDivElement
|
|
|
127
126
|
|
|
128
127
|
export function CharacterIcon({ alt, icon }: { icon: string; alt: string }) {
|
|
129
128
|
return (
|
|
130
|
-
<
|
|
129
|
+
<div className="h-full w-full">
|
|
131
130
|
<Image src={icon} layout="fullWidth" alt={alt} className="h-full w-full object-cover" />
|
|
132
|
-
</
|
|
131
|
+
</div>
|
|
133
132
|
);
|
|
134
133
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { INTERFACE_DATA_USE_QUERY_KEY } from "@/constants";
|
|
2
2
|
import { type CharacterInterface, narration, stepHistory } from "@drincs/pixi-vn";
|
|
3
|
-
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { keepPreviousData, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
|
|
6
6
|
const CAN_GO_BACK_USE_QUERY_KEY = "can_go_back_use_query_key";
|
|
@@ -24,6 +24,7 @@ export function useQueryChoiceMenuOptions() {
|
|
|
24
24
|
? t(option.text)
|
|
25
25
|
: option.text.map((text) => t(text)).join(" "),
|
|
26
26
|
})) || [],
|
|
27
|
+
placeholderData: keepPreviousData,
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -36,6 +37,7 @@ export function useQueryInputValue<T>() {
|
|
|
36
37
|
type: narration.inputType,
|
|
37
38
|
currentValue: narration.inputValue as T | undefined,
|
|
38
39
|
}),
|
|
40
|
+
placeholderData: keepPreviousData,
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -86,6 +88,7 @@ export function useQueryDialogue() {
|
|
|
86
88
|
character: character,
|
|
87
89
|
};
|
|
88
90
|
},
|
|
91
|
+
placeholderData: keepPreviousData,
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
|
|
@@ -144,5 +147,6 @@ export function useQueryNarrativeHistory({ searchString }: { searchString?: stri
|
|
|
144
147
|
);
|
|
145
148
|
});
|
|
146
149
|
},
|
|
150
|
+
placeholderData: keepPreviousData,
|
|
147
151
|
});
|
|
148
152
|
}
|
|
@@ -8,7 +8,7 @@ let assetsInitialized = false;
|
|
|
8
8
|
/**
|
|
9
9
|
* Define all the assets that will be used in the game.
|
|
10
10
|
* This function will be called before the game starts.
|
|
11
|
-
* You can read more about assets management in the documentation: https://pixi-vn.
|
|
11
|
+
* You can read more about assets management in the documentation: https://pixi-vn.com/start/assets-management.html
|
|
12
12
|
*/
|
|
13
13
|
export async function defineAssets() {
|
|
14
14
|
if (!assetsInitialized) {
|