@buoy-gg/shared-ui 7.0.39 → 7.0.41

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 (377) hide show
  1. package/README.md +6 -0
  2. package/lib/commonjs/JsModal.js +13 -61
  3. package/lib/commonjs/JsModal.web.js +32 -95
  4. package/lib/commonjs/clipboard/autoDetectClipboard.js +1 -1
  5. package/lib/commonjs/clipboard/clipboard-impl.web.js +21 -0
  6. package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +4 -2
  7. package/lib/commonjs/hooks/index.js +1 -1
  8. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  9. package/lib/commonjs/hooks/usePersistedState.js +1 -1
  10. package/lib/commonjs/hooks/useSafeAreaInsets.web.js +41 -0
  11. package/lib/commonjs/icons/index.js +14 -0
  12. package/lib/commonjs/index.js +34 -0
  13. package/lib/commonjs/license/AccountSetup.js +4 -25
  14. package/lib/commonjs/license/AccountSetup.web.js +78 -64
  15. package/lib/commonjs/license/AccountSetupContent.js +482 -0
  16. package/lib/commonjs/license/FreeAccountPrompt.js +32 -178
  17. package/lib/commonjs/license/LicenseEntryModal.js +5 -12
  18. package/lib/commonjs/license/accountRuntime.js +8 -0
  19. package/lib/commonjs/license/accountRuntime.web.js +9 -0
  20. package/lib/commonjs/license/licenseModule.js +2 -0
  21. package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
  22. package/lib/commonjs/storage/definePersistedSetting.js +1 -1
  23. package/lib/commonjs/stores/ignoredPatternsCore.js +8 -1
  24. package/lib/commonjs/stores/ignoredPatternsStore.js +10 -199
  25. package/lib/commonjs/stores/ignoredPatternsStore.shared.js +205 -0
  26. package/lib/commonjs/stores/ignoredPatternsStore.web.js +10 -230
  27. package/lib/commonjs/ui/backgrounds/backgroundStore.js +1 -1
  28. package/lib/commonjs/ui/backgrounds/variants/wormhole.js +3 -0
  29. package/lib/commonjs/ui/components/CopyButton.js +1 -1
  30. package/lib/commonjs/ui/components/EventStepperFooter.js +1 -1
  31. package/lib/commonjs/ui/components/ToolFooter.js +1 -1
  32. package/lib/commonjs/ui/floating/FloatingTool.web.js +12 -2
  33. package/lib/commonjs/ui/night/primitives.js +10 -3
  34. package/lib/commonjs/ui/otto/OttoSprite.js +1 -1
  35. package/lib/commonjs/utils/browserAsyncStorage.js +157 -0
  36. package/lib/commonjs/utils/browserNavigation.js +116 -0
  37. package/lib/commonjs/utils/devServer.js +8 -4
  38. package/lib/commonjs/utils/devServer.web.js +10 -0
  39. package/lib/commonjs/utils/domRuntime.js +143 -0
  40. package/lib/commonjs/utils/expoRouterModule.js +51 -0
  41. package/lib/commonjs/utils/expoRouterModule.web.js +14 -0
  42. package/lib/commonjs/utils/getSafeAreaInsets.web.js +35 -0
  43. package/lib/commonjs/utils/index.js +111 -4
  44. package/lib/commonjs/utils/loadToolModule.js +46 -0
  45. package/lib/commonjs/utils/loadToolModule.web.js +12 -0
  46. package/lib/commonjs/utils/modalStorage.js +42 -0
  47. package/lib/commonjs/utils/nativeWeb.js +454 -0
  48. package/lib/commonjs/utils/persistentStorage.web.js +78 -0
  49. package/lib/commonjs/utils/reloadApp.js +18 -57
  50. package/lib/commonjs/utils/reloadPlatform.js +37 -0
  51. package/lib/commonjs/utils/reloadPlatform.web.js +17 -0
  52. package/lib/commonjs/utils/safeExpoRouter.js +3 -53
  53. package/lib/commonjs/utils/safeExpoRouter.web.js +48 -0
  54. package/lib/commonjs/utils/toolModules.js +25 -0
  55. package/lib/module/JsModal.js +11 -59
  56. package/lib/module/JsModal.web.js +28 -91
  57. package/lib/module/clipboard/autoDetectClipboard.js +2 -2
  58. package/lib/module/clipboard/clipboard-impl.web.js +14 -0
  59. package/lib/module/dataViewer/tree/TreeDiffViewer.js +4 -2
  60. package/lib/module/hooks/index.js +2 -2
  61. package/lib/module/hooks/safe-area-impl.js +1 -1
  62. package/lib/module/hooks/usePersistedState.js +1 -1
  63. package/lib/module/hooks/useSafeAreaInsets.web.js +30 -0
  64. package/lib/module/icons/index.js +2 -1
  65. package/lib/module/index.js +3 -0
  66. package/lib/module/license/AccountSetup.js +5 -26
  67. package/lib/module/license/AccountSetup.web.js +79 -65
  68. package/lib/module/license/AccountSetupContent.js +476 -0
  69. package/lib/module/license/FreeAccountPrompt.js +27 -176
  70. package/lib/module/license/LicenseEntryModal.js +6 -13
  71. package/lib/module/license/accountRuntime.js +3 -0
  72. package/lib/module/license/accountRuntime.web.js +4 -0
  73. package/lib/module/license/licenseModule.js +2 -0
  74. package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
  75. package/lib/module/storage/definePersistedSetting.js +1 -1
  76. package/lib/module/stores/ignoredPatternsCore.js +8 -1
  77. package/lib/module/stores/ignoredPatternsStore.js +1 -187
  78. package/lib/module/stores/ignoredPatternsStore.shared.js +189 -0
  79. package/lib/module/stores/ignoredPatternsStore.web.js +1 -219
  80. package/lib/module/ui/backgrounds/backgroundStore.js +1 -1
  81. package/lib/module/ui/backgrounds/variants/wormhole.js +3 -0
  82. package/lib/module/ui/components/CopyButton.js +1 -1
  83. package/lib/module/ui/components/EventStepperFooter.js +1 -1
  84. package/lib/module/ui/components/ToolFooter.js +1 -1
  85. package/lib/module/ui/floating/FloatingTool.web.js +12 -2
  86. package/lib/module/ui/night/primitives.js +11 -4
  87. package/lib/module/ui/otto/OttoSprite.js +1 -1
  88. package/lib/module/utils/browserAsyncStorage.js +151 -0
  89. package/lib/module/utils/browserNavigation.js +108 -0
  90. package/lib/module/utils/devServer.js +8 -4
  91. package/lib/module/utils/devServer.web.js +6 -0
  92. package/lib/module/utils/domRuntime.js +134 -0
  93. package/lib/module/utils/expoRouterModule.js +46 -0
  94. package/lib/module/utils/expoRouterModule.web.js +9 -0
  95. package/lib/module/utils/getSafeAreaInsets.web.js +31 -0
  96. package/lib/module/utils/index.js +9 -4
  97. package/lib/module/utils/loadToolModule.js +42 -0
  98. package/lib/module/utils/loadToolModule.web.js +8 -0
  99. package/lib/module/utils/modalStorage.js +37 -0
  100. package/lib/module/utils/nativeWeb.js +107 -0
  101. package/lib/module/utils/persistentStorage.web.js +72 -0
  102. package/lib/module/utils/reloadApp.js +13 -51
  103. package/lib/module/utils/reloadPlatform.js +31 -0
  104. package/lib/module/utils/reloadPlatform.web.js +11 -0
  105. package/lib/module/utils/safeExpoRouter.js +3 -53
  106. package/lib/module/utils/safeExpoRouter.web.js +37 -0
  107. package/lib/module/utils/toolModules.js +19 -0
  108. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/JsModal.web.d.ts +7 -18
  110. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts +5 -0
  112. package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  115. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts +6 -0
  116. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/icons/index.d.ts +1 -0
  118. package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/index.d.ts +2 -0
  120. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
  123. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/license/AccountSetupContent.d.ts +11 -0
  125. package/lib/typescript/commonjs/license/AccountSetupContent.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +3 -15
  127. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/license/accountRuntime.d.ts +2 -0
  130. package/lib/typescript/commonjs/license/accountRuntime.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/license/accountRuntime.web.d.ts +2 -0
  132. package/lib/typescript/commonjs/license/accountRuntime.web.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/license/licenseModule.d.ts +3 -1
  134. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/stores/ignoredPatternsCore.d.ts +5 -1
  136. package/lib/typescript/commonjs/stores/ignoredPatternsCore.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts +1 -59
  138. package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +60 -0
  140. package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts +1 -71
  142. package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +1 -1
  144. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
  146. package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts +25 -0
  147. package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/utils/browserNavigation.d.ts +31 -0
  149. package/lib/typescript/commonjs/utils/browserNavigation.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/utils/devServer.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/utils/devServer.web.d.ts +2 -0
  152. package/lib/typescript/commonjs/utils/devServer.web.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/utils/domRuntime.d.ts +27 -0
  154. package/lib/typescript/commonjs/utils/domRuntime.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/utils/expoRouterModule.d.ts +3 -0
  156. package/lib/typescript/commonjs/utils/expoRouterModule.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts +3 -0
  158. package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts +8 -0
  160. package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/utils/index.d.ts +5 -0
  162. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
  163. package/lib/typescript/commonjs/utils/loadToolModule.d.ts +3 -0
  164. package/lib/typescript/commonjs/utils/loadToolModule.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts +2 -0
  166. package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/utils/modalStorage.d.ts +21 -0
  168. package/lib/typescript/commonjs/utils/modalStorage.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/utils/nativeWeb.d.ts +22 -0
  170. package/lib/typescript/commonjs/utils/nativeWeb.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts +6 -0
  172. package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/utils/reloadApp.d.ts +7 -25
  174. package/lib/typescript/commonjs/utils/reloadApp.d.ts.map +1 -1
  175. package/lib/typescript/commonjs/utils/reloadPlatform.d.ts +8 -0
  176. package/lib/typescript/commonjs/utils/reloadPlatform.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts +4 -0
  178. package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts +43 -0
  181. package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/utils/toolModules.d.ts +5 -0
  183. package/lib/typescript/commonjs/utils/toolModules.d.ts.map +1 -0
  184. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  185. package/lib/typescript/module/JsModal.web.d.ts +7 -18
  186. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  187. package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts +5 -0
  188. package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts.map +1 -0
  189. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  190. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  191. package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts +6 -0
  192. package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts.map +1 -0
  193. package/lib/typescript/module/icons/index.d.ts +1 -0
  194. package/lib/typescript/module/icons/index.d.ts.map +1 -1
  195. package/lib/typescript/module/index.d.ts +2 -0
  196. package/lib/typescript/module/index.d.ts.map +1 -1
  197. package/lib/typescript/module/license/AccountSetup.d.ts.map +1 -1
  198. package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
  199. package/lib/typescript/module/license/AccountSetup.web.d.ts.map +1 -1
  200. package/lib/typescript/module/license/AccountSetupContent.d.ts +11 -0
  201. package/lib/typescript/module/license/AccountSetupContent.d.ts.map +1 -0
  202. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +3 -15
  203. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
  204. package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
  205. package/lib/typescript/module/license/accountRuntime.d.ts +2 -0
  206. package/lib/typescript/module/license/accountRuntime.d.ts.map +1 -0
  207. package/lib/typescript/module/license/accountRuntime.web.d.ts +2 -0
  208. package/lib/typescript/module/license/accountRuntime.web.d.ts.map +1 -0
  209. package/lib/typescript/module/license/licenseModule.d.ts +3 -1
  210. package/lib/typescript/module/license/licenseModule.d.ts.map +1 -1
  211. package/lib/typescript/module/stores/ignoredPatternsCore.d.ts +5 -1
  212. package/lib/typescript/module/stores/ignoredPatternsCore.d.ts.map +1 -1
  213. package/lib/typescript/module/stores/ignoredPatternsStore.d.ts +1 -59
  214. package/lib/typescript/module/stores/ignoredPatternsStore.d.ts.map +1 -1
  215. package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +60 -0
  216. package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts.map +1 -0
  217. package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts +1 -71
  218. package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts.map +1 -1
  219. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +1 -1
  220. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
  221. package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
  222. package/lib/typescript/module/utils/browserAsyncStorage.d.ts +25 -0
  223. package/lib/typescript/module/utils/browserAsyncStorage.d.ts.map +1 -0
  224. package/lib/typescript/module/utils/browserNavigation.d.ts +31 -0
  225. package/lib/typescript/module/utils/browserNavigation.d.ts.map +1 -0
  226. package/lib/typescript/module/utils/devServer.d.ts.map +1 -1
  227. package/lib/typescript/module/utils/devServer.web.d.ts +2 -0
  228. package/lib/typescript/module/utils/devServer.web.d.ts.map +1 -0
  229. package/lib/typescript/module/utils/domRuntime.d.ts +27 -0
  230. package/lib/typescript/module/utils/domRuntime.d.ts.map +1 -0
  231. package/lib/typescript/module/utils/expoRouterModule.d.ts +3 -0
  232. package/lib/typescript/module/utils/expoRouterModule.d.ts.map +1 -0
  233. package/lib/typescript/module/utils/expoRouterModule.web.d.ts +3 -0
  234. package/lib/typescript/module/utils/expoRouterModule.web.d.ts.map +1 -0
  235. package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts +8 -0
  236. package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts.map +1 -0
  237. package/lib/typescript/module/utils/index.d.ts +5 -0
  238. package/lib/typescript/module/utils/index.d.ts.map +1 -1
  239. package/lib/typescript/module/utils/loadToolModule.d.ts +3 -0
  240. package/lib/typescript/module/utils/loadToolModule.d.ts.map +1 -0
  241. package/lib/typescript/module/utils/loadToolModule.web.d.ts +2 -0
  242. package/lib/typescript/module/utils/loadToolModule.web.d.ts.map +1 -0
  243. package/lib/typescript/module/utils/modalStorage.d.ts +21 -0
  244. package/lib/typescript/module/utils/modalStorage.d.ts.map +1 -0
  245. package/lib/typescript/module/utils/nativeWeb.d.ts +22 -0
  246. package/lib/typescript/module/utils/nativeWeb.d.ts.map +1 -0
  247. package/lib/typescript/module/utils/persistentStorage.web.d.ts +6 -0
  248. package/lib/typescript/module/utils/persistentStorage.web.d.ts.map +1 -0
  249. package/lib/typescript/module/utils/reloadApp.d.ts +7 -25
  250. package/lib/typescript/module/utils/reloadApp.d.ts.map +1 -1
  251. package/lib/typescript/module/utils/reloadPlatform.d.ts +8 -0
  252. package/lib/typescript/module/utils/reloadPlatform.d.ts.map +1 -0
  253. package/lib/typescript/module/utils/reloadPlatform.web.d.ts +4 -0
  254. package/lib/typescript/module/utils/reloadPlatform.web.d.ts.map +1 -0
  255. package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +1 -1
  256. package/lib/typescript/module/utils/safeExpoRouter.web.d.ts +43 -0
  257. package/lib/typescript/module/utils/safeExpoRouter.web.d.ts.map +1 -0
  258. package/lib/typescript/module/utils/toolModules.d.ts +5 -0
  259. package/lib/typescript/module/utils/toolModules.d.ts.map +1 -0
  260. package/lib/web/asyncStorage.mjs +2 -0
  261. package/lib/web/chunks/chunk-2MHKRRQW.mjs +8 -0
  262. package/lib/web/chunks/chunk-2Q3SDPH2.mjs +14 -0
  263. package/lib/web/chunks/chunk-34YQ42KI.mjs +2 -0
  264. package/lib/web/chunks/chunk-3NNNCQYP.mjs +14 -0
  265. package/lib/web/chunks/chunk-3UTMGIUG.mjs +2 -0
  266. package/lib/web/chunks/chunk-46CXXOQB.mjs +2 -0
  267. package/lib/web/chunks/chunk-475BSDCB.mjs +2 -0
  268. package/lib/web/chunks/chunk-53J2FMUD.mjs +2 -0
  269. package/lib/web/chunks/chunk-552W4COI.mjs +2 -0
  270. package/lib/web/chunks/chunk-56TTTMX4.mjs +6145 -0
  271. package/lib/web/chunks/chunk-5LOQZINQ.mjs +14 -0
  272. package/lib/web/chunks/chunk-5NOIO6ZM.mjs +16 -0
  273. package/lib/web/chunks/chunk-5NZOQR6Q.mjs +2 -0
  274. package/lib/web/chunks/chunk-6CCRCSA2.mjs +2 -0
  275. package/lib/web/chunks/chunk-6Q52HRBL.mjs +2 -0
  276. package/lib/web/chunks/chunk-6TEDFSNM.mjs +655 -0
  277. package/lib/web/chunks/chunk-7BMRSMHN.mjs +2 -0
  278. package/lib/web/chunks/chunk-A2SOFE47.mjs +24 -0
  279. package/lib/web/chunks/chunk-A7KJCK4R.mjs +14 -0
  280. package/lib/web/chunks/chunk-AEXGGXS7.mjs +2 -0
  281. package/lib/web/chunks/chunk-AGD7ZT6O.mjs +15 -0
  282. package/lib/web/chunks/chunk-AIEOQWNG.mjs +2 -0
  283. package/lib/web/chunks/chunk-ASTM35HG.mjs +16 -0
  284. package/lib/web/chunks/chunk-AZBMFPMX.mjs +1421 -0
  285. package/lib/web/chunks/chunk-B2V2UDCU.mjs +16 -0
  286. package/lib/web/chunks/chunk-BFGKGTAC.mjs +2 -0
  287. package/lib/web/chunks/chunk-BHW6AFO6.mjs +2 -0
  288. package/lib/web/chunks/chunk-BWRW3NJ2.mjs +16 -0
  289. package/lib/web/chunks/chunk-CBM2IZAK.mjs +2 -0
  290. package/lib/web/chunks/chunk-CDLCFF44.mjs +2 -0
  291. package/lib/web/chunks/chunk-CE5U3CSQ.mjs +2 -0
  292. package/lib/web/chunks/chunk-CI5CO7FQ.mjs +2 -0
  293. package/lib/web/chunks/chunk-CIB4U2YK.mjs +2 -0
  294. package/lib/web/chunks/chunk-CLLTZQGD.mjs +596 -0
  295. package/lib/web/chunks/chunk-D5HQLRFW.mjs +655 -0
  296. package/lib/web/chunks/chunk-DZDTNXXK.mjs +2 -0
  297. package/lib/web/chunks/chunk-FDOZ6YSS.mjs +2 -0
  298. package/lib/web/chunks/chunk-FMEWNGQO.mjs +2 -0
  299. package/lib/web/chunks/chunk-G4DH7GMT.mjs +2 -0
  300. package/lib/web/chunks/chunk-GBUZCZE4.mjs +2 -0
  301. package/lib/web/chunks/chunk-GF5C5DVX.mjs +2 -0
  302. package/lib/web/chunks/chunk-GLMS5ZLJ.mjs +445 -0
  303. package/lib/web/chunks/chunk-GNGMIA7V.mjs +2 -0
  304. package/lib/web/chunks/chunk-GTYIS7H7.mjs +15 -0
  305. package/lib/web/chunks/chunk-HJ36IONA.mjs +15 -0
  306. package/lib/web/chunks/chunk-HXPTZMAZ.mjs +2 -0
  307. package/lib/web/chunks/chunk-I27M4JCS.mjs +2 -0
  308. package/lib/web/chunks/chunk-IVCT27JB.mjs +2 -0
  309. package/lib/web/chunks/chunk-JG4QSK5B.mjs +2 -0
  310. package/lib/web/chunks/chunk-JR7BJW6B.mjs +389 -0
  311. package/lib/web/chunks/chunk-K46ZJUXJ.mjs +90 -0
  312. package/lib/web/chunks/chunk-K4LXMO4D.mjs +2 -0
  313. package/lib/web/chunks/chunk-K7CGIEFU.mjs +2 -0
  314. package/lib/web/chunks/chunk-KBTYK5YE.mjs +662 -0
  315. package/lib/web/chunks/chunk-KHP6CSSM.mjs +2 -0
  316. package/lib/web/chunks/chunk-KRDRIW7T.mjs +14 -0
  317. package/lib/web/chunks/chunk-L2DTKDER.mjs +2 -0
  318. package/lib/web/chunks/chunk-LFDFDGHY.mjs +655 -0
  319. package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +2 -0
  320. package/lib/web/chunks/chunk-MAIUUK4E.mjs +2 -0
  321. package/lib/web/chunks/chunk-MKJKS3IG.mjs +275 -0
  322. package/lib/web/chunks/chunk-MRQKVLXG.mjs +2 -0
  323. package/lib/web/chunks/chunk-NK3OISOL.mjs +14 -0
  324. package/lib/web/chunks/chunk-NLJDDIXW.mjs +2 -0
  325. package/lib/web/chunks/chunk-OENR3XFI.mjs +11 -0
  326. package/lib/web/chunks/chunk-OZB3VKZE.mjs +2 -0
  327. package/lib/web/chunks/chunk-P64PFJT3.mjs +17618 -0
  328. package/lib/web/chunks/chunk-PACPGYH7.mjs +2 -0
  329. package/lib/web/chunks/chunk-PART6HOE.mjs +14 -0
  330. package/lib/web/chunks/chunk-PMRXUQRH.mjs +2 -0
  331. package/lib/web/chunks/chunk-PTK5FO6C.mjs +2 -0
  332. package/lib/web/chunks/chunk-PZ45TQ55.mjs +14 -0
  333. package/lib/web/chunks/chunk-Q5LN7GET.mjs +17624 -0
  334. package/lib/web/chunks/chunk-QCD6T6L4.mjs +297 -0
  335. package/lib/web/chunks/chunk-QD5EUANU.mjs +2 -0
  336. package/lib/web/chunks/chunk-QJTECJCO.mjs +2 -0
  337. package/lib/web/chunks/chunk-QPIZURPZ.mjs +2 -0
  338. package/lib/web/chunks/chunk-QPY45R5F.mjs +274 -0
  339. package/lib/web/chunks/chunk-R2SGZIG5.mjs +2 -0
  340. package/lib/web/chunks/chunk-S3GYQYVJ.mjs +16 -0
  341. package/lib/web/chunks/chunk-SCCXVTDM.mjs +2 -0
  342. package/lib/web/chunks/chunk-SHJHD646.mjs +2 -0
  343. package/lib/web/chunks/chunk-TCRVZ55E.mjs +2 -0
  344. package/lib/web/chunks/chunk-TJ6ZVV2L.mjs +15 -0
  345. package/lib/web/chunks/chunk-TPSY4RC3.mjs +14 -0
  346. package/lib/web/chunks/chunk-U5KNX5O6.mjs +17624 -0
  347. package/lib/web/chunks/chunk-UCKELQSM.mjs +2 -0
  348. package/lib/web/chunks/chunk-UGGCYHRH.mjs +15 -0
  349. package/lib/web/chunks/chunk-UNYQJZET.mjs +16 -0
  350. package/lib/web/chunks/chunk-VE72SWLV.mjs +15 -0
  351. package/lib/web/chunks/chunk-VKONO6MI.mjs +2 -0
  352. package/lib/web/chunks/chunk-W4BGMPJO.mjs +2 -0
  353. package/lib/web/chunks/chunk-WHNEEKLR.mjs +2 -0
  354. package/lib/web/chunks/chunk-WLGUP3KY.mjs +16 -0
  355. package/lib/web/chunks/chunk-WY7D4WBZ.mjs +2 -0
  356. package/lib/web/chunks/chunk-XRNB2MHO.mjs +107 -0
  357. package/lib/web/chunks/chunk-XXTIAXQY.mjs +2 -0
  358. package/lib/web/chunks/chunk-XYUAUO57.mjs +2 -0
  359. package/lib/web/chunks/chunk-YG6DIKQD.mjs +2 -0
  360. package/lib/web/chunks/chunk-YIZFMU66.mjs +2 -0
  361. package/lib/web/chunks/chunk-YOGAPOGC.mjs +2 -0
  362. package/lib/web/chunks/chunk-Z7373DS5.mjs +2 -0
  363. package/lib/web/chunks/chunk-Z76GRN66.mjs +17627 -0
  364. package/lib/web/chunks/persistentStorage.web-4FBAOYJ4.mjs +12 -0
  365. package/lib/web/chunks/persistentStorage.web-7W3Y6Q24.mjs +12 -0
  366. package/lib/web/chunks/persistentStorage.web-GOWNFMVT.mjs +2 -0
  367. package/lib/web/chunks/persistentStorage.web-RF47FXIK.mjs +12 -0
  368. package/lib/web/colors.mjs +2 -0
  369. package/lib/web/dataViewer.mjs +3 -0
  370. package/lib/web/floating.mjs +2 -0
  371. package/lib/web/history.mjs +2 -0
  372. package/lib/web/hooks.mjs +2 -0
  373. package/lib/web/index.mjs +15 -0
  374. package/lib/web/native.mjs +2 -0
  375. package/lib/web/ui.mjs +2 -0
  376. package/lib/web/utils.mjs +2 -0
  377. package/package.json +118 -36
