idlerpg.sh 0.1.0

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 (478) hide show
  1. package/README.md +171 -0
  2. package/dist/affix/AffixRegistry.d.ts +68 -0
  3. package/dist/affix/AffixRegistry.d.ts.map +1 -0
  4. package/dist/affix/AffixRegistry.js +245 -0
  5. package/dist/affix/AffixRegistry.js.map +1 -0
  6. package/dist/affix/PluginLoader.d.ts +66 -0
  7. package/dist/affix/PluginLoader.d.ts.map +1 -0
  8. package/dist/affix/PluginLoader.js +321 -0
  9. package/dist/affix/PluginLoader.js.map +1 -0
  10. package/dist/affix/builtin.d.ts +6 -0
  11. package/dist/affix/builtin.d.ts.map +1 -0
  12. package/dist/affix/builtin.js +311 -0
  13. package/dist/affix/builtin.js.map +1 -0
  14. package/dist/affix/index.d.ts +8 -0
  15. package/dist/affix/index.d.ts.map +1 -0
  16. package/dist/affix/index.js +11 -0
  17. package/dist/affix/index.js.map +1 -0
  18. package/dist/affix/types.d.ts +152 -0
  19. package/dist/affix/types.d.ts.map +1 -0
  20. package/dist/affix/types.js +8 -0
  21. package/dist/affix/types.js.map +1 -0
  22. package/dist/ai/PlayKitClient.d.ts +208 -0
  23. package/dist/ai/PlayKitClient.d.ts.map +1 -0
  24. package/dist/ai/PlayKitClient.js +721 -0
  25. package/dist/ai/PlayKitClient.js.map +1 -0
  26. package/dist/ai/index.d.ts +5 -0
  27. package/dist/ai/index.d.ts.map +1 -0
  28. package/dist/ai/index.js +8 -0
  29. package/dist/ai/index.js.map +1 -0
  30. package/dist/app/App.d.ts +85 -0
  31. package/dist/app/App.d.ts.map +1 -0
  32. package/dist/app/App.js +296 -0
  33. package/dist/app/App.js.map +1 -0
  34. package/dist/app/EventBus.d.ts +222 -0
  35. package/dist/app/EventBus.d.ts.map +1 -0
  36. package/dist/app/EventBus.js +88 -0
  37. package/dist/app/EventBus.js.map +1 -0
  38. package/dist/app/Keybind.d.ts +83 -0
  39. package/dist/app/Keybind.d.ts.map +1 -0
  40. package/dist/app/Keybind.js +184 -0
  41. package/dist/app/Keybind.js.map +1 -0
  42. package/dist/app/Router.d.ts +123 -0
  43. package/dist/app/Router.d.ts.map +1 -0
  44. package/dist/app/Router.js +142 -0
  45. package/dist/app/Router.js.map +1 -0
  46. package/dist/app/ScreenManager.d.ts +97 -0
  47. package/dist/app/ScreenManager.d.ts.map +1 -0
  48. package/dist/app/ScreenManager.js +216 -0
  49. package/dist/app/ScreenManager.js.map +1 -0
  50. package/dist/app/index.d.ts +14 -0
  51. package/dist/app/index.d.ts.map +1 -0
  52. package/dist/app/index.js +19 -0
  53. package/dist/app/index.js.map +1 -0
  54. package/dist/app/screens/BaseScreen.d.ts +101 -0
  55. package/dist/app/screens/BaseScreen.d.ts.map +1 -0
  56. package/dist/app/screens/BaseScreen.js +132 -0
  57. package/dist/app/screens/BaseScreen.js.map +1 -0
  58. package/dist/app/screens/CharacterCreationScreen.d.ts +42 -0
  59. package/dist/app/screens/CharacterCreationScreen.d.ts.map +1 -0
  60. package/dist/app/screens/CharacterCreationScreen.js +467 -0
  61. package/dist/app/screens/CharacterCreationScreen.js.map +1 -0
  62. package/dist/app/screens/CombatScreen.d.ts +30 -0
  63. package/dist/app/screens/CombatScreen.d.ts.map +1 -0
  64. package/dist/app/screens/CombatScreen.js +309 -0
  65. package/dist/app/screens/CombatScreen.js.map +1 -0
  66. package/dist/app/screens/DialogScreen.d.ts +29 -0
  67. package/dist/app/screens/DialogScreen.d.ts.map +1 -0
  68. package/dist/app/screens/DialogScreen.js +295 -0
  69. package/dist/app/screens/DialogScreen.js.map +1 -0
  70. package/dist/app/screens/ExploreScreen.d.ts +50 -0
  71. package/dist/app/screens/ExploreScreen.d.ts.map +1 -0
  72. package/dist/app/screens/ExploreScreen.js +308 -0
  73. package/dist/app/screens/ExploreScreen.js.map +1 -0
  74. package/dist/app/screens/HelpScreen.d.ts +12 -0
  75. package/dist/app/screens/HelpScreen.d.ts.map +1 -0
  76. package/dist/app/screens/HelpScreen.js +155 -0
  77. package/dist/app/screens/HelpScreen.js.map +1 -0
  78. package/dist/app/screens/InventoryScreen.d.ts +27 -0
  79. package/dist/app/screens/InventoryScreen.d.ts.map +1 -0
  80. package/dist/app/screens/InventoryScreen.js +326 -0
  81. package/dist/app/screens/InventoryScreen.js.map +1 -0
  82. package/dist/app/screens/PrologueScreen.d.ts +24 -0
  83. package/dist/app/screens/PrologueScreen.d.ts.map +1 -0
  84. package/dist/app/screens/PrologueScreen.js +176 -0
  85. package/dist/app/screens/PrologueScreen.js.map +1 -0
  86. package/dist/app/screens/TitleScreen.d.ts +42 -0
  87. package/dist/app/screens/TitleScreen.d.ts.map +1 -0
  88. package/dist/app/screens/TitleScreen.js +380 -0
  89. package/dist/app/screens/TitleScreen.js.map +1 -0
  90. package/dist/app/screens/TravelScreen.d.ts +22 -0
  91. package/dist/app/screens/TravelScreen.d.ts.map +1 -0
  92. package/dist/app/screens/TravelScreen.js +122 -0
  93. package/dist/app/screens/TravelScreen.js.map +1 -0
  94. package/dist/app/screens/index.d.ts +14 -0
  95. package/dist/app/screens/index.d.ts.map +1 -0
  96. package/dist/app/screens/index.js +17 -0
  97. package/dist/app/screens/index.js.map +1 -0
  98. package/dist/commands/CommandRegistry.d.ts +91 -0
  99. package/dist/commands/CommandRegistry.d.ts.map +1 -0
  100. package/dist/commands/CommandRegistry.js +159 -0
  101. package/dist/commands/CommandRegistry.js.map +1 -0
  102. package/dist/commands/index.d.ts +7 -0
  103. package/dist/commands/index.d.ts.map +1 -0
  104. package/dist/commands/index.js +10 -0
  105. package/dist/commands/index.js.map +1 -0
  106. package/dist/core/Actor.d.ts +103 -0
  107. package/dist/core/Actor.d.ts.map +1 -0
  108. package/dist/core/Actor.js +409 -0
  109. package/dist/core/Actor.js.map +1 -0
  110. package/dist/core/Combat.d.ts +37 -0
  111. package/dist/core/Combat.d.ts.map +1 -0
  112. package/dist/core/Combat.js +294 -0
  113. package/dist/core/Combat.js.map +1 -0
  114. package/dist/core/DungeonRunner.d.ts +169 -0
  115. package/dist/core/DungeonRunner.d.ts.map +1 -0
  116. package/dist/core/DungeonRunner.js +627 -0
  117. package/dist/core/DungeonRunner.js.map +1 -0
  118. package/dist/core/Game.d.ts +133 -0
  119. package/dist/core/Game.d.ts.map +1 -0
  120. package/dist/core/Game.js +644 -0
  121. package/dist/core/Game.js.map +1 -0
  122. package/dist/core/IdleCombat.d.ts +61 -0
  123. package/dist/core/IdleCombat.d.ts.map +1 -0
  124. package/dist/core/IdleCombat.js +461 -0
  125. package/dist/core/IdleCombat.js.map +1 -0
  126. package/dist/core/IdleGameManager.d.ts +198 -0
  127. package/dist/core/IdleGameManager.d.ts.map +1 -0
  128. package/dist/core/IdleGameManager.js +688 -0
  129. package/dist/core/IdleGameManager.js.map +1 -0
  130. package/dist/core/IdleSaveManager.d.ts +109 -0
  131. package/dist/core/IdleSaveManager.d.ts.map +1 -0
  132. package/dist/core/IdleSaveManager.js +296 -0
  133. package/dist/core/IdleSaveManager.js.map +1 -0
  134. package/dist/core/NewGameFlowManager.d.ts +64 -0
  135. package/dist/core/NewGameFlowManager.d.ts.map +1 -0
  136. package/dist/core/NewGameFlowManager.js +153 -0
  137. package/dist/core/NewGameFlowManager.js.map +1 -0
  138. package/dist/core/Player.d.ts +65 -0
  139. package/dist/core/Player.d.ts.map +1 -0
  140. package/dist/core/Player.js +261 -0
  141. package/dist/core/Player.js.map +1 -0
  142. package/dist/core/RoomHandlers.d.ts +75 -0
  143. package/dist/core/RoomHandlers.d.ts.map +1 -0
  144. package/dist/core/RoomHandlers.js +383 -0
  145. package/dist/core/RoomHandlers.js.map +1 -0
  146. package/dist/core/SaveManager.d.ts +84 -0
  147. package/dist/core/SaveManager.d.ts.map +1 -0
  148. package/dist/core/SaveManager.js +281 -0
  149. package/dist/core/SaveManager.js.map +1 -0
  150. package/dist/core/SaveMigration.d.ts +69 -0
  151. package/dist/core/SaveMigration.d.ts.map +1 -0
  152. package/dist/core/SaveMigration.js +408 -0
  153. package/dist/core/SaveMigration.js.map +1 -0
  154. package/dist/core/StateAdapter.d.ts +79 -0
  155. package/dist/core/StateAdapter.d.ts.map +1 -0
  156. package/dist/core/StateAdapter.js +397 -0
  157. package/dist/core/StateAdapter.js.map +1 -0
  158. package/dist/core/Team.d.ts +145 -0
  159. package/dist/core/Team.d.ts.map +1 -0
  160. package/dist/core/Team.js +371 -0
  161. package/dist/core/Team.js.map +1 -0
  162. package/dist/core/TeamCombat.d.ts +88 -0
  163. package/dist/core/TeamCombat.d.ts.map +1 -0
  164. package/dist/core/TeamCombat.js +405 -0
  165. package/dist/core/TeamCombat.js.map +1 -0
  166. package/dist/core/TeamDungeonRunner.d.ts +186 -0
  167. package/dist/core/TeamDungeonRunner.d.ts.map +1 -0
  168. package/dist/core/TeamDungeonRunner.js +758 -0
  169. package/dist/core/TeamDungeonRunner.js.map +1 -0
  170. package/dist/core/TimeManager.d.ts +114 -0
  171. package/dist/core/TimeManager.d.ts.map +1 -0
  172. package/dist/core/TimeManager.js +318 -0
  173. package/dist/core/TimeManager.js.map +1 -0
  174. package/dist/core/index.d.ts +9 -0
  175. package/dist/core/index.d.ts.map +1 -0
  176. package/dist/core/index.js +12 -0
  177. package/dist/core/index.js.map +1 -0
  178. package/dist/core/timeConstants.d.ts +135 -0
  179. package/dist/core/timeConstants.d.ts.map +1 -0
  180. package/dist/core/timeConstants.js +157 -0
  181. package/dist/core/timeConstants.js.map +1 -0
  182. package/dist/core/types.d.ts +780 -0
  183. package/dist/core/types.d.ts.map +1 -0
  184. package/dist/core/types.js +16 -0
  185. package/dist/core/types.js.map +1 -0
  186. package/dist/data/continents/index.d.ts +163 -0
  187. package/dist/data/continents/index.d.ts.map +1 -0
  188. package/dist/data/continents/index.js +31 -0
  189. package/dist/data/continents/index.js.map +1 -0
  190. package/dist/data/continents/verdantia.d.ts +294 -0
  191. package/dist/data/continents/verdantia.d.ts.map +1 -0
  192. package/dist/data/continents/verdantia.js +327 -0
  193. package/dist/data/continents/verdantia.js.map +1 -0
  194. package/dist/handlers/DialogHandler.d.ts +95 -0
  195. package/dist/handlers/DialogHandler.d.ts.map +1 -0
  196. package/dist/handlers/DialogHandler.js +450 -0
  197. package/dist/handlers/DialogHandler.js.map +1 -0
  198. package/dist/handlers/SaveLoadHandler.d.ts +60 -0
  199. package/dist/handlers/SaveLoadHandler.d.ts.map +1 -0
  200. package/dist/handlers/SaveLoadHandler.js +187 -0
  201. package/dist/handlers/SaveLoadHandler.js.map +1 -0
  202. package/dist/handlers/TitleScreenHandler.d.ts +43 -0
  203. package/dist/handlers/TitleScreenHandler.d.ts.map +1 -0
  204. package/dist/handlers/TitleScreenHandler.js +508 -0
  205. package/dist/handlers/TitleScreenHandler.js.map +1 -0
  206. package/dist/handlers/WorkshopHandler.d.ts +75 -0
  207. package/dist/handlers/WorkshopHandler.d.ts.map +1 -0
  208. package/dist/handlers/WorkshopHandler.js +401 -0
  209. package/dist/handlers/WorkshopHandler.js.map +1 -0
  210. package/dist/handlers/index.d.ts +12 -0
  211. package/dist/handlers/index.d.ts.map +1 -0
  212. package/dist/handlers/index.js +14 -0
  213. package/dist/handlers/index.js.map +1 -0
  214. package/dist/handlers/types.d.ts +34 -0
  215. package/dist/handlers/types.d.ts.map +1 -0
  216. package/dist/handlers/types.js +8 -0
  217. package/dist/handlers/types.js.map +1 -0
  218. package/dist/i18n/en.d.ts +3 -0
  219. package/dist/i18n/en.d.ts.map +1 -0
  220. package/dist/i18n/en.js +130 -0
  221. package/dist/i18n/en.js.map +1 -0
  222. package/dist/i18n/index.d.ts +40 -0
  223. package/dist/i18n/index.d.ts.map +1 -0
  224. package/dist/i18n/index.js +105 -0
  225. package/dist/i18n/index.js.map +1 -0
  226. package/dist/i18n/types.d.ts +133 -0
  227. package/dist/i18n/types.d.ts.map +1 -0
  228. package/dist/i18n/types.js +8 -0
  229. package/dist/i18n/types.js.map +1 -0
  230. package/dist/i18n/zh.d.ts +3 -0
  231. package/dist/i18n/zh.d.ts.map +1 -0
  232. package/dist/i18n/zh.js +130 -0
  233. package/dist/i18n/zh.js.map +1 -0
  234. package/dist/instrument.d.ts +8 -0
  235. package/dist/instrument.d.ts.map +1 -0
  236. package/dist/instrument.js +33 -0
  237. package/dist/instrument.js.map +1 -0
  238. package/dist/main-new.d.ts +12 -0
  239. package/dist/main-new.d.ts.map +1 -0
  240. package/dist/main-new.js +32 -0
  241. package/dist/main-new.js.map +1 -0
  242. package/dist/main.d.ts +7 -0
  243. package/dist/main.d.ts.map +1 -0
  244. package/dist/main.js +2816 -0
  245. package/dist/main.js.map +1 -0
  246. package/dist/map/ContinentManager.d.ts +88 -0
  247. package/dist/map/ContinentManager.d.ts.map +1 -0
  248. package/dist/map/ContinentManager.js +241 -0
  249. package/dist/map/ContinentManager.js.map +1 -0
  250. package/dist/map/DungeonGenerator.d.ts +32 -0
  251. package/dist/map/DungeonGenerator.d.ts.map +1 -0
  252. package/dist/map/DungeonGenerator.js +615 -0
  253. package/dist/map/DungeonGenerator.js.map +1 -0
  254. package/dist/map/MapGenerator.d.ts +27 -0
  255. package/dist/map/MapGenerator.d.ts.map +1 -0
  256. package/dist/map/MapGenerator.js +485 -0
  257. package/dist/map/MapGenerator.js.map +1 -0
  258. package/dist/map/index.d.ts +5 -0
  259. package/dist/map/index.d.ts.map +1 -0
  260. package/dist/map/index.js +8 -0
  261. package/dist/map/index.js.map +1 -0
  262. package/dist/npc/NPCGenerator.d.ts +68 -0
  263. package/dist/npc/NPCGenerator.d.ts.map +1 -0
  264. package/dist/npc/NPCGenerator.js +468 -0
  265. package/dist/npc/NPCGenerator.js.map +1 -0
  266. package/dist/npc/NPCManager.d.ts +86 -0
  267. package/dist/npc/NPCManager.d.ts.map +1 -0
  268. package/dist/npc/NPCManager.js +217 -0
  269. package/dist/npc/NPCManager.js.map +1 -0
  270. package/dist/npc/fixedNPCs.d.ts +7 -0
  271. package/dist/npc/fixedNPCs.d.ts.map +1 -0
  272. package/dist/npc/fixedNPCs.js +196 -0
  273. package/dist/npc/fixedNPCs.js.map +1 -0
  274. package/dist/npc/index.d.ts +9 -0
  275. package/dist/npc/index.d.ts.map +1 -0
  276. package/dist/npc/index.js +12 -0
  277. package/dist/npc/index.js.map +1 -0
  278. package/dist/npc/traits.d.ts +33 -0
  279. package/dist/npc/traits.d.ts.map +1 -0
  280. package/dist/npc/traits.js +795 -0
  281. package/dist/npc/traits.js.map +1 -0
  282. package/dist/npc/types.d.ts +193 -0
  283. package/dist/npc/types.d.ts.map +1 -0
  284. package/dist/npc/types.js +9 -0
  285. package/dist/npc/types.js.map +1 -0
  286. package/dist/quest/QuestManager.d.ts +79 -0
  287. package/dist/quest/QuestManager.d.ts.map +1 -0
  288. package/dist/quest/QuestManager.js +273 -0
  289. package/dist/quest/QuestManager.js.map +1 -0
  290. package/dist/quest/index.d.ts +6 -0
  291. package/dist/quest/index.d.ts.map +1 -0
  292. package/dist/quest/index.js +9 -0
  293. package/dist/quest/index.js.map +1 -0
  294. package/dist/quest/types.d.ts +81 -0
  295. package/dist/quest/types.d.ts.map +1 -0
  296. package/dist/quest/types.js +8 -0
  297. package/dist/quest/types.js.map +1 -0
  298. package/dist/strategy/StrategyExecutor.d.ts +159 -0
  299. package/dist/strategy/StrategyExecutor.d.ts.map +1 -0
  300. package/dist/strategy/StrategyExecutor.js +479 -0
  301. package/dist/strategy/StrategyExecutor.js.map +1 -0
  302. package/dist/strategy/StrategyParser.d.ts +48 -0
  303. package/dist/strategy/StrategyParser.d.ts.map +1 -0
  304. package/dist/strategy/StrategyParser.js +321 -0
  305. package/dist/strategy/StrategyParser.js.map +1 -0
  306. package/dist/strategy/defaultStrategy.d.ts +40 -0
  307. package/dist/strategy/defaultStrategy.d.ts.map +1 -0
  308. package/dist/strategy/defaultStrategy.js +254 -0
  309. package/dist/strategy/defaultStrategy.js.map +1 -0
  310. package/dist/strategy/index.d.ts +8 -0
  311. package/dist/strategy/index.d.ts.map +1 -0
  312. package/dist/strategy/index.js +14 -0
  313. package/dist/strategy/index.js.map +1 -0
  314. package/dist/tui/ExploreMenu.d.ts +106 -0
  315. package/dist/tui/ExploreMenu.d.ts.map +1 -0
  316. package/dist/tui/ExploreMenu.js +282 -0
  317. package/dist/tui/ExploreMenu.js.map +1 -0
  318. package/dist/tui/GameUI.d.ts +313 -0
  319. package/dist/tui/GameUI.d.ts.map +1 -0
  320. package/dist/tui/GameUI.js +2116 -0
  321. package/dist/tui/GameUI.js.map +1 -0
  322. package/dist/tui/GameUIAdapter.d.ts +207 -0
  323. package/dist/tui/GameUIAdapter.d.ts.map +1 -0
  324. package/dist/tui/GameUIAdapter.js +1342 -0
  325. package/dist/tui/GameUIAdapter.js.map +1 -0
  326. package/dist/tui/Input.d.ts +139 -0
  327. package/dist/tui/Input.d.ts.map +1 -0
  328. package/dist/tui/Input.js +278 -0
  329. package/dist/tui/Input.js.map +1 -0
  330. package/dist/tui/Menu.d.ts +110 -0
  331. package/dist/tui/Menu.d.ts.map +1 -0
  332. package/dist/tui/Menu.js +365 -0
  333. package/dist/tui/Menu.js.map +1 -0
  334. package/dist/tui/Screen.d.ts +228 -0
  335. package/dist/tui/Screen.d.ts.map +1 -0
  336. package/dist/tui/Screen.js +502 -0
  337. package/dist/tui/Screen.js.map +1 -0
  338. package/dist/tui/components/Box.d.ts +36 -0
  339. package/dist/tui/components/Box.d.ts.map +1 -0
  340. package/dist/tui/components/Box.js +43 -0
  341. package/dist/tui/components/Box.js.map +1 -0
  342. package/dist/tui/components/List.d.ts +69 -0
  343. package/dist/tui/components/List.d.ts.map +1 -0
  344. package/dist/tui/components/List.js +136 -0
  345. package/dist/tui/components/List.js.map +1 -0
  346. package/dist/tui/components/ProgressBar.d.ts +42 -0
  347. package/dist/tui/components/ProgressBar.d.ts.map +1 -0
  348. package/dist/tui/components/ProgressBar.js +75 -0
  349. package/dist/tui/components/ProgressBar.js.map +1 -0
  350. package/dist/tui/components/index.d.ts +8 -0
  351. package/dist/tui/components/index.d.ts.map +1 -0
  352. package/dist/tui/components/index.js +11 -0
  353. package/dist/tui/components/index.js.map +1 -0
  354. package/dist/tui/core/BaseSection.d.ts +98 -0
  355. package/dist/tui/core/BaseSection.d.ts.map +1 -0
  356. package/dist/tui/core/BaseSection.js +174 -0
  357. package/dist/tui/core/BaseSection.js.map +1 -0
  358. package/dist/tui/core/Component.d.ts +61 -0
  359. package/dist/tui/core/Component.d.ts.map +1 -0
  360. package/dist/tui/core/Component.js +32 -0
  361. package/dist/tui/core/Component.js.map +1 -0
  362. package/dist/tui/core/Section.d.ts +101 -0
  363. package/dist/tui/core/Section.d.ts.map +1 -0
  364. package/dist/tui/core/Section.js +24 -0
  365. package/dist/tui/core/Section.js.map +1 -0
  366. package/dist/tui/core/SectionManager.d.ts +108 -0
  367. package/dist/tui/core/SectionManager.d.ts.map +1 -0
  368. package/dist/tui/core/SectionManager.js +258 -0
  369. package/dist/tui/core/SectionManager.js.map +1 -0
  370. package/dist/tui/core/index.d.ts +9 -0
  371. package/dist/tui/core/index.d.ts.map +1 -0
  372. package/dist/tui/core/index.js +12 -0
  373. package/dist/tui/core/index.js.map +1 -0
  374. package/dist/tui/index.d.ts +15 -0
  375. package/dist/tui/index.d.ts.map +1 -0
  376. package/dist/tui/index.js +23 -0
  377. package/dist/tui/index.js.map +1 -0
  378. package/dist/tui/screens/BaseScreen.d.ts +62 -0
  379. package/dist/tui/screens/BaseScreen.d.ts.map +1 -0
  380. package/dist/tui/screens/BaseScreen.js +55 -0
  381. package/dist/tui/screens/BaseScreen.js.map +1 -0
  382. package/dist/tui/screens/CombatScreen.d.ts +43 -0
  383. package/dist/tui/screens/CombatScreen.d.ts.map +1 -0
  384. package/dist/tui/screens/CombatScreen.js +125 -0
  385. package/dist/tui/screens/CombatScreen.js.map +1 -0
  386. package/dist/tui/screens/DialogScreen.d.ts +53 -0
  387. package/dist/tui/screens/DialogScreen.d.ts.map +1 -0
  388. package/dist/tui/screens/DialogScreen.js +90 -0
  389. package/dist/tui/screens/DialogScreen.js.map +1 -0
  390. package/dist/tui/screens/DungeonScreen.d.ts +80 -0
  391. package/dist/tui/screens/DungeonScreen.d.ts.map +1 -0
  392. package/dist/tui/screens/DungeonScreen.js +317 -0
  393. package/dist/tui/screens/DungeonScreen.js.map +1 -0
  394. package/dist/tui/screens/ExploreScreen.d.ts +69 -0
  395. package/dist/tui/screens/ExploreScreen.d.ts.map +1 -0
  396. package/dist/tui/screens/ExploreScreen.js +224 -0
  397. package/dist/tui/screens/ExploreScreen.js.map +1 -0
  398. package/dist/tui/screens/SectionScreen.d.ts +84 -0
  399. package/dist/tui/screens/SectionScreen.d.ts.map +1 -0
  400. package/dist/tui/screens/SectionScreen.js +156 -0
  401. package/dist/tui/screens/SectionScreen.js.map +1 -0
  402. package/dist/tui/screens/TitleScreen.d.ts +40 -0
  403. package/dist/tui/screens/TitleScreen.d.ts.map +1 -0
  404. package/dist/tui/screens/TitleScreen.js +253 -0
  405. package/dist/tui/screens/TitleScreen.js.map +1 -0
  406. package/dist/tui/screens/TownScreen.d.ts +98 -0
  407. package/dist/tui/screens/TownScreen.d.ts.map +1 -0
  408. package/dist/tui/screens/TownScreen.js +370 -0
  409. package/dist/tui/screens/TownScreen.js.map +1 -0
  410. package/dist/tui/screens/TravelScreen.d.ts +67 -0
  411. package/dist/tui/screens/TravelScreen.d.ts.map +1 -0
  412. package/dist/tui/screens/TravelScreen.js +286 -0
  413. package/dist/tui/screens/TravelScreen.js.map +1 -0
  414. package/dist/tui/screens/index.d.ts +8 -0
  415. package/dist/tui/screens/index.d.ts.map +1 -0
  416. package/dist/tui/screens/index.js +17 -0
  417. package/dist/tui/screens/index.js.map +1 -0
  418. package/dist/tui/sections/ActionsSection.d.ts +71 -0
  419. package/dist/tui/sections/ActionsSection.d.ts.map +1 -0
  420. package/dist/tui/sections/ActionsSection.js +184 -0
  421. package/dist/tui/sections/ActionsSection.js.map +1 -0
  422. package/dist/tui/sections/DungeonSection.d.ts +65 -0
  423. package/dist/tui/sections/DungeonSection.d.ts.map +1 -0
  424. package/dist/tui/sections/DungeonSection.js +144 -0
  425. package/dist/tui/sections/DungeonSection.js.map +1 -0
  426. package/dist/tui/sections/EventsSection.d.ts +50 -0
  427. package/dist/tui/sections/EventsSection.d.ts.map +1 -0
  428. package/dist/tui/sections/EventsSection.js +134 -0
  429. package/dist/tui/sections/EventsSection.js.map +1 -0
  430. package/dist/tui/sections/MapSection.d.ts +66 -0
  431. package/dist/tui/sections/MapSection.d.ts.map +1 -0
  432. package/dist/tui/sections/MapSection.js +669 -0
  433. package/dist/tui/sections/MapSection.js.map +1 -0
  434. package/dist/tui/sections/StatusSection.d.ts +47 -0
  435. package/dist/tui/sections/StatusSection.d.ts.map +1 -0
  436. package/dist/tui/sections/StatusSection.js +133 -0
  437. package/dist/tui/sections/StatusSection.js.map +1 -0
  438. package/dist/tui/sections/TeamSection.d.ts +71 -0
  439. package/dist/tui/sections/TeamSection.d.ts.map +1 -0
  440. package/dist/tui/sections/TeamSection.js +224 -0
  441. package/dist/tui/sections/TeamSection.js.map +1 -0
  442. package/dist/tui/sections/TravelingSection.d.ts +51 -0
  443. package/dist/tui/sections/TravelingSection.d.ts.map +1 -0
  444. package/dist/tui/sections/TravelingSection.js +106 -0
  445. package/dist/tui/sections/TravelingSection.js.map +1 -0
  446. package/dist/tui/sections/index.d.ts +9 -0
  447. package/dist/tui/sections/index.d.ts.map +1 -0
  448. package/dist/tui/sections/index.js +12 -0
  449. package/dist/tui/sections/index.js.map +1 -0
  450. package/dist/ui/Terminal.d.ts +68 -0
  451. package/dist/ui/Terminal.d.ts.map +1 -0
  452. package/dist/ui/Terminal.js +297 -0
  453. package/dist/ui/Terminal.js.map +1 -0
  454. package/dist/ui/index.d.ts +5 -0
  455. package/dist/ui/index.d.ts.map +1 -0
  456. package/dist/ui/index.js +8 -0
  457. package/dist/ui/index.js.map +1 -0
  458. package/dist/utils/configMigration.d.ts +14 -0
  459. package/dist/utils/configMigration.d.ts.map +1 -0
  460. package/dist/utils/configMigration.js +92 -0
  461. package/dist/utils/configMigration.js.map +1 -0
  462. package/dist/utils/errorHandler.d.ts +86 -0
  463. package/dist/utils/errorHandler.d.ts.map +1 -0
  464. package/dist/utils/errorHandler.js +224 -0
  465. package/dist/utils/errorHandler.js.map +1 -0
  466. package/dist/utils/logger.d.ts +14 -0
  467. package/dist/utils/logger.d.ts.map +1 -0
  468. package/dist/utils/logger.js +43 -0
  469. package/dist/utils/logger.js.map +1 -0
  470. package/dist/weapon/WeaponFactory.d.ts +32 -0
  471. package/dist/weapon/WeaponFactory.d.ts.map +1 -0
  472. package/dist/weapon/WeaponFactory.js +216 -0
  473. package/dist/weapon/WeaponFactory.js.map +1 -0
  474. package/dist/weapon/index.d.ts +5 -0
  475. package/dist/weapon/index.d.ts.map +1 -0
  476. package/dist/weapon/index.js +8 -0
  477. package/dist/weapon/index.js.map +1 -0
  478. package/package.json +46 -0
