create-pixi-vn 2.0.13 → 2.0.15

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 (205) 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 +760 -1060
  5. package/template-react-vite-muijoy/package.json +11 -12
  6. package/template-react-vite-muijoy/src/components/dev-devtools.tsx +25 -0
  7. package/template-react-vite-muijoy/src/components/loading.tsx +11 -1
  8. package/template-react-vite-muijoy/src/components/menus/choice-menus.tsx +4 -0
  9. package/template-react-vite-muijoy/src/components/menus/main-menu.tsx +1 -6
  10. package/template-react-vite-muijoy/src/components/menus/settings/index.tsx +3 -1
  11. package/template-react-vite-muijoy/src/components/menus/settings/menus/history.tsx +78 -62
  12. package/template-react-vite-muijoy/src/components/modals/input-request-dialogues.tsx +1 -1
  13. package/template-react-vite-muijoy/src/components/modals/quick-actions-wheel.tsx +3 -1
  14. package/template-react-vite-muijoy/src/components/providers/alert-dialog-provider.tsx +3 -0
  15. package/template-react-vite-muijoy/src/components/screens/narration/index.tsx +5 -2
  16. package/template-react-vite-muijoy/src/components/screens/narration/narration-cards.tsx +40 -19
  17. package/template-react-vite-muijoy/src/components/ui/alert-dialog.tsx +3 -2
  18. package/template-react-vite-muijoy/src/components/ui/avatar.tsx +2 -2
  19. package/template-react-vite-muijoy/src/components/ui/breadcrumb.tsx +5 -4
  20. package/template-react-vite-muijoy/src/components/ui/button-group.tsx +3 -2
  21. package/template-react-vite-muijoy/src/components/ui/button.tsx +2 -2
  22. package/template-react-vite-muijoy/src/components/ui/card.tsx +6 -10
  23. package/template-react-vite-muijoy/src/components/ui/carousel.tsx +10 -7
  24. package/template-react-vite-muijoy/src/components/ui/drawer.tsx +2 -0
  25. package/template-react-vite-muijoy/src/components/ui/field.tsx +8 -5
  26. package/template-react-vite-muijoy/src/components/ui/input-group.tsx +4 -3
  27. package/template-react-vite-muijoy/src/components/ui/input.tsx +1 -1
  28. package/template-react-vite-muijoy/src/components/ui/item.tsx +9 -8
  29. package/template-react-vite-muijoy/src/components/ui/label.tsx +1 -1
  30. package/template-react-vite-muijoy/src/components/ui/radio-group.tsx +4 -1
  31. package/template-react-vite-muijoy/src/components/ui/scroll-area.tsx +5 -2
  32. package/template-react-vite-muijoy/src/components/ui/select.tsx +3 -2
  33. package/template-react-vite-muijoy/src/components/ui/separator.tsx +2 -0
  34. package/template-react-vite-muijoy/src/components/ui/sonner.tsx +4 -4
  35. package/template-react-vite-muijoy/src/components/ui/spinner.tsx +2 -1
  36. package/template-react-vite-muijoy/src/components/ui/switch.tsx +3 -0
  37. package/template-react-vite-muijoy/src/components/ui/textarea.tsx +2 -1
  38. package/template-react-vite-muijoy/src/components/ui/tooltip.tsx +2 -0
  39. package/template-react-vite-muijoy/src/lib/hooks/hotkeys-hooks.ts +113 -10
  40. package/template-react-vite-muijoy/src/lib/hooks/narration-hooks.ts +31 -10
  41. package/template-react-vite-muijoy/src/lib/hooks/navigation-hooks.ts +29 -10
  42. package/template-react-vite-muijoy/src/lib/query/narration-query.ts +32 -2
  43. package/template-react-vite-muijoy/src/lib/stores/alert-dialog-store.ts +13 -0
  44. package/template-react-vite-muijoy/src/lib/stores/text-display-settings-store.ts +20 -1
  45. package/template-react-vite-muijoy/src/locales/en.json +2 -0
  46. package/template-react-vite-muijoy/src/main.tsx +0 -1
  47. 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
  48. package/template-react-vite-muijoy/src/routeTree.gen.ts +3 -21
  49. package/template-react-vite-muijoy/src/routes/__root.tsx +10 -21
  50. package/template-react-vite-muijoy/src/styles.css +43 -43
  51. package/template-react-vite-muijoy/vite.config.ts +1 -1
  52. package/template-react-vite-muijoy-ink/components.json +1 -1
  53. package/template-react-vite-muijoy-ink/package-lock.json +721 -1059
  54. package/template-react-vite-muijoy-ink/package.json +12 -13
  55. package/template-react-vite-muijoy-ink/src/components/dev-devtools.tsx +25 -0
  56. package/template-react-vite-muijoy-ink/src/components/loading.tsx +11 -1
  57. package/template-react-vite-muijoy-ink/src/components/menus/choice-menus.tsx +4 -0
  58. package/template-react-vite-muijoy-ink/src/components/menus/main-menu.tsx +1 -6
  59. package/template-react-vite-muijoy-ink/src/components/menus/settings/index.tsx +3 -1
  60. package/template-react-vite-muijoy-ink/src/components/menus/settings/menus/history.tsx +78 -62
  61. package/template-react-vite-muijoy-ink/src/components/modals/input-request-dialogues.tsx +1 -1
  62. package/template-react-vite-muijoy-ink/src/components/modals/quick-actions-wheel.tsx +3 -1
  63. package/template-react-vite-muijoy-ink/src/components/providers/alert-dialog-provider.tsx +3 -0
  64. package/template-react-vite-muijoy-ink/src/components/screens/narration/index.tsx +5 -2
  65. package/template-react-vite-muijoy-ink/src/components/screens/narration/narration-cards.tsx +40 -19
  66. package/template-react-vite-muijoy-ink/src/components/ui/alert-dialog.tsx +3 -2
  67. package/template-react-vite-muijoy-ink/src/components/ui/avatar.tsx +2 -2
  68. package/template-react-vite-muijoy-ink/src/components/ui/breadcrumb.tsx +5 -4
  69. package/template-react-vite-muijoy-ink/src/components/ui/button-group.tsx +3 -2
  70. package/template-react-vite-muijoy-ink/src/components/ui/button.tsx +2 -2
  71. package/template-react-vite-muijoy-ink/src/components/ui/card.tsx +6 -10
  72. package/template-react-vite-muijoy-ink/src/components/ui/carousel.tsx +10 -7
  73. package/template-react-vite-muijoy-ink/src/components/ui/drawer.tsx +2 -0
  74. package/template-react-vite-muijoy-ink/src/components/ui/field.tsx +8 -5
  75. package/template-react-vite-muijoy-ink/src/components/ui/input-group.tsx +4 -3
  76. package/template-react-vite-muijoy-ink/src/components/ui/input.tsx +1 -1
  77. package/template-react-vite-muijoy-ink/src/components/ui/item.tsx +9 -8
  78. package/template-react-vite-muijoy-ink/src/components/ui/label.tsx +1 -1
  79. package/template-react-vite-muijoy-ink/src/components/ui/radio-group.tsx +4 -1
  80. package/template-react-vite-muijoy-ink/src/components/ui/scroll-area.tsx +5 -2
  81. package/template-react-vite-muijoy-ink/src/components/ui/select.tsx +3 -2
  82. package/template-react-vite-muijoy-ink/src/components/ui/separator.tsx +2 -0
  83. package/template-react-vite-muijoy-ink/src/components/ui/sonner.tsx +4 -4
  84. package/template-react-vite-muijoy-ink/src/components/ui/spinner.tsx +2 -1
  85. package/template-react-vite-muijoy-ink/src/components/ui/switch.tsx +3 -0
  86. package/template-react-vite-muijoy-ink/src/components/ui/textarea.tsx +2 -1
  87. package/template-react-vite-muijoy-ink/src/components/ui/tooltip.tsx +2 -0
  88. package/template-react-vite-muijoy-ink/src/content/ink/hashtag-commands.ts +2 -1
  89. package/template-react-vite-muijoy-ink/src/lib/hooks/hotkeys-hooks.ts +113 -10
  90. package/template-react-vite-muijoy-ink/src/lib/hooks/narration-hooks.ts +31 -10
  91. package/template-react-vite-muijoy-ink/src/lib/hooks/navigation-hooks.ts +29 -10
  92. package/template-react-vite-muijoy-ink/src/lib/query/narration-query.ts +32 -2
  93. package/template-react-vite-muijoy-ink/src/lib/stores/alert-dialog-store.ts +13 -0
  94. package/template-react-vite-muijoy-ink/src/lib/stores/text-display-settings-store.ts +20 -1
  95. package/template-react-vite-muijoy-ink/src/locales/en.json +2 -0
  96. package/template-react-vite-muijoy-ink/src/main.tsx +0 -1
  97. package/template-react-vite-muijoy-ink/src/pixi-vn.keys.gen.ts +24 -0
  98. package/template-react-vite-muijoy-ink/src/routeTree.gen.ts +3 -21
  99. package/template-react-vite-muijoy-ink/src/routes/__root.tsx +10 -21
  100. package/template-react-vite-muijoy-ink/src/styles.css +43 -43
  101. package/template-react-vite-muijoy-ink/vite.config.ts +1 -1
  102. package/template-react-vite-muijoy-ink-tauri/components.json +1 -1
  103. package/template-react-vite-muijoy-ink-tauri/package-lock.json +721 -1059
  104. package/template-react-vite-muijoy-ink-tauri/package.json +12 -13
  105. package/template-react-vite-muijoy-ink-tauri/src/components/dev-devtools.tsx +25 -0
  106. package/template-react-vite-muijoy-ink-tauri/src/components/loading.tsx +11 -1
  107. package/template-react-vite-muijoy-ink-tauri/src/components/menus/choice-menus.tsx +4 -0
  108. package/template-react-vite-muijoy-ink-tauri/src/components/menus/main-menu.tsx +1 -6
  109. package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/index.tsx +3 -1
  110. package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/menus/history.tsx +78 -62
  111. package/template-react-vite-muijoy-ink-tauri/src/components/modals/input-request-dialogues.tsx +1 -1
  112. package/template-react-vite-muijoy-ink-tauri/src/components/modals/quick-actions-wheel.tsx +3 -1
  113. package/template-react-vite-muijoy-ink-tauri/src/components/providers/alert-dialog-provider.tsx +3 -0
  114. package/template-react-vite-muijoy-ink-tauri/src/components/screens/narration/index.tsx +5 -2
  115. package/template-react-vite-muijoy-ink-tauri/src/components/screens/narration/narration-cards.tsx +40 -19
  116. package/template-react-vite-muijoy-ink-tauri/src/components/ui/alert-dialog.tsx +3 -2
  117. package/template-react-vite-muijoy-ink-tauri/src/components/ui/avatar.tsx +2 -2
  118. package/template-react-vite-muijoy-ink-tauri/src/components/ui/breadcrumb.tsx +5 -4
  119. package/template-react-vite-muijoy-ink-tauri/src/components/ui/button-group.tsx +3 -2
  120. package/template-react-vite-muijoy-ink-tauri/src/components/ui/button.tsx +2 -2
  121. package/template-react-vite-muijoy-ink-tauri/src/components/ui/card.tsx +6 -10
  122. package/template-react-vite-muijoy-ink-tauri/src/components/ui/carousel.tsx +10 -7
  123. package/template-react-vite-muijoy-ink-tauri/src/components/ui/drawer.tsx +2 -0
  124. package/template-react-vite-muijoy-ink-tauri/src/components/ui/field.tsx +8 -5
  125. package/template-react-vite-muijoy-ink-tauri/src/components/ui/input-group.tsx +4 -3
  126. package/template-react-vite-muijoy-ink-tauri/src/components/ui/input.tsx +1 -1
  127. package/template-react-vite-muijoy-ink-tauri/src/components/ui/item.tsx +9 -8
  128. package/template-react-vite-muijoy-ink-tauri/src/components/ui/label.tsx +1 -1
  129. package/template-react-vite-muijoy-ink-tauri/src/components/ui/radio-group.tsx +4 -1
  130. package/template-react-vite-muijoy-ink-tauri/src/components/ui/scroll-area.tsx +5 -2
  131. package/template-react-vite-muijoy-ink-tauri/src/components/ui/select.tsx +3 -2
  132. package/template-react-vite-muijoy-ink-tauri/src/components/ui/separator.tsx +2 -0
  133. package/template-react-vite-muijoy-ink-tauri/src/components/ui/sonner.tsx +4 -4
  134. package/template-react-vite-muijoy-ink-tauri/src/components/ui/spinner.tsx +2 -1
  135. package/template-react-vite-muijoy-ink-tauri/src/components/ui/switch.tsx +3 -0
  136. package/template-react-vite-muijoy-ink-tauri/src/components/ui/textarea.tsx +2 -1
  137. package/template-react-vite-muijoy-ink-tauri/src/components/ui/tooltip.tsx +2 -0
  138. package/template-react-vite-muijoy-ink-tauri/src/content/ink/hashtag-commands.ts +2 -1
  139. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/hotkeys-hooks.ts +113 -10
  140. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/narration-hooks.ts +31 -10
  141. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/navigation-hooks.ts +29 -10
  142. package/template-react-vite-muijoy-ink-tauri/src/lib/query/narration-query.ts +32 -2
  143. package/template-react-vite-muijoy-ink-tauri/src/lib/stores/alert-dialog-store.ts +13 -0
  144. package/template-react-vite-muijoy-ink-tauri/src/lib/stores/text-display-settings-store.ts +20 -1
  145. package/template-react-vite-muijoy-ink-tauri/src/locales/en.json +2 -0
  146. package/template-react-vite-muijoy-ink-tauri/src/main.tsx +0 -1
  147. 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
  148. package/template-react-vite-muijoy-ink-tauri/src/routeTree.gen.ts +3 -21
  149. package/template-react-vite-muijoy-ink-tauri/src/routes/__root.tsx +10 -21
  150. package/template-react-vite-muijoy-ink-tauri/src/styles.css +43 -43
  151. package/template-react-vite-muijoy-ink-tauri/vite.config.ts +1 -1
  152. package/template-react-vite-muijoy-tauri/components.json +1 -1
  153. package/template-react-vite-muijoy-tauri/package-lock.json +760 -1060
  154. package/template-react-vite-muijoy-tauri/package.json +11 -12
  155. package/template-react-vite-muijoy-tauri/src/components/dev-devtools.tsx +25 -0
  156. package/template-react-vite-muijoy-tauri/src/components/loading.tsx +11 -1
  157. package/template-react-vite-muijoy-tauri/src/components/menus/choice-menus.tsx +4 -0
  158. package/template-react-vite-muijoy-tauri/src/components/menus/main-menu.tsx +1 -6
  159. package/template-react-vite-muijoy-tauri/src/components/menus/settings/index.tsx +3 -1
  160. package/template-react-vite-muijoy-tauri/src/components/menus/settings/menus/history.tsx +78 -62
  161. package/template-react-vite-muijoy-tauri/src/components/modals/input-request-dialogues.tsx +1 -1
  162. package/template-react-vite-muijoy-tauri/src/components/modals/quick-actions-wheel.tsx +3 -1
  163. package/template-react-vite-muijoy-tauri/src/components/providers/alert-dialog-provider.tsx +3 -0
  164. package/template-react-vite-muijoy-tauri/src/components/screens/narration/index.tsx +5 -2
  165. package/template-react-vite-muijoy-tauri/src/components/screens/narration/narration-cards.tsx +40 -19
  166. package/template-react-vite-muijoy-tauri/src/components/ui/alert-dialog.tsx +3 -2
  167. package/template-react-vite-muijoy-tauri/src/components/ui/avatar.tsx +2 -2
  168. package/template-react-vite-muijoy-tauri/src/components/ui/breadcrumb.tsx +5 -4
  169. package/template-react-vite-muijoy-tauri/src/components/ui/button-group.tsx +3 -2
  170. package/template-react-vite-muijoy-tauri/src/components/ui/button.tsx +2 -2
  171. package/template-react-vite-muijoy-tauri/src/components/ui/card.tsx +6 -10
  172. package/template-react-vite-muijoy-tauri/src/components/ui/carousel.tsx +10 -7
  173. package/template-react-vite-muijoy-tauri/src/components/ui/drawer.tsx +2 -0
  174. package/template-react-vite-muijoy-tauri/src/components/ui/field.tsx +8 -5
  175. package/template-react-vite-muijoy-tauri/src/components/ui/input-group.tsx +4 -3
  176. package/template-react-vite-muijoy-tauri/src/components/ui/input.tsx +1 -1
  177. package/template-react-vite-muijoy-tauri/src/components/ui/item.tsx +9 -8
  178. package/template-react-vite-muijoy-tauri/src/components/ui/label.tsx +1 -1
  179. package/template-react-vite-muijoy-tauri/src/components/ui/radio-group.tsx +4 -1
  180. package/template-react-vite-muijoy-tauri/src/components/ui/scroll-area.tsx +5 -2
  181. package/template-react-vite-muijoy-tauri/src/components/ui/select.tsx +3 -2
  182. package/template-react-vite-muijoy-tauri/src/components/ui/separator.tsx +2 -0
  183. package/template-react-vite-muijoy-tauri/src/components/ui/sonner.tsx +4 -4
  184. package/template-react-vite-muijoy-tauri/src/components/ui/spinner.tsx +2 -1
  185. package/template-react-vite-muijoy-tauri/src/components/ui/switch.tsx +3 -0
  186. package/template-react-vite-muijoy-tauri/src/components/ui/textarea.tsx +2 -1
  187. package/template-react-vite-muijoy-tauri/src/components/ui/tooltip.tsx +2 -0
  188. package/template-react-vite-muijoy-tauri/src/lib/hooks/hotkeys-hooks.ts +113 -10
  189. package/template-react-vite-muijoy-tauri/src/lib/hooks/narration-hooks.ts +31 -10
  190. package/template-react-vite-muijoy-tauri/src/lib/hooks/navigation-hooks.ts +29 -10
  191. package/template-react-vite-muijoy-tauri/src/lib/query/narration-query.ts +32 -2
  192. package/template-react-vite-muijoy-tauri/src/lib/stores/alert-dialog-store.ts +13 -0
  193. package/template-react-vite-muijoy-tauri/src/lib/stores/text-display-settings-store.ts +20 -1
  194. package/template-react-vite-muijoy-tauri/src/locales/en.json +2 -0
  195. package/template-react-vite-muijoy-tauri/src/main.tsx +0 -1
  196. 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
  197. package/template-react-vite-muijoy-tauri/src/routeTree.gen.ts +3 -21
  198. package/template-react-vite-muijoy-tauri/src/routes/__root.tsx +10 -21
  199. package/template-react-vite-muijoy-tauri/src/styles.css +43 -43
  200. package/template-react-vite-muijoy-tauri/vite.config.ts +1 -1
  201. package/template-react-vite-muijoy/src/pixi-vn-keys.gen.d.ts +0 -20
  202. package/template-react-vite-muijoy/src/routes/narration.tsx +0 -9
  203. package/template-react-vite-muijoy-ink/src/routes/narration.tsx +0 -9
  204. package/template-react-vite-muijoy-ink-tauri/src/routes/narration.tsx +0 -9
  205. package/template-react-vite-muijoy-tauri/src/routes/narration.tsx +0 -9
