create-pixi-vn 2.0.12 → 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 (256) 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/.vscode/extensions.json +2 -1
  41. package/template-react-vite-muijoy-ink/.vscode/settings.json +6 -1
  42. package/template-react-vite-muijoy-ink/_gitignore +1 -0
  43. package/template-react-vite-muijoy-ink/components.json +1 -1
  44. package/template-react-vite-muijoy-ink/ink/second_part.ink +571 -0
  45. package/template-react-vite-muijoy-ink/ink/start.ink +214 -0
  46. package/template-react-vite-muijoy-ink/package-lock.json +847 -963
  47. package/template-react-vite-muijoy-ink/package.json +13 -12
  48. package/template-react-vite-muijoy-ink/src/App.tsx +25 -25
  49. package/template-react-vite-muijoy-ink/src/assets/index.ts +2 -4
  50. package/template-react-vite-muijoy-ink/src/assets/ink-manifest.gen.json +4 -1
  51. package/template-react-vite-muijoy-ink/src/components/dev-devtools.tsx +25 -0
  52. package/template-react-vite-muijoy-ink/src/components/menus/settings/menus/history.tsx +78 -62
  53. package/template-react-vite-muijoy-ink/src/components/screens/narration/index.tsx +5 -2
  54. package/template-react-vite-muijoy-ink/src/components/ui/alert-dialog.tsx +3 -2
  55. package/template-react-vite-muijoy-ink/src/components/ui/avatar.tsx +2 -2
  56. package/template-react-vite-muijoy-ink/src/components/ui/breadcrumb.tsx +5 -4
  57. package/template-react-vite-muijoy-ink/src/components/ui/button-group.tsx +3 -2
  58. package/template-react-vite-muijoy-ink/src/components/ui/button.tsx +2 -2
  59. package/template-react-vite-muijoy-ink/src/components/ui/card.tsx +6 -10
  60. package/template-react-vite-muijoy-ink/src/components/ui/carousel.tsx +10 -7
  61. package/template-react-vite-muijoy-ink/src/components/ui/drawer.tsx +2 -0
  62. package/template-react-vite-muijoy-ink/src/components/ui/field.tsx +8 -5
  63. package/template-react-vite-muijoy-ink/src/components/ui/input-group.tsx +4 -3
  64. package/template-react-vite-muijoy-ink/src/components/ui/input.tsx +1 -1
  65. package/template-react-vite-muijoy-ink/src/components/ui/item.tsx +9 -8
  66. package/template-react-vite-muijoy-ink/src/components/ui/label.tsx +1 -1
  67. package/template-react-vite-muijoy-ink/src/components/ui/radio-group.tsx +4 -1
  68. package/template-react-vite-muijoy-ink/src/components/ui/scroll-area.tsx +5 -2
  69. package/template-react-vite-muijoy-ink/src/components/ui/select.tsx +3 -2
  70. package/template-react-vite-muijoy-ink/src/components/ui/separator.tsx +2 -0
  71. package/template-react-vite-muijoy-ink/src/components/ui/sonner.tsx +4 -4
  72. package/template-react-vite-muijoy-ink/src/components/ui/spinner.tsx +2 -1
  73. package/template-react-vite-muijoy-ink/src/components/ui/switch.tsx +3 -0
  74. package/template-react-vite-muijoy-ink/src/components/ui/textarea.tsx +2 -1
  75. package/template-react-vite-muijoy-ink/src/components/ui/tooltip.tsx +2 -0
  76. package/template-react-vite-muijoy-ink/src/content/ink/hashtag-commands.ts +39 -0
  77. package/template-react-vite-muijoy-ink/src/content/ink/text-replaces.ts +19 -0
  78. package/template-react-vite-muijoy-ink/src/lib/hooks/hotkeys-hooks.ts +2 -0
  79. package/template-react-vite-muijoy-ink/src/lib/hooks/ink-hooks.tsx +12 -0
  80. package/template-react-vite-muijoy-ink/src/lib/hooks/narration-hooks.ts +24 -9
  81. package/template-react-vite-muijoy-ink/src/lib/hooks/navigation-hooks.ts +29 -10
  82. package/template-react-vite-muijoy-ink/src/lib/i18n.ts +22 -1
  83. package/template-react-vite-muijoy-ink/src/main.tsx +0 -1
  84. package/template-react-vite-muijoy-ink/src/pixi-vn.keys.gen.ts +24 -0
  85. package/template-react-vite-muijoy-ink/src/routeTree.gen.ts +3 -21
  86. package/template-react-vite-muijoy-ink/src/routes/__root.tsx +14 -20
  87. package/template-react-vite-muijoy-ink/src/styles.css +43 -43
  88. package/template-react-vite-muijoy-ink/vite.config.ts +7 -1
  89. package/template-react-vite-muijoy-ink-tauri/.assetpack.ts +9 -0
  90. package/template-react-vite-muijoy-ink-tauri/.vscode/extensions.json +5 -1
  91. package/template-react-vite-muijoy-ink-tauri/.vscode/launch.json +11 -0
  92. package/template-react-vite-muijoy-ink-tauri/.vscode/settings.json +6 -1
  93. package/template-react-vite-muijoy-ink-tauri/.vscode/tasks.json +47 -0
  94. package/template-react-vite-muijoy-ink-tauri/README.md +3 -3
  95. package/template-react-vite-muijoy-ink-tauri/_github/workflows/desktop.yml +188 -0
  96. package/template-react-vite-muijoy-ink-tauri/_github/workflows/mobile.yml +270 -0
  97. package/template-react-vite-muijoy-ink-tauri/_gitignore +11 -0
  98. package/template-react-vite-muijoy-ink-tauri/components.json +1 -1
  99. package/template-react-vite-muijoy-ink-tauri/ink/second_part.ink +571 -0
  100. package/template-react-vite-muijoy-ink-tauri/ink/start.ink +214 -0
  101. package/template-react-vite-muijoy-ink-tauri/package-lock.json +1145 -1011
  102. package/template-react-vite-muijoy-ink-tauri/package.json +23 -13
  103. package/template-react-vite-muijoy-ink-tauri/src/App.tsx +25 -25
  104. package/template-react-vite-muijoy-ink-tauri/src/assets/index.ts +2 -4
  105. package/template-react-vite-muijoy-ink-tauri/src/assets/ink-manifest.gen.json +4 -1
  106. package/template-react-vite-muijoy-ink-tauri/src/components/dev-devtools.tsx +25 -0
  107. package/template-react-vite-muijoy-ink-tauri/src/components/menus/main-menu.tsx +16 -1
  108. package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/menus/history.tsx +78 -62
  109. package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/quick-menus.tsx +17 -1
  110. package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/system-controls.tsx +11 -1
  111. package/template-react-vite-muijoy-ink-tauri/src/components/screens/narration/index.tsx +5 -2
  112. package/template-react-vite-muijoy-ink-tauri/src/components/ui/alert-dialog.tsx +3 -2
  113. package/template-react-vite-muijoy-ink-tauri/src/components/ui/avatar.tsx +2 -2
  114. package/template-react-vite-muijoy-ink-tauri/src/components/ui/breadcrumb.tsx +5 -4
  115. package/template-react-vite-muijoy-ink-tauri/src/components/ui/button-group.tsx +3 -2
  116. package/template-react-vite-muijoy-ink-tauri/src/components/ui/button.tsx +2 -2
  117. package/template-react-vite-muijoy-ink-tauri/src/components/ui/card.tsx +6 -10
  118. package/template-react-vite-muijoy-ink-tauri/src/components/ui/carousel.tsx +10 -7
  119. package/template-react-vite-muijoy-ink-tauri/src/components/ui/drawer.tsx +2 -0
  120. package/template-react-vite-muijoy-ink-tauri/src/components/ui/field.tsx +8 -5
  121. package/template-react-vite-muijoy-ink-tauri/src/components/ui/input-group.tsx +4 -3
  122. package/template-react-vite-muijoy-ink-tauri/src/components/ui/input.tsx +1 -1
  123. package/template-react-vite-muijoy-ink-tauri/src/components/ui/item.tsx +9 -8
  124. package/template-react-vite-muijoy-ink-tauri/src/components/ui/label.tsx +1 -1
  125. package/template-react-vite-muijoy-ink-tauri/src/components/ui/radio-group.tsx +4 -1
  126. package/template-react-vite-muijoy-ink-tauri/src/components/ui/scroll-area.tsx +5 -2
  127. package/template-react-vite-muijoy-ink-tauri/src/components/ui/select.tsx +3 -2
  128. package/template-react-vite-muijoy-ink-tauri/src/components/ui/separator.tsx +2 -0
  129. package/template-react-vite-muijoy-ink-tauri/src/components/ui/sonner.tsx +4 -4
  130. package/template-react-vite-muijoy-ink-tauri/src/components/ui/spinner.tsx +2 -1
  131. package/template-react-vite-muijoy-ink-tauri/src/components/ui/switch.tsx +3 -0
  132. package/template-react-vite-muijoy-ink-tauri/src/components/ui/textarea.tsx +2 -1
  133. package/template-react-vite-muijoy-ink-tauri/src/components/ui/tooltip.tsx +2 -0
  134. package/template-react-vite-muijoy-ink-tauri/src/content/ink/hashtag-commands.ts +56 -0
  135. package/template-react-vite-muijoy-ink-tauri/src/content/ink/text-replaces.ts +19 -0
  136. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/hotkeys-hooks.ts +2 -0
  137. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/ink-hooks.tsx +12 -0
  138. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/narration-hooks.ts +24 -9
  139. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/navigation-hooks.ts +29 -10
  140. package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/quit-hooks.ts +24 -0
  141. package/template-react-vite-muijoy-ink-tauri/src/lib/i18n.ts +22 -1
  142. package/template-react-vite-muijoy-ink-tauri/src/lib/query/settings-query.ts +7 -1
  143. package/template-react-vite-muijoy-ink-tauri/src/lib/steam.ts +143 -0
  144. package/template-react-vite-muijoy-ink-tauri/src/main.tsx +0 -1
  145. package/template-react-vite-muijoy-ink-tauri/src/pixi-vn.keys.gen.ts +24 -0
  146. package/template-react-vite-muijoy-ink-tauri/src/routeTree.gen.ts +3 -21
  147. package/template-react-vite-muijoy-ink-tauri/src/routes/__root.tsx +14 -20
  148. package/template-react-vite-muijoy-ink-tauri/src/styles.css +43 -43
  149. package/template-react-vite-muijoy-ink-tauri/src-tauri/Cargo.toml +50 -0
  150. package/template-react-vite-muijoy-ink-tauri/src-tauri/build.rs +46 -0
  151. package/template-react-vite-muijoy-ink-tauri/src-tauri/capabilities/default.json +21 -0
  152. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/128x128.png +0 -0
  153. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/128x128@2x.png +0 -0
  154. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/32x32.png +0 -0
  155. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square107x107Logo.png +0 -0
  156. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square142x142Logo.png +0 -0
  157. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square150x150Logo.png +0 -0
  158. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square284x284Logo.png +0 -0
  159. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square30x30Logo.png +0 -0
  160. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square310x310Logo.png +0 -0
  161. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square44x44Logo.png +0 -0
  162. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square71x71Logo.png +0 -0
  163. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/Square89x89Logo.png +0 -0
  164. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/StoreLogo.png +0 -0
  165. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/icon.icns +0 -0
  166. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/icon.ico +0 -0
  167. package/template-react-vite-muijoy-ink-tauri/src-tauri/icons/icon.png +0 -0
  168. package/template-react-vite-muijoy-ink-tauri/src-tauri/src/lib.rs +64 -0
  169. package/template-react-vite-muijoy-ink-tauri/src-tauri/src/main.rs +6 -0
  170. package/template-react-vite-muijoy-ink-tauri/src-tauri/src/steam.rs +238 -0
  171. package/template-react-vite-muijoy-ink-tauri/src-tauri/tauri.conf.json +50 -0
  172. package/template-react-vite-muijoy-ink-tauri/vite.config.ts +31 -1
  173. package/template-react-vite-muijoy-tauri/.assetpack.ts +9 -0
  174. package/template-react-vite-muijoy-tauri/.vscode/extensions.json +4 -1
  175. package/template-react-vite-muijoy-tauri/.vscode/launch.json +11 -0
  176. package/template-react-vite-muijoy-tauri/.vscode/tasks.json +47 -0
  177. package/template-react-vite-muijoy-tauri/README.md +3 -3
  178. package/template-react-vite-muijoy-tauri/_github/workflows/desktop.yml +188 -0
  179. package/template-react-vite-muijoy-tauri/_github/workflows/mobile.yml +270 -0
  180. package/template-react-vite-muijoy-tauri/_gitignore +10 -0
  181. package/template-react-vite-muijoy-tauri/components.json +1 -1
  182. package/template-react-vite-muijoy-tauri/package-lock.json +1052 -1106
  183. package/template-react-vite-muijoy-tauri/package.json +20 -12
  184. package/template-react-vite-muijoy-tauri/src/components/dev-devtools.tsx +25 -0
  185. package/template-react-vite-muijoy-tauri/src/components/menus/main-menu.tsx +16 -1
  186. package/template-react-vite-muijoy-tauri/src/components/menus/settings/menus/history.tsx +78 -62
  187. package/template-react-vite-muijoy-tauri/src/components/menus/settings/quick-menus.tsx +17 -1
  188. package/template-react-vite-muijoy-tauri/src/components/menus/settings/system-controls.tsx +11 -1
  189. package/template-react-vite-muijoy-tauri/src/components/screens/narration/index.tsx +5 -2
  190. package/template-react-vite-muijoy-tauri/src/components/ui/alert-dialog.tsx +3 -2
  191. package/template-react-vite-muijoy-tauri/src/components/ui/avatar.tsx +2 -2
  192. package/template-react-vite-muijoy-tauri/src/components/ui/breadcrumb.tsx +5 -4
  193. package/template-react-vite-muijoy-tauri/src/components/ui/button-group.tsx +3 -2
  194. package/template-react-vite-muijoy-tauri/src/components/ui/button.tsx +2 -2
  195. package/template-react-vite-muijoy-tauri/src/components/ui/card.tsx +6 -10
  196. package/template-react-vite-muijoy-tauri/src/components/ui/carousel.tsx +10 -7
  197. package/template-react-vite-muijoy-tauri/src/components/ui/drawer.tsx +2 -0
  198. package/template-react-vite-muijoy-tauri/src/components/ui/field.tsx +8 -5
  199. package/template-react-vite-muijoy-tauri/src/components/ui/input-group.tsx +4 -3
  200. package/template-react-vite-muijoy-tauri/src/components/ui/input.tsx +1 -1
  201. package/template-react-vite-muijoy-tauri/src/components/ui/item.tsx +9 -8
  202. package/template-react-vite-muijoy-tauri/src/components/ui/label.tsx +1 -1
  203. package/template-react-vite-muijoy-tauri/src/components/ui/radio-group.tsx +4 -1
  204. package/template-react-vite-muijoy-tauri/src/components/ui/scroll-area.tsx +5 -2
  205. package/template-react-vite-muijoy-tauri/src/components/ui/select.tsx +3 -2
  206. package/template-react-vite-muijoy-tauri/src/components/ui/separator.tsx +2 -0
  207. package/template-react-vite-muijoy-tauri/src/components/ui/sonner.tsx +4 -4
  208. package/template-react-vite-muijoy-tauri/src/components/ui/spinner.tsx +2 -1
  209. package/template-react-vite-muijoy-tauri/src/components/ui/switch.tsx +3 -0
  210. package/template-react-vite-muijoy-tauri/src/components/ui/textarea.tsx +2 -1
  211. package/template-react-vite-muijoy-tauri/src/components/ui/tooltip.tsx +2 -0
  212. package/template-react-vite-muijoy-tauri/src/lib/hooks/hotkeys-hooks.ts +2 -0
  213. package/template-react-vite-muijoy-tauri/src/lib/hooks/narration-hooks.ts +24 -9
  214. package/template-react-vite-muijoy-tauri/src/lib/hooks/navigation-hooks.ts +29 -10
  215. package/template-react-vite-muijoy-tauri/src/lib/hooks/quit-hooks.ts +24 -0
  216. package/template-react-vite-muijoy-tauri/src/lib/query/settings-query.ts +7 -1
  217. package/template-react-vite-muijoy-tauri/src/lib/steam.ts +143 -0
  218. package/template-react-vite-muijoy-tauri/src/main.tsx +0 -1
  219. package/{template-react-vite-muijoy-ink/src/pixi-vn-keys.gen.d.ts → template-react-vite-muijoy-tauri/src/pixi-vn.keys.gen.ts} +4 -2
  220. package/template-react-vite-muijoy-tauri/src/routeTree.gen.ts +3 -21
  221. package/template-react-vite-muijoy-tauri/src/routes/__root.tsx +10 -20
  222. package/template-react-vite-muijoy-tauri/src/styles.css +43 -43
  223. package/template-react-vite-muijoy-tauri/src-tauri/Cargo.toml +50 -0
  224. package/template-react-vite-muijoy-tauri/src-tauri/build.rs +46 -0
  225. package/template-react-vite-muijoy-tauri/src-tauri/capabilities/default.json +21 -0
  226. package/template-react-vite-muijoy-tauri/src-tauri/icons/128x128.png +0 -0
  227. package/template-react-vite-muijoy-tauri/src-tauri/icons/128x128@2x.png +0 -0
  228. package/template-react-vite-muijoy-tauri/src-tauri/icons/32x32.png +0 -0
  229. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square107x107Logo.png +0 -0
  230. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square142x142Logo.png +0 -0
  231. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square150x150Logo.png +0 -0
  232. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square284x284Logo.png +0 -0
  233. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square30x30Logo.png +0 -0
  234. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square310x310Logo.png +0 -0
  235. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square44x44Logo.png +0 -0
  236. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square71x71Logo.png +0 -0
  237. package/template-react-vite-muijoy-tauri/src-tauri/icons/Square89x89Logo.png +0 -0
  238. package/template-react-vite-muijoy-tauri/src-tauri/icons/StoreLogo.png +0 -0
  239. package/template-react-vite-muijoy-tauri/src-tauri/icons/icon.icns +0 -0
  240. package/template-react-vite-muijoy-tauri/src-tauri/icons/icon.ico +0 -0
  241. package/template-react-vite-muijoy-tauri/src-tauri/icons/icon.png +0 -0
  242. package/template-react-vite-muijoy-tauri/src-tauri/src/lib.rs +64 -0
  243. package/template-react-vite-muijoy-tauri/src-tauri/src/main.rs +6 -0
  244. package/template-react-vite-muijoy-tauri/src-tauri/src/steam.rs +238 -0
  245. package/template-react-vite-muijoy-tauri/src-tauri/tauri.conf.json +50 -0
  246. package/template-react-vite-muijoy-tauri/vite.config.ts +25 -1
  247. package/template-react-vite-muijoy/src/pixi-vn-keys.gen.d.ts +0 -20
  248. package/template-react-vite-muijoy/src/routes/narration.tsx +0 -9
  249. package/template-react-vite-muijoy-ink/src/content/labels/second.label.ts +0 -1207
  250. package/template-react-vite-muijoy-ink/src/content/labels/start.label.ts +0 -566
  251. package/template-react-vite-muijoy-ink/src/routes/narration.tsx +0 -9
  252. package/template-react-vite-muijoy-ink-tauri/src/content/labels/second.label.ts +0 -1207
  253. package/template-react-vite-muijoy-ink-tauri/src/content/labels/start.label.ts +0 -566
  254. package/template-react-vite-muijoy-ink-tauri/src/pixi-vn-keys.gen.d.ts +0 -20
  255. package/template-react-vite-muijoy-ink-tauri/src/routes/narration.tsx +0 -9
  256. package/template-react-vite-muijoy-tauri/src/routes/narration.tsx +0 -9
