@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,126 @@
1
+ import { Container } from 'pixi.js';
2
+ import { AlignOptions } from './Bounds';
3
+ /**
4
+ * Alignment utility for positioning PixiJS containers, similar to Photoshop's align tools.
5
+ *
6
+ * Provides methods to align multiple containers relative to each other or to a reference point.
7
+ * All alignment operations modify the position of containers in-place.
8
+ *
9
+ * ## Features
10
+ *
11
+ * - **Horizontal Alignment**: Left, center, right
12
+ * - **Vertical Alignment**: Top, center, bottom
13
+ * - **Flexible Reference**: Align to selection bounds, specific container, or custom rectangle
14
+ * - **Parent-aware**: Handles coordinate transformations correctly
15
+ *
16
+ * ## Alignment Modes
17
+ *
18
+ * The alignment reference can be controlled via {@link AlignOptions}:
19
+ * - `selection` (default): Align to the bounding box of all selected items
20
+ * - `container`: Align to a specific container's bounds
21
+ * - `key`: Align to a specific key object
22
+ * - `rectangle`: Align to a custom rectangle
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * import { Align } from '@rb-games/core/layout';
27
+ * import { Container, Sprite } from 'pixi.js';
28
+ *
29
+ * // Create some sprites
30
+ * const sprite1 = new Sprite();
31
+ * const sprite2 = new Sprite();
32
+ * const sprite3 = new Sprite();
33
+ *
34
+ * const container = new Container();
35
+ * container.addChild(sprite1, sprite2, sprite3);
36
+ *
37
+ * // Align all sprites to the left edge of their selection
38
+ * Align.left([sprite1, sprite2, sprite3]);
39
+ *
40
+ * // Align horizontally centered
41
+ * Align.hCenter([sprite1, sprite2, sprite3]);
42
+ *
43
+ * // Align to a specific container
44
+ * const bounds = new Container();
45
+ * Align.left([sprite1, sprite2, sprite3], { container: bounds });
46
+ * ```
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * // Align UI elements to screen center
51
+ * const title = new Text('Game Title');
52
+ * const button = new Sprite();
53
+ * const logo = new Sprite();
54
+ *
55
+ * // Center all elements horizontally to screen bounds
56
+ * Align.hCenter([title, button, logo], {
57
+ * rect: new Rectangle(0, 0, 1920, 1080)
58
+ * });
59
+ *
60
+ * // Align to top
61
+ * Align.top([title, button, logo]);
62
+ * ```
63
+ *
64
+ * @category Layout
65
+ * @public
66
+ */
67
+ export declare class Align {
68
+ /**
69
+ * Aligns containers to the left edge of the reference bounds.
70
+ *
71
+ * @param items - Array of containers to align
72
+ * @param options - Alignment options to control the reference point
73
+ *
74
+ * @example
75
+ * ```typescript
76
+ * // Align to selection bounds (default)
77
+ * Align.left([sprite1, sprite2, sprite3]);
78
+ *
79
+ * // Align to container
80
+ * Align.left([sprite1, sprite2], { container: bounds });
81
+ * ```
82
+ */
83
+ static left(items: Container[], options?: AlignOptions): void;
84
+ /**
85
+ * Aligns containers to the horizontal center of the reference bounds.
86
+ *
87
+ * @param items - Array of containers to align
88
+ * @param options - Alignment options to control the reference point
89
+ *
90
+ * @example
91
+ * ```typescript
92
+ * // Center horizontally within selection
93
+ * Align.hCenter([sprite1, sprite2, sprite3]);
94
+ * ```
95
+ */
96
+ static hCenter(items: Container[], options?: AlignOptions): void;
97
+ /**
98
+ * Aligns containers to the right edge of the reference bounds.
99
+ *
100
+ * @param items - Array of containers to align
101
+ * @param options - Alignment options to control the reference point
102
+ */
103
+ static right(items: Container[], options?: AlignOptions): void;
104
+ /**
105
+ * Aligns containers to the top edge of the reference bounds.
106
+ *
107
+ * @param items - Array of containers to align
108
+ * @param options - Alignment options to control the reference point
109
+ */
110
+ static top(items: Container[], options?: AlignOptions): void;
111
+ /**
112
+ * Aligns containers to the vertical center of the reference bounds.
113
+ *
114
+ * @param items - Array of containers to align
115
+ * @param options - Alignment options to control the reference point
116
+ */
117
+ static vCenter(items: Container[], options?: AlignOptions): void;
118
+ /**
119
+ * Aligns containers to the bottom edge of the reference bounds.
120
+ *
121
+ * @param items - Array of containers to align
122
+ * @param options - Alignment options to control the reference point
123
+ */
124
+ static bottom(items: Container[], options?: AlignOptions): void;
125
+ }
126
+ //# sourceMappingURL=Align.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Align.d.ts","sourceRoot":"","sources":["../../layout/Align.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,YAAY,EAA8D,MAAM,UAAU,CAAC;AAEpG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,qBAAa,KAAK;IAChB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY;IAOtD;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY;IAOzD;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY;IAOvD;;;;;OAKG;IACH,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY;IAOrD;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY;IAOzD;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY;CAOzD"}
@@ -0,0 +1,120 @@
1
+ import { Container, Rectangle } from 'pixi.js';
2
+ /**
3
+ * Configuration options for alignment operations.
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * // Align to selection (default, no options needed)
8
+ * Align.hCenter([sprite1, sprite2]);
9
+ *
10
+ * // Align to container
11
+ * Align.left([sprite1, sprite2], { container: myContainer });
12
+ *
13
+ * // Align to rectangle
14
+ * Align.hCenter([sprite1], { container: new Rectangle(0, 0, 1920, 1080) });
15
+ *
16
+ * // Align to key object
17
+ * Align.top([sprite1, sprite2], { key: mainSprite });
18
+ * ```
19
+ */
20
+ export interface AlignOptions {
21
+ key?: Container;
22
+ container?: Container | Rectangle;
23
+ }
24
+ /**
25
+ * Represents the bounding box of a container with convenient access to edges and center points.
26
+ *
27
+ * This interface provides a virtual container that describes the bounds of one or more
28
+ * PixiJS containers, useful for alignment and layout calculations.
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * const bounds: BoundsLike = {
33
+ * left: 0,
34
+ * right: 100,
35
+ * top: 0,
36
+ * bottom: 50,
37
+ * width: 100,
38
+ * height: 50,
39
+ * centerX: 50,
40
+ * centerY: 25
41
+ * };
42
+ * ```
43
+ */
44
+ export interface BoundsLike {
45
+ /** Left edge X coordinate */
46
+ left: number;
47
+ /** Right edge X coordinate */
48
+ right: number;
49
+ /** Top edge Y coordinate */
50
+ top: number;
51
+ /** Bottom edge Y coordinate */
52
+ bottom: number;
53
+ /** Total width (right - left) */
54
+ width: number;
55
+ /** Total height (bottom - top) */
56
+ height: number;
57
+ /** Horizontal center X coordinate */
58
+ centerX: number;
59
+ /** Vertical center Y coordinate */
60
+ centerY: number;
61
+ }
62
+ /**
63
+ * Gets the common parent container of all items.
64
+ *
65
+ * All items must share the same parent, otherwise an error is thrown.
66
+ * This is essential for coordinate transformations in alignment operations.
67
+ *
68
+ * @param items - Array of containers to check
69
+ * @returns The common parent container
70
+ * @throws {Error} If items don't have a parent or don't share the same parent
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * const parent = getCommonParent([sprite1, sprite2, sprite3]);
75
+ * ```
76
+ */
77
+ export declare function getCommonParent(items: Container[]): Container;
78
+ /**
79
+ * Calculates the bounds of a child container in its parent's coordinate space.
80
+ *
81
+ * This function handles coordinate transformations correctly, accounting for
82
+ * rotation, scale, and skew of the child relative to the parent.
83
+ *
84
+ * @param child - The child container to measure
85
+ * @param parent - The parent container (coordinate space reference)
86
+ * @returns Bounds of the child in parent's local coordinates
87
+ *
88
+ * @example
89
+ * ```typescript
90
+ * const bounds = getLocalBoundsInParent(sprite, container);
91
+ * console.log(`Width: ${bounds.width}, Height: ${bounds.height}`);
92
+ * console.log(`Center: (${bounds.centerX}, ${bounds.centerY})`);
93
+ * ```
94
+ */
95
+ export declare function getLocalBoundsInParent(child: Container, parent: Container): BoundsLike;
96
+ /**
97
+ * Calculates the combined bounding box of multiple containers.
98
+ *
99
+ * This creates a virtual container that encompasses all provided items,
100
+ * similar to selecting multiple objects in Photoshop and seeing their combined bounds.
101
+ *
102
+ * @param items - Array of containers to measure
103
+ * @param parent - Optional parent container for coordinate space (defaults to common parent)
104
+ * @returns Combined bounds of all items
105
+ *
106
+ * @example
107
+ * ```typescript
108
+ * const bounds = getSelectionBounds([sprite1, sprite2, sprite3]);
109
+ * console.log(`Selection size: ${bounds.width} x ${bounds.height}`);
110
+ * console.log(`Selection center: (${bounds.centerX}, ${bounds.centerY})`);
111
+ * ```
112
+ */
113
+ export declare function getSelectionBounds(items: Container[], parent?: Container): BoundsLike;
114
+ export declare function getReferenceBounds(items: Container[], options?: AlignOptions): {
115
+ ref: BoundsLike;
116
+ parent: Container;
117
+ };
118
+ export declare function nudgeX(child: Container, dx: number): void;
119
+ export declare function nudgeY(child: Container, dy: number): void;
120
+ //# sourceMappingURL=Bounds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bounds.d.ts","sourceRoot":"","sources":["../../layout/Bounds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAS,SAAS,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC;AAqBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,UAAU;IACzB,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,CAO7D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,UAAU,CAoBtF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,CAyBrF;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,EAAE,EAClB,OAAO,CAAC,EAAE,YAAY,GACrB;IAAE,GAAG,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAwCxC;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,QAElD;AACD,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,QAElD"}
@@ -0,0 +1,103 @@
1
+ import { Container, Rectangle } from 'pixi.js';
2
+ /**
3
+ * Distribution utility for evenly spacing PixiJS containers, similar to Photoshop's distribute tools.
4
+ *
5
+ * Provides methods to distribute multiple containers with equal spacing between them,
6
+ * either by edges, centers, or with equal gaps. All distribution operations modify
7
+ * container positions in-place.
8
+ *
9
+ * ## Features
10
+ *
11
+ * - **Horizontal Distribution**: By left edges, centers, right edges, or spacing
12
+ * - **Vertical Distribution**: By top edges, centers, bottom edges, or spacing
13
+ * - **Auto-sorting**: Automatically sorts items before distributing
14
+ * - **Minimum 3 items**: Requires at least 3 items (first and last act as anchors)
15
+ *
16
+ * ## Distribution Types
17
+ *
18
+ * ### Edge Distribution
19
+ * Distributes items so their edges are evenly spaced:
20
+ * - `hLeft()`, `hRight()`: Horizontal by left/right edges
21
+ * - `vTop()`, `vBottom()`: Vertical by top/bottom edges
22
+ *
23
+ * ### Center Distribution
24
+ * Distributes items so their centers are evenly spaced:
25
+ * - `hCenters()`: Horizontal centers
26
+ * - `vCenters()`: Vertical centers
27
+ *
28
+ * ### Spacing Distribution
29
+ * Distributes items with equal gaps between them:
30
+ * - `hSpacing()`: Equal horizontal gaps
31
+ * - `vSpacing()`: Equal vertical gaps
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * import { Distribute } from '@rb-games/core/layout';
36
+ * import { Container, Sprite } from 'pixi.js';
37
+ *
38
+ * // Create some sprites
39
+ * const sprites = [
40
+ * new Sprite(),
41
+ * new Sprite(),
42
+ * new Sprite(),
43
+ * new Sprite()
44
+ * ];
45
+ *
46
+ * const container = new Container();
47
+ * container.addChild(...sprites);
48
+ *
49
+ * // Distribute horizontally by centers
50
+ * Distribute.hCenters(sprites);
51
+ *
52
+ * // Distribute vertically with equal spacing
53
+ * Distribute.vSpacing(sprites);
54
+ *
55
+ * // Distribute horizontally by left edges
56
+ * Distribute.hLeft(sprites);
57
+ * ```
58
+ *
59
+ * @example
60
+ * ```typescript
61
+ * // Distribute UI buttons with equal spacing
62
+ * const buttons = [button1, button2, button3, button4];
63
+ *
64
+ * // Equal horizontal spacing between buttons
65
+ * Distribute.hSpacing(buttons);
66
+ *
67
+ * // Distribute within a specific rectangle
68
+ * Distribute.hSpacing(buttons, {
69
+ * container: new Rectangle(100, 100, 800, 100)
70
+ * });
71
+ * ```
72
+ *
73
+ * @public
74
+ */
75
+ export declare class Distribute {
76
+ static hLeft(items: Container[], options?: {
77
+ parent?: Container;
78
+ }): void;
79
+ static hCenters(items: Container[], options?: {
80
+ parent?: Container;
81
+ }): void;
82
+ static hRight(items: Container[], options?: {
83
+ parent?: Container;
84
+ }): void;
85
+ static vTop(items: Container[], options?: {
86
+ parent?: Container;
87
+ }): void;
88
+ static vCenters(items: Container[], options?: {
89
+ parent?: Container;
90
+ }): void;
91
+ static vBottom(items: Container[], options?: {
92
+ parent?: Container;
93
+ }): void;
94
+ static hSpacing(items: Container[], options?: {
95
+ parent?: Container;
96
+ container?: Rectangle;
97
+ }): void;
98
+ static vSpacing(items: Container[], options?: {
99
+ parent?: Container;
100
+ container?: Rectangle;
101
+ }): void;
102
+ }
103
+ //# sourceMappingURL=Distribute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Distribute.d.ts","sourceRoot":"","sources":["../../layout/Distribute.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAS/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,qBAAa,UAAU;IACrB,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAejE,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAgBpE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAelE,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAehE,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAgBpE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAenE,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,SAAS,CAAA;KAAE;IAuB3F,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,SAAS,CAAA;KAAE;CAsB5F"}
@@ -0,0 +1,213 @@
1
+ import { Container, Rectangle } from 'pixi.js';
2
+ /**
3
+ * Flow direction for layout.
4
+ * - `row`: Horizontal layout (left to right)
5
+ * - `column`: Vertical layout (top to bottom)
6
+ */
7
+ export type FlowDirection = 'row' | 'column';
8
+ /**
9
+ * Wrapping behavior for flow layout.
10
+ * - `none`: No wrapping, single line/column
11
+ * - `bounds`: Wrap when reaching bounds width/height
12
+ * - `count`: Wrap after specific number of items
13
+ */
14
+ export type FlowWrap = 'none' | 'bounds' | 'count';
15
+ /**
16
+ * Cross-axis alignment (perpendicular to flow direction).
17
+ * - `start`: Align to start of line/column
18
+ * - `center`: Center within line/column
19
+ * - `end`: Align to end of line/column
20
+ */
21
+ export type FlowAlign = 'start' | 'center' | 'end';
22
+ /**
23
+ * Main-axis justification (along flow direction).
24
+ * - `start`: Pack items to start
25
+ * - `center`: Center items
26
+ * - `end`: Pack items to end
27
+ * - `space-between`: Equal space between items
28
+ * - `space-around`: Equal space around items
29
+ * - `space-evenly`: Equal space including edges
30
+ */
31
+ export type FlowJustify = 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
32
+ /**
33
+ * Individual item margin configuration.
34
+ * Supports shorthand notations:
35
+ * - `x`: Sets both left and right
36
+ * - `y`: Sets both top and bottom
37
+ * - Specific values (top, right, bottom, left) override shorthands
38
+ */
39
+ export interface FlowItemMargin {
40
+ left?: number;
41
+ right?: number;
42
+ top?: number;
43
+ bottom?: number;
44
+ x?: number;
45
+ y?: number;
46
+ }
47
+ /**
48
+ * Margin value for a single item.
49
+ * - `number`: All sides get the same margin
50
+ * - `FlowItemMargin`: Detailed control with optional shorthands
51
+ * - `undefined`: No margin (all sides = 0)
52
+ */
53
+ export type FlowItemMarginValue = number | FlowItemMargin | undefined;
54
+ /**
55
+ * Configuration options for flow layout.
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * const options: FlowOptions = {
60
+ * direction: 'row',
61
+ * wrap: 'bounds',
62
+ * gap: 10,
63
+ * justify: 'space-between',
64
+ * align: 'center',
65
+ * padding: 20,
66
+ * margins: [10, 0, { y: 15 }]
67
+ * };
68
+ * ```
69
+ */
70
+ export interface FlowOptions {
71
+ direction?: FlowDirection;
72
+ wrap?: FlowWrap;
73
+ gap?: number | {
74
+ h: number;
75
+ v: number;
76
+ };
77
+ rowGap?: number;
78
+ columnGap?: number;
79
+ justify?: FlowJustify;
80
+ align?: FlowAlign;
81
+ padding?: number | {
82
+ top?: number;
83
+ right?: number;
84
+ bottom?: number;
85
+ left?: number;
86
+ };
87
+ bounds?: Container | Rectangle;
88
+ rowCount?: number;
89
+ columnCount?: number;
90
+ order?: (a: Container, b: Container) => number;
91
+ margins?: FlowItemMarginValue[];
92
+ }
93
+ /**
94
+ * Flexbox-like layout utility for arranging PixiJS containers in rows or columns.
95
+ *
96
+ * Flow provides a powerful layout system similar to CSS Flexbox, allowing you to
97
+ * arrange containers horizontally or vertically with automatic wrapping, spacing,
98
+ * alignment, and justification.
99
+ *
100
+ * ## Features
101
+ *
102
+ * - **Flexible Direction**: Row (horizontal) or column (vertical) layouts
103
+ * - **Smart Wrapping**: No wrap, wrap by bounds, or wrap by count
104
+ * - **Spacing Control**: Gaps between items, padding around container
105
+ * - **Alignment**: Start, center, end alignment on cross-axis
106
+ * - **Justification**: Start, center, end, space-between, space-around, space-evenly
107
+ * - **Custom Sorting**: Optional custom order function
108
+ *
109
+ * ## Layout Modes
110
+ *
111
+ * ### Row Layout (Horizontal)
112
+ * Items flow left to right, wrapping creates new rows below.
113
+ * - Main axis: Horizontal (justify controls)
114
+ * - Cross axis: Vertical (align controls)
115
+ *
116
+ * ### Column Layout (Vertical)
117
+ * Items flow top to bottom, wrapping creates new columns to the right.
118
+ * - Main axis: Vertical (justify controls)
119
+ * - Cross axis: Horizontal (align controls)
120
+ *
121
+ * ## Wrapping Modes
122
+ *
123
+ * - **none**: Single line/column, no wrapping
124
+ * - **bounds**: Wrap when reaching container bounds
125
+ * - **count**: Wrap after specific number of items (rowCount/columnCount)
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * import { Flow } from '@rb-games/core/layout';
130
+ * import { Container, Sprite } from 'pixi.js';
131
+ *
132
+ * // Create inventory grid
133
+ * const items = Array.from({ length: 20 }, () => new Sprite());
134
+ * const container = new Container();
135
+ * container.addChild(...items);
136
+ *
137
+ * // Grid layout: 5 columns, wrap by count
138
+ * Flow.layout(items, {
139
+ * direction: 'row',
140
+ * wrap: 'count',
141
+ * columnCount: 5,
142
+ * gap: 10,
143
+ * padding: 20
144
+ * });
145
+ * ```
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * // Responsive horizontal menu with wrapping
150
+ * const menuItems = [item1, item2, item3, item4, item5];
151
+ *
152
+ * Flow.layout(menuItems, {
153
+ * direction: 'row',
154
+ * wrap: 'bounds',
155
+ * bounds: new Rectangle(0, 0, 800, 600),
156
+ * gap: 15,
157
+ * justify: 'space-between',
158
+ * align: 'center',
159
+ * padding: { top: 10, right: 20, bottom: 10, left: 20 }
160
+ * });
161
+ * ```
162
+ *
163
+ * @example
164
+ * ```typescript
165
+ * // Vertical button list
166
+ * const buttons = [btn1, btn2, btn3];
167
+ *
168
+ * Flow.layout(buttons, {
169
+ * direction: 'column',
170
+ * wrap: 'none',
171
+ * gap: 10,
172
+ * align: 'center',
173
+ * justify: 'start'
174
+ * });
175
+ * ```
176
+ *
177
+ * @public
178
+ */
179
+ export declare class Flow {
180
+ /**
181
+ * Arranges containers in a flexbox-like layout.
182
+ *
183
+ * This method modifies container positions in-place to create the desired layout.
184
+ * Items are sorted (if order function provided) and then arranged according to
185
+ * direction, wrapping, alignment, and justification settings.
186
+ *
187
+ * @param items - Array of containers to layout
188
+ * @param options - Layout configuration options
189
+ *
190
+ * @example
191
+ * ```typescript
192
+ * // Simple horizontal row
193
+ * Flow.layout(items, { direction: 'row', gap: 10 });
194
+ *
195
+ * // Grid with 4 columns
196
+ * Flow.layout(items, {
197
+ * direction: 'row',
198
+ * wrap: 'count',
199
+ * columnCount: 4,
200
+ * gap: { h: 10, v: 15 }
201
+ * });
202
+ *
203
+ * // Centered vertical list
204
+ * Flow.layout(items, {
205
+ * direction: 'column',
206
+ * align: 'center',
207
+ * gap: 20
208
+ * });
209
+ * ```
210
+ */
211
+ static layout(items: Container[], options?: FlowOptions): void;
212
+ }
213
+ //# sourceMappingURL=Flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../../layout/Flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAS,SAAS,EAAE,MAAM,SAAS,CAAC;AAUtD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,QAAQ,GACR,KAAK,GACL,eAAe,GACf,cAAc,GACd,cAAc,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;AAEtE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpF,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,KAAK,MAAM,CAAC;IAC/C,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAoED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,qBAAa,IAAI;IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW;CAwFxD"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Position utility types and functions for CSS-like positioning.
3
+ * Supports keywords (center, top, bottom, left, right), percentages, and numbers.
4
+ */
5
+ type PositionKeyword = 'center' | 'top' | 'bottom' | 'left' | 'right';
6
+ type NumberPercent = `${number}%`;
7
+ type NumberString = `${number}`;
8
+ type SinglePositionValue = PositionKeyword | NumberPercent | NumberString;
9
+ type TwoPositionValue = `${string} ${string}`;
10
+ export type PositionValue = SinglePositionValue | TwoPositionValue | number;
11
+ /**
12
+ * Resolves a single position value to pixels.
13
+ * Assumes pivot/anchor is at (0, 0).
14
+ *
15
+ * @param value - Position value (keyword, percentage, or number)
16
+ * @param axis - Which axis this value applies to ('x' or 'y')
17
+ * @param viewportSize - Size of the viewport/container on this axis
18
+ * @param sourceScaledSize - Size of the source element (after scaling) on this axis
19
+ * @returns Resolved pixel position
20
+ */
21
+ export declare function resolvePositionValue(value: string | number, axis: 'x' | 'y', viewportSize: number, sourceScaledSize: number): number;
22
+ /**
23
+ * Resolves a position string to x, y coordinates.
24
+ * Supports: "center", "center top", "50%", "50% 0", 0
25
+ *
26
+ * @param position - Position value (string or number)
27
+ * @param viewportWidth - Width of the viewport/container
28
+ * @param viewportHeight - Height of the viewport/container
29
+ * @param sourceScaledWidth - Width of the source element (after scaling)
30
+ * @param sourceScaledHeight - Height of the source element (after scaling)
31
+ * @returns Object with x and y pixel coordinates
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * // Center on both axes
36
+ * resolvePosition("center", 1920, 1080, 800, 600);
37
+ * // { x: 560, y: 240 }
38
+ *
39
+ * // Center horizontally, top vertically
40
+ * resolvePosition("center top", 1920, 1080, 800, 600);
41
+ * // { x: 560, y: 0 }
42
+ *
43
+ * // 50% on both axes (same as center for pivot 0,0)
44
+ * resolvePosition("50%", 1920, 1080, 800, 600);
45
+ * // { x: 560, y: 240 }
46
+ *
47
+ * // Fixed position
48
+ * resolvePosition(100, 1920, 1080, 800, 600);
49
+ * // { x: 100, y: 100 }
50
+ * ```
51
+ */
52
+ export declare function resolvePosition(position: PositionValue, viewportWidth: number, viewportHeight: number, sourceScaledWidth: number, sourceScaledHeight: number): {
53
+ x: number;
54
+ y: number;
55
+ };
56
+ export {};
57
+ //# sourceMappingURL=PositionUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PositionUtils.d.ts","sourceRoot":"","sources":["../../layout/PositionUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,KAAK,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AACtE,KAAK,aAAa,GAAG,GAAG,MAAM,GAAG,CAAC;AAClC,KAAK,YAAY,GAAG,GAAG,MAAM,EAAE,CAAC;AAChC,KAAK,mBAAmB,GAAG,eAAe,GAAG,aAAa,GAAG,YAAY,CAAC;AAC1E,KAAK,gBAAgB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAE9C,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,gBAAgB,GAAG,MAAM,CAAC;AAE5E;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,IAAI,EAAE,GAAG,GAAG,GAAG,EACf,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,GACvB,MAAM,CA+BR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,aAAa,EACvB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,MAAM,EACzB,kBAAkB,EAAE,MAAM,GACzB;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAsB1B"}
@@ -0,0 +1,6 @@
1
+ export * from "./Align";
2
+ export * from "./Bounds";
3
+ export * from "./Distribute";
4
+ export * from "./Flow";
5
+ export * from "./PositionUtils";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC"}