@@ -0,0 +1,502 @@
1
+ /**
2
+ * TUI Screen Manager - Low-level terminal rendering
3
+ * Handles cursor, colors, and screen buffer management
4
+ */
5
+ // ANSI escape codes
6
+
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5ecd615-83d1-5ccb-808b-c3e5c7ad33d3")}catch(e){}}();
8
+ export const ANSI = {
9
+ // Cursor
10
+ hideCursor: '\x1b[?25l',
11
+ showCursor: '\x1b[?25h',
12
+ moveTo: (row, col) => `\x1b[${row};${col}H`,
13
+ moveUp: (n) => `\x1b[${n}A`,
14
+ moveDown: (n) => `\x1b[${n}B`,
15
+ moveRight: (n) => `\x1b[${n}C`,
16
+ moveLeft: (n) => `\x1b[${n}D`,
17
+ saveCursor: '\x1b[s',
18
+ restoreCursor: '\x1b[u',
19
+ // Screen
20
+ clearScreen: '\x1b[2J',
21
+ clearLine: '\x1b[2K',
22
+ clearToEnd: '\x1b[0J',
23
+ scrollUp: '\x1b[S',
24
+ scrollDown: '\x1b[T',
25
+ // Alternate screen buffer (prevents overlap with terminal history)
26
+ enterAltScreen: '\x1b[?1049h',
27
+ exitAltScreen: '\x1b[?1049l',
28
+ // Styles
29
+ reset: '\x1b[0m',
30
+ bold: '\x1b[1m',
31
+ dim: '\x1b[2m',
32
+ italic: '\x1b[3m',
33
+ underline: '\x1b[4m',
34
+ blink: '\x1b[5m',
35
+ inverse: '\x1b[7m',
36
+ // Foreground colors
37
+ fg: {
38
+ black: '\x1b[30m',
39
+ red: '\x1b[31m',
40
+ green: '\x1b[32m',
41
+ yellow: '\x1b[33m',
42
+ blue: '\x1b[34m',
43
+ magenta: '\x1b[35m',
44
+ cyan: '\x1b[36m',
45
+ white: '\x1b[37m',
46
+ gray: '\x1b[90m',
47
+ brightRed: '\x1b[91m',
48
+ brightGreen: '\x1b[92m',
49
+ brightYellow: '\x1b[93m',
50
+ brightBlue: '\x1b[94m',
51
+ brightMagenta: '\x1b[95m',
52
+ brightCyan: '\x1b[96m',
53
+ brightWhite: '\x1b[97m',
54
+ },
55
+ // Background colors
56
+ bg: {
57
+ black: '\x1b[40m',
58
+ red: '\x1b[41m',
59
+ green: '\x1b[42m',
60
+ yellow: '\x1b[43m',
61
+ blue: '\x1b[44m',
62
+ magenta: '\x1b[45m',
63
+ cyan: '\x1b[46m',
64
+ white: '\x1b[47m',
65
+ gray: '\x1b[100m',
66
+ },
67
+ };
68
+ // Box drawing characters
69
+ export const BOX = {
70
+ topLeft: '┌',
71
+ topRight: '┐',
72
+ bottomLeft: '└',
73
+ bottomRight: '┘',
74
+ horizontal: '─',
75
+ vertical: '│',
76
+ cross: '┼',
77
+ teeDown: '┬',
78
+ teeUp: '┴',
79
+ teeLeft: '┤',
80
+ teeRight: '├',
81
+ // Double
82
+ dTopLeft: '╔',
83
+ dTopRight: '╗',
84
+ dBottomLeft: '╚',
85
+ dBottomRight: '╝',
86
+ dHorizontal: '═',
87
+ dVertical: '║',
88
+ // Heavy
89
+ hTopLeft: '┏',
90
+ hTopRight: '┓',
91
+ hBottomLeft: '┗',
92
+ hBottomRight: '┛',
93
+ hHorizontal: '━',
94
+ hVertical: '┃',
95
+ };
96
+ // Progress bar characters
97
+ export const PROGRESS = {
98
+ full: '█',
99
+ high: '▓',
100
+ medium: '▒',
101
+ low: '░',
102
+ empty: '░',
103
+ };
104
+ // Minimum terminal size requirements
105
+ export const MIN_TERMINAL_SIZE = {
106
+ width: 80,
107
+ height: 24,
108
+ };
109
+ // Map symbols
110
+ export const MAP_SYMBOLS = {
111
+ player: '@',
112
+ town: 'T',
113
+ dungeon: 'D',
114
+ shop: 'S',
115
+ boss: 'B',
116
+ treasure: '$',
117
+ event: '!',
118
+ unexplored: '?',
119
+ empty: '·',
120
+ wall: '#',
121
+ door: '+',
122
+ path: '━',
123
+ pathV: '┃',
124
+ };
125
+ /**
126
+ * Screen class for managing terminal output
127
+ */
128
+ export class Screen {
129
+ width;
130
+ height;
131
+ buffer;
132
+ prevBuffer;
133
+ cursorVisible = true;
134
+ inAlternateScreen = false;
135
+ resizeCallbacks = [];
136
+ needsFullRedraw = false;
137
+ resizeTimeout = null;
138
+ isResizing = false;
139
+ constructor() {
140
+ this.width = process.stdout.columns || 80;
141
+ this.height = process.stdout.rows || 24;
142
+ this.buffer = this.createBuffer();
143
+ this.prevBuffer = this.createBuffer();
144
+ // Handle resize with debouncing
145
+ process.stdout.on('resize', () => {
146
+ // Mark as resizing to prevent renders during resize
147
+ this.isResizing = true;
148
+ // Clear any pending resize timeout
149
+ if (this.resizeTimeout) {
150
+ clearTimeout(this.resizeTimeout);
151
+ }
152
+ // Clear screen immediately to prevent artifacts
153
+ process.stdout.write(ANSI.clearScreen);
154
+ // Debounce: wait for resize to settle
155
+ this.resizeTimeout = setTimeout(() => {
156
+ this.isResizing = false;
157
+ const oldWidth = this.width;
158
+ const oldHeight = this.height;
159
+ this.width = process.stdout.columns || 80;
160
+ this.height = process.stdout.rows || 24;
161
+ // Rebuild buffers
162
+ this.buffer = this.createBuffer();
163
+ this.prevBuffer = this.createBuffer();
164
+ // Mark that we need a full redraw
165
+ this.needsFullRedraw = true;
166
+ // Notify resize callbacks (they should redraw content)
167
+ for (const callback of this.resizeCallbacks) {
168
+ callback(this.width, this.height);
169
+ }
170
+ }, 100); // Wait 100ms for resize to settle
171
+ });
172
+ }
173
+ /**
174
+ * Check if currently resizing
175
+ */
176
+ isCurrentlyResizing() {
177
+ return this.isResizing;
178
+ }
179
+ /**
180
+ * Register a resize callback
181
+ */
182
+ onResize(callback) {
183
+ this.resizeCallbacks.push(callback);
184
+ }
185
+ /**
186
+ * Check if terminal size meets minimum requirements
187
+ */
188
+ checkMinimumSize() {
189
+ return {
190
+ valid: this.width >= MIN_TERMINAL_SIZE.width && this.height >= MIN_TERMINAL_SIZE.height,
191
+ width: this.width,
192
+ height: this.height,
193
+ minWidth: MIN_TERMINAL_SIZE.width,
194
+ minHeight: MIN_TERMINAL_SIZE.height,
195
+ };
196
+ }
197
+ /**
198
+ * Render a "terminal too small" warning overlay
199
+ */
200
+ renderSizeWarning() {
201
+ // Clear and show warning in center
202
+ const msg1 = '⚠ Terminal too small ⚠';
203
+ const msg2 = `Current: ${this.width}×${this.height}`;
204
+ const msg3 = `Required: ${MIN_TERMINAL_SIZE.width}×${MIN_TERMINAL_SIZE.height}`;
205
+ const msg4 = 'Please resize your terminal window';
206
+ const maxLen = Math.max(msg1.length, msg2.length, msg3.length, msg4.length);
207
+ const boxWidth = maxLen + 6;
208
+ const boxHeight = 8;
209
+ // Calculate center position (works even for small screens)
210
+ const boxX = Math.max(0, Math.floor((this.width - boxWidth) / 2));
211
+ const boxY = Math.max(0, Math.floor((this.height - boxHeight) / 2));
212
+ // Clear screen first
213
+ process.stdout.write(ANSI.clearScreen + ANSI.moveTo(1, 1));
214
+ // Draw warning box directly to stdout (bypass buffer for small screens)
215
+ const lines = [];
216
+ // Top border
217
+ lines.push('┌' + '─'.repeat(boxWidth - 2) + '┐');
218
+ lines.push('│' + ' '.repeat(boxWidth - 2) + '│');
219
+ lines.push('│' + this.centerText(msg1, boxWidth - 2) + '│');
220
+ lines.push('│' + ' '.repeat(boxWidth - 2) + '│');
221
+ lines.push('│' + this.centerText(msg2, boxWidth - 2) + '│');
222
+ lines.push('│' + this.centerText(msg3, boxWidth - 2) + '│');
223
+ lines.push('│' + ' '.repeat(boxWidth - 2) + '│');
224
+ lines.push('│' + this.centerText(msg4, boxWidth - 2) + '│');
225
+ lines.push('│' + ' '.repeat(boxWidth - 2) + '│');
226
+ lines.push('└' + '─'.repeat(boxWidth - 2) + '┘');
227
+ // Output with colors
228
+ for (let i = 0; i < lines.length; i++) {
229
+ const y = boxY + i;
230
+ if (y >= 0 && y < this.height) {
231
+ process.stdout.write(ANSI.moveTo(y + 1, boxX + 1));
232
+ if (i === 2) {
233
+ // Warning message in yellow
234
+ process.stdout.write(ANSI.fg.yellow + ANSI.bold + lines[i] + ANSI.reset);
235
+ }
236
+ else if (i === 4 || i === 5) {
237
+ // Size info in cyan
238
+ process.stdout.write(ANSI.fg.cyan + lines[i] + ANSI.reset);
239
+ }
240
+ else {
241
+ process.stdout.write(ANSI.fg.white + lines[i] + ANSI.reset);
242
+ }
243
+ }
244
+ }
245
+ }
246
+ /**
247
+ * Center text within a given width
248
+ */
249
+ centerText(text, width) {
250
+ if (text.length >= width)
251
+ return text.slice(0, width);
252
+ const padding = Math.floor((width - text.length) / 2);
253
+ return ' '.repeat(padding) + text + ' '.repeat(width - padding - text.length);
254
+ }
255
+ /**
256
+ * Create empty buffer
257
+ */
258
+ createBuffer() {
259
+ const buffer = [];
260
+ for (let y = 0; y < this.height; y++) {
261
+ const row = [];
262
+ for (let x = 0; x < this.width; x++) {
263
+ row.push({ char: ' ' });
264
+ }
265
+ buffer.push(row);
266
+ }
267
+ return buffer;
268
+ }
269
+ /**
270
+ * Get screen dimensions
271
+ */
272
+ getSize() {
273
+ return { width: this.width, height: this.height };
274
+ }
275
+ /**
276
+ * Clear the buffer
277
+ */
278
+ clear() {
279
+ for (let y = 0; y < this.height; y++) {
280
+ for (let x = 0; x < this.width; x++) {
281
+ this.buffer[y][x] = { char: ' ' };
282
+ }
283
+ }
284
+ }
285
+ /**
286
+ * Write a character at position
287
+ */
288
+ setChar(x, y, char, fg, bg, style) {
289
+ if (x < 0 || x >= this.width || y < 0 || y >= this.height)
290
+ return;
291
+ this.buffer[y][x] = { char: char[0] || ' ', fg, bg, style };
292
+ }
293
+ /**
294
+ * Write text at position
295
+ */
296
+ write(x, y, text, fg, bg, style) {
297
+ for (let i = 0; i < text.length && x + i < this.width; i++) {
298
+ if (x + i >= 0) {
299
+ this.setChar(x + i, y, text[i], fg, bg, style);
300
+ }
301
+ }
302
+ }
303
+ /**
304
+ * Write styled text (supports inline color codes)
305
+ */
306
+ writeStyled(x, y, text) {
307
+ // Simple text without parsing for now
308
+ this.write(x, y, text);
309
+ }
310
+ /**
311
+ * Draw a box
312
+ */
313
+ drawBox(x, y, width, height, title, double = false, titleFg, titleBg) {
314
+ const chars = double
315
+ ? { tl: BOX.dTopLeft, tr: BOX.dTopRight, bl: BOX.dBottomLeft, br: BOX.dBottomRight, h: BOX.dHorizontal, v: BOX.dVertical }
316
+ : { tl: BOX.topLeft, tr: BOX.topRight, bl: BOX.bottomLeft, br: BOX.bottomRight, h: BOX.horizontal, v: BOX.vertical };
317
+ // Top border
318
+ this.setChar(x, y, chars.tl);
319
+ for (let i = 1; i < width - 1; i++) {
320
+ this.setChar(x + i, y, chars.h);
321
+ }
322
+ this.setChar(x + width - 1, y, chars.tr);
323
+ // Title with optional custom colors
324
+ if (title) {
325
+ const titleText = ` ${title} `;
326
+ const titleX = x + Math.floor((width - titleText.length) / 2);
327
+ this.write(titleX, y, titleText, titleFg || ANSI.fg.cyan, titleBg);
328
+ }
329
+ // Sides
330
+ for (let i = 1; i < height - 1; i++) {
331
+ this.setChar(x, y + i, chars.v);
332
+ this.setChar(x + width - 1, y + i, chars.v);
333
+ }
334
+ // Bottom border
335
+ this.setChar(x, y + height - 1, chars.bl);
336
+ for (let i = 1; i < width - 1; i++) {
337
+ this.setChar(x + i, y + height - 1, chars.h);
338
+ }
339
+ this.setChar(x + width - 1, y + height - 1, chars.br);
340
+ }
341
+ /**
342
+ * Draw a progress bar
343
+ */
344
+ drawProgressBar(x, y, width, value, max, fg, bg) {
345
+ const ratio = Math.max(0, Math.min(1, value / max));
346
+ const filled = Math.floor(ratio * width);
347
+ for (let i = 0; i < width; i++) {
348
+ const char = i < filled ? PROGRESS.full : PROGRESS.empty;
349
+ const color = i < filled ? (fg || ANSI.fg.green) : (bg || ANSI.fg.gray);
350
+ this.setChar(x + i, y, char, color);
351
+ }
352
+ }
353
+ /**
354
+ * Draw horizontal line
355
+ */
356
+ drawHLine(x, y, length, char = BOX.horizontal) {
357
+ for (let i = 0; i < length; i++) {
358
+ this.setChar(x + i, y, char);
359
+ }
360
+ }
361
+ /**
362
+ * Draw vertical line
363
+ */
364
+ drawVLine(x, y, length, char = BOX.vertical) {
365
+ for (let i = 0; i < length; i++) {
366
+ this.setChar(x, y + i, char);
367
+ }
368
+ }
369
+ /**
370
+ * Render buffer to screen (differential update, or full if needed)
371
+ */
372
+ render() {
373
+ // Skip rendering during resize
374
+ if (this.isResizing) {
375
+ return;
376
+ }
377
+ // If a resize happened, we need a full redraw
378
+ if (this.needsFullRedraw) {
379
+ this.needsFullRedraw = false;
380
+ this.forceRedraw();
381
+ return;
382
+ }
383
+ let output = '';
384
+ for (let y = 0; y < this.height; y++) {
385
+ for (let x = 0; x < this.width; x++) {
386
+ const cell = this.buffer[y][x];
387
+ const prevCell = this.prevBuffer[y][x];
388
+ // Only update changed cells
389
+ if (cell.char !== prevCell.char ||
390
+ cell.fg !== prevCell.fg ||
391
+ cell.bg !== prevCell.bg ||
392
+ cell.style !== prevCell.style) {
393
+ output += ANSI.moveTo(y + 1, x + 1);
394
+ if (cell.style)
395
+ output += cell.style;
396
+ if (cell.fg)
397
+ output += cell.fg;
398
+ if (cell.bg)
399
+ output += cell.bg;
400
+ output += cell.char;
401
+ output += ANSI.reset;
402
+ // Update prev buffer
403
+ this.prevBuffer[y][x] = { ...cell };
404
+ }
405
+ }
406
+ }
407
+ if (output) {
408
+ process.stdout.write(output);
409
+ }
410
+ }
411
+ /**
412
+ * Force full redraw
413
+ */
414
+ forceRedraw() {
415
+ // Skip during resize
416
+ if (this.isResizing) {
417
+ return;
418
+ }
419
+ // Clear screen and move to top-left
420
+ process.stdout.write(ANSI.clearScreen + ANSI.moveTo(1, 1));
421
+ // Build output with explicit cursor positioning for each row
422
+ // This is more reliable than using newlines
423
+ let output = '';
424
+ for (let y = 0; y < this.height; y++) {
425
+ // Move to start of row
426
+ output += ANSI.moveTo(y + 1, 1);
427
+ for (let x = 0; x < this.width; x++) {
428
+ const cell = this.buffer[y][x];
429
+ if (cell.style)
430
+ output += cell.style;
431
+ if (cell.fg)
432
+ output += cell.fg;
433
+ if (cell.bg)
434
+ output += cell.bg;
435
+ output += cell.char;
436
+ output += ANSI.reset;
437
+ this.prevBuffer[y][x] = { ...cell };
438
+ }
439
+ }
440
+ process.stdout.write(output);
441
+ }
442
+ /**
443
+ * Enter alternate screen buffer (prevents overlap with terminal history)
444
+ */
445
+ enterAlternateScreen() {
446
+ if (!this.inAlternateScreen) {
447
+ process.stdout.write(ANSI.enterAltScreen);
448
+ this.inAlternateScreen = true;
449
+ }
450
+ }
451
+ /**
452
+ * Exit alternate screen buffer (restores terminal history)
453
+ */
454
+ exitAlternateScreen() {
455
+ if (this.inAlternateScreen) {
456
+ process.stdout.write(ANSI.exitAltScreen);
457
+ this.inAlternateScreen = false;
458
+ }
459
+ }
460
+ /**
461
+ * Hide cursor
462
+ */
463
+ hideCursor() {
464
+ if (this.cursorVisible) {
465
+ process.stdout.write(ANSI.hideCursor);
466
+ this.cursorVisible = false;
467
+ }
468
+ }
469
+ /**
470
+ * Show cursor
471
+ */
472
+ showCursor() {
473
+ if (!this.cursorVisible) {
474
+ process.stdout.write(ANSI.showCursor);
475
+ this.cursorVisible = true;
476
+ }
477
+ }
478
+ /**
479
+ * Move cursor to position
480
+ */
481
+ moveCursor(x, y) {
482
+ process.stdout.write(ANSI.moveTo(y + 1, x + 1));
483
+ }
484
+ /**
485
+ * Cleanup on exit
486
+ */
487
+ cleanup() {
488
+ this.showCursor();
489
+ this.exitAlternateScreen();
490
+ process.stdout.write(ANSI.clearScreen + ANSI.moveTo(1, 1) + ANSI.reset);
491
+ }
492
+ }
493
+ // Singleton
494
+ let screenInstance = null;
495
+ export function getScreen() {
496
+ if (!screenInstance) {
497
+ screenInstance = new Screen();
498
+ }
499
+ return screenInstance;
500
+ }
501
+ //# sourceMappingURL=Screen.js.map
502
+ //# debugId=c5ecd615-83d1-5ccb-808b-c3e5c7ad33d3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Screen.js","sources":["tui/Screen.ts"],"sourceRoot":"/","sourcesContent":["/**\r\n * TUI Screen Manager - Low-level terminal rendering\r\n * Handles cursor, colors, and screen buffer management\r\n */\r\n\r\n// ANSI escape codes\r\nexport const ANSI = {\r\n // Cursor\r\n hideCursor: '\\x1b[?25l',\r\n showCursor: '\\x1b[?25h',\r\n moveTo: (row: number, col: number) => `\\x1b[${row};${col}H`,\r\n moveUp: (n: number) => `\\x1b[${n}A`,\r\n moveDown: (n: number) => `\\x1b[${n}B`,\r\n moveRight: (n: number) => `\\x1b[${n}C`,\r\n moveLeft: (n: number) => `\\x1b[${n}D`,\r\n saveCursor: '\\x1b[s',\r\n restoreCursor: '\\x1b[u',\r\n\r\n // Screen\r\n clearScreen: '\\x1b[2J',\r\n clearLine: '\\x1b[2K',\r\n clearToEnd: '\\x1b[0J',\r\n scrollUp: '\\x1b[S',\r\n scrollDown: '\\x1b[T',\r\n\r\n // Alternate screen buffer (prevents overlap with terminal history)\r\n enterAltScreen: '\\x1b[?1049h',\r\n exitAltScreen: '\\x1b[?1049l',\r\n\r\n // Styles\r\n reset: '\\x1b[0m',\r\n bold: '\\x1b[1m',\r\n dim: '\\x1b[2m',\r\n italic: '\\x1b[3m',\r\n underline: '\\x1b[4m',\r\n blink: '\\x1b[5m',\r\n inverse: '\\x1b[7m',\r\n\r\n // Foreground colors\r\n fg: {\r\n black: '\\x1b[30m',\r\n red: '\\x1b[31m',\r\n green: '\\x1b[32m',\r\n yellow: '\\x1b[33m',\r\n blue: '\\x1b[34m',\r\n magenta: '\\x1b[35m',\r\n cyan: '\\x1b[36m',\r\n white: '\\x1b[37m',\r\n gray: '\\x1b[90m',\r\n brightRed: '\\x1b[91m',\r\n brightGreen: '\\x1b[92m',\r\n brightYellow: '\\x1b[93m',\r\n brightBlue: '\\x1b[94m',\r\n brightMagenta: '\\x1b[95m',\r\n brightCyan: '\\x1b[96m',\r\n brightWhite: '\\x1b[97m',\r\n },\r\n\r\n // Background colors\r\n bg: {\r\n black: '\\x1b[40m',\r\n red: '\\x1b[41m',\r\n green: '\\x1b[42m',\r\n yellow: '\\x1b[43m',\r\n blue: '\\x1b[44m',\r\n magenta: '\\x1b[45m',\r\n cyan: '\\x1b[46m',\r\n white: '\\x1b[47m',\r\n gray: '\\x1b[100m',\r\n },\r\n};\r\n\r\n// Box drawing characters\r\nexport const BOX = {\r\n topLeft: '┌',\r\n topRight: '┐',\r\n bottomLeft: '└',\r\n bottomRight: '┘',\r\n horizontal: '─',\r\n vertical: '│',\r\n cross: '┼',\r\n teeDown: '┬',\r\n teeUp: '┴',\r\n teeLeft: '┤',\r\n teeRight: '├',\r\n // Double\r\n dTopLeft: '╔',\r\n dTopRight: '╗',\r\n dBottomLeft: '╚',\r\n dBottomRight: '╝',\r\n dHorizontal: '═',\r\n dVertical: '║',\r\n // Heavy\r\n hTopLeft: '┏',\r\n hTopRight: '┓',\r\n hBottomLeft: '┗',\r\n hBottomRight: '┛',\r\n hHorizontal: '━',\r\n hVertical: '┃',\r\n};\r\n\r\n// Progress bar characters\r\nexport const PROGRESS = {\r\n full: '█',\r\n high: '▓',\r\n medium: '▒',\r\n low: '░',\r\n empty: '░',\r\n};\r\n\r\n// Minimum terminal size requirements\r\nexport const MIN_TERMINAL_SIZE = {\r\n width: 80,\r\n height: 24,\r\n};\r\n\r\n// Map symbols\r\nexport const MAP_SYMBOLS = {\r\n player: '@',\r\n town: 'T',\r\n dungeon: 'D',\r\n shop: 'S',\r\n boss: 'B',\r\n treasure: '$',\r\n event: '!',\r\n unexplored: '?',\r\n empty: '·',\r\n wall: '#',\r\n door: '+',\r\n path: '━',\r\n pathV: '┃',\r\n};\r\n\r\n/**\r\n * Screen buffer cell\r\n */\r\ninterface Cell {\r\n char: string;\r\n fg?: string;\r\n bg?: string;\r\n style?: string;\r\n}\r\n\r\n/**\r\n * Screen class for managing terminal output\r\n */\r\nexport class Screen {\r\n private width: number;\r\n private height: number;\r\n private buffer: Cell[][];\r\n private prevBuffer: Cell[][];\r\n private cursorVisible: boolean = true;\r\n private inAlternateScreen: boolean = false;\r\n private resizeCallbacks: Array<(width: number, height: number) => void> = [];\r\n private needsFullRedraw: boolean = false;\r\n private resizeTimeout: NodeJS.Timeout | null = null;\r\n private isResizing: boolean = false;\r\n\r\n constructor() {\r\n this.width = process.stdout.columns || 80;\r\n this.height = process.stdout.rows || 24;\r\n this.buffer = this.createBuffer();\r\n this.prevBuffer = this.createBuffer();\r\n\r\n // Handle resize with debouncing\r\n process.stdout.on('resize', () => {\r\n // Mark as resizing to prevent renders during resize\r\n this.isResizing = true;\r\n \r\n // Clear any pending resize timeout\r\n if (this.resizeTimeout) {\r\n clearTimeout(this.resizeTimeout);\r\n }\r\n \r\n // Clear screen immediately to prevent artifacts\r\n process.stdout.write(ANSI.clearScreen);\r\n \r\n // Debounce: wait for resize to settle\r\n this.resizeTimeout = setTimeout(() => {\r\n this.isResizing = false;\r\n \r\n const oldWidth = this.width;\r\n const oldHeight = this.height;\r\n \r\n this.width = process.stdout.columns || 80;\r\n this.height = process.stdout.rows || 24;\r\n \r\n // Rebuild buffers\r\n this.buffer = this.createBuffer();\r\n this.prevBuffer = this.createBuffer();\r\n \r\n // Mark that we need a full redraw\r\n this.needsFullRedraw = true;\r\n \r\n // Notify resize callbacks (they should redraw content)\r\n for (const callback of this.resizeCallbacks) {\r\n callback(this.width, this.height);\r\n }\r\n }, 100); // Wait 100ms for resize to settle\r\n });\r\n }\r\n \r\n /**\r\n * Check if currently resizing\r\n */\r\n isCurrentlyResizing(): boolean {\r\n return this.isResizing;\r\n }\r\n\r\n /**\r\n * Register a resize callback\r\n */\r\n onResize(callback: (width: number, height: number) => void): void {\r\n this.resizeCallbacks.push(callback);\r\n }\r\n\r\n /**\r\n * Check if terminal size meets minimum requirements\r\n */\r\n checkMinimumSize(): { valid: boolean; width: number; height: number; minWidth: number; minHeight: number } {\r\n return {\r\n valid: this.width >= MIN_TERMINAL_SIZE.width && this.height >= MIN_TERMINAL_SIZE.height,\r\n width: this.width,\r\n height: this.height,\r\n minWidth: MIN_TERMINAL_SIZE.width,\r\n minHeight: MIN_TERMINAL_SIZE.height,\r\n };\r\n }\r\n\r\n /**\r\n * Render a \"terminal too small\" warning overlay\r\n */\r\n renderSizeWarning(): void {\r\n // Clear and show warning in center\r\n const msg1 = '⚠ Terminal too small ⚠';\r\n const msg2 = `Current: ${this.width}×${this.height}`;\r\n const msg3 = `Required: ${MIN_TERMINAL_SIZE.width}×${MIN_TERMINAL_SIZE.height}`;\r\n const msg4 = 'Please resize your terminal window';\r\n \r\n const maxLen = Math.max(msg1.length, msg2.length, msg3.length, msg4.length);\r\n const boxWidth = maxLen + 6;\r\n const boxHeight = 8;\r\n \r\n // Calculate center position (works even for small screens)\r\n const boxX = Math.max(0, Math.floor((this.width - boxWidth) / 2));\r\n const boxY = Math.max(0, Math.floor((this.height - boxHeight) / 2));\r\n \r\n // Clear screen first\r\n process.stdout.write(ANSI.clearScreen + ANSI.moveTo(1, 1));\r\n \r\n // Draw warning box directly to stdout (bypass buffer for small screens)\r\n const lines: string[] = [];\r\n \r\n // Top border\r\n lines.push('┌' + '─'.repeat(boxWidth - 2) + '┐');\r\n lines.push('│' + ' '.repeat(boxWidth - 2) + '│');\r\n lines.push('│' + this.centerText(msg1, boxWidth - 2) + '│');\r\n lines.push('│' + ' '.repeat(boxWidth - 2) + '│');\r\n lines.push('│' + this.centerText(msg2, boxWidth - 2) + '│');\r\n lines.push('│' + this.centerText(msg3, boxWidth - 2) + '│');\r\n lines.push('│' + ' '.repeat(boxWidth - 2) + '│');\r\n lines.push('│' + this.centerText(msg4, boxWidth - 2) + '│');\r\n lines.push('│' + ' '.repeat(boxWidth - 2) + '│');\r\n lines.push('└' + '─'.repeat(boxWidth - 2) + '┘');\r\n \r\n // Output with colors\r\n for (let i = 0; i < lines.length; i++) {\r\n const y = boxY + i;\r\n if (y >= 0 && y < this.height) {\r\n process.stdout.write(ANSI.moveTo(y + 1, boxX + 1));\r\n if (i === 2) {\r\n // Warning message in yellow\r\n process.stdout.write(ANSI.fg.yellow + ANSI.bold + lines[i] + ANSI.reset);\r\n } else if (i === 4 || i === 5) {\r\n // Size info in cyan\r\n process.stdout.write(ANSI.fg.cyan + lines[i] + ANSI.reset);\r\n } else {\r\n process.stdout.write(ANSI.fg.white + lines[i] + ANSI.reset);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Center text within a given width\r\n */\r\n private centerText(text: string, width: number): string {\r\n if (text.length >= width) return text.slice(0, width);\r\n const padding = Math.floor((width - text.length) / 2);\r\n return ' '.repeat(padding) + text + ' '.repeat(width - padding - text.length);\r\n }\r\n\r\n /**\r\n * Create empty buffer\r\n */\r\n private createBuffer(): Cell[][] {\r\n const buffer: Cell[][] = [];\r\n for (let y = 0; y < this.height; y++) {\r\n const row: Cell[] = [];\r\n for (let x = 0; x < this.width; x++) {\r\n row.push({ char: ' ' });\r\n }\r\n buffer.push(row);\r\n }\r\n return buffer;\r\n }\r\n\r\n /**\r\n * Get screen dimensions\r\n */\r\n getSize(): { width: number; height: number } {\r\n return { width: this.width, height: this.height };\r\n }\r\n\r\n /**\r\n * Clear the buffer\r\n */\r\n clear(): void {\r\n for (let y = 0; y < this.height; y++) {\r\n for (let x = 0; x < this.width; x++) {\r\n this.buffer[y][x] = { char: ' ' };\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Write a character at position\r\n */\r\n setChar(x: number, y: number, char: string, fg?: string, bg?: string, style?: string): void {\r\n if (x < 0 || x >= this.width || y < 0 || y >= this.height) return;\r\n this.buffer[y][x] = { char: char[0] || ' ', fg, bg, style };\r\n }\r\n\r\n /**\r\n * Write text at position\r\n */\r\n write(x: number, y: number, text: string, fg?: string, bg?: string, style?: string): void {\r\n for (let i = 0; i < text.length && x + i < this.width; i++) {\r\n if (x + i >= 0) {\r\n this.setChar(x + i, y, text[i], fg, bg, style);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Write styled text (supports inline color codes)\r\n */\r\n writeStyled(x: number, y: number, text: string): void {\r\n // Simple text without parsing for now\r\n this.write(x, y, text);\r\n }\r\n\r\n /**\r\n * Draw a box\r\n */\r\n drawBox(\r\n x: number, y: number, width: number, height: number, \r\n title?: string, double: boolean = false,\r\n titleFg?: string, titleBg?: string\r\n ): void {\r\n const chars = double\r\n ? { tl: BOX.dTopLeft, tr: BOX.dTopRight, bl: BOX.dBottomLeft, br: BOX.dBottomRight, h: BOX.dHorizontal, v: BOX.dVertical }\r\n : { tl: BOX.topLeft, tr: BOX.topRight, bl: BOX.bottomLeft, br: BOX.bottomRight, h: BOX.horizontal, v: BOX.vertical };\r\n\r\n // Top border\r\n this.setChar(x, y, chars.tl);\r\n for (let i = 1; i < width - 1; i++) {\r\n this.setChar(x + i, y, chars.h);\r\n }\r\n this.setChar(x + width - 1, y, chars.tr);\r\n\r\n // Title with optional custom colors\r\n if (title) {\r\n const titleText = ` ${title} `;\r\n const titleX = x + Math.floor((width - titleText.length) / 2);\r\n this.write(titleX, y, titleText, titleFg || ANSI.fg.cyan, titleBg);\r\n }\r\n\r\n // Sides\r\n for (let i = 1; i < height - 1; i++) {\r\n this.setChar(x, y + i, chars.v);\r\n this.setChar(x + width - 1, y + i, chars.v);\r\n }\r\n\r\n // Bottom border\r\n this.setChar(x, y + height - 1, chars.bl);\r\n for (let i = 1; i < width - 1; i++) {\r\n this.setChar(x + i, y + height - 1, chars.h);\r\n }\r\n this.setChar(x + width - 1, y + height - 1, chars.br);\r\n }\r\n\r\n /**\r\n * Draw a progress bar\r\n */\r\n drawProgressBar(x: number, y: number, width: number, value: number, max: number, fg?: string, bg?: string): void {\r\n const ratio = Math.max(0, Math.min(1, value / max));\r\n const filled = Math.floor(ratio * width);\r\n\r\n for (let i = 0; i < width; i++) {\r\n const char = i < filled ? PROGRESS.full : PROGRESS.empty;\r\n const color = i < filled ? (fg || ANSI.fg.green) : (bg || ANSI.fg.gray);\r\n this.setChar(x + i, y, char, color);\r\n }\r\n }\r\n\r\n /**\r\n * Draw horizontal line\r\n */\r\n drawHLine(x: number, y: number, length: number, char: string = BOX.horizontal): void {\r\n for (let i = 0; i < length; i++) {\r\n this.setChar(x + i, y, char);\r\n }\r\n }\r\n\r\n /**\r\n * Draw vertical line\r\n */\r\n drawVLine(x: number, y: number, length: number, char: string = BOX.vertical): void {\r\n for (let i = 0; i < length; i++) {\r\n this.setChar(x, y + i, char);\r\n }\r\n }\r\n\r\n /**\r\n * Render buffer to screen (differential update, or full if needed)\r\n */\r\n render(): void {\r\n // Skip rendering during resize\r\n if (this.isResizing) {\r\n return;\r\n }\r\n \r\n // If a resize happened, we need a full redraw\r\n if (this.needsFullRedraw) {\r\n this.needsFullRedraw = false;\r\n this.forceRedraw();\r\n return;\r\n }\r\n \r\n let output = '';\r\n \r\n for (let y = 0; y < this.height; y++) {\r\n for (let x = 0; x < this.width; x++) {\r\n const cell = this.buffer[y][x];\r\n const prevCell = this.prevBuffer[y][x];\r\n\r\n // Only update changed cells\r\n if (\r\n cell.char !== prevCell.char ||\r\n cell.fg !== prevCell.fg ||\r\n cell.bg !== prevCell.bg ||\r\n cell.style !== prevCell.style\r\n ) {\r\n output += ANSI.moveTo(y + 1, x + 1);\r\n \r\n if (cell.style) output += cell.style;\r\n if (cell.fg) output += cell.fg;\r\n if (cell.bg) output += cell.bg;\r\n \r\n output += cell.char;\r\n output += ANSI.reset;\r\n\r\n // Update prev buffer\r\n this.prevBuffer[y][x] = { ...cell };\r\n }\r\n }\r\n }\r\n\r\n if (output) {\r\n process.stdout.write(output);\r\n }\r\n }\r\n\r\n /**\r\n * Force full redraw\r\n */\r\n forceRedraw(): void {\r\n // Skip during resize\r\n if (this.isResizing) {\r\n return;\r\n }\r\n \r\n // Clear screen and move to top-left\r\n process.stdout.write(ANSI.clearScreen + ANSI.moveTo(1, 1));\r\n \r\n // Build output with explicit cursor positioning for each row\r\n // This is more reliable than using newlines\r\n let output = '';\r\n for (let y = 0; y < this.height; y++) {\r\n // Move to start of row\r\n output += ANSI.moveTo(y + 1, 1);\r\n \r\n for (let x = 0; x < this.width; x++) {\r\n const cell = this.buffer[y][x];\r\n \r\n if (cell.style) output += cell.style;\r\n if (cell.fg) output += cell.fg;\r\n if (cell.bg) output += cell.bg;\r\n \r\n output += cell.char;\r\n output += ANSI.reset;\r\n\r\n this.prevBuffer[y][x] = { ...cell };\r\n }\r\n }\r\n\r\n process.stdout.write(output);\r\n }\r\n\r\n /**\r\n * Enter alternate screen buffer (prevents overlap with terminal history)\r\n */\r\n enterAlternateScreen(): void {\r\n if (!this.inAlternateScreen) {\r\n process.stdout.write(ANSI.enterAltScreen);\r\n this.inAlternateScreen = true;\r\n }\r\n }\r\n\r\n /**\r\n * Exit alternate screen buffer (restores terminal history)\r\n */\r\n exitAlternateScreen(): void {\r\n if (this.inAlternateScreen) {\r\n process.stdout.write(ANSI.exitAltScreen);\r\n this.inAlternateScreen = false;\r\n }\r\n }\r\n\r\n /**\r\n * Hide cursor\r\n */\r\n hideCursor(): void {\r\n if (this.cursorVisible) {\r\n process.stdout.write(ANSI.hideCursor);\r\n this.cursorVisible = false;\r\n }\r\n }\r\n\r\n /**\r\n * Show cursor\r\n */\r\n showCursor(): void {\r\n if (!this.cursorVisible) {\r\n process.stdout.write(ANSI.showCursor);\r\n this.cursorVisible = true;\r\n }\r\n }\r\n\r\n /**\r\n * Move cursor to position\r\n */\r\n moveCursor(x: number, y: number): void {\r\n process.stdout.write(ANSI.moveTo(y + 1, x + 1));\r\n }\r\n\r\n /**\r\n * Cleanup on exit\r\n */\r\n cleanup(): void {\r\n this.showCursor();\r\n this.exitAlternateScreen();\r\n process.stdout.write(ANSI.clearScreen + ANSI.moveTo(1, 1) + ANSI.reset);\r\n }\r\n}\r\n\r\n// Singleton\r\nlet screenInstance: Screen | null = null;\r\n\r\nexport function getScreen(): Screen {\r\n if (!screenInstance) {\r\n screenInstance = new Screen();\r\n }\r\n return screenInstance;\r\n}\r\n"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAoB;;;AACpB,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,SAAS;IACT,UAAU,EAAE,WAAW;IACvB,UAAU,EAAE,WAAW;IACvB,MAAM,EAAE,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE,CAAC,QAAQ,GAAG,IAAI,GAAG,GAAG;IAC3D,MAAM,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG;IACnC,QAAQ,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG;IACrC,SAAS,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG;IACtC,QAAQ,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG;IACrC,UAAU,EAAE,QAAQ;IACpB,aAAa,EAAE,QAAQ;IAEvB,SAAS;IACT,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,QAAQ;IAEpB,mEAAmE;IACnE,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAE5B,SAAS;IACT,KAAK,EAAE,SAAS;IAChB,IA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G;IACH,UAAU;QACR,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC5B,CAAC;IACH,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,CAAS,EAAE,CAAS;QAC7B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1E,CAAC;CACF;AAED,YAAY;AACZ,IAAI,cAAc,GAAkB,IAAI,CAAC;AAEzC,MAAM,UAAU,SAAS;IACvB,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,cAAc,GAAG,IAAI,MAAM,EAAE,CAAC;IAChC,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC","debug_id":"c5ecd615-83d1-5ccb-808b-c3e5c7ad33d3"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Box Component - Draws a bordered box
3
+ */
4
+ import type { IComponent, RenderContext } from '../core/Component.js';
5
+ /**
6
+ * Box configuration
7
+ */
8
+ export interface BoxConfig {
9
+ title?: string;
10
+ titleFg?: string;
11
+ titleBg?: string;
12
+ double?: boolean;
13
+ filled?: boolean;
14
+ }
15
+ /**
16
+ * Box Component - Renders a bordered box with optional title
17
+ */
18
+ export declare class Box implements IComponent {
19
+ readonly id: string;
20
+ visible: boolean;
21
+ private config;
22
+ constructor(id: string, config?: BoxConfig);
23
+ /**
24
+ * Update box configuration
25
+ */
26
+ setConfig(config: Partial<BoxConfig>): void;
27
+ /**
28
+ * Render the box
29
+ */
30
+ render(ctx: RenderContext): void;
31
+ }
32
+ /**
33
+ * Draw a simple box directly to screen
34
+ */
35
+ export declare function drawBox(ctx: RenderContext, config?: BoxConfig): void;
36
+ //# sourceMappingURL=Box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Box.d.ts","sourceRoot":"/","sources":["tui/components/Box.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAQ,MAAM,sBAAsB,CAAC;AAG5E;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,GAAI,YAAW,UAAU;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAQ;IAExB,OAAO,CAAC,MAAM,CAAY;gBAEd,EAAE,EAAE,MAAM,EAAE,MAAM,GAAE,SAAc;IAK9C;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI;IAI3C;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;CASjC;AAED;;GAEG;AACH,wBAAgB,OAAO,CACrB,GAAG,EAAE,aAAa,EAClB,MAAM,GAAE,SAAc,GACrB,IAAI,CAGN"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Box Component - Draws a bordered box
3
+ */
4
+ /**
5
+ * Box Component - Renders a bordered box with optional title
6
+ */
7
+
8
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a55e9607-7568-5531-94eb-a698dbcc7f38")}catch(e){}}();
9
+ export class Box {
10
+ id;
11
+ visible = true;
12
+ config;
13
+ constructor(id, config = {}) {
14
+ this.id = id;
15
+ this.config = config;
16
+ }
17
+ /**
18
+ * Update box configuration
19
+ */
20
+ setConfig(config) {
21
+ this.config = { ...this.config, ...config };
22
+ }
23
+ /**
24
+ * Render the box
25
+ */
26
+ render(ctx) {
27
+ if (!this.visible)
28
+ return;
29
+ const { screen, bounds } = ctx;
30
+ const { x, y, width, height } = bounds;
31
+ const { title, titleFg, titleBg, double } = this.config;
32
+ screen.drawBox(x, y, width, height, title, double, titleFg, titleBg);
33
+ }
34
+ }
35
+ /**
36
+ * Draw a simple box directly to screen
37
+ */
38
+ export function drawBox(ctx, config = {}) {
39
+ const box = new Box('temp', config);
40
+ box.render(ctx);
41
+ }
42
+ //# sourceMappingURL=Box.js.map
43
+ //# debugId=a55e9607-7568-5531-94eb-a698dbcc7f38
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Box.js","sources":["tui/components/Box.ts"],"sourceRoot":"/","sourcesContent":["/**\r\n * Box Component - Draws a bordered box\r\n */\r\n\r\nimport type { IComponent, RenderContext, Rect } from '../core/Component.js';\r\nimport { ANSI, BOX } from '../Screen.js';\r\n\r\n/**\r\n * Box configuration\r\n */\r\nexport interface BoxConfig {\r\n title?: string;\r\n titleFg?: string;\r\n titleBg?: string;\r\n double?: boolean;\r\n filled?: boolean;\r\n}\r\n\r\n/**\r\n * Box Component - Renders a bordered box with optional title\r\n */\r\nexport class Box implements IComponent {\r\n readonly id: string;\r\n visible: boolean = true;\r\n\r\n private config: BoxConfig;\r\n\r\n constructor(id: string, config: BoxConfig = {}) {\r\n this.id = id;\r\n this.config = config;\r\n }\r\n\r\n /**\r\n * Update box configuration\r\n */\r\n setConfig(config: Partial<BoxConfig>): void {\r\n this.config = { ...this.config, ...config };\r\n }\r\n\r\n /**\r\n * Render the box\r\n */\r\n render(ctx: RenderContext): void {\r\n if (!this.visible) return;\r\n\r\n const { screen, bounds } = ctx;\r\n const { x, y, width, height } = bounds;\r\n const { title, titleFg, titleBg, double } = this.config;\r\n\r\n screen.drawBox(x, y, width, height, title, double, titleFg, titleBg);\r\n }\r\n}\r\n\r\n/**\r\n * Draw a simple box directly to screen\r\n */\r\nexport function drawBox(\r\n ctx: RenderContext,\r\n config: BoxConfig = {}\r\n): void {\r\n const box = new Box('temp', config);\r\n box.render(ctx);\r\n}\r\n"],"names":[],"mappings":"AAAA;;GAEG;AAgBH;;GAEG;;;AACH,MAAM,OAAO,GAAG;IACL,EAAE,CAAS;IACpB,OAAO,GAAY,IAAI,CAAC;IAEhB,MAAM,CAAY;IAE1B,YAAY,EAAU,EAAE,SAAoB,EAAE;QAC5C,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,MAA0B;QAClC,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,GAAkB;QACvB,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO;QAE1B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;QAC/B,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACvC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QAExD,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CACrB,GAAkB,EAClB,SAAoB,EAAE;IAEtB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAClB,CAAC","debug_id":"a55e9607-7568-5531-94eb-a698dbcc7f38"}