@@ -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";
@@ -0,0 +1,39 @@
1
+ import { characterIdsEnum } from "@/pixi-vn.keys.gen";
2
+ import { RegisteredCharacters } from "@drincs/pixi-vn";
3
+ import { HashtagCommands } from "@drincs/pixi-vn-ink";
4
+ import zod from "zod";
5
+
6
+ HashtagCommands.add(
7
+ async (script, { navigate }) => {
8
+ await navigate({ to: script[1] });
9
+ return true;
10
+ },
11
+ {
12
+ name: "navigate",
13
+ description: `Navigates to a specified route within the game.
14
+
15
+ \`\`\`ink
16
+ # navigate <route>
17
+ \`\`\``,
18
+ validation: zod.tuple([zod.literal("navigate"), zod.string()]),
19
+ },
20
+ );
21
+
22
+ HashtagCommands.add(
23
+ async (script) => {
24
+ const character = RegisteredCharacters.get(script[1]);
25
+ if (character) {
26
+ character.name = script[2];
27
+ }
28
+ return true;
29
+ },
30
+ {
31
+ name: "character rename",
32
+ description: `Renames a character in the game.
33
+
34
+ \`\`\`ink
35
+ # rename <characterId> <newName>
36
+ \`\`\``,
37
+ validation: zod.tuple([zod.literal("rename"), zod.enum(characterIdsEnum), zod.string()]),
38
+ },
39
+ );
@@ -0,0 +1,19 @@
1
+ import { RegisteredCharacters } from "@drincs/pixi-vn";
2
+ import { TextReplaces } from "@drincs/pixi-vn-ink";
3
+
4
+ TextReplaces.add((key) => RegisteredCharacters.get(key)?.name, {
5
+ name: "character name",
6
+ validation: "characterId",
7
+ type: "after-translation",
8
+ i18nInterpolation: true,
9
+ description: "Replaces a character ID with the character's name in the game.",
10
+ });
11
+
12
+ TextReplaces.add(() => "Stephanie", {
13
+ name: "steph_fullname",
14
+ validation: /steph_fullname/,
15
+ type: "after-translation",
16
+ i18nInterpolation: true,
17
+ description:
18
+ "Replaces the placeholder 'steph_fullname' with the full name of the character Stephanie.",
19
+ });
@@ -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"),
@@ -0,0 +1,12 @@
1
+ import { onInkTranslate } from "@drincs/pixi-vn-ink";
2
+ import { useEffect } from "react";
3
+ import { useTranslation } from "react-i18next";
4
+
5
+ export default function useInkInitialization() {
6
+ const { t } = useTranslation(["narration"]);
7
+ useEffect(() => {
8
+ onInkTranslate(t);
9
+ }, [t]);
10
+
11
+ return null;
12
+ }
@@ -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
  }