@@ -1,4 +1,4 @@
1
- import type * as React from "react";
1
+ import * as React from "react";
2
2
 
3
3
  import { cn } from "@/lib/utils";
4
4
 
@@ -12,7 +12,7 @@ function Card({
12
12
  data-slot="card"
13
13
  data-size={size}
14
14
  className={cn(
15
- "group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
15
+ "group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
16
16
  className,
17
17
  )}
18
18
  {...props}
@@ -25,7 +25,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
25
25
  <div
26
26
  data-slot="card-header"
27
27
  className={cn(
28
- "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",
28
+ "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
29
29
  className,
30
30
  )}
31
31
  {...props}
@@ -71,11 +71,7 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
71
71
 
72
72
  function CardContent({ className, ...props }: React.ComponentProps<"div">) {
73
73
  return (
74
- <div
75
- data-slot="card-content"
76
- className={cn("px-4 group-data-[size=sm]/card:px-3", className)}
77
- {...props}
78
- />
74
+ <div data-slot="card-content" className={cn("px-(--card-spacing)", className)} {...props} />
79
75
  );
80
76
  }
81
77
 
@@ -84,7 +80,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
84
80
  <div
85
81
  data-slot="card-footer"
86
82
  className={cn(
87
- "flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",
83
+ "flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",
88
84
  className,
89
85
  )}
90
86
  {...props}
@@ -92,4 +88,4 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
92
88
  );
93
89
  }
