create-pixi-vn 2.0.13 → 2.0.14

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 (157) hide show
  1. package/dist/index.mjs +36 -35
  2. package/package.json +1 -1
  3. package/template-react-vite-muijoy/components.json +1 -1
  4. package/template-react-vite-muijoy/package-lock.json +663 -967
  5. package/template-react-vite-muijoy/package.json +10 -11
  6. package/template-react-vite-muijoy/src/components/dev-devtools.tsx +25 -0
  7. package/template-react-vite-muijoy/src/components/menus/settings/menus/history.tsx +78 -62
  8. package/template-react-vite-muijoy/src/components/screens/narration/index.tsx +5 -2
  9. package/template-react-vite-muijoy/src/components/ui/alert-dialog.tsx +3 -2
  10. package/template-react-vite-muijoy/src/components/ui/avatar.tsx +2 -2
  11. package/template-react-vite-muijoy/src/components/ui/breadcrumb.tsx +5 -4
  12. package/template-react-vite-muijoy/src/components/ui/button-group.tsx +3 -2
  13. package/template-react-vite-muijoy/src/components/ui/button.tsx +2 -2
  14. package/template-react-vite-muijoy/src/components/ui/card.tsx +6 -10
  15. package/template-react-vite-muijoy/src/components/ui/carousel.tsx +10 -7
  16. package/template-react-vite-muijoy/src/components/ui/drawer.tsx +2 -0
  17. package/template-react-vite-muijoy/src/components/ui/field.tsx +8 -5
  18. package/template-react-vite-muijoy/src/components/ui/input-group.tsx +4 -3
  19. package/template-react-vite-muijoy/src/components/ui/input.tsx +1 -1
  20. package/template-react-vite-muijoy/src/components/ui/item.tsx +9 -8
  21. package/template-react-vite-muijoy/src/components/ui/label.tsx +1 -1
  22. package/template-react-vite-muijoy/src/components/ui/radio-group.tsx +4 -1
  23. package/template-react-vite-muijoy/src/components/ui/scroll-area.tsx +5 -2
  24. package/template-react-vite-muijoy/src/components/ui/select.tsx +3 -2
  25. package/template-react-vite-muijoy/src/components/ui/separator.tsx +2 -0
  26. package/template-react-vite-muijoy/src/components/ui/sonner.tsx +4 -4
  27. package/template-react-vite-muijoy/src/components/ui/spinner.tsx +2 -1
  28. package/template-react-vite-muijoy/src/components/ui/switch.tsx +3 -0
  29. package/template-react-vite-muijoy/src/components/ui/textarea.tsx +2 -1
  30. package/template-react-vite-muijoy/src/components/ui/tooltip.tsx +2 -0
  31. package/template-react-vite-muijoy/src/lib/hooks/hotkeys-hooks.ts +2 -0
  32. package/template-react-vite-muijoy/src/lib/hooks/narration-hooks.ts +24 -9
  33. package/template-react-vite-muijoy/src/lib/hooks/navigation-hooks.ts +29 -10
  34. package/template-react-vite-muijoy/src/main.tsx +0 -1
  35. package/{template-react-vite-muijoy-tauri/src/pixi-vn-keys.gen.d.ts → template-react-vite-muijoy/src/pixi-vn.keys.gen.ts} +4 -2
  36. package/template-react-vite-muijoy/src/routeTree.gen.ts +3 -21
  37. package/template-react-vite-muijoy/src/routes/__root.tsx +10 -20
  38. package/template-react-vite-muijoy/src/styles.css +43 -43
  39. package/template-react-vite-muijoy/vite.config.ts +1 -1
  40. package/template-react-vite-muijoy-ink/components.json +1 -1
  41. package/template-react-vite-muijoy-ink/package-lock.json +709 -1051
  42. package/template-react-vite-muijoy-ink/package.json +11 -12
  43. package/template-react-vite-muijoy-ink/src/components/dev-devtools.tsx +25 -0
  44. package/template-react-vite-muijoy-ink/src/components/menus/settings/menus/history.tsx +78 -62
  45. package/template-react-vite-muijoy-ink/src/components/screens/narration/index.tsx +5 -2
  46. package/template-react-vite-muijoy-ink/src/components/ui/alert-dialog.tsx +3 -2
  47. package/template-react-vite-muijoy-ink/src/components/ui/avatar.tsx +2 -2
  48. package/template-react-vite-muijoy-ink/src/components/ui/breadcrumb.tsx +5 -4
  49. package/template-react-vite-muijoy-ink/src/components/ui/button-group.tsx +3 -2
  50. package/template-react-vite-muijoy-ink/src/components/ui/button.tsx +2 -2
  51. package/template-react-vite-muijoy-ink/src/components/ui/card.tsx +6 -10
  52. package/template-react-vite-muijoy-ink/src/components/ui/carousel.tsx +10 -7
  53. package/template-react-vite-muijoy-ink/src/components/ui/drawer.tsx +2 -0
  54. package/template-react-vite-muijoy-ink/src/components/ui/field.tsx +8 -5
  55. package/template-react-vite-muijoy-ink/src/components/ui/input-group.tsx +4 -3
  56. package/template-react-vite-muijoy-ink/src/components/ui/input.tsx +1 -1
  57. package/template-react-vite-muijoy-ink/src/components/ui/item.tsx +9 -8
  58. package/template-react-vite-muijoy-ink/src/components/ui/label.tsx +1 -1
  59. package/template-react-vite-muijoy-ink/src/components/ui/radio-group.tsx +4 -1
  60. package/template-react-vite-muijoy-ink/src/components/ui/scroll-area.tsx +5 -2
  61. package/template-react-vite-muijoy-ink/src/components/ui/select.tsx +3 -2
  62. package/template-react-vite-muijoy-ink/src/components/ui/separator.tsx +2 -0
  63. package/template-react-vite-muijoy-ink/src/components/ui/sonner.tsx +4 -4
  64. package/template-react-vite-muijoy-ink/src/components/ui/spinner.tsx +2 -1
  65. package/template-react-vite-muijoy-ink/src/components/ui/switch.tsx +3 -0
  66. package/template-react-vite-muijoy-ink/src/components/ui/textarea.tsx +2 -1
  67. package/template-react-vite-muijoy-ink/src/components/ui/tooltip.tsx +2 -0
  68. package/template-react-vite-muijoy-ink/src/content/ink/hashtag-commands.ts +2 -1
  69. package/template-react-vite-muijoy-ink/src/lib/hooks/hotkeys-hooks.ts +2 -0
  70. package/template-react-vite-muijoy-ink/src/lib/hooks/narration-hooks.ts +24 -9
  71. package/template-react-vite-muijoy-ink/src/lib/hooks/navigation-hooks.ts +29 -10
  72. package/template-react-vite-muijoy-ink/src/main.tsx +0 -1
  73. package/template-react-vite-muijoy-ink/src/pixi-vn.keys.gen.ts +24 -0
  74. package/template-react-vite-muijoy-ink/src/routeTree.gen.ts +3 -21
  75. package/template-react-vite-muijoy-ink/src/routes/__root.tsx +10 -20
  76. package/template-react-vite-muijoy-ink/src/styles.css +43 -43
  77. package/template-react-vite-muijoy-ink/vite.config.ts +1 -1
  78. package/template-react-vite-muijoy-ink-tauri/components.json +1 -1
  79. package/template-react-vite-muijoy-ink-tauri/package-lock.json +709 -1051
  80. package/template-react-vite-muijoy-ink-tauri/package.json +11 -12
  81. package/template-react-vite-muijoy-ink-tauri/src/components/dev-devtools.tsx +25 -0
  82. package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/menus/history.tsx +78 -62
  83. package/template-react-vite-muijoy-ink-tauri/src/components/screens/narration/index.tsx +5 -2
  84. package/template-react-vite-muijoy-ink-tauri/src/components/ui/alert-dialog.tsx +3 -2
  85. package/template-react-vite-muijoy-ink-tauri/src/components/ui/avatar.tsx +2 -2
  86. package/template-react-vite-muijoy-ink-tauri/src/components/ui/breadcrumb.tsx +5 -4
  87. package/template-react-vite-muijoy-ink-tauri/src/components/ui/button-group.tsx +3 -2
  88. package/template-react-vite-muijoy-ink-tauri/src/components/ui/button.tsx +2 -2
  89. package/template-react-vite-muijoy-ink-tauri/src/components/ui/card.tsx +6 -10
  90. package/template-react-vite-muijoy-ink-tauri/src/components/ui/carousel.tsx +10 -7
  91. package/template-react-vite-muijoy-ink-tauri/src/components/ui/drawer.tsx +2 -0
  92. package/template-react-vite-muijoy-ink-tauri/src/components/ui/field.tsx +8 -5
  93. package/template-react-vite-muijoy-ink-tauri/src/components/ui/input-group.tsx +4 -3
  94. package/template-react-vite-muijoy-ink-tauri/src/components/ui/input.tsx +1 -1
  95. package/template-react-vite-muijoy-ink-tauri/src/components/ui/item.tsx +9 -8
  96. package/template-react-vite-muijoy-ink-tauri/src/components/ui/label.tsx +1 -1
  97. package/template-react-vite-muijoy-ink-tauri/src/components/ui/radio-group.tsx +4 -1
  98. package/template-react-vite-muijoy-ink-tauri/src/components/ui/scroll-area.tsx +5 -2
  99. package/template-react-vite-muijoy-ink-tauri/src/components/ui/select.tsx +3 -2
  100. package/template-react-vite-muijoy-ink-tauri/src/components/ui/separator.tsx +2 -0
  101. package/template-react-vite-muijoy-ink-tauri/src/components/ui/sonner.tsx +4 -4
  102. package/template-react-vite-muijoy-ink-tauri/src/components/ui/spinner.tsx +2 -1
  103. package/template-react-vite-muijoy-ink-tauri/src/components/ui/switch.tsx +3 -0
  104. package/template-react-vite-muijoy-ink-tauri/src/components/ui/textarea.tsx +2 -1
  105. package/template-react-vite-muijoy-ink-tauri/src/components/ui/tooltip.tsx +2 -0
  106. package/template-react-vite-muijoy-ink-tauri/src/content/ink/hashtag-commands.ts +2 -1
  107. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/hotkeys-hooks.ts +2 -0
  108. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/narration-hooks.ts +24 -9
  109. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/navigation-hooks.ts +29 -10
  110. package/template-react-vite-muijoy-ink-tauri/src/main.tsx +0 -1
  111. package/{template-react-vite-muijoy-ink/src/pixi-vn-keys.gen.d.ts → template-react-vite-muijoy-ink-tauri/src/pixi-vn.keys.gen.ts} +4 -2
  112. package/template-react-vite-muijoy-ink-tauri/src/routeTree.gen.ts +3 -21
  113. package/template-react-vite-muijoy-ink-tauri/src/routes/__root.tsx +10 -20
  114. package/template-react-vite-muijoy-ink-tauri/src/styles.css +43 -43
  115. package/template-react-vite-muijoy-ink-tauri/vite.config.ts +1 -1
  116. package/template-react-vite-muijoy-tauri/components.json +1 -1
  117. package/template-react-vite-muijoy-tauri/package-lock.json +663 -967
  118. package/template-react-vite-muijoy-tauri/package.json +10 -11
  119. package/template-react-vite-muijoy-tauri/src/components/dev-devtools.tsx +25 -0
  120. package/template-react-vite-muijoy-tauri/src/components/menus/settings/menus/history.tsx +78 -62
  121. package/template-react-vite-muijoy-tauri/src/components/screens/narration/index.tsx +5 -2
  122. package/template-react-vite-muijoy-tauri/src/components/ui/alert-dialog.tsx +3 -2
  123. package/template-react-vite-muijoy-tauri/src/components/ui/avatar.tsx +2 -2
  124. package/template-react-vite-muijoy-tauri/src/components/ui/breadcrumb.tsx +5 -4
  125. package/template-react-vite-muijoy-tauri/src/components/ui/button-group.tsx +3 -2
  126. package/template-react-vite-muijoy-tauri/src/components/ui/button.tsx +2 -2
  127. package/template-react-vite-muijoy-tauri/src/components/ui/card.tsx +6 -10
  128. package/template-react-vite-muijoy-tauri/src/components/ui/carousel.tsx +10 -7
  129. package/template-react-vite-muijoy-tauri/src/components/ui/drawer.tsx +2 -0
  130. package/template-react-vite-muijoy-tauri/src/components/ui/field.tsx +8 -5
  131. package/template-react-vite-muijoy-tauri/src/components/ui/input-group.tsx +4 -3
  132. package/template-react-vite-muijoy-tauri/src/components/ui/input.tsx +1 -1
  133. package/template-react-vite-muijoy-tauri/src/components/ui/item.tsx +9 -8
  134. package/template-react-vite-muijoy-tauri/src/components/ui/label.tsx +1 -1
  135. package/template-react-vite-muijoy-tauri/src/components/ui/radio-group.tsx +4 -1
  136. package/template-react-vite-muijoy-tauri/src/components/ui/scroll-area.tsx +5 -2
  137. package/template-react-vite-muijoy-tauri/src/components/ui/select.tsx +3 -2
  138. package/template-react-vite-muijoy-tauri/src/components/ui/separator.tsx +2 -0
  139. package/template-react-vite-muijoy-tauri/src/components/ui/sonner.tsx +4 -4
  140. package/template-react-vite-muijoy-tauri/src/components/ui/spinner.tsx +2 -1
  141. package/template-react-vite-muijoy-tauri/src/components/ui/switch.tsx +3 -0
  142. package/template-react-vite-muijoy-tauri/src/components/ui/textarea.tsx +2 -1
  143. package/template-react-vite-muijoy-tauri/src/components/ui/tooltip.tsx +2 -0
  144. package/template-react-vite-muijoy-tauri/src/lib/hooks/hotkeys-hooks.ts +2 -0
  145. package/template-react-vite-muijoy-tauri/src/lib/hooks/narration-hooks.ts +24 -9
  146. package/template-react-vite-muijoy-tauri/src/lib/hooks/navigation-hooks.ts +29 -10
  147. package/template-react-vite-muijoy-tauri/src/main.tsx +0 -1
  148. package/{template-react-vite-muijoy-ink-tauri/src/pixi-vn-keys.gen.d.ts → template-react-vite-muijoy-tauri/src/pixi-vn.keys.gen.ts} +4 -4
  149. package/template-react-vite-muijoy-tauri/src/routeTree.gen.ts +3 -21
  150. package/template-react-vite-muijoy-tauri/src/routes/__root.tsx +10 -20
  151. package/template-react-vite-muijoy-tauri/src/styles.css +43 -43
  152. package/template-react-vite-muijoy-tauri/vite.config.ts +1 -1
  153. package/template-react-vite-muijoy/src/pixi-vn-keys.gen.d.ts +0 -20
  154. package/template-react-vite-muijoy/src/routes/narration.tsx +0 -9
  155. package/template-react-vite-muijoy-ink/src/routes/narration.tsx +0 -9
  156. package/template-react-vite-muijoy-ink-tauri/src/routes/narration.tsx +0 -9
  157. package/template-react-vite-muijoy-tauri/src/routes/narration.tsx +0 -9