@@ -0,0 +1,1421 @@
1
+ "use client";
2
+ import {
3
+ ActivityGlyph,
4
+ AlertCircleGlyph,
5
+ AlertOctagon,
6
+ AlertTriangleGlyph,
7
+ CheckCircleGlyph,
8
+ ChevronDownGlyph,
9
+ ChevronUpGlyph,
10
+ HelpCircle,
11
+ monoFont
12
+ } from "./chunk-56TTTMX4.mjs";
13
+ import {
14
+ gameUIColors
15
+ } from "./chunk-QPY45R5F.mjs";
16
+
17
+ // src/utils/safeStringify.ts
18
+ var CIRCULAR_REPLACE_NODE = "[Circular]";
19
+ var LIMIT_REPLACE_NODE = "[...]";
20
+ function safeStringify(obj, space, options = {}) {
21
+ const {
22
+ depthLimit = Number.MAX_SAFE_INTEGER,
23
+ edgesLimit = Number.MAX_SAFE_INTEGER
24
+ } = options;
25
+ const arr = [];
26
+ function decirc(val, k, edgeIndex, stack, parent, depth) {
27
+ depth += 1;
28
+ if (typeof val === "object" && val !== null) {
29
+ for (let i = 0; i < stack.length; i++) {
30
+ if (stack[i] === val) {
31
+ setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
32
+ return;
33
+ }
34
+ }
35
+ if (depth > depthLimit) {
36
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
37
+ return;
38
+ }
39
+ if (edgeIndex + 1 > edgesLimit) {
40
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
41
+ return;
42
+ }
43
+ stack.push(val);
44
+ if (Array.isArray(val)) {
45
+ const arrayParent = val;
46
+ for (let i = 0; i < val.length; i++) {
47
+ decirc(val[i], i, i, stack, arrayParent, depth);
48
+ }
49
+ } else if (val instanceof Map || val instanceof Set || val instanceof RegExp || val instanceof Date || val instanceof Error) {
50
+ stack.pop();
51
+ return;
52
+ } else {
53
+ const objParent = val;
54
+ const keys = Object.keys(objParent);
55
+ for (let i = 0; i < keys.length; i++) {
56
+ const key = keys[i];
57
+ decirc(objParent[key], key, i, stack, objParent, depth);
58
+ }
59
+ }
60
+ stack.pop();
61
+ }
62
+ }
63
+ function setReplace(replace, val, k, parent) {
64
+ if (!parent) return;
65
+ const propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
66
+ if (propertyDescriptor?.get !== void 0) {
67
+ if (propertyDescriptor.configurable) {
68
+ Object.defineProperty(parent, k, { value: replace });
69
+ arr.push([parent, k, val, propertyDescriptor]);
70
+ } else {
71
+ return;
72
+ }
73
+ } else {
74
+ parent[k] = replace;
75
+ arr.push([parent, k, val]);
76
+ }
77
+ }
78
+ const replacer = (key, value) => {
79
+ if (typeof value === "bigint") return `${value.toString()}n`;
80
+ if (typeof value === "symbol") return value.toString();
81
+ if (typeof value === "undefined") return "undefined";
82
+ if (typeof value === "function") {
83
+ return `[Function: ${value.name || "anonymous"}]`;
84
+ }
85
+ if (typeof value === "number") {
86
+ if (value === Infinity) return "Infinity";
87
+ if (value === -Infinity) return "-Infinity";
88
+ if (Number.isNaN(value)) return "NaN";
89
+ }
90
+ if (value instanceof Error) {
91
+ const errorObj = {
92
+ name: value.name,
93
+ message: value.message,
94
+ stack: value.stack
95
+ };
96
+ Object.getOwnPropertyNames(value).forEach((prop) => {
97
+ if (!["name", "message", "stack"].includes(prop)) {
98
+ try {
99
+ const propValue = value[prop];
100
+ if (propValue !== void 0) {
101
+ errorObj[prop] = propValue;
102
+ }
103
+ } catch {
104
+ }
105
+ }
106
+ });
107
+ return errorObj;
108
+ }
109
+ if (value instanceof Date) return value.toISOString();
110
+ if (value instanceof RegExp) return value.toString();
111
+ if (value instanceof Map) {
112
+ try {
113
+ const entries = Array.from(value.entries()).map(([mapKey, val]) => [
114
+ String(mapKey),
115
+ val
116
+ ]);
117
+ return {
118
+ __type: "Map",
119
+ entries
120
+ };
121
+ } catch {
122
+ return {
123
+ __type: "Map",
124
+ entries: "[Map iteration failed]"
125
+ };
126
+ }
127
+ }
128
+ if (value instanceof Set) {
129
+ try {
130
+ return {
131
+ __type: "Set",
132
+ values: Array.from(value)
133
+ };
134
+ } catch {
135
+ return {
136
+ __type: "Set",
137
+ values: "[Set iteration failed]"
138
+ };
139
+ }
140
+ }
141
+ return value;
142
+ };
143
+ try {
144
+ decirc(obj, "", 0, [], null, 0);
145
+ const result = JSON.stringify(obj, replacer, space);
146
+ return result;
147
+ } catch {
148
+ return JSON.stringify(
149
+ "[unable to serialize, circular reference is too complex to analyze]"
150
+ );
151
+ } finally {
152
+ while (arr.length !== 0) {
153
+ const part = arr.pop();
154
+ if (part && part.length === 4) {
155
+ const [targetObj, key, , descriptor] = part;
156
+ if (targetObj && typeof targetObj === "object" && descriptor) {
157
+ Object.defineProperty(targetObj, key, descriptor);
158
+ }
159
+ } else if (part) {
160
+ const [targetObj, key, value] = part;
161
+ if (targetObj && typeof targetObj === "object" && (typeof key === "string" || typeof key === "number")) {
162
+ targetObj[key] = value;
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+
169
+ // src/utils/minimalSuperJSON.ts
170
+ var isUndefined = (payload) => typeof payload === "undefined";
171
+ var isPlainObject = (payload) => {
172
+ if (typeof payload !== "object" || payload === null) return false;
173
+ if (payload === Object.prototype) return false;
174
+ if (Object.getPrototypeOf(payload) === null) return true;
175
+ return Object.getPrototypeOf(payload) === Object.prototype;
176
+ };
177
+ var isArray = (payload) => Array.isArray(payload);
178
+ var isPrimitive = (payload) => typeof payload === "boolean" || payload === null || typeof payload === "undefined" || typeof payload === "number" || typeof payload === "string" || typeof payload === "symbol";
179
+ var isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
180
+ var isError = (payload) => payload instanceof Error;
181
+ var isRegExp = (payload) => payload instanceof RegExp;
182
+ var isSet = (payload) => payload instanceof Set;
183
+ var isMap = (payload) => payload instanceof Map;
184
+ var isBigint = (payload) => typeof payload === "bigint";
185
+ var isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
186
+ var isInfinite = (payload) => payload === Infinity || payload === -Infinity;
187
+ var isMinusZero = (payload) => payload === 0 && 1 / payload === -Infinity;
188
+ var isURL = (payload) => payload instanceof URL;
189
+ var isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
190
+ var TYPED_ARRAY_CONSTRUCTORS = {
191
+ Int8Array,
192
+ Uint8Array,
193
+ Int16Array,
194
+ Uint16Array,
195
+ Int32Array,
196
+ Uint32Array,
197
+ Float32Array,
198
+ Float64Array,
199
+ Uint8ClampedArray
200
+ };
201
+ var transformRules = [
202
+ {
203
+ isApplicable: isUndefined,
204
+ annotation: "undefined",
205
+ transform: () => null,
206
+ untransform: () => void 0
207
+ },
208
+ {
209
+ isApplicable: isBigint,
210
+ annotation: "bigint",
211
+ transform: (v) => v.toString(),
212
+ untransform: (v) => {
213
+ if (typeof BigInt !== "undefined") {
214
+ return BigInt(v);
215
+ }
216
+ console.error("BigInt is not supported in this environment");
217
+ return v;
218
+ }
219
+ },
220
+ {
221
+ isApplicable: isDate,
222
+ annotation: "Date",
223
+ transform: (v) => v.toISOString(),
224
+ untransform: (v) => new Date(v)
225
+ },
226
+ {
227
+ isApplicable: isError,
228
+ annotation: "Error",
229
+ transform: (v) => ({
230
+ name: v.name,
231
+ message: v.message,
232
+ stack: v.stack,
233
+ cause: "cause" in v ? v.cause : void 0
234
+ }),
235
+ untransform: (v) => {
236
+ const e = new Error(v.message);
237
+ e.name = v.name;
238
+ e.stack = v.stack;
239
+ if (v.cause !== void 0) {
240
+ e.cause = v.cause;
241
+ }
242
+ return e;
243
+ }
244
+ },
245
+ {
246
+ isApplicable: isRegExp,
247
+ annotation: "regexp",
248
+ transform: (v) => "" + v,
249
+ untransform: (v) => {
250
+ const body = v.slice(1, v.lastIndexOf("/"));
251
+ const flags = v.slice(v.lastIndexOf("/") + 1);
252
+ return new RegExp(body, flags);
253
+ }
254
+ },
255
+ {
256
+ isApplicable: isSet,
257
+ annotation: "set",
258
+ transform: (v) => [...v.values()],
259
+ untransform: (v) => new Set(v)
260
+ },
261
+ {
262
+ isApplicable: isMap,
263
+ annotation: "map",
264
+ transform: (v) => [...v.entries()],
265
+ untransform: (v) => new Map(v)
266
+ },
267
+ {
268
+ isApplicable: (v) => isNaNValue(v) || isInfinite(v),
269
+ annotation: "number",
270
+ transform: (v) => {
271
+ if (isNaNValue(v)) return "NaN";
272
+ return v > 0 ? "Infinity" : "-Infinity";
273
+ },
274
+ untransform: (v) => Number(v)
275
+ },
276
+ {
277
+ isApplicable: isMinusZero,
278
+ annotation: "number",
279
+ transform: () => "-0",
280
+ untransform: () => -0
281
+ },
282
+ {
283
+ isApplicable: isURL,
284
+ annotation: "URL",
285
+ transform: (v) => v.toString(),
286
+ untransform: (v) => new URL(v)
287
+ },
288
+ {
289
+ isApplicable: isTypedArray,
290
+ annotation: (v) => ["typed-array", v.constructor.name],
291
+ transform: (v) => [...v],
292
+ untransform: (v, annotation) => {
293
+ const typeName = Array.isArray(annotation) ? annotation[1] : "Uint8Array";
294
+ const ctor = TYPED_ARRAY_CONSTRUCTORS[typeName];
295
+ if (!ctor) {
296
+ throw new Error(`Unknown typed array: ${typeName}`);
297
+ }
298
+ return new ctor(v);
299
+ }
300
+ }
301
+ ];
302
+ function transformValue(value) {
303
+ for (const rule of transformRules) {
304
+ if (rule.isApplicable(value)) {
305
+ const annotation = typeof rule.annotation === "function" ? rule.annotation(value) : rule.annotation;
306
+ return {
307
+ value: rule.transform(value),
308
+ type: annotation
309
+ };
310
+ }
311
+ }
312
+ return void 0;
313
+ }
314
+ function untransformValue(json, type) {
315
+ for (const rule of transformRules) {
316
+ const ruleAnnotation = typeof rule.annotation === "function" ? Array.isArray(type) ? type[0] : type : rule.annotation;
317
+ const matches = Array.isArray(type) && Array.isArray(ruleAnnotation) ? type[0] === ruleAnnotation[0] : ruleAnnotation === type;
318
+ if (matches) {
319
+ return rule.untransform(json, type);
320
+ }
321
+ }
322
+ throw new Error(`Unknown transformation: ${type}`);
323
+ }
324
+ var isDeep = (object) => isPlainObject(object) || isArray(object) || isMap(object) || isSet(object) || isError(object);
325
+ function escapeKey(key) {
326
+ return key.replace(/\\/g, "\\\\").replace(/\./g, "\\.");
327
+ }
328
+ function walker(object, path = [], objectsInThisPath = []) {
329
+ const primitive = isPrimitive(object);
330
+ if (!primitive && !isDeep(object)) {
331
+ const transformed2 = transformValue(object);
332
+ return transformed2 ? {
333
+ transformedValue: transformed2.value,
334
+ annotations: { [path.map(String).map(escapeKey).join(".")]: transformed2.type }
335
+ } : { transformedValue: object };
336
+ }
337
+ if (!primitive && objectsInThisPath.indexOf(object) !== -1) {
338
+ return { transformedValue: null };
339
+ }
340
+ if (!isDeep(object)) {
341
+ const transformed2 = transformValue(object);
342
+ return transformed2 ? {
343
+ transformedValue: transformed2.value,
344
+ annotations: path.length > 0 ? { [path.map(String).map(escapeKey).join(".")]: transformed2.type } : { "": transformed2.type }
345
+ } : { transformedValue: object };
346
+ }
347
+ const transformationResult = transformValue(object);
348
+ const transformed = transformationResult?.value ?? object;
349
+ const transformedValue = isArray(transformed) ? [] : {};
350
+ const allAnnotations = {};
351
+ if (transformationResult) {
352
+ const key = path.length > 0 ? path.map(String).map(escapeKey).join(".") : "";
353
+ allAnnotations[key] = transformationResult.type;
354
+ }
355
+ const entries = isArray(transformed) ? transformed.map((v, i) => [i, v]) : Object.entries(transformed);
356
+ for (const [index, value] of entries) {
357
+ const indexStr = String(index);
358
+ if (indexStr === "__proto__" || indexStr === "constructor" || indexStr === "prototype") {
359
+ throw new Error(
360
+ `Detected property ${indexStr}. This is a prototype pollution risk, please remove it from your object.`
361
+ );
362
+ }
363
+ const recursiveResult = walker(
364
+ value,
365
+ [...path, index],
366
+ [...objectsInThisPath, object]
367
+ );
368
+ transformedValue[index] = recursiveResult.transformedValue;
369
+ if (recursiveResult.annotations) {
370
+ Object.assign(allAnnotations, recursiveResult.annotations);
371
+ }
372
+ }
373
+ return {
374
+ transformedValue,
375
+ annotations: Object.keys(allAnnotations).length > 0 ? allAnnotations : void 0
376
+ };
377
+ }
378
+ function parsePath(pathString) {
379
+ if (pathString === "") return [];
380
+ const result = [];
381
+ let segment = "";
382
+ for (let i = 0; i < pathString.length; i++) {
383
+ const char = pathString.charAt(i);
384
+ if (char === "\\") {
385
+ const nextChar = pathString.charAt(i + 1);
386
+ if (nextChar === "\\") {
387
+ segment += "\\";
388
+ i++;
389
+ continue;
390
+ } else if (nextChar === ".") {
391
+ segment += ".";
392
+ i++;
393
+ continue;
394
+ }
395
+ }
396
+ if (char === ".") {
397
+ result.push(segment);
398
+ segment = "";
399
+ continue;
400
+ }
401
+ segment += char;
402
+ }
403
+ if (segment) {
404
+ result.push(segment);
405
+ }
406
+ return result;
407
+ }
408
+ function setDeep(object, path, value) {
409
+ if (path.length === 0) {
410
+ return;
411
+ }
412
+ let current = object;
413
+ for (let i = 0; i < path.length - 1; i++) {
414
+ current = current[path[i]];
415
+ }
416
+ current[path[path.length - 1]] = value;
417
+ }
418
+ function getDeep(object, path) {
419
+ let current = object;
420
+ for (const key of path) {
421
+ current = current[key];
422
+ }
423
+ return current;
424
+ }
425
+ function serialize(object) {
426
+ const result = walker(object);
427
+ const res = {
428
+ json: result.transformedValue
429
+ };
430
+ if (result.annotations) {
431
+ res.meta = { values: result.annotations };
432
+ }
433
+ return res;
434
+ }
435
+ function deserialize(payload) {
436
+ const { json, meta } = payload;
437
+ if (!meta?.values) {
438
+ return json;
439
+ }
440
+ let result = isArray(json) ? [...json] : { ...json };
441
+ const annotations = Object.entries(meta.values).map(([pathString, type]) => ({ pathString, type, path: parsePath(pathString) })).sort((a, b) => b.path.length - a.path.length);
442
+ for (const { type, path } of annotations) {
443
+ if (path.length === 0) {
444
+ result = untransformValue(result, type);
445
+ } else {
446
+ const value = getDeep(result, path);
447
+ const transformed = untransformValue(value, type);
448
+ setDeep(result, path, transformed);
449
+ }
450
+ }
451
+ return result;
452
+ }
453
+
454
+ // src/utils/displayValue.ts
455
+ var displayValue = (value, beautify = false) => {
456
+ const { json } = serialize(value);
457
+ return JSON.stringify(json, null, beautify ? 2 : void 0);
458
+ };
459
+ var parseDisplayValue = (value) => {
460
+ try {
461
+ const parsed = JSON.parse(value);
462
+ return deserialize({ json: parsed, meta: void 0 });
463
+ } catch {
464
+ return JSON.parse(value);
465
+ }
466
+ };
467
+
468
+ // src/ui/gameUI/components/GameUICollapsibleSection.tsx
469
+ import {
470
+ StyleSheet,
471
+ Text,
472
+ View,
473
+ TouchableOpacity,
474
+ Animated
475
+ } from "react-native-web";
476
+ import { jsx, jsxs } from "react/jsx-runtime";
477
+ function GameUICollapsibleSection({
478
+ icon: Icon,
479
+ iconColor,
480
+ title,
481
+ count,
482
+ subtitle,
483
+ expanded,
484
+ onToggle,
485
+ children,
486
+ style,
487
+ titleStyle
488
+ }) {
489
+ return /* @__PURE__ */ jsxs(View, { style: [styles.container, style], children: [
490
+ /* @__PURE__ */ jsxs(
491
+ TouchableOpacity,
492
+ {
493
+ onPress: onToggle,
494
+ activeOpacity: 0.7,
495
+ style: styles.headerTouchable,
496
+ children: [
497
+ /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
498
+ /* @__PURE__ */ jsxs(View, { style: styles.headerLeft, children: [
499
+ /* @__PURE__ */ jsx(Icon, { size: 14, color: iconColor }),
500
+ /* @__PURE__ */ jsx(Text, { style: [styles.title, titleStyle], children: title }),
501
+ /* @__PURE__ */ jsx(View, { style: [styles.badge, { backgroundColor: iconColor + "20" }], children: /* @__PURE__ */ jsx(Text, { style: [styles.badgeText, { color: iconColor }], children: count }) })
502
+ ] }),
503
+ expanded ? /* @__PURE__ */ jsx(ChevronUpGlyph, { size: 14, color: gameUIColors.muted }) : /* @__PURE__ */ jsx(ChevronDownGlyph, { size: 14, color: gameUIColors.muted })
504
+ ] }),
505
+ /* @__PURE__ */ jsx(Text, { style: styles.subtitle, children: subtitle })
506
+ ]
507
+ }
508
+ ),
509
+ expanded && /* @__PURE__ */ jsx(Animated.View, { style: { opacity: 1 }, children })
510
+ ] });
511
+ }
512
+ var styles = StyleSheet.create({
513
+ container: {
514
+ marginBottom: 20
515
+ },
516
+ headerTouchable: {
517
+ marginBottom: 12
518
+ },
519
+ header: {
520
+ flexDirection: "row",
521
+ alignItems: "center",
522
+ justifyContent: "space-between",
523
+ marginBottom: 4,
524
+ paddingHorizontal: 4
525
+ },
526
+ headerLeft: {
527
+ flexDirection: "row",
528
+ alignItems: "center",
529
+ gap: 8,
530
+ flex: 1
531
+ },
532
+ title: {
533
+ fontSize: 11,
534
+ color: gameUIColors.primary,
535
+ fontFamily: monoFont,
536
+ fontWeight: "700",
537
+ letterSpacing: 2,
538
+ opacity: 0.9
539
+ },
540
+ subtitle: {
541
+ fontSize: 9,
542
+ color: gameUIColors.secondary,
543
+ fontFamily: monoFont,
544
+ paddingHorizontal: 4,
545
+ marginTop: 2,
546
+ opacity: 0.7
547
+ },
548
+ badge: {
549
+ paddingHorizontal: 8,
550
+ paddingVertical: 2,
551
+ borderRadius: 10
552
+ },
553
+ badgeText: {
554
+ fontSize: 10,
555
+ fontFamily: monoFont,
556
+ fontWeight: "700"
557
+ }
558
+ });
559
+
560
+ // src/utils/absoluteFill.ts
561
+ var absoluteFill = {
562
+ position: "absolute",
563
+ top: 0,
564
+ left: 0,
565
+ right: 0,
566
+ bottom: 0
567
+ };
568
+
569
+ // src/ui/gameUI/components/GameUIStatusHeader.tsx
570
+ import { StyleSheet as StyleSheet2, Text as Text2, View as View2, Animated as Animated2 } from "react-native-web";
571
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
572
+ function GameUIStatusHeader({
573
+ alertConfig,
574
+ badgeText,
575
+ animatedStyle,
576
+ style,
577
+ indicatorCount = 3
578
+ }) {
579
+ const IconComponent = alertConfig.icon;
580
+ return /* @__PURE__ */ jsxs2(
581
+ Animated2.View,
582
+ {
583
+ style: [
584
+ styles2.container,
585
+ { borderColor: alertConfig.color + "40" },
586
+ style,
587
+ animatedStyle
588
+ ],
589
+ children: [
590
+ /* @__PURE__ */ jsx2(
591
+ View2,
592
+ {
593
+ style: [styles2.glow, { backgroundColor: alertConfig.color + "10" }]
594
+ }
595
+ ),
596
+ /* @__PURE__ */ jsxs2(View2, { style: styles2.content, children: [
597
+ /* @__PURE__ */ jsx2(
598
+ View2,
599
+ {
600
+ style: [
601
+ styles2.iconWrapper,
602
+ { backgroundColor: alertConfig.color + "15" }
603
+ ],
604
+ children: /* @__PURE__ */ jsx2(IconComponent, { size: 20, color: alertConfig.color })
605
+ }
606
+ ),
607
+ /* @__PURE__ */ jsxs2(View2, { style: styles2.textContainer, children: [
608
+ /* @__PURE__ */ jsx2(Text2, { style: [styles2.label, { color: alertConfig.color }], children: alertConfig.label }),
609
+ /* @__PURE__ */ jsx2(Text2, { style: styles2.subtitle, children: alertConfig.subtitle })
610
+ ] }),
611
+ /* @__PURE__ */ jsx2(
612
+ View2,
613
+ {
614
+ style: [styles2.badge, { backgroundColor: alertConfig.color + "20" }],
615
+ children: /* @__PURE__ */ jsx2(Text2, { style: [styles2.badgeText, { color: alertConfig.color }], children: badgeText })
616
+ }
617
+ )
618
+ ] }),
619
+ /* @__PURE__ */ jsx2(View2, { style: styles2.indicators, children: [...Array(indicatorCount)].map((_, i) => /* @__PURE__ */ jsx2(
620
+ View2,
621
+ {
622
+ style: [
623
+ styles2.indicatorDot,
624
+ {
625
+ backgroundColor: alertConfig.color,
626
+ opacity: alertConfig.pulse ? i === 0 ? 1 : 0.5 - i * 0.2 : 0.3 - i * 0.1
627
+ }
628
+ ]
629
+ },
630
+ i
631
+ )) })
632
+ ]
633
+ }
634
+ );
635
+ }
636
+ var styles2 = StyleSheet2.create({
637
+ container: {
638
+ backgroundColor: gameUIColors.panel,
639
+ borderRadius: 12,
640
+ borderWidth: 1,
641
+ padding: 16,
642
+ marginBottom: 16,
643
+ position: "relative",
644
+ overflow: "hidden"
645
+ },
646
+ glow: {
647
+ ...absoluteFill,
648
+ opacity: 0.5
649
+ },
650
+ content: {
651
+ flexDirection: "row",
652
+ alignItems: "center",
653
+ gap: 12
654
+ },
655
+ iconWrapper: {
656
+ width: 36,
657
+ height: 36,
658
+ borderRadius: 8,
659
+ justifyContent: "center",
660
+ alignItems: "center"
661
+ },
662
+ textContainer: {
663
+ flex: 1,
664
+ gap: 2
665
+ },
666
+ label: {
667
+ fontSize: 13,
668
+ fontWeight: "700",
669
+ fontFamily: monoFont,
670
+ letterSpacing: 1.5,
671
+ textShadowOffset: { width: 0, height: 0 },
672
+ textShadowRadius: 8
673
+ },
674
+ subtitle: {
675
+ fontSize: 10,
676
+ color: gameUIColors.secondary,
677
+ fontFamily: monoFont
678
+ },
679
+ badge: {
680
+ paddingHorizontal: 8,
681
+ paddingVertical: 4,
682
+ borderRadius: 4
683
+ },
684
+ badgeText: {
685
+ fontSize: 9,
686
+ fontWeight: "700",
687
+ fontFamily: monoFont,
688
+ letterSpacing: 1
689
+ },
690
+ indicators: {
691
+ position: "absolute",
692
+ top: 8,
693
+ right: 8,
694
+ flexDirection: "row",
695
+ gap: 3
696
+ },
697
+ indicatorDot: {
698
+ width: 4,
699
+ height: 4,
700
+ borderRadius: 2
701
+ }
702
+ });
703
+
704
+ // src/ui/gameUI/components/GameUICompactStats.tsx
705
+ import { Fragment } from "react";
706
+ import { StyleSheet as StyleSheet3, Text as Text3, View as View3, Animated as Animated3 } from "react-native-web";
707
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
708
+ function GameUICompactStats({
709
+ statsConfig,
710
+ totalCount,
711
+ header,
712
+ bottomStats,
713
+ style,
714
+ hideInactive = true
715
+ }) {
716
+ return /* @__PURE__ */ jsxs3(View3, { style: [styles3.container, style], children: [
717
+ header && /* @__PURE__ */ jsxs3(View3, { style: styles3.header, children: [
718
+ /* @__PURE__ */ jsxs3(View3, { style: styles3.headerLeft, children: [
719
+ /* @__PURE__ */ jsx3(Text3, { style: styles3.headerTitle, children: header.title }),
720
+ /* @__PURE__ */ jsx3(Text3, { style: styles3.headerSubtitle, children: header.subtitle })
721
+ ] }),
722
+ header.healthPercentage !== void 0 && /* @__PURE__ */ jsx3(View3, { style: styles3.headerRight, children: /* @__PURE__ */ jsxs3(View3, { style: styles3.statusIndicator, children: [
723
+ /* @__PURE__ */ jsx3(
724
+ View3,
725
+ {
726
+ style: [
727
+ styles3.statusDot,
728
+ {
729
+ backgroundColor: header.healthColor || gameUIColors.success
730
+ }
731
+ ]
732
+ }
733
+ ),
734
+ /* @__PURE__ */ jsx3(
735
+ Text3,
736
+ {
737
+ style: [
738
+ styles3.statusText,
739
+ { color: header.healthColor || gameUIColors.success }
740
+ ],
741
+ children: header.healthStatus || "OPTIMAL"
742
+ }
743
+ )
744
+ ] }) })
745
+ ] }),
746
+ header?.healthPercentage !== void 0 && /* @__PURE__ */ jsxs3(View3, { style: styles3.healthSection, children: [
747
+ /* @__PURE__ */ jsx3(Text3, { style: styles3.healthLabel, children: "SYSTEM HEALTH" }),
748
+ /* @__PURE__ */ jsx3(View3, { style: styles3.healthBarWrapper, children: /* @__PURE__ */ jsx3(View3, { style: styles3.healthBarBg, children: /* @__PURE__ */ jsx3(
749
+ Animated3.View,
750
+ {
751
+ style: [
752
+ styles3.healthBarFill,
753
+ {
754
+ width: `${header.healthPercentage}%`,
755
+ backgroundColor: header.healthColor || gameUIColors.success
756
+ }
757
+ ]
758
+ }
759
+ ) }) }),
760
+ /* @__PURE__ */ jsxs3(
761
+ Text3,
762
+ {
763
+ style: [
764
+ styles3.healthPercentage,
765
+ { color: header.healthColor || gameUIColors.success }
766
+ ],
767
+ children: [
768
+ header.healthPercentage,
769
+ "%"
770
+ ]
771
+ }
772
+ )
773
+ ] }),
774
+ /* @__PURE__ */ jsx3(View3, { style: styles3.statsGrid, children: statsConfig.map((stat) => {
775
+ const isActive = stat.value > 0;
776
+ if (hideInactive && !isActive) return null;
777
+ const IconComponent = stat.icon;
778
+ const percentage = totalCount ? stat.value / totalCount * 100 : 0;
779
+ return /* @__PURE__ */ jsxs3(
780
+ Animated3.View,
781
+ {
782
+ style: [styles3.statCard, { borderColor: stat.color + "30" }],
783
+ children: [
784
+ /* @__PURE__ */ jsxs3(View3, { style: styles3.cardContent, children: [
785
+ /* @__PURE__ */ jsx3(
786
+ View3,
787
+ {
788
+ style: [
789
+ styles3.iconBadge,
790
+ {
791
+ backgroundColor: stat.color + "1A",
792
+ borderColor: stat.color + "33"
793
+ }
794
+ ],
795
+ children: /* @__PURE__ */ jsx3(IconComponent, { size: 12, color: stat.color })
796
+ }
797
+ ),
798
+ /* @__PURE__ */ jsxs3(View3, { style: styles3.cardInfo, children: [
799
+ /* @__PURE__ */ jsx3(Text3, { style: styles3.cardLabel, children: stat.label }),
800
+ /* @__PURE__ */ jsx3(Text3, { style: styles3.cardSubtitle, children: stat.subtitle })
801
+ ] }),
802
+ /* @__PURE__ */ jsxs3(View3, { style: styles3.valueBlock, children: [
803
+ /* @__PURE__ */ jsx3(Text3, { style: [styles3.statNumber, { color: stat.color }], children: stat.value.toString().padStart(2, "0") }),
804
+ totalCount ? /* @__PURE__ */ jsxs3(Text3, { style: styles3.percentText, children: [
805
+ Math.round(percentage),
806
+ "%"
807
+ ] }) : null
808
+ ] })
809
+ ] }),
810
+ stat.showBar !== false && totalCount && /* @__PURE__ */ jsx3(
811
+ View3,
812
+ {
813
+ style: [
814
+ styles3.statBar,
815
+ { backgroundColor: stat.color + "10" }
816
+ ],
817
+ children: /* @__PURE__ */ jsx3(
818
+ View3,
819
+ {
820
+ style: [
821
+ styles3.statBarFill,
822
+ {
823
+ width: `${percentage}%`,
824
+ backgroundColor: stat.color
825
+ }
826
+ ]
827
+ }
828
+ )
829
+ }
830
+ )
831
+ ]
832
+ },
833
+ stat.key
834
+ );
835
+ }) }),
836
+ bottomStats && bottomStats.length > 0 && /* @__PURE__ */ jsx3(View3, { style: styles3.bottomBar, children: bottomStats.map((stat, index) => /* @__PURE__ */ jsxs3(Fragment, { children: [
837
+ /* @__PURE__ */ jsxs3(View3, { style: styles3.bottomStat, children: [
838
+ /* @__PURE__ */ jsx3(Text3, { style: styles3.bottomStatLabel, children: stat.label }),
839
+ /* @__PURE__ */ jsx3(
840
+ Text3,
841
+ {
842
+ style: [
843
+ styles3.bottomStatValue,
844
+ stat.color && { color: stat.color }
845
+ ],
846
+ children: stat.value
847
+ }
848
+ )
849
+ ] }),
850
+ index < bottomStats.length - 1 && /* @__PURE__ */ jsx3(View3, { style: styles3.bottomDivider })
851
+ ] }, stat.label)) })
852
+ ] });
853
+ }
854
+ var styles3 = StyleSheet3.create({
855
+ container: {
856
+ backgroundColor: gameUIColors.panel,
857
+ borderRadius: 12,
858
+ padding: 12,
859
+ marginBottom: 12,
860
+ borderWidth: 1,
861
+ borderColor: gameUIColors.border + "40",
862
+ overflow: "hidden",
863
+ position: "relative"
864
+ },
865
+ // Header
866
+ header: {
867
+ flexDirection: "row",
868
+ justifyContent: "space-between",
869
+ alignItems: "center",
870
+ marginBottom: 8,
871
+ paddingBottom: 8,
872
+ borderBottomWidth: 1,
873
+ borderBottomColor: "rgba(128, 128, 128, 0.1)"
874
+ },
875
+ headerLeft: {
876
+ gap: 1
877
+ },
878
+ headerRight: {
879
+ alignItems: "flex-end"
880
+ },
881
+ headerTitle: {
882
+ fontSize: 11,
883
+ fontWeight: "700",
884
+ color: gameUIColors.primary,
885
+ fontFamily: monoFont,
886
+ letterSpacing: 1.5
887
+ },
888
+ headerSubtitle: {
889
+ fontSize: 8,
890
+ color: gameUIColors.secondary,
891
+ fontFamily: monoFont,
892
+ opacity: 0.7
893
+ },
894
+ statusIndicator: {
895
+ flexDirection: "row",
896
+ alignItems: "center",
897
+ gap: 4
898
+ },
899
+ statusDot: {
900
+ width: 5,
901
+ height: 5,
902
+ borderRadius: 2.5
903
+ },
904
+ statusText: {
905
+ fontSize: 9,
906
+ fontWeight: "600",
907
+ fontFamily: monoFont,
908
+ letterSpacing: 0.5
909
+ },
910
+ // Health section
911
+ healthSection: {
912
+ flexDirection: "row",
913
+ alignItems: "center",
914
+ marginBottom: 10,
915
+ gap: 8
916
+ },
917
+ healthLabel: {
918
+ fontSize: 8,
919
+ color: gameUIColors.secondary,
920
+ fontFamily: monoFont,
921
+ letterSpacing: 0.5
922
+ },
923
+ healthBarWrapper: {
924
+ flex: 1
925
+ },
926
+ healthBarBg: {
927
+ height: 4,
928
+ backgroundColor: "rgba(128, 128, 128, 0.1)",
929
+ borderRadius: 2,
930
+ overflow: "hidden"
931
+ },
932
+ healthBarFill: {
933
+ height: "100%",
934
+ borderRadius: 2
935
+ },
936
+ healthPercentage: {
937
+ fontSize: 11,
938
+ fontWeight: "700",
939
+ fontFamily: monoFont
940
+ },
941
+ // Stats grid
942
+ statsGrid: {
943
+ gap: 6,
944
+ marginBottom: 8
945
+ },
946
+ statCard: {
947
+ backgroundColor: gameUIColors.blackTint2,
948
+ borderRadius: 8,
949
+ borderWidth: 1,
950
+ borderColor: gameUIColors.border,
951
+ padding: 10,
952
+ marginBottom: 4
953
+ },
954
+ cardContent: {
955
+ flexDirection: "row",
956
+ alignItems: "center",
957
+ gap: 8,
958
+ marginBottom: 4
959
+ },
960
+ cardInfo: {
961
+ flex: 1
962
+ },
963
+ cardLabel: {
964
+ fontSize: 11,
965
+ fontWeight: "700",
966
+ fontFamily: monoFont,
967
+ letterSpacing: 0.5,
968
+ color: gameUIColors.primary
969
+ },
970
+ cardSubtitle: {
971
+ fontSize: 8,
972
+ color: gameUIColors.secondary,
973
+ fontFamily: monoFont,
974
+ opacity: 0.7
975
+ },
976
+ statNumber: {
977
+ fontSize: 16,
978
+ fontWeight: "700",
979
+ fontFamily: monoFont,
980
+ minWidth: 28
981
+ },
982
+ valueBlock: {
983
+ alignItems: "flex-end"
984
+ },
985
+ percentText: {
986
+ fontSize: 9,
987
+ color: gameUIColors.secondary,
988
+ fontFamily: monoFont
989
+ },
990
+ statBar: {
991
+ height: 3,
992
+ borderRadius: 1.5,
993
+ overflow: "hidden"
994
+ },
995
+ statBarFill: {
996
+ height: "100%",
997
+ borderRadius: 1.5
998
+ },
999
+ // Bottom bar
1000
+ bottomBar: {
1001
+ flexDirection: "row",
1002
+ alignItems: "center",
1003
+ paddingTop: 8,
1004
+ borderTopWidth: 1,
1005
+ borderTopColor: gameUIColors.border + "40"
1006
+ },
1007
+ bottomStat: {
1008
+ flex: 1,
1009
+ alignItems: "center"
1010
+ },
1011
+ bottomStatLabel: {
1012
+ fontSize: 7,
1013
+ color: gameUIColors.muted,
1014
+ fontFamily: monoFont,
1015
+ letterSpacing: 0.5,
1016
+ marginBottom: 1
1017
+ },
1018
+ bottomStatValue: {
1019
+ fontSize: 11,
1020
+ fontWeight: "700",
1021
+ color: gameUIColors.primary,
1022
+ fontFamily: monoFont
1023
+ },
1024
+ bottomDivider: {
1025
+ width: 1,
1026
+ height: 16,
1027
+ backgroundColor: gameUIColors.border + "40"
1028
+ },
1029
+ iconBadge: {
1030
+ width: 24,
1031
+ height: 24,
1032
+ borderRadius: 6,
1033
+ borderWidth: 1,
1034
+ alignItems: "center",
1035
+ justifyContent: "center"
1036
+ }
1037
+ });
1038
+
1039
+ // src/ui/gameUI/components/GameUIIssuesList.tsx
1040
+ import { useState, useCallback } from "react";
1041
+ import {
1042
+ StyleSheet as StyleSheet4,
1043
+ Text as Text4,
1044
+ View as View4,
1045
+ TouchableOpacity as TouchableOpacity2,
1046
+ Animated as Animated4
1047
+ } from "react-native-web";
1048
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1049
+ function GameUIIssuesList({
1050
+ issues,
1051
+ onIssueClick,
1052
+ hintText = "Tap any issue to view details",
1053
+ style,
1054
+ expandable = true,
1055
+ statusLabels = {
1056
+ missing: "Not found",
1057
+ wrong_type: "Type error",
1058
+ wrong_value: "Invalid value"
1059
+ }
1060
+ }) {
1061
+ const [expandedIssues, setExpandedIssues] = useState(/* @__PURE__ */ new Set());
1062
+ const toggleIssue = useCallback(
1063
+ (key) => {
1064
+ if (!expandable) return;
1065
+ setExpandedIssues((prev) => {
1066
+ const newSet = new Set(prev);
1067
+ if (newSet.has(key)) {
1068
+ newSet.delete(key);
1069
+ } else {
1070
+ newSet.add(key);
1071
+ }
1072
+ return newSet;
1073
+ });
1074
+ },
1075
+ [expandable]
1076
+ );
1077
+ const getStatusColor = (status) => {
1078
+ return status === "missing" ? gameUIColors.warning : gameUIColors.info;
1079
+ };
1080
+ const getStatusIcon = (status) => {
1081
+ return status === "missing" ? AlertOctagon : AlertTriangleGlyph;
1082
+ };
1083
+ const getStatusLabel = (issue) => {
1084
+ switch (issue.status) {
1085
+ case "missing":
1086
+ return `\u2022 ${statusLabels.missing}`;
1087
+ case "wrong_type":
1088
+ return `\u2022 ${statusLabels.wrong_type}${issue.expectedType ? `: Expected ${issue.expectedType}` : ""}`;
1089
+ case "wrong_value":
1090
+ return `\u2022 ${statusLabels.wrong_value}${issue.value ? `: ${String(issue.value).substring(0, 20)}` : ""}`;
1091
+ default:
1092
+ return "";
1093
+ }
1094
+ };
1095
+ if (issues.length === 0) return null;
1096
+ return /* @__PURE__ */ jsxs4(View4, { style: [styles4.container, style], children: [
1097
+ issues.map((issue, index) => {
1098
+ const statusColor = getStatusColor(issue.status);
1099
+ const StatusIcon = getStatusIcon(issue.status);
1100
+ const isExpanded = expandedIssues.has(issue.key);
1101
+ const ChevronIcon = isExpanded ? ChevronUpGlyph : ChevronDownGlyph;
1102
+ return /* @__PURE__ */ jsxs4(View4, { children: [
1103
+ /* @__PURE__ */ jsxs4(
1104
+ TouchableOpacity2,
1105
+ {
1106
+ onPress: () => {
1107
+ if (expandable) {
1108
+ toggleIssue(issue.key);
1109
+ }
1110
+ onIssueClick?.(issue);
1111
+ },
1112
+ style: styles4.issueRow,
1113
+ activeOpacity: 0.7,
1114
+ children: [
1115
+ /* @__PURE__ */ jsx4(StatusIcon, { size: 14, color: statusColor }),
1116
+ /* @__PURE__ */ jsxs4(View4, { style: styles4.issueContent, children: [
1117
+ /* @__PURE__ */ jsx4(
1118
+ Text4,
1119
+ {
1120
+ style: [styles4.issueKey, { color: gameUIColors.primary }],
1121
+ children: issue.key
1122
+ }
1123
+ ),
1124
+ /* @__PURE__ */ jsx4(Text4, { style: styles4.issueDesc, children: getStatusLabel(issue) })
1125
+ ] }),
1126
+ expandable && /* @__PURE__ */ jsx4(ChevronIcon, { size: 12, color: gameUIColors.muted })
1127
+ ]
1128
+ }
1129
+ ),
1130
+ expandable && isExpanded && /* @__PURE__ */ jsxs4(Animated4.View, { style: styles4.issueDetails, children: [
1131
+ /* @__PURE__ */ jsxs4(View4, { style: styles4.detailRow, children: [
1132
+ /* @__PURE__ */ jsx4(Text4, { style: styles4.detailLabel, children: "Status:" }),
1133
+ /* @__PURE__ */ jsxs4(
1134
+ Text4,
1135
+ {
1136
+ style: [
1137
+ styles4.detailValue,
1138
+ { color: gameUIColors.primary, fontWeight: "600" }
1139
+ ],
1140
+ children: [
1141
+ issue.status === "missing" && "MISSING",
1142
+ issue.status === "wrong_type" && "TYPE ERROR",
1143
+ issue.status === "wrong_value" && "INVALID VALUE"
1144
+ ]
1145
+ }
1146
+ )
1147
+ ] }),
1148
+ issue.value !== void 0 && issue.status !== "missing" && /* @__PURE__ */ jsxs4(View4, { style: styles4.detailRow, children: [
1149
+ /* @__PURE__ */ jsx4(Text4, { style: styles4.detailLabel, children: "Current:" }),
1150
+ /* @__PURE__ */ jsx4(
1151
+ Text4,
1152
+ {
1153
+ style: [
1154
+ styles4.detailValue,
1155
+ { color: gameUIColors.warning }
1156
+ ],
1157
+ children: `"${String(issue.value)}"`
1158
+ }
1159
+ )
1160
+ ] }),
1161
+ issue.expectedType && issue.status === "wrong_type" && /* @__PURE__ */ jsxs4(View4, { style: styles4.detailRow, children: [
1162
+ /* @__PURE__ */ jsx4(Text4, { style: styles4.detailLabel, children: "Expected:" }),
1163
+ /* @__PURE__ */ jsx4(
1164
+ Text4,
1165
+ {
1166
+ style: [
1167
+ styles4.detailValue,
1168
+ { color: gameUIColors.success }
1169
+ ],
1170
+ children: issue.expectedType
1171
+ }
1172
+ )
1173
+ ] }),
1174
+ issue.expectedValue && issue.status === "wrong_value" && /* @__PURE__ */ jsxs4(View4, { style: styles4.detailRow, children: [
1175
+ /* @__PURE__ */ jsx4(Text4, { style: styles4.detailLabel, children: "Expected:" }),
1176
+ /* @__PURE__ */ jsx4(
1177
+ Text4,
1178
+ {
1179
+ style: [
1180
+ styles4.detailValue,
1181
+ { color: gameUIColors.success }
1182
+ ],
1183
+ children: `"${issue.expectedValue}"`
1184
+ }
1185
+ )
1186
+ ] }),
1187
+ issue.description && /* @__PURE__ */ jsx4(View4, { style: styles4.descSection, children: /* @__PURE__ */ jsx4(Text4, { style: styles4.descText, children: issue.description }) }),
1188
+ issue.fixSuggestion && /* @__PURE__ */ jsxs4(View4, { style: styles4.fixSection, children: [
1189
+ /* @__PURE__ */ jsx4(Text4, { style: styles4.fixLabel, children: "HOW TO FIX" }),
1190
+ /* @__PURE__ */ jsx4(Text4, { style: styles4.fixText, children: issue.fixSuggestion })
1191
+ ] })
1192
+ ] })
1193
+ ] }, `${issue.key}-${index}`);
1194
+ }),
1195
+ hintText && /* @__PURE__ */ jsx4(Text4, { style: styles4.hint, children: hintText })
1196
+ ] });
1197
+ }
1198
+ var styles4 = StyleSheet4.create({
1199
+ container: {
1200
+ backgroundColor: gameUIColors.panel,
1201
+ borderRadius: 8,
1202
+ padding: 8,
1203
+ borderWidth: 1,
1204
+ borderColor: gameUIColors.warning + "33"
1205
+ },
1206
+ issueRow: {
1207
+ flexDirection: "row",
1208
+ alignItems: "center",
1209
+ paddingVertical: 8,
1210
+ paddingHorizontal: 8,
1211
+ borderRadius: 6,
1212
+ marginBottom: 4
1213
+ },
1214
+ issueContent: {
1215
+ flex: 1,
1216
+ marginLeft: 8,
1217
+ flexDirection: "row",
1218
+ alignItems: "center",
1219
+ gap: 8
1220
+ },
1221
+ issueKey: {
1222
+ fontSize: 11,
1223
+ fontWeight: "600",
1224
+ fontFamily: monoFont
1225
+ },
1226
+ issueDesc: {
1227
+ fontSize: 10,
1228
+ color: gameUIColors.secondary,
1229
+ fontFamily: monoFont,
1230
+ flex: 1
1231
+ },
1232
+ hint: {
1233
+ fontSize: 9,
1234
+ color: gameUIColors.muted,
1235
+ fontFamily: monoFont,
1236
+ textAlign: "center",
1237
+ marginTop: 8,
1238
+ paddingTop: 8,
1239
+ borderTopWidth: 1,
1240
+ borderTopColor: gameUIColors.primary + "0D"
1241
+ },
1242
+ // Expanded details
1243
+ issueDetails: {
1244
+ marginTop: 8,
1245
+ marginLeft: 22,
1246
+ marginRight: 8,
1247
+ paddingLeft: 12,
1248
+ paddingRight: 8,
1249
+ paddingTop: 8,
1250
+ paddingBottom: 8,
1251
+ backgroundColor: gameUIColors.background + "4D",
1252
+ borderLeftWidth: 2,
1253
+ borderLeftColor: gameUIColors.primary + "1A",
1254
+ borderRadius: 4
1255
+ },
1256
+ detailRow: {
1257
+ flexDirection: "row",
1258
+ marginTop: 8,
1259
+ alignItems: "flex-start"
1260
+ },
1261
+ detailLabel: {
1262
+ fontSize: 10,
1263
+ color: gameUIColors.secondary,
1264
+ fontFamily: monoFont,
1265
+ fontWeight: "600",
1266
+ width: 70
1267
+ },
1268
+ detailValue: {
1269
+ fontSize: 11,
1270
+ color: gameUIColors.primary,
1271
+ fontFamily: monoFont,
1272
+ flex: 1,
1273
+ lineHeight: 16
1274
+ },
1275
+ fixSection: {
1276
+ marginTop: 12,
1277
+ padding: 10,
1278
+ backgroundColor: gameUIColors.info + "14",
1279
+ borderRadius: 6,
1280
+ borderWidth: 1,
1281
+ borderColor: gameUIColors.info + "33"
1282
+ },
1283
+ fixLabel: {
1284
+ fontSize: 10,
1285
+ color: gameUIColors.info,
1286
+ fontFamily: monoFont,
1287
+ fontWeight: "700",
1288
+ marginBottom: 6,
1289
+ letterSpacing: 0.5
1290
+ },
1291
+ fixText: {
1292
+ fontSize: 11,
1293
+ color: gameUIColors.primary,
1294
+ fontFamily: monoFont,
1295
+ lineHeight: 18,
1296
+ backgroundColor: gameUIColors.background + "66",
1297
+ padding: 8,
1298
+ borderRadius: 4,
1299
+ overflow: "hidden"
1300
+ },
1301
+ descSection: {
1302
+ marginTop: 10,
1303
+ paddingTop: 10,
1304
+ borderTopWidth: 1,
1305
+ borderTopColor: gameUIColors.primary + "0D"
1306
+ },
1307
+ descText: {
1308
+ fontSize: 10,
1309
+ color: gameUIColors.secondary,
1310
+ fontFamily: monoFont,
1311
+ marginTop: 4,
1312
+ lineHeight: 14
1313
+ }
1314
+ });
1315
+
1316
+ // src/ui/gameUI/hooks/useGameUIAlertState.ts
1317
+ import { useMemo, useEffect, useRef } from "react";
1318
+ import { Animated as Animated5, Easing } from "react-native-web";
1319
+ var GAME_UI_ALERT_STATES = {
1320
+ OPTIMAL: {
1321
+ icon: CheckCircleGlyph,
1322
+ color: gameUIColors.success,
1323
+ label: "CONFIG OK",
1324
+ subtitle: "All requirements met",
1325
+ pulse: false
1326
+ },
1327
+ WARNING: {
1328
+ icon: AlertTriangleGlyph,
1329
+ color: gameUIColors.warning,
1330
+ label: "CONFIG WARNING",
1331
+ subtitle: "Check values and types",
1332
+ pulse: false
1333
+ },
1334
+ ERROR: {
1335
+ icon: AlertCircleGlyph,
1336
+ color: gameUIColors.error,
1337
+ label: "CONFIG ERROR",
1338
+ subtitle: "Missing required data",
1339
+ pulse: false
1340
+ },
1341
+ CRITICAL: {
1342
+ icon: AlertOctagon,
1343
+ color: gameUIColors.critical,
1344
+ label: "CONFIG FAILURE",
1345
+ subtitle: "Multiple critical issues",
1346
+ pulse: false
1347
+ },
1348
+ LOADING: {
1349
+ icon: ActivityGlyph,
1350
+ color: gameUIColors.info,
1351
+ label: "LOADING",
1352
+ subtitle: "Reading configuration...",
1353
+ pulse: true
1354
+ },
1355
+ EMPTY: {
1356
+ icon: HelpCircle,
1357
+ color: gameUIColors.muted,
1358
+ label: "NO DATA",
1359
+ subtitle: "No configuration found",
1360
+ pulse: false
1361
+ }
1362
+ };
1363
+ function useGameUIAlertState(stats, customStates) {
1364
+ const alertStates = useMemo(
1365
+ () => ({ ...GAME_UI_ALERT_STATES, ...customStates }),
1366
+ [customStates]
1367
+ );
1368
+ const alertState = useMemo(() => {
1369
+ if (stats.totalCount === 0) return "EMPTY";
1370
+ if (stats.missingCount > 2 || stats.wrongTypeCount > 2) return "CRITICAL";
1371
+ if (stats.missingCount > 0) return "ERROR";
1372
+ if (stats.wrongValueCount > 0 || stats.wrongTypeCount > 0) return "WARNING";
1373
+ return "OPTIMAL";
1374
+ }, [stats]);
1375
+ const alertConfig = alertStates[alertState];
1376
+ const alertOpacity = useRef(new Animated5.Value(1)).current;
1377
+ const alertScale = useRef(new Animated5.Value(1)).current;
1378
+ useEffect(() => {
1379
+ alertOpacity.setValue(0);
1380
+ alertScale.setValue(0.95);
1381
+ Animated5.parallel([
1382
+ Animated5.timing(alertOpacity, {
1383
+ toValue: 1,
1384
+ duration: 300,
1385
+ useNativeDriver: true
1386
+ }),
1387
+ Animated5.timing(alertScale, {
1388
+ toValue: 1,
1389
+ duration: 300,
1390
+ easing: Easing.out(Easing.ease),
1391
+ useNativeDriver: true
1392
+ })
1393
+ ]).start();
1394
+ }, [alertState, alertOpacity, alertScale]);
1395
+ const alertAnimatedStyle = {
1396
+ transform: [{ scale: alertScale }],
1397
+ opacity: alertOpacity
1398
+ };
1399
+ return {
1400
+ alertState,
1401
+ alertConfig,
1402
+ alertAnimatedStyle,
1403
+ alertOpacity,
1404
+ alertScale
1405
+ };
1406
+ }
1407
+
1408
+ export {
1409
+ safeStringify,
1410
+ serialize,
1411
+ deserialize,
1412
+ displayValue,
1413
+ parseDisplayValue,
1414
+ GameUICollapsibleSection,
1415
+ absoluteFill,
1416
+ GameUIStatusHeader,
1417
+ GameUICompactStats,
1418
+ GameUIIssuesList,
1419
+ GAME_UI_ALERT_STATES,
1420
+ useGameUIAlertState
1421
+ };