94
90
 
95
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
91
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
@@ -1,8 +1,11 @@
1
- import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
2
- import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
1
+ "use client";
2
+
3
3
  import * as React from "react";
4
- import { Button } from "@/components/ui/button";
4
+ import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
5
+
5
6
  import { cn } from "@/lib/utils";
7
+ import { Button } from "@/components/ui/button";
8
+ import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
6
9
 
7
10
  type CarouselApi = UseEmblaCarouselType[1];
8
11
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
@@ -177,7 +180,7 @@ function CarouselPrevious({
177
180
  className={cn(
178
181
  "absolute touch-manipulation rounded-full",
179
182
  orientation === "horizontal"
180
- ? "top-1/2 -left-12 -translate-y-1/2"
183
+ ? "inset-y-0 -left-12 my-auto"
181
184
  : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
182
185
  className,
183
186
  )}
@@ -207,7 +210,7 @@ function CarouselNext({
207
210
  className={cn(
208
211
  "absolute touch-manipulation rounded-full",
209
212
  orientation === "horizontal"
210
- ? "top-1/2 -right-12 -translate-y-1/2"
213
+ ? "inset-y-0 -right-12 my-auto"
211
214
  : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
212
215
  className,
213
216
  )}
@@ -222,11 +225,11 @@ function CarouselNext({
222
225
  }
223
226
 
224
227
  export {
225
- Carousel,
226
228
  type CarouselApi,
229
+ Carousel,
227
230
  CarouselContent,
228
231
  CarouselItem,
229
- CarouselNext,
230
232
  CarouselPrevious,
233
+ CarouselNext,
231
234
  useCarousel,
232
235
  };
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from "react";
2
4
  import { Drawer as DrawerPrimitive } from "vaul";
3
5
 
@@ -1,8 +1,11 @@
1
- import { cva, type VariantProps } from "class-variance-authority";
1
+ "use client";
2
+
2
3
  import { useMemo } from "react";
4
+ import { cva, type VariantProps } from "class-variance-authority";
5
+
6
+ import { cn } from "@/lib/utils";
3
7
  import { Label } from "@/components/ui/label";
4
8
  import { Separator } from "@/components/ui/separator";
5
- import { cn } from "@/lib/utils";
6
9
 
7
10
  function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
8
11
  return (
@@ -111,7 +114,7 @@ function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {
111
114
  <div
112
115
  data-slot="field-label"
113
116
  className={cn(
114
- "flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
117
+ "flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
115
118
  className,
116
119
  )}
117
120
  {...props}
@@ -214,13 +217,13 @@ function FieldError({
214
217
 
215
218
  export {
216
219
  Field,
217
- FieldContent,
220
+ FieldLabel,
218
221
  FieldDescription,
219
222
  FieldError,
220
223
  FieldGroup,
221
- FieldLabel,
222
224
  FieldLegend,
223
225
  FieldSeparator,
224
226
  FieldSet,
227
+ FieldContent,
225
228
  FieldTitle,
226
229
  };
@@ -1,9 +1,10 @@
1
+ import * as React from "react";
1
2
  import { cva, type VariantProps } from "class-variance-authority";
2
- import type * as React from "react";
3
+
4
+ import { cn } from "@/lib/utils";
3
5
  import { Button } from "@/components/ui/button";
4
6
  import { Input } from "@/components/ui/input";
5
7
  import { Textarea } from "@/components/ui/textarea";
6
- import { cn } from "@/lib/utils";
7
8
 
8
9
  function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
9
10
  return (
@@ -138,7 +139,7 @@ export {
138
139
  InputGroup,
139
140
  InputGroupAddon,
140
141
  InputGroupButton,
141
- InputGroupInput,
142
142
  InputGroupText,
143
+ InputGroupInput,
143
144
  InputGroupTextarea,
144
145
  };
@@ -1,5 +1,5 @@
1
+ import * as React from "react";
1
2
  import { Input as InputPrimitive } from "@base-ui/react/input";
2
- import type * as React from "react";
3
3
 
4
4
  import { cn } from "@/lib/utils";
5
5
 
@@ -1,9 +1,10 @@
1
- import { Separator } from "@/components/ui/separator";
2
- import { cn } from "@/lib/utils";
1
+ import * as React from "react";
3
2
  import { mergeProps } from "@base-ui/react/merge-props";
4
3
  import { useRender } from "@base-ui/react/use-render";
5
4
  import { cva, type VariantProps } from "class-variance-authority";
6
- import type * as React from "react";
5
+
6
+ import { cn } from "@/lib/utils";
7
+ import { Separator } from "@/components/ui/separator";
7
8
 
8
9
  function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
9
10
  return (
@@ -178,13 +179,13 @@ function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
178
179
 
179
180
  export {
180
181
  Item,
181
- ItemActions,
182
+ ItemMedia,
182
183
  ItemContent,
183
- ItemDescription,
184
- ItemFooter,
184
+ ItemActions,
185
185
  ItemGroup,
186
- ItemHeader,
187
- ItemMedia,
188
186
  ItemSeparator,
189
187
  ItemTitle,
188
+ ItemDescription,
189
+ ItemHeader,
190
+ ItemFooter,
190
191
  };
@@ -1,4 +1,4 @@
1
- import type * as React from "react";
1
+ import * as React from "react";
2
2
 
3
3
  import { cn } from "@/lib/utils";
4
4
 
@@ -1,7 +1,10 @@
1
- import { cn } from "@/lib/utils";
1
+ "use client";
2
+
2
3
  import { Radio as RadioPrimitive } from "@base-ui/react/radio";
3
4
  import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
4
5
 
6
+ import { cn } from "@/lib/utils";
7
+
5
8
  function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
6
9
  return (
7
10
  <RadioGroupPrimitive
@@ -1,7 +1,11 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
1
4
  import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
5
+
2
6
  import { cn } from "@/lib/utils";
3
7
 
4
- function ScrollArea({ className, children, ref, ...props }: ScrollAreaPrimitive.Root.Props) {
8
+ function ScrollArea({ className, children, ...props }: ScrollAreaPrimitive.Root.Props) {
5
9
  return (
6
10
  <ScrollAreaPrimitive.Root
7
11
  data-slot="scroll-area"
@@ -9,7 +13,6 @@ function ScrollArea({ className, children, ref, ...props }: ScrollAreaPrimitive.
9
13
  {...props}
10
14
  >
11
15
  <ScrollAreaPrimitive.Viewport
12
- ref={ref}
13
16
  data-slot="scroll-area-viewport"
14
17
  className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
15
18
  >
@@ -1,7 +1,8 @@
1
+ import * as React from "react";
1
2
  import { Select as SelectPrimitive } from "@base-ui/react/select";
2
- import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
3
- import type * as React from "react";
3
+
4
4
  import { cn } from "@/lib/utils";
5
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
5
6
 
6
7
  const Select = SelectPrimitive.Root;
7
8
 
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
2
4
 
3
5
  import { cn } from "@/lib/utils";
@@ -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";
@@ -2,22 +2,47 @@ import { useAlertDialog } from "@/components/providers/alert-dialog-provider";
2
2
  import { useNarrationFunctions } from "@/lib/hooks/narration-hooks";
3
3
  import { useSetSearchParamState } from "@/lib/hooks/navigation-hooks";
4
4
  import { useGameProps } from "@/lib/hooks/props-hooks";
5
- import { useQueryInputValue } from "@/lib/query/narration-query";
5
+ import { useQueryCanGoNext, useQueryInputValue } from "@/lib/query/narration-query";
6
6
  import {
7
7
  LAST_SAVE_USE_QUERY_KEY,
8
8
  SAVES_USE_QUERY_KEY,
9
9
  useQueryLastSave,
10
10
  } from "@/lib/query/save-query";
11
+ import { AlertDialogState } from "@/lib/stores/alert-dialog-store";
11
12
  import { QuickActionsWheelState } from "@/lib/stores/quick-actions-wheel-store";
13
+ import { SearchParams } from "@/lib/stores/search-param-store";
12
14
  import { SkipSettings } from "@/lib/stores/skip-settings-store";
15
+ import { TextDisplaySettings } from "@/lib/stores/text-display-settings-store";
13
16
  import { loadSave, saveGameToIndexDB } from "@/lib/utils/save-utility";
17
+ import { narration } from "@drincs/pixi-vn";
14
18
  import { useHotkeys } from "@tanstack/react-hotkeys";
15
19
  import { useQueryClient } from "@tanstack/react-query";
16
20
  import { useLocation } from "@tanstack/react-router";
17
- import { useCallback } from "react";
21
+ import { useSelector } from "@tanstack/react-store";
22
+ import { useCallback, useMemo, useRef } from "react";
18
23
  import { useTranslation } from "react-i18next";
19
24
  import { toast } from "sonner";
20
25
 
26
+ function useMenuDialogState() {
27
+ const searchParams = useSelector(SearchParams.store, (state) => state);
28
+ const alertDialogCount = useSelector(AlertDialogState.store, (state) => state.count);
29
+ const { data: { isRequired } = {} } = useQueryInputValue<string | number>();
30
+
31
+ /** true when the settings menu (or any sub-page) is open */
32
+ const isSettingsOpen = useMemo(
33
+ () => Object.values(searchParams).some((v) => v !== undefined),
34
+ [searchParams],
35
+ );
36
+
37
+ /** true when an alert confirmation dialog or the input-request dialog is blocking interaction */
38
+ const isAlertOrInputOpen = alertDialogCount > 0 || !!isRequired;
39
+
40
+ /** true when any menu or dialog that should disable hotkeys is open */
41
+ const isAnyMenuOrDialogOpen = isSettingsOpen || isAlertOrInputOpen;
42
+
43
+ return { isAnyMenuOrDialogOpen, isSettingsOpen, isAlertOrInputOpen };
44
+ }
45
+
21
46
  /**
22
47
  * useSaveHotkeys
23
48
  *
@@ -40,6 +65,7 @@ export function useSaveHotkeys(): null {
40
65
  const { data: lastSave = null } = useQueryLastSave();
41
66
  const { openAlertDialog } = useAlertDialog();
42
67
  const gameProps = useGameProps();
68
+ const { isSettingsOpen } = useMenuDialogState();
43
69
 
44
70
  const quickSave = useCallback(() => {
45
71
  if (location.pathname === "/") {
@@ -87,6 +113,7 @@ export function useSaveHotkeys(): null {
87
113
  hotkey: "F5",
88
114
  callback: quickSave,
89
115
  options: {
116
+ enabled: !isSettingsOpen,
90
117
  meta: {
91
118
  name: t("quick_save"),
92
119
  description: t("quick_save_hotkey_description"),
@@ -97,6 +124,7 @@ export function useSaveHotkeys(): null {
97
124
  hotkey: "Control+S",
98
125
  callback: quickSave,
99
126
  options: {
127
+ enabled: !isSettingsOpen,
100
128
  meta: {
101
129
  name: t("quick_save"),
102
130
  description: t("quick_save_hotkey_alternative_description"),
@@ -107,6 +135,7 @@ export function useSaveHotkeys(): null {
107
135
  hotkey: "F9",
108
136
  callback: quickLoad,
109
137
  options: {
138
+ enabled: !isSettingsOpen,
110
139
  meta: {
111
140
  name: t("load_last_save"),
112
141
  description: t("quick_load_hotkey_description"),
@@ -117,6 +146,7 @@ export function useSaveHotkeys(): null {
117
146
  hotkey: "Control+L",
118
147
  callback: quickLoad,
119
148
  options: {
149
+ enabled: !isSettingsOpen,
120
150
  meta: {
121
151
  name: t("load_last_save"),
122
152
  description: t("quick_load_hotkey_alternative_description"),
@@ -132,6 +162,7 @@ export function useSettingsHotkeys(): null {
132
162
  const { t } = useTranslation(["ui"]);
133
163
  const setSettingsOpen = useSetSearchParamState<boolean>("settings");
134
164
  const setSettingsTab = useSetSearchParamState<string>("settings_tab");
165
+ const { isAnyMenuOrDialogOpen } = useMenuDialogState();
135
166
 
136
167
  const openControlsPage = useCallback(() => {
137
168
  setSettingsOpen(true);
@@ -150,9 +181,10 @@ export function useSettingsHotkeys(): null {
150
181
  },
151
182
  },
152
183
  {
153
- hotkey: "Control+K",
184
+ hotkey: "K",
154
185
  callback: openControlsPage,
155
186
  options: {
187
+ enabled: !isAnyMenuOrDialogOpen,
156
188
  meta: {
157
189
  name: t("hotkeys_menu"),
158
190
  description: t("hotkeys_menu_shortcut_description"),
@@ -169,6 +201,7 @@ export function useGameHotkeys(): null {
169
201
  const setSettingsTab = useSetSearchParamState<string>("settings_tab");
170
202
  const setHistory = useSetSearchParamState<boolean>("history");
171
203
  const { t } = useTranslation(["ui"]);
204
+ const { isAnyMenuOrDialogOpen } = useMenuDialogState();
172
205
 
173
206
  const openHistoryPage = useCallback(() => {
174
207
  setHistory(undefined);
@@ -187,9 +220,10 @@ export function useGameHotkeys(): null {
187
220
 
188
221
  useHotkeys([
189
222
  {
190
- hotkey: "Control+H",
223
+ hotkey: "H",
191
224
  callback: openHistoryPage,
192
225
  options: {
226
+ enabled: !isAnyMenuOrDialogOpen,
193
227
  meta: {
194
228
  name: t("history"),
195
229
  description: t("history_hotkey_description"),
@@ -200,6 +234,7 @@ export function useGameHotkeys(): null {
200
234
  hotkey: "Tab",
201
235
  callback: toggleQuickActionsWheel,
202
236
  options: {
237
+ enabled: !isAnyMenuOrDialogOpen,
203
238
  meta: {
204
239
  name: t("quick_actions"),
205
240
  description: t("quick_actions_open_description"),
@@ -211,38 +246,104 @@ export function useGameHotkeys(): null {
211
246
  return null;
212
247
  }
213
248
 
249
+ export function useChoiceMenuHotkeys(menuLength: number) {
250
+ const { t } = useTranslation(["ui"]);
251
+ const menuRef = useRef<HTMLDivElement>(null);
252
+
253
+ function getMenuItems(): HTMLButtonElement[] {
254
+ if (!menuRef.current) return [];
255
+ return Array.from(
256
+ menuRef.current.querySelectorAll<HTMLButtonElement>(
257
+ "button[role='menuitem']:not(:disabled)",
258
+ ),
259
+ );
260
+ }
261
+
262
+ function focusMenuItem(direction: "up" | "down") {
263
+ const items = getMenuItems();
264
+ if (!items.length) return;
265
+ const active = document.activeElement as HTMLElement;
266
+ const currentIndex = items.indexOf(active as HTMLButtonElement);
267
+ let next: number;
268
+ if (direction === "down") {
269
+ next = currentIndex < items.length - 1 ? currentIndex + 1 : 0;
270
+ } else {
271
+ next = currentIndex > 0 ? currentIndex - 1 : items.length - 1;
272
+ }
273
+ items[next].focus();
274
+ }
275
+
276
+ useHotkeys([
277
+ {
278
+ hotkey: "ArrowDown",
279
+ callback: () => focusMenuItem("down"),
280
+ options: {
281
+ enabled: menuLength > 0,
282
+ preventDefault: true,
283
+ meta: {
284
+ name: t("choice_navigation"),
285
+ description: t("choice_navigation_description"),
286
+ },
287
+ },
288
+ },
289
+ {
290
+ hotkey: "ArrowUp",
291
+ callback: () => focusMenuItem("up"),
292
+ options: {
293
+ enabled: menuLength > 0,
294
+ preventDefault: true,
295
+ meta: {
296
+ name: t("choice_navigation"),
297
+ description: t("choice_navigation_description"),
298
+ },
299
+ },
300
+ },
301
+ ]);
302
+
303
+ return { menuRef };
304
+ }
305
+
214
306
  export function useNarrationHotkeys(): null {
215
307
  const { t } = useTranslation(["ui"]);
216
308
  const { goNext } = useNarrationFunctions();
217
- const { data: { isRequired } = {} } = useQueryInputValue<string | number>();
309
+ const typewriterInProgress = useSelector(
310
+ TextDisplaySettings.store,
311
+ (state) => state.inProgress,
312
+ );
313
+ const { isAnyMenuOrDialogOpen } = useMenuDialogState();
314
+ const { data: canGoNext } = useQueryCanGoNext();
218
315
 
219
316
  const onSkipKeyDown = useCallback(() => SkipSettings.setEnabled(true), []);
220
317
  const onSkipKeyUp = useCallback(() => {
221
318
  SkipSettings.setEnabled(false);
319
+ if (typewriterInProgress && !narration.dialogGlue) {
320
+ TextDisplaySettings.complete();
321
+ return;
322
+ }
222
323
  goNext();
223
- }, [goNext]);
324
+ }, [goNext, typewriterInProgress]);
224
325
 
225
326
  useHotkeys([
226
327
  {
227
328
  hotkey: "Enter",
228
329
  callback: onSkipKeyDown,
229
330
  options: {
331
+ enabled: !isAnyMenuOrDialogOpen && canGoNext,
230
332
  meta: {
231
333
  name: t("skip"),
232
334
  description: t("skip_hold_description"),
233
335
  },
234
- enabled: !isRequired,
235
336
  },
236
337
  },
237
338
  {
238
339
  hotkey: "Space",
239
340
  callback: onSkipKeyDown,
240
341
  options: {
342
+ enabled: !isAnyMenuOrDialogOpen && canGoNext,
241
343
  meta: {
242
344
  name: t("skip"),
243
345
  description: t("skip_hold_space_description"),
244
346
  },
245
- enabled: !isRequired,
246
347
  },
247
348
  },
248
349
  {
@@ -250,11 +351,12 @@ export function useNarrationHotkeys(): null {
250
351
  callback: onSkipKeyUp,
251
352
  options: {
252
353
  eventType: "keyup",
354
+ conflictBehavior: "allow",
355
+ enabled: !isAnyMenuOrDialogOpen && canGoNext,
253
356
  meta: {
254
357
  name: t("next"),
255
358
  description: t("skip_release_description"),
256
359
  },
257
- enabled: !isRequired,
258
360
  },
259
361
  },
260
362
  {
@@ -262,11 +364,12 @@ export function useNarrationHotkeys(): null {
262
364
  callback: onSkipKeyUp,
263
365
  options: {
264
366
  eventType: "keyup",
367
+ conflictBehavior: "allow",
368
+ enabled: !isAnyMenuOrDialogOpen && canGoNext,
265
369
  meta: {
266
370
  name: t("next"),
267
371
  description: t("skip_release_space_description"),
268
372
  },
269
- enabled: !isRequired,
270
373
  },
271
374
  },
272
375
  ]);