@@ -1,12 +1,12 @@
1
+ import { useTheme } from "next-themes";
2
+ import { Toaster as Sonner, type ToasterProps } from "sonner";
1
3
  import {
2
4
  CircleCheckIcon,
3
5
  InfoIcon,
4
- Loader2Icon,
5
- OctagonXIcon,
6
6
  TriangleAlertIcon,
7
+ OctagonXIcon,
8
+ Loader2Icon,
7
9
  } from "lucide-react";
8
- import { useTheme } from "next-themes";
9
- import { Toaster as Sonner, type ToasterProps } from "sonner";
10
10
 
11
11
  const Toaster = ({ ...props }: ToasterProps) => {
12
12
  const { theme = "system" } = useTheme();
@@ -1,9 +1,10 @@
1
- import { Loader2Icon } from "lucide-react";
2
1
  import { cn } from "@/lib/utils";
2
+ import { Loader2Icon } from "lucide-react";
3
3
 
4
4
  function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
5
5
  return (
6
6
  <Loader2Icon
7
+ data-slot="spinner"
7
8
  role="status"
8
9
  aria-label="Loading"
9
10
  className={cn("size-4 animate-spin", className)}
@@ -1,4 +1,7 @@
1
+ "use client";
2
+
1
3
  import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
4
+
2
5
  import { cn } from "@/lib/utils";
3
6
 
4
7
  function Switch({
@@ -1,4 +1,5 @@
1
- import type * as React from "react";
1
+ import * as React from "react";
2
+
2
3
  import { cn } from "@/lib/utils";
3
4
 
4
5
  function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
2
4
 
3
5
  import { cn } from "@/lib/utils";
@@ -1,4 +1,5 @@
1
1
  import { steam } from "@/lib/steam";
2
+ import { characterIdsEnum } from "@/pixi-vn.keys.gen";
2
3
  import { RegisteredCharacters } from "@drincs/pixi-vn";
3
4
  import { HashtagCommands } from "@drincs/pixi-vn-ink";
4
5
  import zod from "zod";
@@ -34,7 +35,7 @@ HashtagCommands.add(
34
35
  \`\`\`ink
35
36
  # rename <characterId> <newName>
36
37
  \`\`\``,
37
- validation: zod.tuple([zod.literal("rename"), zod.string(), zod.string()]),
38
+ validation: zod.tuple([zod.literal("rename"), zod.enum(characterIdsEnum), zod.string()]),
38
39
  },
39
40
  );
40
41
 
@@ -250,6 +250,7 @@ export function useNarrationHotkeys(): null {
250
250
  callback: onSkipKeyUp,
251
251
  options: {
252
252
  eventType: "keyup",
253
+ conflictBehavior: "allow",
253
254
  meta: {
254
255
  name: t("next"),
255
256
  description: t("skip_release_description"),
@@ -262,6 +263,7 @@ export function useNarrationHotkeys(): null {
262
263
  callback: onSkipKeyUp,
263
264
  options: {
264
265
  eventType: "keyup",
266
+ conflictBehavior: "allow",
265
267
  meta: {
266
268
  name: t("next"),
267
269
  description: t("skip_release_space_description"),
@@ -2,6 +2,7 @@ import { SKIP_DELAY } from "@/constants";
2
2
  import { useGameProps } from "@/lib/hooks/props-hooks";
3
3
  import { AutoSettings } from "@/lib/stores/auto-settings-store";
4
4
  import { GameStatus } from "@/lib/stores/game-status-store";
5
+ import { SearchParams } from "@/lib/stores/search-param-store";
5
6
  import { SkipSettings } from "@/lib/stores/skip-settings-store";
6
7
  import { TextDisplaySettings } from "@/lib/stores/text-display-settings-store";
7
8
  import { hasScrollableParent, isScrollableElement } from "@/lib/utils/scroll-utils";
@@ -9,12 +10,18 @@ import { narration, stepHistory, type StoredIndexedChoiceInterface } from "@drin
9
10
  import { useDebouncer } from "@tanstack/react-pacer";
10
11
  import { useSelector } from "@tanstack/react-store";
11
12
  import type React from "react";
12
- import { useCallback, useEffect, useRef } from "react";
13
+ import { useCallback, useEffect, useMemo, useRef } from "react";
13
14
 
14
15
  export function useNarrationFunctions() {
15
16
  const gameProps = useGameProps();
17
+ const searchParams = useSelector(SearchParams.store, (state) => state);
18
+ const hasOpenMenu = useMemo(
19
+ () => Object.values(searchParams).some((value) => value !== undefined),
20
+ [searchParams],
21
+ );
16
22
 
17
23
  const goNext = useCallback(async () => {
24
+ if (hasOpenMenu) return;
18
25
  GameStatus.setLoading(true);
19
26
  try {
20
27
  if (!narration.canContinue) {
@@ -36,9 +43,10 @@ export function useNarrationFunctions() {
36
43
  console.error(e);
37
44
  return;
38
45
  }
39
- }, [gameProps]);
46
+ }, [gameProps, hasOpenMenu]);
40
47
 
41
48
  const goBack = useCallback(async () => {
49
+ if (hasOpenMenu) return;
42
50
  GameStatus.setLoading(true);
43
51
  return stepHistory
44
52
  .back(gameProps)
@@ -50,10 +58,11 @@ export function useNarrationFunctions() {
50
58
  GameStatus.setLoading(false);
51
59
  console.error(e);
52
60
  });
53
- }, [gameProps]);
61
+ }, [gameProps, hasOpenMenu]);
54
62
 
55
63
  const selectChoice = useCallback(
56
64
  async (item: StoredIndexedChoiceInterface) => {
65
+ if (hasOpenMenu) return;
57
66
  GameStatus.setLoading(true);
58
67
  return narration
59
68
  .selectChoice(item, gameProps)
@@ -66,7 +75,7 @@ export function useNarrationFunctions() {
66
75
  console.error(e);
67
76
  });
68
77
  },
69
- [gameProps],
78
+ [gameProps, hasOpenMenu],
70
79
  );
71
80
 
72
81
  return {
@@ -196,6 +205,11 @@ export function useSkipAutoDetector() {
196
205
  TextDisplaySettings.store,
197
206
  (state) => state.inProgress,
198
207
  );
208
+ const searchParams = useSelector(SearchParams.store, (state) => state);
209
+ const hasOpenMenu = useMemo(
210
+ () => Object.values(searchParams).some((value) => value !== undefined),
211
+ [searchParams],
212
+ );
199
213
  const { goNext } = useNarrationFunctions();
200
214
 
201
215
  const savedGoNext = useRef(goNext);
@@ -203,11 +217,11 @@ export function useSkipAutoDetector() {
203
217
  savedGoNext.current = goNext;
204
218
  }, [goNext]);
205
219
  useEffect(() => {
206
- if (skipEnabled) {
220
+ if (skipEnabled && !hasOpenMenu) {
207
221
  const id = setInterval(() => savedGoNext.current(), SKIP_DELAY);
208
222
  return () => clearInterval(id);
209
223
  }
210
- }, [skipEnabled]);
224
+ }, [skipEnabled, hasOpenMenu]);
211
225
 
212
226
  const autoDebouncer = useDebouncer(
213
227
  (_trigger: {
@@ -215,20 +229,21 @@ export function useSkipAutoDetector() {
215
229
  skipEnabled: boolean;
216
230
  typewriterInProgress: boolean;
217
231
  autoTime: number;
232
+ hasOpenMenu: boolean;
218
233
  }) => {
219
234
  goNext();
220
235
  },
221
236
  {
222
237
  wait: autoTime * 1000,
223
- enabled: autoEnabled && !skipEnabled && !typewriterInProgress,
238
+ enabled: autoEnabled && !skipEnabled && !typewriterInProgress && !hasOpenMenu,
224
239
  },
225
240
  );
226
241
 
227
242
  const { maybeExecute } = autoDebouncer;
228
243
 
229
244
  useEffect(() => {
230
- maybeExecute({ autoEnabled, skipEnabled, typewriterInProgress, autoTime });
231
- }, [maybeExecute, autoEnabled, skipEnabled, typewriterInProgress, autoTime]);
245
+ maybeExecute({ autoEnabled, skipEnabled, typewriterInProgress, autoTime, hasOpenMenu });
246
+ }, [maybeExecute, autoEnabled, skipEnabled, typewriterInProgress, autoTime, hasOpenMenu]);
232
247
 
233
248
  return null;
234
249
  }
@@ -1,9 +1,35 @@
1
1
  import { SearchParams } from "@/lib/stores/search-param-store";
2
- import { useDebouncedCallback } from "@tanstack/react-pacer";
3
2
  import { useLocation, useNavigate } from "@tanstack/react-router";
4
3
  import { useSelector } from "@tanstack/react-store";
5
4
  import { useCallback, useEffect } from "react";
6
5
 
6
+ // Shared pending param changes — all synchronous setters accumulate here
7
+ // and a single navigate fires after a very short delay.
8
+ const _pendingParams: Record<string, unknown> = {};
9
+ let _pendingTimer: ReturnType<typeof setTimeout> | null = null;
10
+ let _pendingNavigate: ((...args: unknown[]) => unknown) | null = null;
11
+
12
+ function scheduleNavigate(navigate: (...args: unknown[]) => unknown, key: string, value: unknown) {
13
+ _pendingParams[key] = value;
14
+ _pendingNavigate = navigate;
15
+ if (_pendingTimer !== null) {
16
+ clearTimeout(_pendingTimer);
17
+ }
18
+ _pendingTimer = setTimeout(() => {
19
+ _pendingTimer = null;
20
+ if (_pendingNavigate) {
21
+ const snapshot = { ..._pendingParams };
22
+ for (const k of Object.keys(_pendingParams)) {
23
+ delete _pendingParams[k];
24
+ }
25
+ _pendingNavigate({
26
+ search: (prev: Record<string, unknown>) => ({ ...prev, ...snapshot }),
27
+ });
28
+ _pendingNavigate = null;
29
+ }
30
+ }, 10);
31
+ }
32
+
7
33
  /**
8
34
  * useConfirmBackNavigation
9
35
  *
@@ -69,13 +95,6 @@ export function useSetSearchParamState<T>(
69
95
  ): (value: T | undefined | ((previous: T | undefined) => T | undefined)) => void {
70
96
  const navigate = useNavigate();
71
97
 
72
- const debouncedNavigate = useDebouncedCallback(
73
- (key: string, value: unknown) => {
74
- navigate({ search: ((prev: any) => ({ ...prev, [key]: value })) as any });
75
- },
76
- { wait: 300 },
77
- );
78
-
79
98
  return useCallback(
80
99
  (value) => {
81
100
  const currentValue = SearchParams.store.state[field] as T | undefined;
@@ -86,8 +105,8 @@ export function useSetSearchParamState<T>(
86
105
  const normalizedValue = nextValue === false ? undefined : nextValue;
87
106
 
88
107
  SearchParams.set(field, normalizedValue);
89
- debouncedNavigate(field, normalizedValue);
108
+ scheduleNavigate(navigate as never, field, normalizedValue);
90
109
  },
91
- [field, debouncedNavigate],
110
+ [field, navigate],
92
111
  );
93
112
  }
@@ -10,7 +10,6 @@ import { ChannelSound } from "@/lib/stores/channel-sound-stores";
10
10
  import { MasterSound } from "@/lib/stores/master-sound-storage";
11
11
  import "@/styles.css";
12
12
  import { Assets, canvas, Container, drawCanvasErrorHandler, Game, sound } from "@drincs/pixi-vn";
13
- import "@drincs/pixi-vn-spine";
14
13
  import { createRoot } from "react-dom/client";
15
14
 
16
15
  // Canvas setup with PIXI
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  /* eslint-disable */
3
2
  // noinspection JSUnusedGlobalSymbols
4
3
  // This file is auto-generated by @drincs/pixi-vn vite plugin. Do not edit manually.
@@ -19,4 +18,7 @@ declare module "@drincs/pixi-vn/narration" {
19
18
  "start_|_c-1": never;
20
19
  }
21
20
  }
22
- export {};
21
+ export const characterIds = ["mc","james","steph","sly"] as const;
22
+ export const characterIdsEnum = {"mc":"mc","james":"james","steph":"steph","sly":"sly"} as const;
23
+ export const labelIds = ["animation_01","second_part","start","start_|_c-0","start_|_c-1"] as const;
24
+ export const labelIdsEnum = {"animation_01":"animation_01","second_part":"second_part","start":"start","start_|_c-0":"start_|_c-0","start_|_c-1":"start_|_c-1"} as const;
@@ -9,16 +9,10 @@
9
9
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10
10
 
11
11
  import { Route as rootRouteImport } from './routes/__root'
12
- import { Route as NarrationRouteImport } from './routes/narration'
13
12
  import { Route as GameRouteImport } from './routes/game'
14
13
  import { Route as IndexRouteImport } from './routes/index'
15
14
  import { Route as GameNarrationRouteImport } from './routes/game/narration'
16
15
 
17
- const NarrationRoute = NarrationRouteImport.update({
18
- id: '/narration',
19
- path: '/narration',
20
- getParentRoute: () => rootRouteImport,
21
- } as any)
22
16
  const GameRoute = GameRouteImport.update({
23
17
  id: '/game',
24
18
  path: '/game',
@@ -38,45 +32,34 @@ const GameNarrationRoute = GameNarrationRouteImport.update({
38
32
  export interface FileRoutesByFullPath {
39
33
  '/': typeof IndexRoute
40
34
  '/game': typeof GameRouteWithChildren
41
- '/narration': typeof NarrationRoute
42
35
  '/game/narration': typeof GameNarrationRoute
43
36
  }
44
37
  export interface FileRoutesByTo {
45
38
  '/': typeof IndexRoute
46
39
  '/game': typeof GameRouteWithChildren
47
- '/narration': typeof NarrationRoute
48
40
  '/game/narration': typeof GameNarrationRoute
49
41
  }
50
42
  export interface FileRoutesById {
51
43
  __root__: typeof rootRouteImport
52
44
  '/': typeof IndexRoute
53
45
  '/game': typeof GameRouteWithChildren
54
- '/narration': typeof NarrationRoute
55
46
  '/game/narration': typeof GameNarrationRoute
56
47
  }
57
48
  export interface FileRouteTypes {
58
49
  fileRoutesByFullPath: FileRoutesByFullPath
59
- fullPaths: '/' | '/game' | '/narration' | '/game/narration'
50
+ fullPaths: '/' | '/game' | '/game/narration'
60
51
  fileRoutesByTo: FileRoutesByTo
61
- to: '/' | '/game' | '/narration' | '/game/narration'
62
- id: '__root__' | '/' | '/game' | '/narration' | '/game/narration'
52
+ to: '/' | '/game' | '/game/narration'
53
+ id: '__root__' | '/' | '/game' | '/game/narration'
63
54
  fileRoutesById: FileRoutesById
64
55
  }
65
56
  export interface RootRouteChildren {
66
57
  IndexRoute: typeof IndexRoute
67
58
  GameRoute: typeof GameRouteWithChildren
68
- NarrationRoute: typeof NarrationRoute
69
59
  }
70
60
 
71
61
  declare module '@tanstack/react-router' {
72
62
  interface FileRoutesByPath {
73
- '/narration': {
74
- id: '/narration'
75
- path: '/narration'
76
- fullPath: '/narration'
77
- preLoaderRoute: typeof NarrationRouteImport
78
- parentRoute: typeof rootRouteImport
79
- }
80
63
  '/game': {
81
64
  id: '/game'
82
65
  path: '/game'
@@ -114,7 +97,6 @@ const GameRouteWithChildren = GameRoute._addFileChildren(GameRouteChildren)
114
97
  const rootRouteChildren: RootRouteChildren = {
115
98
  IndexRoute: IndexRoute,
116
99
  GameRoute: GameRouteWithChildren,
117
- NarrationRoute: NarrationRoute,
118
100
  }
119
101
  export const routeTree = rootRouteImport
120
102
  ._addFileChildren(rootRouteChildren)
@@ -14,11 +14,12 @@ import { loadRefreshSave } from "@/lib/utils/save-utility";
14
14
  import type { RouterContext } from "@/router";
15
15
  import { setupInkHmrListener } from "@drincs/pixi-vn-ink/vite-listener";
16
16
  import { setupPixivnViteData } from "@drincs/pixi-vn/vite-listener";
17
- import { TanStackDevtools } from "@tanstack/react-devtools";
18
- import { hotkeysDevtoolsPlugin } from "@tanstack/react-hotkeys-devtools";
19
- import { ReactQueryDevtoolsPanel } from "@tanstack/react-query-devtools";
20
17
  import { createRootRouteWithContext, ErrorComponent, Outlet } from "@tanstack/react-router";
21
- import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools";
18
+ import { lazy, Suspense } from "react";
19
+
20
+ const DevDevtools = import.meta.env.DEV
21
+ ? lazy(() => import("@/components/dev-devtools"))
22
+ : null;
22
23
 
23
24
  export const Route = createRootRouteWithContext<RouterContext>()({
24
25
  validateSearch: (search) => SearchParams.setMany(search),
@@ -58,22 +59,11 @@ function RootComponent() {
58
59
  <Outlet />
59
60
  </RootProvider>
60
61
 
61
- <TanStackDevtools
62
- config={{
63
- position: "bottom-right",
64
- }}
65
- plugins={[
66
- {
67
- name: "UI screens",
68
- render: <TanStackRouterDevtoolsPanel />,
69
- },
70
- { ...hotkeysDevtoolsPlugin(), name: "Hotkeys" },
71
- {
72
- name: "UI cache",
73
- render: <ReactQueryDevtoolsPanel />,
74
- },
75
- ]}
76
- />
62
+ {DevDevtools && (
63
+ <Suspense>
64
+ <DevDevtools />
65
+ </Suspense>
66
+ )}
77
67
  </>
78
68
  );
79
69
  }
@@ -8,37 +8,37 @@
8
8
 
9
9
  :root {
10
10
  --background: oklch(1 0 0);
11
- --foreground: oklch(0.141 0.005 285.823);
11
+ --foreground: oklch(0.145 0 0);
12
12
  --card: oklch(1 0 0);
13
- --card-foreground: oklch(0.141 0.005 285.823);
13
+ --card-foreground: oklch(0.145 0 0);
14
14
  --popover: oklch(1 0 0);
15
- --popover-foreground: oklch(0.141 0.005 285.823);
16
- --primary: oklch(0.21 0.006 285.885);
15
+ --popover-foreground: oklch(0.145 0 0);
16
+ --primary: oklch(0.205 0 0);
17
17
  --primary-foreground: oklch(0.985 0 0);
18
- --secondary: oklch(0.967 0.001 286.375);
19
- --secondary-foreground: oklch(0.21 0.006 285.885);
20
- --muted: oklch(0.967 0.001 286.375);
21
- --muted-foreground: oklch(0.552 0.016 285.938);
22
- --accent: oklch(0.967 0.001 286.375);
23
- --accent-foreground: oklch(0.21 0.006 285.885);
18
+ --secondary: oklch(0.97 0 0);
19
+ --secondary-foreground: oklch(0.205 0 0);
20
+ --muted: oklch(0.97 0 0);
21
+ --muted-foreground: oklch(0.556 0 0);
22
+ --accent: oklch(0.97 0 0);
23
+ --accent-foreground: oklch(0.205 0 0);
24
24
  --destructive: oklch(0.577 0.245 27.325);
25
- --border: oklch(0.92 0.004 286.32);
26
- --input: oklch(0.92 0.004 286.32);
27
- --ring: oklch(0.705 0.015 286.067);
28
- --chart-1: oklch(0.871 0.006 286.286);
29
- --chart-2: oklch(0.552 0.016 285.938);
30
- --chart-3: oklch(0.442 0.017 285.786);
31
- --chart-4: oklch(0.37 0.013 285.805);
32
- --chart-5: oklch(0.274 0.006 286.033);
25
+ --border: oklch(0.922 0 0);
26
+ --input: oklch(0.922 0 0);
27
+ --ring: oklch(0.708 0 0);
28
+ --chart-1: oklch(0.87 0 0);
29
+ --chart-2: oklch(0.556 0 0);
30
+ --chart-3: oklch(0.439 0 0);
31
+ --chart-4: oklch(0.371 0 0);
32
+ --chart-5: oklch(0.269 0 0);
33
33
  --radius: 0.625rem;
34
34
  --sidebar: oklch(0.985 0 0);
35
- --sidebar-foreground: oklch(0.141 0.005 285.823);
36
- --sidebar-primary: oklch(0.21 0.006 285.885);
35
+ --sidebar-foreground: oklch(0.145 0 0);
36
+ --sidebar-primary: oklch(0.205 0 0);
37
37
  --sidebar-primary-foreground: oklch(0.985 0 0);
38
- --sidebar-accent: oklch(0.967 0.001 286.375);
39
- --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
40
- --sidebar-border: oklch(0.92 0.004 286.32);
41
- --sidebar-ring: oklch(0.705 0.015 286.067);
38
+ --sidebar-accent: oklch(0.97 0 0);
39
+ --sidebar-accent-foreground: oklch(0.205 0 0);
40
+ --sidebar-border: oklch(0.922 0 0);
41
+ --sidebar-ring: oklch(0.708 0 0);
42
42
  }
43
43
 
44
44
  html,
@@ -56,7 +56,7 @@ body {
56
56
 
57
57
  @theme inline {
58
58
  --font-heading: var(--font-sans);
59
- --font-sans: "Inter Variable", sans-serif;
59
+ --font-sans: "Geist Variable", sans-serif;
60
60
  --color-sidebar-ring: var(--sidebar-ring);
61
61
  --color-sidebar-border: var(--sidebar-border);
62
62
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
@@ -98,37 +98,37 @@ body {
98
98
  }
99
99
 
100
100
  .dark {
101
- --background: oklch(0.141 0.005 285.823);
101
+ --background: oklch(0.145 0 0);
102
102
  --foreground: oklch(0.985 0 0);
103
- --card: oklch(0.21 0.006 285.885);
103
+ --card: oklch(0.205 0 0);
104
104
  --card-foreground: oklch(0.985 0 0);
105
- --popover: oklch(0.21 0.006 285.885);
105
+ --popover: oklch(0.205 0 0);
106
106
  --popover-foreground: oklch(0.985 0 0);
107
- --primary: oklch(0.92 0.004 286.32);
108
- --primary-foreground: oklch(0.21 0.006 285.885);
109
- --secondary: oklch(0.274 0.006 286.033);
107
+ --primary: oklch(0.922 0 0);
108
+ --primary-foreground: oklch(0.205 0 0);
109
+ --secondary: oklch(0.269 0 0);
110
110
  --secondary-foreground: oklch(0.985 0 0);
111
- --muted: oklch(0.274 0.006 286.033);
112
- --muted-foreground: oklch(0.705 0.015 286.067);
113
- --accent: oklch(0.274 0.006 286.033);
111
+ --muted: oklch(0.269 0 0);
112
+ --muted-foreground: oklch(0.708 0 0);
113
+ --accent: oklch(0.269 0 0);
114
114
  --accent-foreground: oklch(0.985 0 0);
115
115
  --destructive: oklch(0.704 0.191 22.216);
116
116
  --border: oklch(1 0 0 / 10%);
117
117
  --input: oklch(1 0 0 / 15%);
118
- --ring: oklch(0.552 0.016 285.938);
119
- --chart-1: oklch(0.871 0.006 286.286);
120
- --chart-2: oklch(0.552 0.016 285.938);
121
- --chart-3: oklch(0.442 0.017 285.786);
122
- --chart-4: oklch(0.37 0.013 285.805);
123
- --chart-5: oklch(0.274 0.006 286.033);
124
- --sidebar: oklch(0.21 0.006 285.885);
118
+ --ring: oklch(0.556 0 0);
119
+ --chart-1: oklch(0.87 0 0);
120
+ --chart-2: oklch(0.556 0 0);
121
+ --chart-3: oklch(0.439 0 0);
122
+ --chart-4: oklch(0.371 0 0);
123
+ --chart-5: oklch(0.269 0 0);
124
+ --sidebar: oklch(0.205 0 0);
125
125
  --sidebar-foreground: oklch(0.985 0 0);
126
126
  --sidebar-primary: oklch(0.488 0.243 264.376);
127
127
  --sidebar-primary-foreground: oklch(0.985 0 0);
128
- --sidebar-accent: oklch(0.274 0.006 286.033);
128
+ --sidebar-accent: oklch(0.269 0 0);
129
129
  --sidebar-accent-foreground: oklch(0.985 0 0);
130
130
  --sidebar-border: oklch(1 0 0 / 10%);
131
- --sidebar-ring: oklch(0.552 0.016 285.938);
131
+ --sidebar-ring: oklch(0.556 0 0);
132
132
  }
133
133
 
134
134
  @layer base {
@@ -38,7 +38,7 @@ export default defineConfig(({ mode }) => ({
38
38
  content: "./src/content/index.ts",
39
39
  characters: "./src/content/characters.ts",
40
40
  labels: "./src/content/labels/*.label.ts",
41
- typeFilePath: "./src/pixi-vn-keys.gen.d.ts",
41
+ typeFilePath: "./src/pixi-vn.keys.gen.ts",
42
42
  }),
43
43
  vitePluginInk({
44
44
  inkGlob: "./ink/**/*.ink",
@@ -6,7 +6,7 @@
6
6
  "tailwind": {
7
7
  "config": "",
8
8
  "css": "src/styles.css",
9
- "baseColor": "zinc",
9
+ "baseColor": "neutral",
10
10
  "cssVariables": true,
11
11
  "prefix": ""
12
12
  },