@@ -1,3 +1,4 @@
1
+ import { generateJsonInkTranslation } from "@drincs/pixi-vn-ink";
1
2
  import i18n, { type ReadCallback } from "i18next";
2
3
  import LanguageDetector from "i18next-browser-languagedetector";
3
4
  import ChainedBackend from "i18next-chained-backend";
@@ -44,9 +45,29 @@ function getLocalesResource(lng: string): Promise<Record<string, Record<string,
44
45
  return import(`./../locales/${lng}.json`);
45
46
  }
46
47
 
48
+ async function generateResourceToTranslate(lng: string): Promise<any> {
49
+ let res = await getLocalesResource(lng);
50
+ res = { ...res };
51
+ if (!res) {
52
+ res = {};
53
+ }
54
+ if (!res.narration) {
55
+ res.narration = {};
56
+ }
57
+ if (res.default) {
58
+ delete res.default;
59
+ }
60
+ const manifest = await import("@/assets/ink-manifest.gen.json");
61
+ for (const path of manifest.default) {
62
+ const element = await fetch(path).then((r) => r.json());
63
+ element && (await generateJsonInkTranslation(element, res.narration));
64
+ }
65
+ return res;
66
+ }
67
+
47
68
  export async function downloadResourceToTranslate() {
48
69
  const lng = i18n.options.fallbackLng?.toString() || "en";
49
- const data = await getLocalesResource(lng);
70
+ const data = await generateResourceToTranslate(lng);
50
71
  const jsonString = JSON.stringify(data);
51
72
  // download the save data as a JSON file
52
73
  const blob = new Blob([jsonString], { type: "application/json" });
@@ -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
@@ -0,0 +1,24 @@
1
+ /* eslint-disable */
2
+ // noinspection JSUnusedGlobalSymbols
3
+ // This file is auto-generated by @drincs/pixi-vn vite plugin. Do not edit manually.
4
+ declare module "@drincs/pixi-vn/characters" {
5
+ interface PixivnCharacterIds {
6
+ "mc": never;
7
+ "james": never;
8
+ "steph": never;
9
+ "sly": never;
10
+ }
11
+ }
12
+ declare module "@drincs/pixi-vn/narration" {
13
+ interface PixivnLabelIds {
14
+ "animation_01": never;
15
+ "second_part": never;
16
+ "start": never;
17
+ "start_|_c-0": never;
18
+ "start_|_c-1": never;
19
+ }
20
+ }
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)
@@ -3,6 +3,7 @@ import { SettingsDialogue } from "@/components/menus/settings";
3
3
  import { OfflineAllert } from "@/components/modals/error-allerts";
