@rb-games/core 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 (388) hide show
  1. package/README.md +488 -0
  2. package/dist/devtools/DraggableController.d.ts +10 -0
  3. package/dist/devtools/DraggableController.d.ts.map +1 -0
  4. package/dist/devtools/ResizableController.d.ts +19 -0
  5. package/dist/devtools/ResizableController.d.ts.map +1 -0
  6. package/dist/devtools/index.d.ts +7 -0
  7. package/dist/devtools/index.d.ts.map +1 -0
  8. package/dist/devtools/index.js +884 -0
  9. package/dist/devtools/index.js.map +1 -0
  10. package/dist/devtools/overlayPlugin.d.ts +3 -0
  11. package/dist/devtools/overlayPlugin.d.ts.map +1 -0
  12. package/dist/devtools/spinePropertiesPlugin.d.ts +3 -0
  13. package/dist/devtools/spinePropertiesPlugin.d.ts.map +1 -0
  14. package/dist/devtools/spriteTextPropertiesPlugin.d.ts +3 -0
  15. package/dist/devtools/spriteTextPropertiesPlugin.d.ts.map +1 -0
  16. package/dist/devtools/treePlugin.d.ts +7 -0
  17. package/dist/devtools/treePlugin.d.ts.map +1 -0
  18. package/dist/engine/PixiEngine.d.ts +404 -0
  19. package/dist/engine/PixiEngine.d.ts.map +1 -0
  20. package/dist/engine/index.d.ts +2 -0
  21. package/dist/engine/index.d.ts.map +1 -0
  22. package/dist/engine/index.js +1818 -0
  23. package/dist/engine/index.js.map +1 -0
  24. package/dist/filters/ChromaKeyFilter.d.ts +64 -0
  25. package/dist/filters/ChromaKeyFilter.d.ts.map +1 -0
  26. package/dist/filters/index.d.ts +2 -0
  27. package/dist/filters/index.d.ts.map +1 -0
  28. package/dist/filters/index.js +248 -0
  29. package/dist/filters/index.js.map +1 -0
  30. package/dist/helpers/AssetHelper.d.ts +117 -0
  31. package/dist/helpers/AssetHelper.d.ts.map +1 -0
  32. package/dist/helpers/SVGAssetHelper.d.ts +397 -0
  33. package/dist/helpers/SVGAssetHelper.d.ts.map +1 -0
  34. package/dist/helpers/SVGLoader.d.ts +46 -0
  35. package/dist/helpers/SVGLoader.d.ts.map +1 -0
  36. package/dist/helpers/SVGParser.d.ts +121 -0
  37. package/dist/helpers/SVGParser.d.ts.map +1 -0
  38. package/dist/helpers/eventBridge.d.ts +150 -0
  39. package/dist/helpers/eventBridge.d.ts.map +1 -0
  40. package/dist/helpers/index.d.ts +8 -0
  41. package/dist/helpers/index.d.ts.map +1 -0
  42. package/dist/helpers/index.js +702 -0
  43. package/dist/helpers/index.js.map +1 -0
  44. package/dist/helpers/mergeUtils.d.ts +21 -0
  45. package/dist/helpers/mergeUtils.d.ts.map +1 -0
  46. package/dist/helpers/resolvePublicPath.d.ts +6 -0
  47. package/dist/helpers/resolvePublicPath.d.ts.map +1 -0
  48. package/dist/i18n/index.d.ts +2 -0
  49. package/dist/i18n/index.d.ts.map +1 -0
  50. package/dist/i18n/index.js +527 -0
  51. package/dist/i18n/index.js.map +1 -0
  52. package/dist/i18n/sharedI18n.d.ts +11 -0
  53. package/dist/i18n/sharedI18n.d.ts.map +1 -0
  54. package/dist/layout/Align.d.ts +126 -0
  55. package/dist/layout/Align.d.ts.map +1 -0
  56. package/dist/layout/Bounds.d.ts +120 -0
  57. package/dist/layout/Bounds.d.ts.map +1 -0
  58. package/dist/layout/Distribute.d.ts +103 -0
  59. package/dist/layout/Distribute.d.ts.map +1 -0
  60. package/dist/layout/Flow.d.ts +213 -0
  61. package/dist/layout/Flow.d.ts.map +1 -0
  62. package/dist/layout/PositionUtils.d.ts +57 -0
  63. package/dist/layout/PositionUtils.d.ts.map +1 -0
  64. package/dist/layout/index.d.ts +6 -0
  65. package/dist/layout/index.d.ts.map +1 -0
  66. package/dist/layout/index.js +673 -0
  67. package/dist/layout/index.js.map +1 -0
  68. package/dist/particle/Emitter.d.ts +290 -0
  69. package/dist/particle/Emitter.d.ts.map +1 -0
  70. package/dist/particle/EmitterConfig.d.ts +228 -0
  71. package/dist/particle/EmitterConfig.d.ts.map +1 -0
  72. package/dist/particle/LinkedListContainer.d.ts +7 -0
  73. package/dist/particle/LinkedListContainer.d.ts.map +1 -0
  74. package/dist/particle/Particle.d.ts +63 -0
  75. package/dist/particle/Particle.d.ts.map +1 -0
  76. package/dist/particle/ParticleUtils.d.ts +97 -0
  77. package/dist/particle/ParticleUtils.d.ts.map +1 -0
  78. package/dist/particle/PropertyList.d.ts +40 -0
  79. package/dist/particle/PropertyList.d.ts.map +1 -0
  80. package/dist/particle/PropertyNode.d.ts +74 -0
  81. package/dist/particle/PropertyNode.d.ts.map +1 -0
  82. package/dist/particle/SpineEmitter.d.ts +55 -0
  83. package/dist/particle/SpineEmitter.d.ts.map +1 -0
  84. package/dist/particle/SpineParticle.d.ts +74 -0
  85. package/dist/particle/SpineParticle.d.ts.map +1 -0
  86. package/dist/particle/behaviors/AccelerationMovement.d.ts +62 -0
  87. package/dist/particle/behaviors/AccelerationMovement.d.ts.map +1 -0
  88. package/dist/particle/behaviors/Alpha.d.ts +60 -0
  89. package/dist/particle/behaviors/Alpha.d.ts.map +1 -0
  90. package/dist/particle/behaviors/AnimatedTexture.d.ts +111 -0
  91. package/dist/particle/behaviors/AnimatedTexture.d.ts.map +1 -0
  92. package/dist/particle/behaviors/Behaviors.d.ts +71 -0
  93. package/dist/particle/behaviors/Behaviors.d.ts.map +1 -0
  94. package/dist/particle/behaviors/BlendMode.d.ts +31 -0
  95. package/dist/particle/behaviors/BlendMode.d.ts.map +1 -0
  96. package/dist/particle/behaviors/BurstSpawn.d.ts +43 -0
  97. package/dist/particle/behaviors/BurstSpawn.d.ts.map +1 -0
  98. package/dist/particle/behaviors/Color.d.ts +60 -0
  99. package/dist/particle/behaviors/Color.d.ts.map +1 -0
  100. package/dist/particle/behaviors/MultiStateAnimatedTexture.d.ts +99 -0
  101. package/dist/particle/behaviors/MultiStateAnimatedTexture.d.ts.map +1 -0
  102. package/dist/particle/behaviors/OrderedTexture.d.ts +33 -0
  103. package/dist/particle/behaviors/OrderedTexture.d.ts.map +1 -0
  104. package/dist/particle/behaviors/PathMovement.d.ts +68 -0
  105. package/dist/particle/behaviors/PathMovement.d.ts.map +1 -0
  106. package/dist/particle/behaviors/PointSpawn.d.ts +21 -0
  107. package/dist/particle/behaviors/PointSpawn.d.ts.map +1 -0
  108. package/dist/particle/behaviors/RandomColor.d.ts +17 -0
  109. package/dist/particle/behaviors/RandomColor.d.ts.map +1 -0
  110. package/dist/particle/behaviors/RandomTexture.d.ts +32 -0
  111. package/dist/particle/behaviors/RandomTexture.d.ts.map +1 -0
  112. package/dist/particle/behaviors/Rotation.d.ts +114 -0
  113. package/dist/particle/behaviors/Rotation.d.ts.map +1 -0
  114. package/dist/particle/behaviors/Scale.d.ts +74 -0
  115. package/dist/particle/behaviors/Scale.d.ts.map +1 -0
  116. package/dist/particle/behaviors/ShapeSpawn.d.ts +58 -0
  117. package/dist/particle/behaviors/ShapeSpawn.d.ts.map +1 -0
  118. package/dist/particle/behaviors/SingleTexture.d.ts +32 -0
  119. package/dist/particle/behaviors/SingleTexture.d.ts.map +1 -0
  120. package/dist/particle/behaviors/SpeedMovement.d.ts +76 -0
  121. package/dist/particle/behaviors/SpeedMovement.d.ts.map +1 -0
  122. package/dist/particle/behaviors/SpineTexture.d.ts +173 -0
  123. package/dist/particle/behaviors/SpineTexture.d.ts.map +1 -0
  124. package/dist/particle/behaviors/ZindexBehavior.d.ts +16 -0
  125. package/dist/particle/behaviors/ZindexBehavior.d.ts.map +1 -0
  126. package/dist/particle/behaviors/editor/Types.d.ts +104 -0
  127. package/dist/particle/behaviors/editor/Types.d.ts.map +1 -0
  128. package/dist/particle/behaviors/editor/behaviors/AccelerationMovement.d.ts +2 -0
  129. package/dist/particle/behaviors/editor/behaviors/AccelerationMovement.d.ts.map +1 -0
  130. package/dist/particle/behaviors/editor/behaviors/Alpha.d.ts +2 -0
  131. package/dist/particle/behaviors/editor/behaviors/Alpha.d.ts.map +1 -0
  132. package/dist/particle/behaviors/editor/behaviors/AnimatedTexture.d.ts +2 -0
  133. package/dist/particle/behaviors/editor/behaviors/AnimatedTexture.d.ts.map +1 -0
  134. package/dist/particle/behaviors/editor/behaviors/BlendMode.d.ts +2 -0
  135. package/dist/particle/behaviors/editor/behaviors/BlendMode.d.ts.map +1 -0
  136. package/dist/particle/behaviors/editor/behaviors/BurstSpawn.d.ts +2 -0
  137. package/dist/particle/behaviors/editor/behaviors/BurstSpawn.d.ts.map +1 -0
  138. package/dist/particle/behaviors/editor/behaviors/Color.d.ts +2 -0
  139. package/dist/particle/behaviors/editor/behaviors/Color.d.ts.map +1 -0
  140. package/dist/particle/behaviors/editor/behaviors/OrderedTexture.d.ts +2 -0
  141. package/dist/particle/behaviors/editor/behaviors/OrderedTexture.d.ts.map +1 -0
  142. package/dist/particle/behaviors/editor/behaviors/PathMovement.d.ts +2 -0
  143. package/dist/particle/behaviors/editor/behaviors/PathMovement.d.ts.map +1 -0
  144. package/dist/particle/behaviors/editor/behaviors/PointSpawn.d.ts +2 -0
  145. package/dist/particle/behaviors/editor/behaviors/PointSpawn.d.ts.map +1 -0
  146. package/dist/particle/behaviors/editor/behaviors/RandomTexture.d.ts +2 -0
  147. package/dist/particle/behaviors/editor/behaviors/RandomTexture.d.ts.map +1 -0
  148. package/dist/particle/behaviors/editor/behaviors/Rotation.d.ts +2 -0
  149. package/dist/particle/behaviors/editor/behaviors/Rotation.d.ts.map +1 -0
  150. package/dist/particle/behaviors/editor/behaviors/Scale.d.ts +2 -0
  151. package/dist/particle/behaviors/editor/behaviors/Scale.d.ts.map +1 -0
  152. package/dist/particle/behaviors/editor/behaviors/ShapeSpawn.d.ts +2 -0
  153. package/dist/particle/behaviors/editor/behaviors/ShapeSpawn.d.ts.map +1 -0
  154. package/dist/particle/behaviors/editor/behaviors/SingleTexture.d.ts +2 -0
  155. package/dist/particle/behaviors/editor/behaviors/SingleTexture.d.ts.map +1 -0
  156. package/dist/particle/behaviors/editor/behaviors/SpeedMovement.d.ts +2 -0
  157. package/dist/particle/behaviors/editor/behaviors/SpeedMovement.d.ts.map +1 -0
  158. package/dist/particle/behaviors/editor/behaviors/index.d.ts +15 -0
  159. package/dist/particle/behaviors/editor/behaviors/index.d.ts.map +1 -0
  160. package/dist/particle/behaviors/editor/index.d.ts +5 -0
  161. package/dist/particle/behaviors/editor/index.d.ts.map +1 -0
  162. package/dist/particle/behaviors/editor/shapes/PolygonalChain.d.ts +2 -0
  163. package/dist/particle/behaviors/editor/shapes/PolygonalChain.d.ts.map +1 -0
  164. package/dist/particle/behaviors/editor/shapes/Rectangle.d.ts +2 -0
  165. package/dist/particle/behaviors/editor/shapes/Rectangle.d.ts.map +1 -0
  166. package/dist/particle/behaviors/editor/shapes/Torus.d.ts +2 -0
  167. package/dist/particle/behaviors/editor/shapes/Torus.d.ts.map +1 -0
  168. package/dist/particle/behaviors/index.d.ts +25 -0
  169. package/dist/particle/behaviors/index.d.ts.map +1 -0
  170. package/dist/particle/behaviors/shapes/PolygonalChain.d.ts +57 -0
  171. package/dist/particle/behaviors/shapes/PolygonalChain.d.ts.map +1 -0
  172. package/dist/particle/behaviors/shapes/Rectangle.d.ts +59 -0
  173. package/dist/particle/behaviors/shapes/Rectangle.d.ts.map +1 -0
  174. package/dist/particle/behaviors/shapes/SpawnShape.d.ts +32 -0
  175. package/dist/particle/behaviors/shapes/SpawnShape.d.ts.map +1 -0
  176. package/dist/particle/behaviors/shapes/Torus.d.ts +71 -0
  177. package/dist/particle/behaviors/shapes/Torus.d.ts.map +1 -0
  178. package/dist/particle/behaviors/shapes/index.d.ts +5 -0
  179. package/dist/particle/behaviors/shapes/index.d.ts.map +1 -0
  180. package/dist/particle/index.d.ts +11 -0
  181. package/dist/particle/index.d.ts.map +1 -0
  182. package/dist/particle/index.js +2845 -0
  183. package/dist/particle/index.js.map +1 -0
  184. package/dist/plugins/Plugin.types.d.ts +80 -0
  185. package/dist/plugins/Plugin.types.d.ts.map +1 -0
  186. package/dist/plugins/device/DeviceOptimizerPlugin.d.ts +187 -0
  187. package/dist/plugins/device/DeviceOptimizerPlugin.d.ts.map +1 -0
  188. package/dist/plugins/device/DeviceOptimizerPlugin.types.d.ts +134 -0
  189. package/dist/plugins/device/DeviceOptimizerPlugin.types.d.ts.map +1 -0
  190. package/dist/plugins/device/index.d.ts +3 -0
  191. package/dist/plugins/device/index.d.ts.map +1 -0
  192. package/dist/plugins/display/DisplayPlugin.d.ts +208 -0
  193. package/dist/plugins/display/DisplayPlugin.d.ts.map +1 -0
  194. package/dist/plugins/display/DisplayPlugin.types.d.ts +174 -0
  195. package/dist/plugins/display/DisplayPlugin.types.d.ts.map +1 -0
  196. package/dist/plugins/display/displayViewport.d.ts +10 -0
  197. package/dist/plugins/display/displayViewport.d.ts.map +1 -0
  198. package/dist/plugins/display/index.d.ts +4 -0
  199. package/dist/plugins/display/index.d.ts.map +1 -0
  200. package/dist/plugins/eventbus/EventBusPlugin.d.ts +21 -0
  201. package/dist/plugins/eventbus/EventBusPlugin.d.ts.map +1 -0
  202. package/dist/plugins/eventbus/EventBusPlugin.types.d.ts +24 -0
  203. package/dist/plugins/eventbus/EventBusPlugin.types.d.ts.map +1 -0
  204. package/dist/plugins/eventbus/index.d.ts +3 -0
  205. package/dist/plugins/eventbus/index.d.ts.map +1 -0
  206. package/dist/plugins/gsap/GsapPlugin.d.ts +307 -0
  207. package/dist/plugins/gsap/GsapPlugin.d.ts.map +1 -0
  208. package/dist/plugins/gsap/index.d.ts +2 -0
  209. package/dist/plugins/gsap/index.d.ts.map +1 -0
  210. package/dist/plugins/index.d.ts +13 -0
  211. package/dist/plugins/index.d.ts.map +1 -0
  212. package/dist/plugins/index.js +12806 -0
  213. package/dist/plugins/index.js.map +1 -0
  214. package/dist/plugins/input/InputPlugin.const.d.ts +80 -0
  215. package/dist/plugins/input/InputPlugin.const.d.ts.map +1 -0
  216. package/dist/plugins/input/InputPlugin.d.ts +141 -0
  217. package/dist/plugins/input/InputPlugin.d.ts.map +1 -0
  218. package/dist/plugins/input/InputPlugin.types.d.ts +41 -0
  219. package/dist/plugins/input/InputPlugin.types.d.ts.map +1 -0
  220. package/dist/plugins/input/KeyboardManager.d.ts +139 -0
  221. package/dist/plugins/input/KeyboardManager.d.ts.map +1 -0
  222. package/dist/plugins/input/KeyboardManager.types.d.ts +27 -0
  223. package/dist/plugins/input/KeyboardManager.types.d.ts.map +1 -0
  224. package/dist/plugins/input/index.d.ts +4 -0
  225. package/dist/plugins/input/index.d.ts.map +1 -0
  226. package/dist/plugins/language/I18NextPlugin.d.ts +30 -0
  227. package/dist/plugins/language/I18NextPlugin.d.ts.map +1 -0
  228. package/dist/plugins/language/I18NextPlugin.types.d.ts +29 -0
  229. package/dist/plugins/language/I18NextPlugin.types.d.ts.map +1 -0
  230. package/dist/plugins/language/index.d.ts +3 -0
  231. package/dist/plugins/language/index.d.ts.map +1 -0
  232. package/dist/plugins/resource/ResourcePlugin.d.ts +189 -0
  233. package/dist/plugins/resource/ResourcePlugin.d.ts.map +1 -0
  234. package/dist/plugins/resource/ResourcePlugin.types.d.ts +153 -0
  235. package/dist/plugins/resource/ResourcePlugin.types.d.ts.map +1 -0
  236. package/dist/plugins/resource/index.d.ts +3 -0
  237. package/dist/plugins/resource/index.d.ts.map +1 -0
  238. package/dist/plugins/scene/Scene.d.ts +203 -0
  239. package/dist/plugins/scene/Scene.d.ts.map +1 -0
  240. package/dist/plugins/scene/ScenePlugin.d.ts +162 -0
  241. package/dist/plugins/scene/ScenePlugin.d.ts.map +1 -0
  242. package/dist/plugins/scene/ScenePlugin.types.d.ts +35 -0
  243. package/dist/plugins/scene/ScenePlugin.types.d.ts.map +1 -0
  244. package/dist/plugins/scene/index.d.ts +4 -0
  245. package/dist/plugins/scene/index.d.ts.map +1 -0
  246. package/dist/plugins/sentry/SentryPlugin.d.ts +66 -0
  247. package/dist/plugins/sentry/SentryPlugin.d.ts.map +1 -0
  248. package/dist/plugins/sentry/SentryPlugin.types.d.ts +8 -0
  249. package/dist/plugins/sentry/SentryPlugin.types.d.ts.map +1 -0
  250. package/dist/plugins/sentry/index.d.ts +3 -0
  251. package/dist/plugins/sentry/index.d.ts.map +1 -0
  252. package/dist/plugins/service/ServiceAdapter.d.ts +88 -0
  253. package/dist/plugins/service/ServiceAdapter.d.ts.map +1 -0
  254. package/dist/plugins/service/ServiceEventHelper.d.ts +6 -0
  255. package/dist/plugins/service/ServiceEventHelper.d.ts.map +1 -0
  256. package/dist/plugins/service/ServicePlugin.d.ts +135 -0
  257. package/dist/plugins/service/ServicePlugin.d.ts.map +1 -0
  258. package/dist/plugins/service/ServicePlugin.types.d.ts +14 -0
  259. package/dist/plugins/service/ServicePlugin.types.d.ts.map +1 -0
  260. package/dist/plugins/service/adapters/DevAuthAdapter.d.ts +56 -0
  261. package/dist/plugins/service/adapters/DevAuthAdapter.d.ts.map +1 -0
  262. package/dist/plugins/service/adapters/RGSAdapter.d.ts +82 -0
  263. package/dist/plugins/service/adapters/RGSAdapter.d.ts.map +1 -0
  264. package/dist/plugins/service/adapters/index.d.ts +7 -0
  265. package/dist/plugins/service/adapters/index.d.ts.map +1 -0
  266. package/dist/plugins/service/adapters/resolvePublicIp.d.ts +10 -0
  267. package/dist/plugins/service/adapters/resolvePublicIp.d.ts.map +1 -0
  268. package/dist/plugins/service/index.d.ts +10 -0
  269. package/dist/plugins/service/index.d.ts.map +1 -0
  270. package/dist/plugins/service/types/api.types.d.ts +299 -0
  271. package/dist/plugins/service/types/api.types.d.ts.map +1 -0
  272. package/dist/plugins/service/types/index.d.ts +6 -0
  273. package/dist/plugins/service/types/index.d.ts.map +1 -0
  274. package/dist/plugins/skin/ISkin.d.ts +62 -0
  275. package/dist/plugins/skin/ISkin.d.ts.map +1 -0
  276. package/dist/plugins/skin/Skin.d.ts +155 -0
  277. package/dist/plugins/skin/Skin.d.ts.map +1 -0
  278. package/dist/plugins/skin/SkinPlugin.d.ts +285 -0
  279. package/dist/plugins/skin/SkinPlugin.d.ts.map +1 -0
  280. package/dist/plugins/skin/SkinPlugin.types.d.ts +56 -0
  281. package/dist/plugins/skin/SkinPlugin.types.d.ts.map +1 -0
  282. package/dist/plugins/skin/index.d.ts +5 -0
  283. package/dist/plugins/skin/index.d.ts.map +1 -0
  284. package/dist/plugins/sound/SoundPlugin.d.ts +319 -0
  285. package/dist/plugins/sound/SoundPlugin.d.ts.map +1 -0
  286. package/dist/plugins/sound/SoundPlugin.types.d.ts +102 -0
  287. package/dist/plugins/sound/SoundPlugin.types.d.ts.map +1 -0
  288. package/dist/plugins/sound/SoundTestGUI.d.ts +42 -0
  289. package/dist/plugins/sound/SoundTestGUI.d.ts.map +1 -0
  290. package/dist/plugins/sound/index.d.ts +4 -0
  291. package/dist/plugins/sound/index.d.ts.map +1 -0
  292. package/dist/state-machine/ConfigBuilder.d.ts +239 -0
  293. package/dist/state-machine/ConfigBuilder.d.ts.map +1 -0
  294. package/dist/state-machine/StateMachine.d.ts +251 -0
  295. package/dist/state-machine/StateMachine.d.ts.map +1 -0
  296. package/dist/state-machine/guards.d.ts +151 -0
  297. package/dist/state-machine/guards.d.ts.map +1 -0
  298. package/dist/state-machine/index.d.ts +5 -0
  299. package/dist/state-machine/index.d.ts.map +1 -0
  300. package/dist/state-machine/index.js +954 -0
  301. package/dist/state-machine/index.js.map +1 -0
  302. package/dist/state-machine/types.d.ts +65 -0
  303. package/dist/state-machine/types.d.ts.map +1 -0
  304. package/dist/store/DataStore.d.ts +167 -0
  305. package/dist/store/DataStore.d.ts.map +1 -0
  306. package/dist/store/index.d.ts +3 -0
  307. package/dist/store/index.d.ts.map +1 -0
  308. package/dist/store/index.js +197 -0
  309. package/dist/store/index.js.map +1 -0
  310. package/dist/ui/behaviors/ButtonBehavior.d.ts +245 -0
  311. package/dist/ui/behaviors/ButtonBehavior.d.ts.map +1 -0
  312. package/dist/ui/behaviors/InputBehavior.d.ts +169 -0
  313. package/dist/ui/behaviors/InputBehavior.d.ts.map +1 -0
  314. package/dist/ui/behaviors/ScrollbarBehavior.d.ts +371 -0
  315. package/dist/ui/behaviors/ScrollbarBehavior.d.ts.map +1 -0
  316. package/dist/ui/behaviors/index.d.ts +4 -0
  317. package/dist/ui/behaviors/index.d.ts.map +1 -0
  318. package/dist/ui/components/ButtonComp.d.ts +138 -0
  319. package/dist/ui/components/ButtonComp.d.ts.map +1 -0
  320. package/dist/ui/components/Comp.utils.d.ts +390 -0
  321. package/dist/ui/components/Comp.utils.d.ts.map +1 -0
  322. package/dist/ui/components/Component.types.d.ts +41 -0
  323. package/dist/ui/components/Component.types.d.ts.map +1 -0
  324. package/dist/ui/components/InputComp.d.ts +43 -0
  325. package/dist/ui/components/InputComp.d.ts.map +1 -0
  326. package/dist/ui/components/LabelBox.d.ts +49 -0
  327. package/dist/ui/components/LabelBox.d.ts.map +1 -0
  328. package/dist/ui/components/ListTableComp.d.ts +106 -0
  329. package/dist/ui/components/ListTableComp.d.ts.map +1 -0
  330. package/dist/ui/components/Skinable.d.ts +261 -0
  331. package/dist/ui/components/Skinable.d.ts.map +1 -0
  332. package/dist/ui/components/SliderComp.d.ts +60 -0
  333. package/dist/ui/components/SliderComp.d.ts.map +1 -0
  334. package/dist/ui/components/SpriteTextBBCode.d.ts +16 -0
  335. package/dist/ui/components/SpriteTextBBCode.d.ts.map +1 -0
  336. package/dist/ui/components/StepperComp.d.ts +89 -0
  337. package/dist/ui/components/StepperComp.d.ts.map +1 -0
  338. package/dist/ui/components/index.d.ts +12 -0
  339. package/dist/ui/components/index.d.ts.map +1 -0
  340. package/dist/ui/components/spriteText/SpriteText.d.ts +114 -0
  341. package/dist/ui/components/spriteText/SpriteText.d.ts.map +1 -0
  342. package/dist/ui/components/spriteText/SpriteText.types.d.ts +109 -0
  343. package/dist/ui/components/spriteText/SpriteText.types.d.ts.map +1 -0
  344. package/dist/ui/components/spriteText/SpriteTextAlignment.d.ts +25 -0
  345. package/dist/ui/components/spriteText/SpriteTextAlignment.d.ts.map +1 -0
  346. package/dist/ui/components/spriteText/SpriteTextBezier.d.ts +20 -0
  347. package/dist/ui/components/spriteText/SpriteTextBezier.d.ts.map +1 -0
  348. package/dist/ui/components/spriteText/SpriteTextCurve.d.ts +4 -0
  349. package/dist/ui/components/spriteText/SpriteTextCurve.d.ts.map +1 -0
  350. package/dist/ui/components/spriteText/SpriteTextKerning.d.ts +7 -0
  351. package/dist/ui/components/spriteText/SpriteTextKerning.d.ts.map +1 -0
  352. package/dist/ui/components/spriteText/SpriteTextTexture.d.ts +16 -0
  353. package/dist/ui/components/spriteText/SpriteTextTexture.d.ts.map +1 -0
  354. package/dist/ui/components/spriteText/SpriteTextWrap.d.ts +19 -0
  355. package/dist/ui/components/spriteText/SpriteTextWrap.d.ts.map +1 -0
  356. package/dist/ui/components/spriteText/index.d.ts +3 -0
  357. package/dist/ui/components/spriteText/index.d.ts.map +1 -0
  358. package/dist/ui/index.d.ts +3 -0
  359. package/dist/ui/index.d.ts.map +1 -0
  360. package/dist/ui/index.js +4778 -0
  361. package/dist/ui/index.js.map +1 -0
  362. package/dist/utils/ArrayUtils.d.ts +24 -0
  363. package/dist/utils/ArrayUtils.d.ts.map +1 -0
  364. package/dist/utils/ColorUtils.d.ts +34 -0
  365. package/dist/utils/ColorUtils.d.ts.map +1 -0
  366. package/dist/utils/DataInjector.d.ts +67 -0
  367. package/dist/utils/DataInjector.d.ts.map +1 -0
  368. package/dist/utils/Logger.d.ts +332 -0
  369. package/dist/utils/Logger.d.ts.map +1 -0
  370. package/dist/utils/NumberFormatter.d.ts +126 -0
  371. package/dist/utils/NumberFormatter.d.ts.map +1 -0
  372. package/dist/utils/ObjectUtils.d.ts +64 -0
  373. package/dist/utils/ObjectUtils.d.ts.map +1 -0
  374. package/dist/utils/PixiUtils.d.ts +118 -0
  375. package/dist/utils/PixiUtils.d.ts.map +1 -0
  376. package/dist/utils/Throttle.d.ts +103 -0
  377. package/dist/utils/Throttle.d.ts.map +1 -0
  378. package/dist/utils/index.d.ts +9 -0
  379. package/dist/utils/index.d.ts.map +1 -0
  380. package/dist/utils/index.js +899 -0
  381. package/dist/utils/index.js.map +1 -0
  382. package/dist/vite/index.d.ts +3 -0
  383. package/dist/vite/index.d.ts.map +1 -0
  384. package/dist/vite/index.js +126 -0
  385. package/dist/vite/index.js.map +1 -0
  386. package/dist/vite/mergeLocalesPlugin.d.ts +22 -0
  387. package/dist/vite/mergeLocalesPlugin.d.ts.map +1 -0
  388. package/package.json +143 -0
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Array prototype extensions for game utilities.
3
+ *
4
+ * ⚠️ WARNING: This file modifies Array.prototype globally.
5
+ * It must be imported early in the application lifecycle.
6
+ *
7
+ * Usage:
8
+ * - array.shuffle() - Returns shuffled copy
9
+ * - array.random() - Returns random element
10
+ * - array.clone() - Returns shallow copy
11
+ * - array.exclude(1, 2) - Returns array without indices 1, 2
12
+ */
13
+ declare global {
14
+ interface Array<T> {
15
+ random(): T;
16
+ clone(): T[];
17
+ exclude(...indexToExclude: number[]): T[];
18
+ shuffle(): T[];
19
+ lastItem(): T | undefined;
20
+ firstItem(): T | undefined;
21
+ }
22
+ }
23
+ export declare const __arrayUtilsLoaded = true;
24
+ //# sourceMappingURL=ArrayUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrayUtils.d.ts","sourceRoot":"","sources":["../../utils/ArrayUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAkDH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,CAAC;QACf,MAAM,IAAI,CAAC,CAAC;QACZ,KAAK,IAAI,CAAC,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,cAAc,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC,EAAE,CAAC;QACf,QAAQ,IAAI,CAAC,GAAG,SAAS,CAAC;QAC1B,SAAS,IAAI,CAAC,GAAG,SAAS,CAAC;KAC5B;CACF;AAGD,eAAO,MAAM,kBAAkB,OAAO,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { Color, type ColorSource } from 'pixi.js';
2
+ /**
3
+ * Lightens a color by a specified percentage.
4
+ *
5
+ * @param color - Color value (hex string, number, or any PixiJS ColorSource)
6
+ * @param amount - Amount to lighten (0-1, where 0.2 = 20% lighter)
7
+ * @returns Lightened color as PixiJS Color instance
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const lighter = lightenColor('#4CAF50', 0.15);
12
+ * const lighter2 = lightenColor(0x4CAF50, 0.15);
13
+ * // Can be used directly with PixiJS: sprite.tint = lighter;
14
+ * // Or as hex string: lighter.toHex()
15
+ * ```
16
+ */
17
+ export declare function lightenColor(color: ColorSource, amount: number): Color;
18
+ /**
19
+ * Darkens a color by a specified percentage.
20
+ *
21
+ * @param color - Color value (hex string, number, or any PixiJS ColorSource)
22
+ * @param amount - Amount to darken (0-1, where 0.2 = 20% darker)
23
+ * @returns Darkened color as PixiJS Color instance
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * const darker = darkenColor('#4CAF50', 0.15);
28
+ * const darker2 = darkenColor(0x4CAF50, 0.15);
29
+ * // Can be used directly with PixiJS: sprite.tint = darker;
30
+ * // Or as hex string: darker.toHex()
31
+ * ```
32
+ */
33
+ export declare function darkenColor(color: ColorSource, amount: number): Color;
34
+ //# sourceMappingURL=ColorUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorUtils.d.ts","sourceRoot":"","sources":["../../utils/ColorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAqDlD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAEtE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAErE"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Injects data into a nested object path.
3
+ *
4
+ * DataInjector is a utility function for safely modifying nested object properties.
5
+ * It creates a deep clone of the original object and injects data at the specified path.
6
+ *
7
+ * ## Features
8
+ *
9
+ * - **Deep Cloning**: Original object is never mutated
10
+ * - **Nested Path Support**: Use dot notation (e.g., 'ui.button.color')
11
+ * - **Merge or Replace**: Choose to merge with existing data or replace it
12
+ * - **Type-Safe**: Preserves TypeScript types
13
+ *
14
+ * ## Usage with Skins
15
+ *
16
+ * Commonly used to patch skin data with specific values while keeping the rest intact.
17
+ *
18
+ * @typeParam T - The type of the object being modified
19
+ * @param obj - Source object to modify
20
+ * @param path - Dot-notation path to the property (e.g., 'options.buttonSkin.up')
21
+ * @param data - Data to inject at the path
22
+ * @param replace - If true, replaces the value; if false, merges with existing (default: false)
23
+ * @returns New object with injected data
24
+ *
25
+ * @example
26
+ * Merge data (default):
27
+ * ```typescript
28
+ * const skinData = {
29
+ * button: { color: 0xFF0000, size: 100 },
30
+ * text: { fontSize: 24 }
31
+ * };
32
+ *
33
+ * const updated = DataInjector(skinData, 'button', { size: 150 });
34
+ * // Result: { button: { color: 0xFF0000, size: 150 }, text: { fontSize: 24 } }
35
+ * ```
36
+ *
37
+ * @example
38
+ * Replace data:
39
+ * ```typescript
40
+ * const updated = DataInjector(skinData, 'button', { size: 150 }, true);
41
+ * // Result: { button: { size: 150 }, text: { fontSize: 24 } }
42
+ * // Note: color is removed because we replaced the entire button object
43
+ * ```
44
+ *
45
+ * @example
46
+ * Real-world example:
47
+ * ```typescript
48
+ * let autoplaySkin = defaultAutoplayMenuSkin;
49
+ *
50
+ * // Inject checkbox textures
51
+ * autoplaySkin = DataInjector(autoplaySkin, 'options.buttonSkin', {
52
+ * up: { background: { texture: 'btn_checkbox_up' } },
53
+ * over: { background: { texture: 'btn_checkbox_over' } },
54
+ * down: { background: { texture: 'btn_checkbox_down' } }
55
+ * });
56
+ *
57
+ * // Inject slider textures
58
+ * autoplaySkin = DataInjector(autoplaySkin, 'count.sliderSkin', {
59
+ * up: { knob: { texture: 'icon_autoplay_slider_up' } },
60
+ * over: { knob: { texture: 'icon_autoplay_slider_over' } }
61
+ * });
62
+ * ```
63
+ *
64
+ * @public
65
+ */
66
+ export declare function DataInjector<T extends object>(obj: T, path: string, data: unknown, replace?: boolean): T;
67
+ //# sourceMappingURL=DataInjector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataInjector.d.ts","sourceRoot":"","sources":["../../utils/DataInjector.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAC3C,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,OAAO,UAAQ,GACd,CAAC,CAgBH"}
@@ -0,0 +1,332 @@
1
+ /**
2
+ * Log levels for filtering log output.
3
+ *
4
+ * Lower numeric values have higher priority.
5
+ * Setting a log level will show that level and all higher priority levels.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Set to INFO level
10
+ * logger.setLevel(LogLevel.INFO);
11
+ * // Will show: ERROR, WARN, INFO
12
+ * // Will hide: DEBUG, TRACE
13
+ * ```
14
+ *
15
+ * @public
16
+ */
17
+ export declare enum LogLevel {
18
+ /** Critical errors (always shown) */
19
+ ERROR = 0,
20
+ /** Warnings (shown at WARN level and above) */
21
+ WARN = 1,
22
+ /** Informational messages (shown at INFO level and above) */
23
+ INFO = 2,
24
+ /** Debug messages (shown at DEBUG level and above) */
25
+ DEBUG = 3,
26
+ /** Trace messages (most verbose, shown only at TRACE level) */
27
+ TRACE = 4
28
+ }
29
+ export type LoggerFilterMatcher = string | RegExp;
30
+ export interface LoggerFilterConfig {
31
+ contexts?: LoggerFilterMatcher[];
32
+ messages?: LoggerFilterMatcher[];
33
+ mode?: 'include' | 'exclude';
34
+ }
35
+ /**
36
+ * Configuration options for the Logger.
37
+ *
38
+ * @public
39
+ */
40
+ export interface LoggerConfig {
41
+ /** Minimum log level to display */
42
+ level: LogLevel;
43
+ /** Whether logging is enabled */
44
+ enabled: boolean;
45
+ /** Whether to show timestamps in logs */
46
+ showTimestamp: boolean;
47
+ /** Whether to show colors in logs */
48
+ showColors: boolean;
49
+ filter?: LoggerFilterConfig;
50
+ }
51
+ /**
52
+ * Singleton logger for centralized logging.
53
+ *
54
+ * Logger provides a unified logging system with:
55
+ * - Multiple log levels (ERROR, WARN, INFO, DEBUG, TRACE)
56
+ * - Colored output (browser and terminal)
57
+ * - Timestamps
58
+ * - Context-based sub-loggers
59
+ * - Environment detection (browser vs Node.js)
60
+ *
61
+ * ## Features
62
+ *
63
+ * - **Singleton Pattern**: Single instance across the application
64
+ * - **Log Levels**: Filter logs by severity
65
+ * - **Colored Output**: CSS colors in browser, ANSI colors in terminal
66
+ * - **Context Loggers**: Create sub-loggers with context prefixes
67
+ * - **Timestamps**: Optional ISO timestamp display
68
+ * - **Environment Aware**: Automatically detects browser vs Node.js
69
+ *
70
+ * ## Log Levels
71
+ *
72
+ * - **ERROR** (0): Critical errors
73
+ * - **WARN** (1): Warnings
74
+ * - **INFO** (2): Informational messages (default)
75
+ * - **DEBUG** (3): Debug information
76
+ * - **TRACE** (4): Detailed trace information
77
+ *
78
+ * @example
79
+ * Basic usage:
80
+ * ```typescript
81
+ * import { logger, LogLevel } from '@rb-games/core/utils';
82
+ *
83
+ * // Configure logger
84
+ * logger.configure({
85
+ * level: LogLevel.DEBUG,
86
+ * showTimestamp: true,
87
+ * showColors: true
88
+ * });
89
+ *
90
+ * // Log messages
91
+ * logger.error('Critical error occurred');
92
+ * logger.warn('This is a warning');
93
+ * logger.info('Application started');
94
+ * logger.debug('Debug information', { data: 'value' });
95
+ * logger.trace('Detailed trace');
96
+ * ```
97
+ *
98
+ * @example
99
+ * Context loggers (used in plugins):
100
+ * ```typescript
101
+ * class MyPlugin {
102
+ * private logger = logger.createContextLogger('MyPlugin');
103
+ *
104
+ * initialize() {
105
+ * this.logger.info('Plugin initialized');
106
+ * // Output: [2024-01-01T12:00:00.000Z] [INFO] [MyPlugin] Plugin initialized
107
+ * }
108
+ *
109
+ * doSomething() {
110
+ * this.logger.debug('Doing something', { value: 42 });
111
+ * // Output: [2024-01-01T12:00:00.000Z] [DEBUG] [MyPlugin] Doing something { value: 42 }
112
+ * }
113
+ * }
114
+ * ```
115
+ *
116
+ * @example
117
+ * Production configuration:
118
+ * ```typescript
119
+ * // In production, only show errors and warnings
120
+ * if (process.env.NODE_ENV === 'production') {
121
+ * logger.setLevel(LogLevel.WARN);
122
+ * } else {
123
+ * logger.setLevel(LogLevel.DEBUG);
124
+ * }
125
+ * ```
126
+ *
127
+ * @example
128
+ * Disable logging:
129
+ * ```typescript
130
+ * logger.setEnabled(false);
131
+ * ```
132
+ *
133
+ * @category Utils
134
+ * @public
135
+ */
136
+ export declare class Logger {
137
+ private static instance;
138
+ private config;
139
+ private readonly terminalColors;
140
+ private readonly browserColors;
141
+ private readonly levelLabels;
142
+ private readonly levelColors;
143
+ private readonly levelBrowserColors;
144
+ /**
145
+ * Private constructor for singleton pattern
146
+ */
147
+ private constructor();
148
+ /**
149
+ * Get the singleton instance of the Logger
150
+ */
151
+ static getInstance(): Logger;
152
+ /**
153
+ * Configure the logger
154
+ * @param config Configuration options
155
+ */
156
+ configure(config: Partial<LoggerConfig>): void;
157
+ /**
158
+ * Enable or disable logging
159
+ * @param enabled Whether logging is enabled
160
+ */
161
+ setEnabled(enabled: boolean): void;
162
+ /**
163
+ * Set the log level
164
+ * @param level The log level to set
165
+ */
166
+ setLevel(level: LogLevel): void;
167
+ /**
168
+ * Get the current log level
169
+ */
170
+ getLevel(): LogLevel;
171
+ /**
172
+ * Log an error message
173
+ * @param message The message to log
174
+ * @param args Additional arguments to log
175
+ */
176
+ error(message: string, ...args: any[]): void;
177
+ /**
178
+ * Log a warning message
179
+ * @param message The message to log
180
+ * @param args Additional arguments to log
181
+ */
182
+ warn(message: string, ...args: any[]): void;
183
+ /**
184
+ * Log an info message
185
+ * @param message The message to log
186
+ * @param args Additional arguments to log
187
+ */
188
+ info(message: string, ...args: any[]): void;
189
+ /**
190
+ * Log a debug message
191
+ * @param message The message to log
192
+ * @param args Additional arguments to log
193
+ */
194
+ debug(message: string, ...args: any[]): void;
195
+ /**
196
+ * Log a trace message
197
+ * @param message The message to log
198
+ * @param args Additional arguments to log
199
+ */
200
+ trace(message: string, ...args: any[]): void;
201
+ /**
202
+ * Log a message with a specific log level
203
+ * @param level The log level
204
+ * @param message The message to log
205
+ * @param args Additional arguments to log
206
+ */
207
+ private log;
208
+ private extractContext;
209
+ private matchesFilter;
210
+ private shouldLogMessage;
211
+ /**
212
+ * Log a message in terminal/node environment
213
+ */
214
+ private logTerminal;
215
+ /**
216
+ * Log a message in browser environment with CSS styling
217
+ */
218
+ private logBrowser;
219
+ /**
220
+ * Creates a context-specific logger.
221
+ *
222
+ * Context loggers automatically prefix all log messages with a context tag.
223
+ * Commonly used in plugins and classes to identify log sources.
224
+ *
225
+ * @param context - Context name (e.g., 'MyPlugin', 'SceneManager')
226
+ * @returns ContextLogger instance
227
+ *
228
+ * @example
229
+ * ```typescript
230
+ * class DisplayPlugin {
231
+ * private logger = logger.createContextLogger('DisplayPlugin');
232
+ *
233
+ * initialize() {
234
+ * this.logger.info('Initializing display');
235
+ * // Output: [INFO] [DisplayPlugin] Initializing display
236
+ * }
237
+ * }
238
+ * ```
239
+ */
240
+ createContextLogger(context: string): ContextLogger;
241
+ }
242
+ /**
243
+ * Context-specific logger that prefixes all messages.
244
+ *
245
+ * ContextLogger wraps the main Logger and automatically adds a context prefix
246
+ * to all log messages. This makes it easy to identify which component or plugin
247
+ * generated a log message.
248
+ *
249
+ * ## Usage
250
+ *
251
+ * Create context loggers using `logger.createContextLogger(context)`.
252
+ * All log methods (error, warn, info, debug, trace) are available.
253
+ *
254
+ * @example
255
+ * ```typescript
256
+ * class ResourcePlugin {
257
+ * private logger = logger.createContextLogger('ResourcePlugin');
258
+ *
259
+ * async loadAssets() {
260
+ * this.logger.info('Loading assets...');
261
+ * // Output: [INFO] [ResourcePlugin] Loading assets...
262
+ *
263
+ * try {
264
+ * await this.load();
265
+ * this.logger.info('Assets loaded successfully');
266
+ * } catch (error) {
267
+ * this.logger.error('Failed to load assets', error);
268
+ * }
269
+ * }
270
+ * }
271
+ * ```
272
+ *
273
+ * @category Utils
274
+ * @public
275
+ */
276
+ export declare class ContextLogger {
277
+ private logger;
278
+ private context;
279
+ constructor(logger: Logger, context: string);
280
+ /**
281
+ * Log an error message
282
+ * @param message The message to log
283
+ * @param args Additional arguments to log
284
+ */
285
+ error(message: string, ...args: any[]): void;
286
+ /**
287
+ * Log a warning message
288
+ * @param message The message to log
289
+ * @param args Additional arguments to log
290
+ */
291
+ warn(message: string, ...args: any[]): void;
292
+ /**
293
+ * Log an info message
294
+ * @param message The message to log
295
+ * @param args Additional arguments to log
296
+ */
297
+ info(message: string, ...args: any[]): void;
298
+ /**
299
+ * Log a debug message
300
+ * @param message The message to log
301
+ * @param args Additional arguments to log
302
+ */
303
+ debug(message: string, ...args: any[]): void;
304
+ /**
305
+ * Log a trace message
306
+ * @param message The message to log
307
+ * @param args Additional arguments to log
308
+ */
309
+ trace(message: string, ...args: any[]): void;
310
+ }
311
+ export declare const logger: Logger;
312
+ /**
313
+ * Get or create a cached context logger.
314
+ * Same context string always returns the same instance.
315
+ *
316
+ * Preferred over class property pattern for easier tree-shaking
317
+ * and production stripping.
318
+ *
319
+ * @param context - Context name (e.g., 'MyPlugin', 'SceneManager')
320
+ * @returns Cached ContextLogger instance
321
+ *
322
+ * @example
323
+ * ```typescript
324
+ * import { getLogger } from '@rb-games/core/utils';
325
+ *
326
+ * // No class property needed - use inline
327
+ * getLogger('MyClass').info('message');
328
+ * getLogger('MyClass').debug('data', { x: 1 });
329
+ * ```
330
+ */
331
+ export declare function getLogger(context: string): ContextLogger;
332
+ //# sourceMappingURL=Logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../utils/Logger.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,QAAQ;IAClB,qCAAqC;IACrC,KAAK,IAAI;IACT,+CAA+C;IAC/C,IAAI,IAAI;IACR,6DAA6D;IAC7D,IAAI,IAAI;IACR,sDAAsD;IACtD,KAAK,IAAI;IACT,+DAA+D;IAC/D,KAAK,IAAI;CACV;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,mCAAmC;IACnC,KAAK,EAAE,QAAQ,CAAC;IAChB,iCAAiC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,qCAAqC;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAe;IAG7B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAU7B;IAGF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAS5B;IAEF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAM1B;IAEF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAM1B;IAEF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAMjC;IAEF;;OAEG;IACH,OAAO;IAiBP;;OAEG;WACW,WAAW,IAAI,MAAM;IAOnC;;;OAGG;IACI,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAIrD;;;OAGG;IACI,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIzC;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAItC;;OAEG;IACI,QAAQ,IAAI,QAAQ;IAI3B;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAInD;;;;OAIG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIlD;;;;OAIG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIlD;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAInD;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAInD;;;;;OAKG;IACH,OAAO,CAAC,GAAG;IAoBX,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,gBAAgB;IAqBxB;;OAEG;IACH,OAAO,CAAC,WAAW;IA8DnB;;OAEG;IACH,OAAO,CAAC,UAAU;IAuDlB;;;;;;;;;;;;;;;;;;;;OAoBG;IACI,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa;CAG3D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAK3C;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAInD;;;;OAIG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIlD;;;;OAIG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIlD;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAInD;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;CAGpD;AAGD,eAAO,MAAM,MAAM,QAAuB,CAAC;AAK3C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAOxD"}
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Configuration options for NumberFormatter.
3
+ *
4
+ * @public
5
+ */
6
+ export interface NumberFormatterConfig {
7
+ /** Number format mask (e.g., '$ #,##0.##', '#,##0.00 TL') */
8
+ mask: string;
9
+ /** Denomination multiplier for currency conversion */
10
+ denom: number;
11
+ /** Threshold for express mode (values above this will be shortened) */
12
+ expressThreshold: number;
13
+ /** Units for express mode (K, M, B, T, etc.) */
14
+ expressUnits: string[];
15
+ /** Decimal precision for express mode */
16
+ decimalPrecision: number;
17
+ /** Symbol to show when number is rounded in express mode */
18
+ roundedSymbol: string;
19
+ }
20
+ /**
21
+ * Options for format and express methods.
22
+ *
23
+ * @public
24
+ */
25
+ export interface FormatOptions {
26
+ /** Prefix to add before the formatted number */
27
+ prefix?: string;
28
+ /** Force showing decimal places even for whole numbers */
29
+ forceDecimals?: boolean;
30
+ /** Ignore denomination multiplier */
31
+ ignoreDenom?: boolean;
32
+ /** Custom threshold for express mode (overrides config) */
33
+ threshold?: number;
34
+ }
35
+ export declare class NumberFormatter {
36
+ private static instance;
37
+ private config;
38
+ private maskCache;
39
+ /**
40
+ * Private constructor for singleton pattern
41
+ */
42
+ private constructor();
43
+ /**
44
+ * Configure the NumberFormatter singleton.
45
+ *
46
+ * @param config - Configuration options
47
+ * @returns NumberFormatter instance
48
+ */
49
+ static configure(config: Partial<NumberFormatterConfig>): NumberFormatter;
50
+ /**
51
+ * Get the singleton instance.
52
+ *
53
+ * If not configured yet, initializes with default configuration.
54
+ *
55
+ * @returns NumberFormatter instance
56
+ */
57
+ static getInstance(): NumberFormatter;
58
+ /**
59
+ * Format a number using the configured mask.
60
+ *
61
+ * @param value - Number to format
62
+ * @param options - Optional formatting options
63
+ * @returns Formatted string
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * formatter.format(1500); // "$ 15.00"
68
+ * formatter.format(1500, { forceDecimals: true }); // "$ 15.00"
69
+ * formatter.format(1500, { ignoreDenom: true }); // "$ 1,500.00"
70
+ * ```
71
+ */
72
+ format(value: number, options?: FormatOptions): string;
73
+ /**
74
+ * Format a number in express mode (shortened with K/M/B/T).
75
+ *
76
+ * @param value - Number to format
77
+ * @param options - Optional formatting options
78
+ * @returns Formatted string with unit suffix
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ * formatter.express(150000); // "$ 1.5K"
83
+ * formatter.express(2500000); // "$ 2.5M"
84
+ * formatter.express(500, { threshold: 100 }); // "$ 0.5K"
85
+ * ```
86
+ */
87
+ express(value: number, options?: FormatOptions): string;
88
+ /**
89
+ * Parse a mask string into its components.
90
+ *
91
+ * @param mask - Mask string to parse
92
+ * @returns Parsed mask information
93
+ * @internal
94
+ */
95
+ private parseMask;
96
+ /**
97
+ * Apply a mask to a number value.
98
+ *
99
+ * @param mask - Mask pattern
100
+ * @param value - Number to format
101
+ * @returns Formatted string
102
+ * @internal
103
+ */
104
+ private applyMask;
105
+ /**
106
+ * Decimal/group separators and fraction length from the configured mask.
107
+ * Use for free-form numeric inputs (e.g. bet multipliers) that are not currency amounts.
108
+ */
109
+ getMaskLocale(): {
110
+ decimal: string;
111
+ group: string;
112
+ decimalPlaces: number;
113
+ };
114
+ /**
115
+ * Format a number using only the numeric portion of the mask (no prefix/suffix, no denom).
116
+ * Suitable for multipliers and limits (e.g. autoplay 10.5× bet).
117
+ */
118
+ formatPlainNumber(value: number, options?: Pick<FormatOptions, 'forceDecimals'>): string;
119
+ /**
120
+ * Get current configuration.
121
+ *
122
+ * @returns Current configuration
123
+ */
124
+ getConfig(): Readonly<NumberFormatterConfig>;
125
+ }
126
+ //# sourceMappingURL=NumberFormatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberFormatter.d.ts","sourceRoot":"","sources":["../../utils/NumberFormatter.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,gBAAgB,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qCAAqC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwID,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAkB;IACzC,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,SAAS,CAAsC;IAEvD;;OAEG;IACH,OAAO;IAIP;;;;;OAKG;WACW,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,eAAe;IAahF;;;;;;OAMG;WACW,WAAW,IAAI,eAAe;IAO5C;;;;;;;;;;;;;OAaG;IACI,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM;IAcjE;;;;;;;;;;;;;OAaG;IACI,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM;IAyClE;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IA8CjB;;;;;;;OAOG;IACH,OAAO,CAAC,SAAS;IAyDjB;;;OAGG;IACI,aAAa,IAAI;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE;IAUjF;;;OAGG;IACI,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,IAAI,CAAC,aAAa,EAAE,eAAe,CAAM,GAAG,MAAM;IAUnG;;;;OAIG;IACI,SAAS,IAAI,QAAQ,CAAC,qBAAqB,CAAC;CAGpD"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Utility functions for object manipulation and property access.
3
+ */
4
+ /**
5
+ * Gets a nested property value from an object using a dot-separated path.
6
+ *
7
+ * @param obj - The source object
8
+ * @param path - Dot-separated path to the nested property (e.g., 'user.profile.name')
9
+ * @returns The value at the specified path, or undefined if any part of the path doesn't exist
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const obj = { user: { profile: { name: 'John' } } };
14
+ * const name = getNestedValue(obj, 'user.profile.name'); // Returns 'John'
15
+ * const age = getNestedValue(obj, 'user.profile.age'); // Returns undefined
16
+ * ```
17
+ */
18
+ export declare function getNestedValue(obj: any, path: string): any;
19
+ /**
20
+ * Sets a nested property value in an object using a dot-separated path.
21
+ * Creates intermediate objects if they don't exist.
22
+ *
23
+ * @param obj - The target object
24
+ * @param path - Dot-separated path to the nested property (e.g., 'user.profile.name')
25
+ * @param value - The value to set
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * const obj = {};
30
+ * setNestedValue(obj, 'user.profile.name', 'John');
31
+ * // Result: { user: { profile: { name: 'John' } } }
32
+ * ```
33
+ */
34
+ export declare function setNestedValue(obj: any, path: string, value: any): void;
35
+ /**
36
+ * Checks if a nested property exists in an object using a dot-separated path.
37
+ *
38
+ * @param obj - The object to check
39
+ * @param path - Dot-separated path to the nested property
40
+ * @returns true if the property exists, false otherwise
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const obj = { user: { profile: { name: 'John' } } };
45
+ * const hasName = hasNestedProperty(obj, 'user.profile.name'); // Returns true
46
+ * const hasAge = hasNestedProperty(obj, 'user.profile.age'); // Returns false
47
+ * ```
48
+ */
49
+ export declare function hasNestedProperty(obj: any, path: string): boolean;
50
+ /**
51
+ * Deep clones an object using structured cloning.
52
+ *
53
+ * @param obj - The object to clone
54
+ * @returns A deep copy of the object
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * const original = { user: { profile: { name: 'John' } } };
59
+ * const cloned = deepClone(original);
60
+ * cloned.user.profile.name = 'Jane'; // Doesn't affect original
61
+ * ```
62
+ */
63
+ export declare function deepClone<T>(obj: T): T;
64
+ //# sourceMappingURL=ObjectUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectUtils.d.ts","sourceRoot":"","sources":["../../utils/ObjectUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAE1D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAUvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAEtC"}