4
4
  import { RootProvider } from "@/components/providers/root-provider";
5
5
  import { INTERFACE_DATA_USE_QUERY_KEY } from "@/constants";
6
+ import useInkInitialization from "@/lib/hooks/ink-hooks";
6
7
  import { useConfirmBackNavigation } from "@/lib/hooks/navigation-hooks";
7
8
  import { useAutoSaveOnPageClose } from "@/lib/hooks/save-hooks";
8
9
  import { useI18n } from "@/lib/i18n";
@@ -11,12 +12,14 @@ import { defineAssets } from "@/lib/utils/assets-utility";
11
12
  import { initializeIndexedDB } from "@/lib/utils/db-utility";
12
13
  import { loadRefreshSave } from "@/lib/utils/save-utility";
13
14
  import type { RouterContext } from "@/router";
15
+ import { setupInkHmrListener } from "@drincs/pixi-vn-ink/vite-listener";
14
16
  import { setupPixivnViteData } from "@drincs/pixi-vn/vite-listener";
15
- import { TanStackDevtools } from "@tanstack/react-devtools";
16
- import { hotkeysDevtoolsPlugin } from "@tanstack/react-hotkeys-devtools";
17
- import { ReactQueryDevtoolsPanel } from "@tanstack/react-query-devtools";
18
17
  import { createRootRouteWithContext, ErrorComponent, Outlet } from "@tanstack/react-router";
19
- 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;
20
23
 
21
24
  export const Route = createRootRouteWithContext<RouterContext>()({
22
25
  validateSearch: (search) => SearchParams.setMany(search),
@@ -26,6 +29,7 @@ export const Route = createRootRouteWithContext<RouterContext>()({
26
29
  // Game.onNavigate(async (to) => redirect({ to }));
27
30
  await Promise.all([import("@/content"), initializeIndexedDB(), defineAssets(), useI18n()]);
28
31
  await setupPixivnViteData();
32
+ await setupInkHmrListener();
29
33
  if (location.pathname !== "/") {
30
34
  const isRefreshSaveExist = await loadRefreshSave();
31
35
  if (isRefreshSaveExist) {
@@ -43,6 +47,7 @@ export const Route = createRootRouteWithContext<RouterContext>()({
43
47
  });
44
48
 
45
49
  function RootComponent() {
50
+ useInkInitialization();
46
51
  useAutoSaveOnPageClose();
47
52
  useConfirmBackNavigation();
48
53
 
@@ -54,22 +59,11 @@ function RootComponent() {
54
59
  <Outlet />
55
60
  </RootProvider>
56
61
 
57
- <TanStackDevtools
58
- config={{
59
- position: "bottom-right",
60
- }}
61
- plugins={[
62
- {
63
- name: "UI screens",
64
- render: <TanStackRouterDevtoolsPanel />,
65
- },
66
- { ...hotkeysDevtoolsPlugin(), name: "Hotkeys" },
67
- {
68
- name: "UI cache",
69
- render: <ReactQueryDevtoolsPanel />,
70
- },
71
- ]}
72
- />
62
+ {DevDevtools && (
63
+ <Suspense>
64
+ <DevDevtools />
65
+ </Suspense>
66
+ )}
73
67
  </>
74
68
  );
75
69
  }