laymur 0.17.0 → 0.17.2

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 (396) hide show
  1. package/README.md +5 -0
  2. package/{src/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.ts → dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts} +2 -3
  3. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +22 -0
  4. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +41 -0
  5. package/dist/core/constraints/UIConstraint.d.ts +12 -0
  6. package/dist/core/constraints/UIConstraint.js +11 -0
  7. package/dist/core/constraints/UICustomConstraint.d.ts +28 -0
  8. package/dist/core/constraints/UICustomConstraint.js +37 -0
  9. package/{src/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.ts → dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts} +2 -3
  10. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +20 -0
  11. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +34 -0
  12. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +11 -0
  13. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +3 -0
  14. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +36 -0
  15. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +100 -0
  16. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +14 -0
  17. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +4 -0
  18. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +44 -0
  19. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +136 -0
  20. package/{src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.ts → dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts} +2 -3
  21. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +22 -0
  22. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +40 -0
  23. package/{src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.ts → dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts} +8 -9
  24. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +43 -0
  25. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +71 -0
  26. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +11 -0
  27. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +3 -0
  28. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +32 -0
  29. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +100 -0
  30. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +14 -0
  31. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +4 -0
  32. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +44 -0
  33. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +136 -0
  34. package/{src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.ts → dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts} +2 -3
  35. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +22 -0
  36. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +40 -0
  37. package/{src/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.ts → dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts} +2 -3
  38. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +20 -0
  39. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +34 -0
  40. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +64 -0
  41. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +19 -0
  42. package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +46 -0
  43. package/dist/core/constraints/builders/UIConstraint2DBuilder.js +138 -0
  44. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +13 -0
  45. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +3 -0
  46. package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +29 -0
  47. package/dist/core/constraints/builders/UICoverConstraintBuilder.js +63 -0
  48. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +13 -0
  49. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +3 -0
  50. package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +29 -0
  51. package/dist/core/constraints/builders/UIFitConstraintBuilder.js +63 -0
  52. package/dist/core/elements/UIAnchor/UIAnchor.Internal.d.ts +12 -0
  53. package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +5 -0
  54. package/dist/core/elements/UIAnchor/UIAnchor.d.ts +32 -0
  55. package/dist/core/elements/UIAnchor/UIAnchor.js +49 -0
  56. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +27 -0
  57. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +15 -0
  58. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +77 -0
  59. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +259 -0
  60. package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +30 -0
  61. package/dist/core/elements/UIDummy/UIDummy.Internal.js +8 -0
  62. package/dist/core/elements/UIDummy/UIDummy.d.ts +82 -0
  63. package/dist/core/elements/UIDummy/UIDummy.js +173 -0
  64. package/{src/core/elements/UIElement/UIElement.Internal.ts → dist/core/elements/UIElement/UIElement.Internal.d.ts} +5 -7
  65. package/dist/core/elements/UIElement/UIElement.Internal.js +5 -0
  66. package/dist/core/elements/UIElement/UIElement.d.ts +38 -0
  67. package/dist/core/elements/UIElement/UIElement.js +74 -0
  68. package/{src/core/elements/UIGraphics/UIGraphics.Internal.ts → dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts} +5 -7
  69. package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +7 -0
  70. package/dist/core/elements/UIGraphics/UIGraphics.d.ts +51 -0
  71. package/dist/core/elements/UIGraphics/UIGraphics.js +126 -0
  72. package/{src/core/elements/UIImage/UIImage.Internal.ts → dist/core/elements/UIImage/UIImage.Internal.d.ts} +2 -3
  73. package/dist/core/elements/UIImage/UIImage.d.ts +32 -0
  74. package/dist/core/elements/UIImage/UIImage.js +85 -0
  75. package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +23 -0
  76. package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +12 -0
  77. package/dist/core/elements/UINineSlice/UINineSlice.d.ts +60 -0
  78. package/dist/core/elements/UINineSlice/UINineSlice.js +188 -0
  79. package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +14 -0
  80. package/dist/core/elements/UIProgress/UIProgress.Internal.js +3 -0
  81. package/dist/core/elements/UIProgress/UIProgress.d.ts +45 -0
  82. package/dist/core/elements/UIProgress/UIProgress.js +165 -0
  83. package/dist/core/elements/UIScene/UIScene.Internal.d.ts +43 -0
  84. package/dist/core/elements/UIScene/UIScene.Internal.js +27 -0
  85. package/dist/core/elements/UIScene/UIScene.d.ts +59 -0
  86. package/dist/core/elements/UIScene/UIScene.js +157 -0
  87. package/{src/core/elements/UIText/UIText.Interfaces.ts → dist/core/elements/UIText/UIText.Interfaces.d.ts} +16 -21
  88. package/dist/core/elements/UIText/UIText.Internal.d.ts +26 -0
  89. package/dist/core/elements/UIText/UIText.Internal.js +12 -0
  90. package/dist/core/elements/UIText/UIText.Measuring.d.ts +50 -0
  91. package/dist/core/elements/UIText/UIText.Measuring.js +153 -0
  92. package/dist/core/elements/UIText/UIText.Rendering.d.ts +20 -0
  93. package/dist/core/elements/UIText/UIText.Rendering.js +61 -0
  94. package/dist/core/elements/UIText/UIText.d.ts +71 -0
  95. package/dist/core/elements/UIText/UIText.js +265 -0
  96. package/{src/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.ts → dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts} +11 -14
  97. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +5 -0
  98. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +63 -0
  99. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +147 -0
  100. package/{src/core/layers/UILayer/UILayer.Internal.ts → dist/core/layers/UILayer/UILayer.Internal.d.ts} +11 -15
  101. package/dist/core/layers/UILayer/UILayer.Internal.js +7 -0
  102. package/dist/core/layers/UILayer/UILayer.d.ts +49 -0
  103. package/dist/core/layers/UILayer/UILayer.js +113 -0
  104. package/dist/core/miscellaneous/UIExpression.d.ts +69 -0
  105. package/dist/core/miscellaneous/UIExpression.js +128 -0
  106. package/dist/core/miscellaneous/UIMode.d.ts +23 -0
  107. package/dist/core/miscellaneous/UIMode.js +30 -0
  108. package/dist/core/miscellaneous/UIOrientation.d.ts +15 -0
  109. package/dist/core/miscellaneous/UIOrientation.js +20 -0
  110. package/dist/core/miscellaneous/UIPriority.d.ts +32 -0
  111. package/dist/core/miscellaneous/UIPriority.js +63 -0
  112. package/dist/core/miscellaneous/UIRelation.d.ts +23 -0
  113. package/dist/core/miscellaneous/UIRelation.js +40 -0
  114. package/dist/core/miscellaneous/UITransparencyMode.d.ts +9 -0
  115. package/dist/core/miscellaneous/UITransparencyMode.js +12 -0
  116. package/dist/core/miscellaneous/area/UIArea.d.ts +3 -0
  117. package/dist/core/miscellaneous/area/UIArea.js +5 -0
  118. package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +15 -0
  119. package/dist/core/miscellaneous/area/UIAreaCircle.js +32 -0
  120. package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +12 -0
  121. package/dist/core/miscellaneous/area/UIAreaPolygon.js +40 -0
  122. package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +17 -0
  123. package/dist/core/miscellaneous/area/UIAreaRectangle.js +36 -0
  124. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +21 -0
  125. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +72 -0
  126. package/dist/core/miscellaneous/asserts.d.ts +43 -0
  127. package/dist/core/miscellaneous/asserts.js +163 -0
  128. package/dist/core/miscellaneous/canvas.d.ts +31 -0
  129. package/dist/core/miscellaneous/canvas.js +37 -0
  130. package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +7 -0
  131. package/dist/core/miscellaneous/color/UIColor.Internal.js +42 -0
  132. package/dist/core/miscellaneous/color/UIColor.d.ts +234 -0
  133. package/dist/core/miscellaneous/color/UIColor.js +636 -0
  134. package/dist/core/miscellaneous/computeTransform.d.ts +18 -0
  135. package/dist/core/miscellaneous/computeTransform.js +82 -0
  136. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +19 -0
  137. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +168 -0
  138. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +1 -0
  139. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +349 -0
  140. package/{src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.ts → dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts} +8 -10
  141. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +1 -0
  142. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +357 -0
  143. package/dist/core/miscellaneous/generic-plane/shared.d.ts +38 -0
  144. package/dist/core/miscellaneous/generic-plane/shared.js +228 -0
  145. package/dist/core/miscellaneous/insets/UIInsets.Internal.d.ts +11 -0
  146. package/dist/core/miscellaneous/insets/UIInsets.Internal.js +3 -0
  147. package/dist/core/miscellaneous/insets/UIInsets.d.ts +48 -0
  148. package/dist/core/miscellaneous/insets/UIInsets.js +224 -0
  149. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +9 -0
  150. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +19 -0
  151. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +21 -0
  152. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +51 -0
  153. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +16 -0
  154. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +48 -0
  155. package/dist/core/miscellaneous/math.d.ts +7 -0
  156. package/dist/core/miscellaneous/math.js +11 -0
  157. package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +31 -0
  158. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +15 -0
  159. package/dist/core/miscellaneous/micro/UIMicro.d.ts +59 -0
  160. package/dist/core/miscellaneous/micro/UIMicro.js +181 -0
  161. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +3 -0
  162. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +9 -0
  163. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +22 -0
  164. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +50 -0
  165. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +22 -0
  166. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +52 -0
  167. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +22 -0
  168. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +52 -0
  169. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +22 -0
  170. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +50 -0
  171. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +22 -0
  172. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +52 -0
  173. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +22 -0
  174. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +52 -0
  175. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +5 -0
  176. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +13 -0
  177. package/dist/core/miscellaneous/shared.d.ts +46 -0
  178. package/dist/core/miscellaneous/shared.js +37 -0
  179. package/{src/core/miscellaneous/text-span/UITextSpan.Internal.ts → dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts} +4 -5
  180. package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +14 -0
  181. package/dist/core/miscellaneous/text-span/UITextSpan.js +36 -0
  182. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.d.ts +48 -0
  183. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +17 -0
  184. package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +85 -0
  185. package/dist/core/miscellaneous/text-style/UITextStyle.js +372 -0
  186. package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +49 -0
  187. package/dist/core/miscellaneous/texture/UITextureView.Internal.js +6 -0
  188. package/dist/core/miscellaneous/texture/UITextureView.d.ts +67 -0
  189. package/dist/core/miscellaneous/texture/UITextureView.js +234 -0
  190. package/dist/core/miscellaneous/webglCapabilities.d.ts +2 -0
  191. package/dist/core/miscellaneous/webglCapabilities.js +103 -0
  192. package/dist/core/shaders/UIImage.glsl.js +3 -0
  193. package/dist/core/shaders/UINineSlice.glsl.js +3 -0
  194. package/dist/core/shaders/UIProgress.glsl.js +3 -0
  195. package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +3 -0
  196. package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +3 -0
  197. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +17 -0
  198. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +13 -0
  199. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +108 -0
  200. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +13 -0
  201. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +20 -0
  202. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +75 -0
  203. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +49 -0
  204. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +215 -0
  205. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +505 -0
  206. package/dist/index.js +51 -0
  207. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +21 -0
  208. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +47 -0
  209. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +14 -0
  210. package/dist/particles/behaviorModules/UIBehaviorModule.js +9 -0
  211. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +39 -0
  212. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +110 -0
  213. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +22 -0
  214. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +66 -0
  215. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +20 -0
  216. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +48 -0
  217. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +26 -0
  218. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +66 -0
  219. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +20 -0
  220. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +49 -0
  221. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +26 -0
  222. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +70 -0
  223. package/dist/particles/elements/UIEmitter.Internal.d.ts +15 -0
  224. package/dist/particles/elements/UIEmitter.Internal.js +11 -0
  225. package/dist/particles/elements/UIEmitter.d.ts +68 -0
  226. package/dist/particles/elements/UIEmitter.js +203 -0
  227. package/dist/particles/index.js +18 -0
  228. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +13 -0
  229. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +211 -0
  230. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +17 -0
  231. package/dist/particles/instancedParticle/UIInstancedParticle.js +93 -0
  232. package/dist/particles/miscellaneous/miscellaneous.d.ts +32 -0
  233. package/dist/particles/miscellaneous/miscellaneous.js +67 -0
  234. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +14 -0
  235. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +32 -0
  236. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +15 -0
  237. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +37 -0
  238. package/dist/particles/renderingModules/UIRenderingModule.d.ts +8 -0
  239. package/dist/particles/renderingModules/UIRenderingModule.js +9 -0
  240. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +14 -0
  241. package/dist/particles/renderingModules/UIRenderingTexture.js +26 -0
  242. package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +3 -0
  243. package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +3 -0
  244. package/dist/particles/shaders/UIRenderingTexture.glsl.js +3 -0
  245. package/dist/particles/spawnModules/UISpawnModule.d.ts +9 -0
  246. package/dist/particles/spawnModules/UISpawnModule.js +9 -0
  247. package/dist/particles/spawnModules/UISpawnOffset.d.ts +21 -0
  248. package/dist/particles/spawnModules/UISpawnOffset.js +46 -0
  249. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +20 -0
  250. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +47 -0
  251. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +20 -0
  252. package/dist/particles/spawnModules/UISpawnRandomRotation.js +45 -0
  253. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +26 -0
  254. package/dist/particles/spawnModules/UISpawnRandomScale.js +60 -0
  255. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +20 -0
  256. package/dist/particles/spawnModules/UISpawnRandomTorque.js +45 -0
  257. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +26 -0
  258. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +64 -0
  259. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +27 -0
  260. package/dist/particles/spawnModules/UISpawnRectangle.js +62 -0
  261. package/package.json +8 -1
  262. package/.claude/settings.local.json +0 -9
  263. package/.editorconfig +0 -14
  264. package/CLAUDE.md +0 -181
  265. package/assets/logotype.png +0 -0
  266. package/eslint.config.js +0 -111
  267. package/rollup.config.js +0 -52
  268. package/src/core/constraints/UIAspectConstraint/UIAspectConstraint.ts +0 -60
  269. package/src/core/constraints/UIConstraint.ts +0 -20
  270. package/src/core/constraints/UICustomConstraint.ts +0 -62
  271. package/src/core/constraints/UIHeightConstraint/UIHeightConstraint.ts +0 -52
  272. package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.ts +0 -13
  273. package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.ts +0 -139
  274. package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.ts +0 -16
  275. package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.ts +0 -189
  276. package/src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.ts +0 -68
  277. package/src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.ts +0 -94
  278. package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.ts +0 -13
  279. package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.ts +0 -135
  280. package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.ts +0 -16
  281. package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.ts +0 -189
  282. package/src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.ts +0 -68
  283. package/src/core/constraints/UIWidthConstraint/UIWidthConstraint.ts +0 -52
  284. package/src/core/constraints/builders/UIConstraint2DBuilder.Internal.ts +0 -84
  285. package/src/core/constraints/builders/UIConstraint2DBuilder.ts +0 -168
  286. package/src/core/constraints/builders/UICoverConstraintBuilder.Internal.ts +0 -15
  287. package/src/core/constraints/builders/UICoverConstraintBuilder.ts +0 -84
  288. package/src/core/constraints/builders/UIFitConstraintBuilder.Internal.ts +0 -15
  289. package/src/core/constraints/builders/UIFitConstraintBuilder.ts +0 -84
  290. package/src/core/elements/UIAnchor/UIAnchor.Internal.ts +0 -13
  291. package/src/core/elements/UIAnchor/UIAnchor.ts +0 -70
  292. package/src/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.ts +0 -30
  293. package/src/core/elements/UIAnimatedImage/UIAnimatedImage.ts +0 -355
  294. package/src/core/elements/UIDummy/UIDummy.Internal.ts +0 -33
  295. package/src/core/elements/UIDummy/UIDummy.ts +0 -244
  296. package/src/core/elements/UIElement/UIElement.ts +0 -127
  297. package/src/core/elements/UIGraphics/UIGraphics.ts +0 -168
  298. package/src/core/elements/UIImage/UIImage.ts +0 -138
  299. package/src/core/elements/UINineSlice/UINineSlice.Internal.ts +0 -26
  300. package/src/core/elements/UINineSlice/UINineSlice.ts +0 -296
  301. package/src/core/elements/UIProgress/UIProgress.Internal.ts +0 -24
  302. package/src/core/elements/UIProgress/UIProgress.ts +0 -259
  303. package/src/core/elements/UIScene/UIScene.Internal.ts +0 -46
  304. package/src/core/elements/UIScene/UIScene.ts +0 -259
  305. package/src/core/elements/UIText/UIText.Internal.ts +0 -29
  306. package/src/core/elements/UIText/UIText.Measuring.ts +0 -183
  307. package/src/core/elements/UIText/UIText.Rendering.ts +0 -83
  308. package/src/core/elements/UIText/UIText.ts +0 -376
  309. package/src/core/layers/UIFullscreenLayer/UIFullscreenLayer.ts +0 -233
  310. package/src/core/layers/UILayer/UILayer.ts +0 -156
  311. package/src/core/miscellaneous/UIExpression.ts +0 -142
  312. package/src/core/miscellaneous/UIMode.ts +0 -29
  313. package/src/core/miscellaneous/UIOrientation.ts +0 -18
  314. package/src/core/miscellaneous/UIPriority.ts +0 -63
  315. package/src/core/miscellaneous/UIRelation.ts +0 -39
  316. package/src/core/miscellaneous/UITransparencyMode.ts +0 -9
  317. package/src/core/miscellaneous/area/UIArea.ts +0 -5
  318. package/src/core/miscellaneous/area/UIAreaCircle.ts +0 -32
  319. package/src/core/miscellaneous/area/UIAreaPolygon.ts +0 -50
  320. package/src/core/miscellaneous/area/UIAreaRectangle.ts +0 -38
  321. package/src/core/miscellaneous/area/UIAreaRoundedRectangle.ts +0 -78
  322. package/src/core/miscellaneous/asserts.ts +0 -187
  323. package/src/core/miscellaneous/canvas.ts +0 -73
  324. package/src/core/miscellaneous/color/UIColor.Internal.ts +0 -89
  325. package/src/core/miscellaneous/color/UIColor.ts +0 -844
  326. package/src/core/miscellaneous/computeTransform.ts +0 -127
  327. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.ts +0 -235
  328. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.ts +0 -524
  329. package/src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.ts +0 -448
  330. package/src/core/miscellaneous/generic-plane/shared.ts +0 -323
  331. package/src/core/miscellaneous/insets/UIInsets.Internal.ts +0 -9
  332. package/src/core/miscellaneous/insets/UIInsets.ts +0 -248
  333. package/src/core/miscellaneous/mask-function/UIProgressMaskFunction.ts +0 -24
  334. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.ts +0 -58
  335. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.ts +0 -52
  336. package/src/core/miscellaneous/math.ts +0 -16
  337. package/src/core/miscellaneous/micro/UIMicro.Internal.ts +0 -33
  338. package/src/core/miscellaneous/micro/UIMicro.ts +0 -222
  339. package/src/core/miscellaneous/resize-policy/UIResizePolicy.ts +0 -8
  340. package/src/core/miscellaneous/resize-policy/UIResizePolicyCover.ts +0 -57
  341. package/src/core/miscellaneous/resize-policy/UIResizePolicyCross.ts +0 -65
  342. package/src/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.ts +0 -65
  343. package/src/core/miscellaneous/resize-policy/UIResizePolicyFit.ts +0 -57
  344. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.ts +0 -65
  345. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.ts +0 -65
  346. package/src/core/miscellaneous/resize-policy/UIResizePolicyNone.ts +0 -11
  347. package/src/core/miscellaneous/shared.ts +0 -73
  348. package/src/core/miscellaneous/text-span/UITextSpan.ts +0 -43
  349. package/src/core/miscellaneous/text-style/UITextStyle.Internal.ts +0 -52
  350. package/src/core/miscellaneous/text-style/UITextStyle.ts +0 -479
  351. package/src/core/miscellaneous/texture/UITextureView.Internal.ts +0 -55
  352. package/src/core/miscellaneous/texture/UITextureView.ts +0 -308
  353. package/src/core/miscellaneous/webglCapabilities.ts +0 -129
  354. package/src/core/shaders/UIImage.glsl +0 -10
  355. package/src/core/shaders/UINineSlice.glsl +0 -53
  356. package/src/core/shaders/UIProgress.glsl +0 -15
  357. package/src/core/shaders/UIProgressMaskFunctionCircular.glsl +0 -13
  358. package/src/core/shaders/UIProgressMaskFunctionDirectional.glsl +0 -12
  359. package/src/core/shaders/glsl.d.ts +0 -27
  360. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.ts +0 -23
  361. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.ts +0 -124
  362. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.ts +0 -22
  363. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.ts +0 -101
  364. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.ts +0 -58
  365. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.ts +0 -605
  366. package/src/particles/behaviorModules/UIBehaviorDirectionalGravity.ts +0 -70
  367. package/src/particles/behaviorModules/UIBehaviorModule.ts +0 -20
  368. package/src/particles/behaviorModules/UIBehaviorPointGravity.ts +0 -173
  369. package/src/particles/behaviorModules/UIBehaviorScaleOverLife.ts +0 -104
  370. package/src/particles/behaviorModules/UIBehaviorTorqueDamping.ts +0 -75
  371. package/src/particles/behaviorModules/UIBehaviorTorqueNoise.ts +0 -115
  372. package/src/particles/behaviorModules/UIBehaviorVelocityDamping.ts +0 -77
  373. package/src/particles/behaviorModules/UIBehaviorVelocityNoise.ts +0 -118
  374. package/src/particles/elements/UIEmitter.Internal.ts +0 -22
  375. package/src/particles/elements/UIEmitter.ts +0 -313
  376. package/src/particles/instancedParticle/UIInstancedParticle.Internal.ts +0 -263
  377. package/src/particles/instancedParticle/UIInstancedParticle.ts +0 -138
  378. package/src/particles/miscellaneous/miscellaneous.ts +0 -115
  379. package/src/particles/renderingModules/UIRenderingColorOverLife.ts +0 -39
  380. package/src/particles/renderingModules/UIRenderingColorOverVelocity.ts +0 -49
  381. package/src/particles/renderingModules/UIRenderingModule.ts +0 -17
  382. package/src/particles/renderingModules/UIRenderingTexture.ts +0 -30
  383. package/src/particles/shaders/UIRenderingColorOverLife.glsl +0 -4
  384. package/src/particles/shaders/UIRenderingColorOverVelocity.glsl +0 -6
  385. package/src/particles/shaders/UIRenderingTexture.glsl +0 -4
  386. package/src/particles/spawnModules/UISpawnModule.ts +0 -22
  387. package/src/particles/spawnModules/UISpawnOffset.ts +0 -62
  388. package/src/particles/spawnModules/UISpawnRandomLifetime.ts +0 -68
  389. package/src/particles/spawnModules/UISpawnRandomRotation.ts +0 -60
  390. package/src/particles/spawnModules/UISpawnRandomScale.ts +0 -81
  391. package/src/particles/spawnModules/UISpawnRandomTorque.ts +0 -62
  392. package/src/particles/spawnModules/UISpawnRandomVelocity.ts +0 -92
  393. package/src/particles/spawnModules/UISpawnRectangle.ts +0 -81
  394. package/tsconfig.json +0 -29
  395. /package/{src/core/index.ts → dist/core/index.d.ts} +0 -0
  396. /package/{src/particles/index.ts → dist/particles/index.d.ts} +0 -0
@@ -0,0 +1,46 @@
1
+ import { UILayer } from "../layers/UILayer/UILayer";
2
+ /** Objects that belong to a UI layer */
3
+ export interface UILayerElement {
4
+ /** The UI layer containing this element */
5
+ readonly layer: UILayer;
6
+ }
7
+ /** UI elements with position in 2D space */
8
+ export interface UIPointElement {
9
+ /** Solver variable for x coordinate */
10
+ readonly xVariable: number;
11
+ /** Solver variable for y coordinate */
12
+ readonly yVariable: number;
13
+ /** X coordinate in world units */
14
+ readonly x: number;
15
+ /** Y coordinate in world units */
16
+ readonly y: number;
17
+ }
18
+ /** UI elements with position and dimensions */
19
+ export interface UIPlaneElement extends UIPointElement {
20
+ /** Solver variable for width */
21
+ readonly wVariable: number;
22
+ /** Solver variable for height */
23
+ readonly hVariable: number;
24
+ /** Width in world units */
25
+ readonly width: number;
26
+ /** Height in world units */
27
+ readonly height: number;
28
+ }
29
+ /**
30
+ * Checks if object implements UILayerElement.
31
+ * @param obj Object to check
32
+ * @returns True if object has valid layer property
33
+ */
34
+ export declare function isUILayerElement(obj: unknown): obj is UILayerElement;
35
+ /**
36
+ * Checks if object implements UIPointElement.
37
+ * @param obj Object to check
38
+ * @returns True if object has valid position variables
39
+ */
40
+ export declare function isUIPointElement(obj: unknown): obj is UIPointElement;
41
+ /**
42
+ * Checks if object implements UIPlaneElement.
43
+ * @param obj Object to check
44
+ * @returns True if object has valid dimension variables
45
+ */
46
+ export declare function isUIPlaneElement(obj: unknown): obj is UIPlaneElement;
@@ -0,0 +1,37 @@
1
+ import { UILayer } from '../layers/UILayer/UILayer.js';
2
+
3
+ /**
4
+ * Checks if object implements UILayerElement.
5
+ * @param obj Object to check
6
+ * @returns True if object has valid layer property
7
+ */
8
+ function isUILayerElement(obj) {
9
+ return typeof obj === "object" && obj !== null && "layer" in obj && obj.layer instanceof UILayer;
10
+ }
11
+ /**
12
+ * Checks if object implements UIPointElement.
13
+ * @param obj Object to check
14
+ * @returns True if object has valid position variables
15
+ */
16
+ function isUIPointElement(obj) {
17
+ return (typeof obj === "object" &&
18
+ obj !== null &&
19
+ typeof obj.xVariable === "number" &&
20
+ typeof obj.yVariable === "number" &&
21
+ typeof obj.x === "number" &&
22
+ typeof obj.y === "number");
23
+ }
24
+ /**
25
+ * Checks if object implements UIPlaneElement.
26
+ * @param obj Object to check
27
+ * @returns True if object has valid dimension variables
28
+ */
29
+ function isUIPlaneElement(obj) {
30
+ return (isUIPointElement(obj) &&
31
+ typeof obj.wVariable === "number" &&
32
+ typeof obj.hVariable === "number" &&
33
+ typeof obj.width === "number" &&
34
+ typeof obj.height === "number");
35
+ }
36
+
37
+ export { isUILayerElement, isUIPlaneElement, isUIPointElement };
@@ -1,9 +1,8 @@
1
1
  import type { UITextStyleConfig } from "../text-style/UITextStyle.Internal";
2
-
3
2
  /** Configuration for creating a text span */
4
3
  export interface UITextSpanConfig {
5
- /** Text content */
6
- text: string;
7
- /** Style properties */
8
- style?: Partial<UITextStyleConfig>;
4
+ /** Text content */
5
+ text: string;
6
+ /** Style properties */
7
+ style?: Partial<UITextStyleConfig>;
9
8
  }
@@ -0,0 +1,14 @@
1
+ import { UITextStyle } from "../text-style/UITextStyle";
2
+ import type { UITextSpanConfig } from "./UITextSpan.Internal";
3
+ /** Text span with associated style */
4
+ export declare class UITextSpan {
5
+ /** Text style */
6
+ style: UITextStyle;
7
+ private textInternal;
8
+ private dirtyInternal;
9
+ /** @param config Text span configuration */
10
+ constructor(config: UITextSpanConfig);
11
+ /** Text content */
12
+ get text(): string;
13
+ set text(value: string);
14
+ }
@@ -0,0 +1,36 @@
1
+ import { UITextStyle } from '../text-style/UITextStyle.js';
2
+
3
+ /** Text span with associated style */
4
+ class UITextSpan {
5
+ /** @param config Text span configuration */
6
+ constructor(config) {
7
+ this._private_dirtyInternal = true;
8
+ this._private_textInternal = config.text;
9
+ this.style = new UITextStyle(config.style);
10
+ }
11
+ /** Text content */
12
+ get text() {
13
+ return this._private_textInternal;
14
+ }
15
+ /**
16
+ * Indicates whether text or style has been modified.
17
+ * Must be reset to `false` externally by the owner.
18
+ * @internal
19
+ */
20
+ get dirty() {
21
+ return this._private_dirtyInternal || this.style.dirty;
22
+ }
23
+ set text(value) {
24
+ if (value !== this._private_textInternal) {
25
+ this._private_textInternal = value;
26
+ this._private_dirtyInternal = true;
27
+ }
28
+ }
29
+ /** @internal */
30
+ setDirtyFalse() {
31
+ this._private_dirtyInternal = false;
32
+ this.style.setDirtyFalse();
33
+ }
34
+ }
35
+
36
+ export { UITextSpan };
@@ -0,0 +1,48 @@
1
+ /** Complete text style configuration with all properties resolved */
2
+ export interface UITextStyleConfig {
3
+ /** Text color */
4
+ color: string;
5
+ /** Text alignment */
6
+ align: "left" | "center" | "right";
7
+ /** Font family name */
8
+ fontFamily: string;
9
+ /** Font size in pixels */
10
+ fontSize: number;
11
+ /** Font style */
12
+ fontStyle: "normal" | "italic" | "oblique";
13
+ /** Font weight */
14
+ fontWeight: "normal" | "bold" | "bolder" | "lighter" | number;
15
+ /** Line height in pixels */
16
+ lineHeight: number;
17
+ /** Whether shadow is enabled */
18
+ enableShadow: boolean;
19
+ /** Shadow horizontal offset in pixels */
20
+ shadowOffsetX: number;
21
+ /** Shadow vertical offset in pixels */
22
+ shadowOffsetY: number;
23
+ /** Shadow blur radius in pixels */
24
+ shadowBlur: number;
25
+ /** Shadow color */
26
+ shadowColor: string;
27
+ /** Whether stroke is enabled */
28
+ enableStroke: boolean;
29
+ /** Stroke color */
30
+ strokeColor: string;
31
+ /** Stroke thickness in pixels */
32
+ strokeThickness: number;
33
+ }
34
+ export declare const TEXT_STYLE_DEFAULT_COLOR = "#000000";
35
+ export declare const TEXT_STYLE_DEFAULT_ALIGN: "left";
36
+ export declare const TEXT_STYLE_DEFAULT_FONT_FAMILY = "Arial";
37
+ export declare const TEXT_STYLE_DEFAULT_FONT_SIZE = 16;
38
+ export declare const TEXT_STYLE_DEFAULT_FONT_STYLE: "normal";
39
+ export declare const TEXT_STYLE_DEFAULT_FONT_WEIGHT: "normal";
40
+ export declare const TEXT_STYLE_DEFAULT_LINE_HEIGHT = 1.2;
41
+ export declare const TEXT_STYLE_DEFAULT_ENABLE_SHADOW = false;
42
+ export declare const TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X = 0;
43
+ export declare const TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y = 0;
44
+ export declare const TEXT_STYLE_DEFAULT_SHADOW_BLUR = 0;
45
+ export declare const TEXT_STYLE_DEFAULT_SHADOW_COLOR = "transparent";
46
+ export declare const TEXT_STYLE_DEFAULT_ENABLE_STROKE = false;
47
+ export declare const TEXT_STYLE_DEFAULT_STROKE_COLOR = "#000000";
48
+ export declare const TEXT_STYLE_DEFAULT_STROKE_THICKNESS = 0;
@@ -0,0 +1,17 @@
1
+ const TEXT_STYLE_DEFAULT_COLOR = "#000000";
2
+ const TEXT_STYLE_DEFAULT_ALIGN = "left";
3
+ const TEXT_STYLE_DEFAULT_FONT_FAMILY = "Arial";
4
+ const TEXT_STYLE_DEFAULT_FONT_SIZE = 16;
5
+ const TEXT_STYLE_DEFAULT_FONT_STYLE = "normal";
6
+ const TEXT_STYLE_DEFAULT_FONT_WEIGHT = "normal";
7
+ const TEXT_STYLE_DEFAULT_LINE_HEIGHT = 1.2;
8
+ const TEXT_STYLE_DEFAULT_ENABLE_SHADOW = false;
9
+ const TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X = 0;
10
+ const TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y = 0;
11
+ const TEXT_STYLE_DEFAULT_SHADOW_BLUR = 0;
12
+ const TEXT_STYLE_DEFAULT_SHADOW_COLOR = "transparent";
13
+ const TEXT_STYLE_DEFAULT_ENABLE_STROKE = false;
14
+ const TEXT_STYLE_DEFAULT_STROKE_COLOR = "#000000";
15
+ const TEXT_STYLE_DEFAULT_STROKE_THICKNESS = 0;
16
+
17
+ export { TEXT_STYLE_DEFAULT_ALIGN, TEXT_STYLE_DEFAULT_COLOR, TEXT_STYLE_DEFAULT_ENABLE_SHADOW, TEXT_STYLE_DEFAULT_ENABLE_STROKE, TEXT_STYLE_DEFAULT_FONT_FAMILY, TEXT_STYLE_DEFAULT_FONT_SIZE, TEXT_STYLE_DEFAULT_FONT_STYLE, TEXT_STYLE_DEFAULT_FONT_WEIGHT, TEXT_STYLE_DEFAULT_LINE_HEIGHT, TEXT_STYLE_DEFAULT_SHADOW_BLUR, TEXT_STYLE_DEFAULT_SHADOW_COLOR, TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X, TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y, TEXT_STYLE_DEFAULT_STROKE_COLOR, TEXT_STYLE_DEFAULT_STROKE_THICKNESS };
@@ -0,0 +1,85 @@
1
+ import type { UITextStyleConfig } from "./UITextStyle.Internal";
2
+ /** Text style configuration for UI text rendering */
3
+ export declare class UITextStyle {
4
+ private colorInternal?;
5
+ private alignInternal?;
6
+ private fontFamilyInternal?;
7
+ private fontSizeInternal?;
8
+ private fontStyleInternal?;
9
+ private fontWeightInternal?;
10
+ private lineHeightInternal?;
11
+ private enableShadowInternal?;
12
+ private shadowOffsetXInternal?;
13
+ private shadowOffsetYInternal?;
14
+ private shadowBlurInternal?;
15
+ private shadowColorInternal?;
16
+ private enableStrokeInternal?;
17
+ private strokeColorInternal?;
18
+ private strokeThicknessInternal?;
19
+ private dirtyInternal;
20
+ /** @param config Partial style configuration. Unspecified properties remain undefined. */
21
+ constructor(config?: Partial<UITextStyleConfig>);
22
+ /** Text color */
23
+ get color(): string | undefined;
24
+ /** Text alignment */
25
+ get align(): "left" | "center" | "right" | undefined;
26
+ /** Font family name */
27
+ get fontFamily(): string | undefined;
28
+ /** Font size in pixels */
29
+ get fontSize(): number | undefined;
30
+ /** Font style */
31
+ get fontStyle(): "normal" | "italic" | "oblique" | undefined;
32
+ /** Font weight */
33
+ get fontWeight(): "normal" | "bold" | "bolder" | "lighter" | number | undefined;
34
+ /** Line height in pixels */
35
+ get lineHeight(): number | undefined;
36
+ /** Whether shadow is enabled */
37
+ get enableShadow(): boolean | undefined;
38
+ /** Shadow horizontal offset in pixels */
39
+ get shadowOffsetX(): number | undefined;
40
+ /** Shadow vertical offset in pixels */
41
+ get shadowOffsetY(): number | undefined;
42
+ /** Shadow blur radius in pixels */
43
+ get shadowBlur(): number | undefined;
44
+ /** Shadow color */
45
+ get shadowColor(): string | undefined;
46
+ /** Whether stroke is enabled */
47
+ get enableStroke(): boolean | undefined;
48
+ /** Stroke color */
49
+ get strokeColor(): string | undefined;
50
+ /** Stroke thickness in pixels */
51
+ get strokeThickness(): number | undefined;
52
+ set color(value: string | undefined);
53
+ set align(value: "left" | "center" | "right" | undefined);
54
+ set fontFamily(value: string | undefined);
55
+ set fontSize(value: number | undefined);
56
+ set fontStyle(value: "normal" | "italic" | "oblique" | undefined);
57
+ set fontWeight(value: "normal" | "bold" | "bolder" | "lighter" | number | undefined);
58
+ set lineHeight(value: number | undefined);
59
+ set enableShadow(value: boolean | undefined);
60
+ set shadowOffsetX(value: number | undefined);
61
+ set shadowOffsetY(value: number | undefined);
62
+ set shadowBlur(value: number | undefined);
63
+ set shadowColor(value: string | undefined);
64
+ set enableStroke(value: boolean | undefined);
65
+ set strokeColor(value: string | undefined);
66
+ set strokeThickness(value: number | undefined);
67
+ /**
68
+ * Resolves complete style from primary and fallback sources.
69
+ * @param primary First style to check for each property
70
+ * @param fallback Second style to check if primary is undefined
71
+ * @returns Complete style configuration with all defaults applied
72
+ */
73
+ static resolve(primary?: UITextStyle, fallback?: UITextStyle): UITextStyleConfig;
74
+ /** Sets all properties to default values */
75
+ setDefaults(): void;
76
+ /** Sets all properties to undefined */
77
+ clear(): void;
78
+ /** Copies from another style instance */
79
+ copy(value: UITextStyle): void;
80
+ /**
81
+ * Calculates maximum padding required for stroke and shadow.
82
+ * @returns Padding in pixels needed on all sides
83
+ */
84
+ calculatePadding(): number;
85
+ }
@@ -0,0 +1,372 @@
1
+ import { assertValidPositiveNumber, assertValidNumber, assertValidNonNegativeNumber } from '../asserts.js';
2
+ import { TEXT_STYLE_DEFAULT_FONT_SIZE, TEXT_STYLE_DEFAULT_STROKE_THICKNESS, TEXT_STYLE_DEFAULT_STROKE_COLOR, TEXT_STYLE_DEFAULT_ENABLE_STROKE, TEXT_STYLE_DEFAULT_SHADOW_COLOR, TEXT_STYLE_DEFAULT_SHADOW_BLUR, TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y, TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X, TEXT_STYLE_DEFAULT_ENABLE_SHADOW, TEXT_STYLE_DEFAULT_FONT_WEIGHT, TEXT_STYLE_DEFAULT_FONT_STYLE, TEXT_STYLE_DEFAULT_FONT_FAMILY, TEXT_STYLE_DEFAULT_ALIGN, TEXT_STYLE_DEFAULT_COLOR, TEXT_STYLE_DEFAULT_LINE_HEIGHT } from './UITextStyle.Internal.js';
3
+
4
+ /** Text style configuration for UI text rendering */
5
+ class UITextStyle {
6
+ /** @param config Partial style configuration. Unspecified properties remain undefined. */
7
+ constructor(config) {
8
+ this._private_dirtyInternal = true;
9
+ this._private_colorInternal = config?.color;
10
+ this._private_alignInternal = config?.align;
11
+ this._private_fontFamilyInternal = config?.fontFamily;
12
+ this._private_fontSizeInternal = config?.fontSize;
13
+ this._private_fontStyleInternal = config?.fontStyle;
14
+ this._private_fontWeightInternal = config?.fontWeight;
15
+ this._private_lineHeightInternal = config?.lineHeight;
16
+ this._private_enableShadowInternal = config?.enableShadow;
17
+ this._private_shadowOffsetXInternal = config?.shadowOffsetX;
18
+ this._private_shadowOffsetYInternal = config?.shadowOffsetY;
19
+ this._private_shadowBlurInternal = config?.shadowBlur;
20
+ this._private_shadowColorInternal = config?.shadowColor;
21
+ this._private_enableStrokeInternal = config?.enableStroke;
22
+ this._private_strokeColorInternal = config?.strokeColor;
23
+ this._private_strokeThicknessInternal = config?.strokeThickness;
24
+ }
25
+ /** Text color */
26
+ get color() {
27
+ return this._private_colorInternal;
28
+ }
29
+ /** Text alignment */
30
+ get align() {
31
+ return this._private_alignInternal;
32
+ }
33
+ /** Font family name */
34
+ get fontFamily() {
35
+ return this._private_fontFamilyInternal;
36
+ }
37
+ /** Font size in pixels */
38
+ get fontSize() {
39
+ return this._private_fontSizeInternal;
40
+ }
41
+ /** Font style */
42
+ get fontStyle() {
43
+ return this._private_fontStyleInternal;
44
+ }
45
+ /** Font weight */
46
+ get fontWeight() {
47
+ return this._private_fontWeightInternal;
48
+ }
49
+ /** Line height in pixels */
50
+ get lineHeight() {
51
+ return this._private_lineHeightInternal;
52
+ }
53
+ /** Whether shadow is enabled */
54
+ get enableShadow() {
55
+ return this._private_enableShadowInternal;
56
+ }
57
+ /** Shadow horizontal offset in pixels */
58
+ get shadowOffsetX() {
59
+ return this._private_shadowOffsetXInternal;
60
+ }
61
+ /** Shadow vertical offset in pixels */
62
+ get shadowOffsetY() {
63
+ return this._private_shadowOffsetYInternal;
64
+ }
65
+ /** Shadow blur radius in pixels */
66
+ get shadowBlur() {
67
+ return this._private_shadowBlurInternal;
68
+ }
69
+ /** Shadow color */
70
+ get shadowColor() {
71
+ return this._private_shadowColorInternal;
72
+ }
73
+ /** Whether stroke is enabled */
74
+ get enableStroke() {
75
+ return this._private_enableStrokeInternal;
76
+ }
77
+ /** Stroke color */
78
+ get strokeColor() {
79
+ return this._private_strokeColorInternal;
80
+ }
81
+ /** Stroke thickness in pixels */
82
+ get strokeThickness() {
83
+ return this._private_strokeThicknessInternal;
84
+ }
85
+ /**
86
+ * Indicates whether any property has been modified.
87
+ * Must be reset to `false` externally by the owner.
88
+ * @internal
89
+ */
90
+ get dirty() {
91
+ return this._private_dirtyInternal;
92
+ }
93
+ set color(value) {
94
+ if (value !== this._private_colorInternal) {
95
+ this._private_colorInternal = value;
96
+ this._private_dirtyInternal = true;
97
+ }
98
+ }
99
+ set align(value) {
100
+ if (value !== this._private_alignInternal) {
101
+ this._private_alignInternal = value;
102
+ this._private_dirtyInternal = true;
103
+ }
104
+ }
105
+ set fontFamily(value) {
106
+ if (value !== this._private_fontFamilyInternal) {
107
+ this._private_fontFamilyInternal = value;
108
+ this._private_dirtyInternal = true;
109
+ }
110
+ }
111
+ set fontSize(value) {
112
+ if (value !== undefined) {
113
+ assertValidPositiveNumber(value, "UITextStyle.fontSize");
114
+ }
115
+ if (value !== this._private_fontSizeInternal) {
116
+ this._private_fontSizeInternal = value;
117
+ this._private_dirtyInternal = true;
118
+ }
119
+ }
120
+ set fontStyle(value) {
121
+ if (value !== this._private_fontStyleInternal) {
122
+ this._private_fontStyleInternal = value;
123
+ this._private_dirtyInternal = true;
124
+ }
125
+ }
126
+ set fontWeight(value) {
127
+ if (typeof value === "number") {
128
+ assertValidPositiveNumber(value, "UITextStyle.fontWeight");
129
+ }
130
+ if (value !== this._private_fontWeightInternal) {
131
+ this._private_fontWeightInternal = value;
132
+ this._private_dirtyInternal = true;
133
+ }
134
+ }
135
+ set lineHeight(value) {
136
+ if (value !== undefined) {
137
+ assertValidNumber(value, "UITextStyle.lineHeight");
138
+ }
139
+ if (value !== this._private_lineHeightInternal) {
140
+ this._private_lineHeightInternal = value;
141
+ this._private_dirtyInternal = true;
142
+ }
143
+ }
144
+ set enableShadow(value) {
145
+ if (value !== this._private_enableShadowInternal) {
146
+ this._private_enableShadowInternal = value;
147
+ this._private_dirtyInternal = true;
148
+ }
149
+ }
150
+ set shadowOffsetX(value) {
151
+ if (value !== undefined) {
152
+ assertValidNonNegativeNumber(value, "UITextStyle.shadowOffsetX");
153
+ }
154
+ if (value !== this._private_shadowOffsetXInternal) {
155
+ this._private_shadowOffsetXInternal = value;
156
+ this._private_dirtyInternal = true;
157
+ }
158
+ }
159
+ set shadowOffsetY(value) {
160
+ if (value !== undefined) {
161
+ assertValidNonNegativeNumber(value, "UITextStyle.shadowOffsetY");
162
+ }
163
+ if (value !== this._private_shadowOffsetYInternal) {
164
+ this._private_shadowOffsetYInternal = value;
165
+ this._private_dirtyInternal = true;
166
+ }
167
+ }
168
+ set shadowBlur(value) {
169
+ if (value !== undefined) {
170
+ assertValidNonNegativeNumber(value, "UITextStyle.shadowBlur");
171
+ }
172
+ if (value !== this._private_shadowBlurInternal) {
173
+ this._private_shadowBlurInternal = value;
174
+ this._private_dirtyInternal = true;
175
+ }
176
+ }
177
+ set shadowColor(value) {
178
+ if (value !== this._private_shadowColorInternal) {
179
+ this._private_shadowColorInternal = value;
180
+ this._private_dirtyInternal = true;
181
+ }
182
+ }
183
+ set enableStroke(value) {
184
+ if (value !== this._private_enableStrokeInternal) {
185
+ this._private_enableStrokeInternal = value;
186
+ this._private_dirtyInternal = true;
187
+ }
188
+ }
189
+ set strokeColor(value) {
190
+ if (value !== this._private_strokeColorInternal) {
191
+ this._private_strokeColorInternal = value;
192
+ this._private_dirtyInternal = true;
193
+ }
194
+ }
195
+ set strokeThickness(value) {
196
+ if (value !== undefined) {
197
+ assertValidNonNegativeNumber(value, "UITextStyle.strokeThickness");
198
+ }
199
+ if (value !== this._private_strokeThicknessInternal) {
200
+ this._private_strokeThicknessInternal = value;
201
+ this._private_dirtyInternal = true;
202
+ }
203
+ }
204
+ /**
205
+ * Resolves complete style from primary and fallback sources.
206
+ * @param primary First style to check for each property
207
+ * @param fallback Second style to check if primary is undefined
208
+ * @returns Complete style configuration with all defaults applied
209
+ */
210
+ static resolve(primary, fallback) {
211
+ const fontSize = primary._private_fontSizeInternal ?? fallback._private_fontSizeInternal ?? TEXT_STYLE_DEFAULT_FONT_SIZE;
212
+ return {
213
+ color: primary._private_colorInternal ?? fallback._private_colorInternal ?? TEXT_STYLE_DEFAULT_COLOR,
214
+ align: primary._private_alignInternal ?? fallback._private_alignInternal ?? TEXT_STYLE_DEFAULT_ALIGN,
215
+ fontFamily: primary._private_fontFamilyInternal ?? fallback._private_fontFamilyInternal ??
216
+ TEXT_STYLE_DEFAULT_FONT_FAMILY,
217
+ fontSize,
218
+ fontStyle: primary._private_fontStyleInternal ?? fallback._private_fontStyleInternal ?? TEXT_STYLE_DEFAULT_FONT_STYLE,
219
+ fontWeight: primary._private_fontWeightInternal ?? fallback._private_fontWeightInternal ??
220
+ TEXT_STYLE_DEFAULT_FONT_WEIGHT,
221
+ lineHeight: primary._private_lineHeightInternal ?? fallback._private_lineHeightInternal ??
222
+ fontSize * TEXT_STYLE_DEFAULT_LINE_HEIGHT,
223
+ enableShadow: primary._private_enableShadowInternal ?? fallback._private_enableShadowInternal ??
224
+ TEXT_STYLE_DEFAULT_ENABLE_SHADOW,
225
+ shadowOffsetX: primary._private_shadowOffsetXInternal ?? fallback._private_shadowOffsetXInternal ??
226
+ TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X,
227
+ shadowOffsetY: primary._private_shadowOffsetYInternal ?? fallback._private_shadowOffsetYInternal ??
228
+ TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y,
229
+ shadowBlur: primary._private_shadowBlurInternal ?? fallback._private_shadowBlurInternal ??
230
+ TEXT_STYLE_DEFAULT_SHADOW_BLUR,
231
+ shadowColor: primary._private_shadowColorInternal ?? fallback._private_shadowColorInternal ??
232
+ TEXT_STYLE_DEFAULT_SHADOW_COLOR,
233
+ enableStroke: primary._private_enableStrokeInternal ?? fallback._private_enableStrokeInternal ??
234
+ TEXT_STYLE_DEFAULT_ENABLE_STROKE,
235
+ strokeColor: primary._private_strokeColorInternal ?? fallback._private_strokeColorInternal ??
236
+ TEXT_STYLE_DEFAULT_STROKE_COLOR,
237
+ strokeThickness: primary._private_strokeThicknessInternal ?? fallback._private_strokeThicknessInternal ??
238
+ TEXT_STYLE_DEFAULT_STROKE_THICKNESS,
239
+ };
240
+ }
241
+ /** @internal */
242
+ setDirtyFalse() {
243
+ this._private_dirtyInternal = false;
244
+ }
245
+ /** Sets all properties to default values */
246
+ setDefaults() {
247
+ if (this._private_colorInternal !== TEXT_STYLE_DEFAULT_COLOR ||
248
+ this._private_alignInternal !== TEXT_STYLE_DEFAULT_ALIGN ||
249
+ this._private_fontFamilyInternal !== TEXT_STYLE_DEFAULT_FONT_FAMILY ||
250
+ this._private_fontSizeInternal !== TEXT_STYLE_DEFAULT_FONT_SIZE ||
251
+ this._private_fontStyleInternal !== TEXT_STYLE_DEFAULT_FONT_STYLE ||
252
+ this._private_fontWeightInternal !== TEXT_STYLE_DEFAULT_FONT_WEIGHT ||
253
+ this._private_lineHeightInternal !== TEXT_STYLE_DEFAULT_FONT_SIZE * TEXT_STYLE_DEFAULT_LINE_HEIGHT ||
254
+ this._private_enableShadowInternal !== TEXT_STYLE_DEFAULT_ENABLE_SHADOW ||
255
+ this._private_shadowOffsetXInternal !== TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X ||
256
+ this._private_shadowOffsetYInternal !== TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y ||
257
+ this._private_shadowBlurInternal !== TEXT_STYLE_DEFAULT_SHADOW_BLUR ||
258
+ this._private_shadowColorInternal !== TEXT_STYLE_DEFAULT_SHADOW_COLOR ||
259
+ this._private_enableStrokeInternal !== TEXT_STYLE_DEFAULT_ENABLE_STROKE ||
260
+ this._private_strokeColorInternal !== TEXT_STYLE_DEFAULT_STROKE_COLOR ||
261
+ this._private_strokeThicknessInternal !== TEXT_STYLE_DEFAULT_STROKE_THICKNESS) {
262
+ this._private_colorInternal = TEXT_STYLE_DEFAULT_COLOR;
263
+ this._private_alignInternal = TEXT_STYLE_DEFAULT_ALIGN;
264
+ this._private_fontFamilyInternal = TEXT_STYLE_DEFAULT_FONT_FAMILY;
265
+ this._private_fontSizeInternal = TEXT_STYLE_DEFAULT_FONT_SIZE;
266
+ this._private_fontStyleInternal = TEXT_STYLE_DEFAULT_FONT_STYLE;
267
+ this._private_fontWeightInternal = TEXT_STYLE_DEFAULT_FONT_WEIGHT;
268
+ this._private_lineHeightInternal = TEXT_STYLE_DEFAULT_FONT_SIZE * TEXT_STYLE_DEFAULT_LINE_HEIGHT;
269
+ this._private_enableShadowInternal = TEXT_STYLE_DEFAULT_ENABLE_SHADOW;
270
+ this._private_shadowOffsetXInternal = TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X;
271
+ this._private_shadowOffsetYInternal = TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y;
272
+ this._private_shadowBlurInternal = TEXT_STYLE_DEFAULT_SHADOW_BLUR;
273
+ this._private_shadowColorInternal = TEXT_STYLE_DEFAULT_SHADOW_COLOR;
274
+ this._private_enableStrokeInternal = TEXT_STYLE_DEFAULT_ENABLE_STROKE;
275
+ this._private_strokeColorInternal = TEXT_STYLE_DEFAULT_STROKE_COLOR;
276
+ this._private_strokeThicknessInternal = TEXT_STYLE_DEFAULT_STROKE_THICKNESS;
277
+ this._private_dirtyInternal = true;
278
+ }
279
+ }
280
+ /** Sets all properties to undefined */
281
+ clear() {
282
+ if (this._private_colorInternal !== undefined ||
283
+ this._private_alignInternal !== undefined ||
284
+ this._private_fontFamilyInternal !== undefined ||
285
+ this._private_fontSizeInternal !== undefined ||
286
+ this._private_fontStyleInternal !== undefined ||
287
+ this._private_fontWeightInternal !== undefined ||
288
+ this._private_lineHeightInternal !== undefined ||
289
+ this._private_enableShadowInternal !== undefined ||
290
+ this._private_shadowOffsetXInternal !== undefined ||
291
+ this._private_shadowOffsetYInternal !== undefined ||
292
+ this._private_shadowBlurInternal !== undefined ||
293
+ this._private_shadowColorInternal !== undefined ||
294
+ this._private_enableStrokeInternal !== undefined ||
295
+ this._private_strokeColorInternal !== undefined ||
296
+ this._private_strokeThicknessInternal !== undefined) {
297
+ this._private_colorInternal = undefined;
298
+ this._private_alignInternal = undefined;
299
+ this._private_fontFamilyInternal = undefined;
300
+ this._private_fontSizeInternal = undefined;
301
+ this._private_fontStyleInternal = undefined;
302
+ this._private_fontWeightInternal = undefined;
303
+ this._private_lineHeightInternal = undefined;
304
+ this._private_enableShadowInternal = undefined;
305
+ this._private_shadowOffsetXInternal = undefined;
306
+ this._private_shadowOffsetYInternal = undefined;
307
+ this._private_shadowBlurInternal = undefined;
308
+ this._private_shadowColorInternal = undefined;
309
+ this._private_enableStrokeInternal = undefined;
310
+ this._private_strokeColorInternal = undefined;
311
+ this._private_strokeThicknessInternal = undefined;
312
+ this._private_dirtyInternal = true;
313
+ }
314
+ }
315
+ /** Copies from another style instance */
316
+ copy(value) {
317
+ if (this._private_colorInternal !== value._private_colorInternal ||
318
+ this._private_alignInternal !== value._private_alignInternal ||
319
+ this._private_fontFamilyInternal !== value._private_fontFamilyInternal ||
320
+ this._private_fontSizeInternal !== value._private_fontSizeInternal ||
321
+ this._private_fontStyleInternal !== value._private_fontStyleInternal ||
322
+ this._private_fontWeightInternal !== value._private_fontWeightInternal ||
323
+ this._private_lineHeightInternal !== value._private_lineHeightInternal ||
324
+ this._private_enableShadowInternal !== value._private_enableShadowInternal ||
325
+ this._private_shadowOffsetXInternal !== value._private_shadowOffsetXInternal ||
326
+ this._private_shadowOffsetYInternal !== value._private_shadowOffsetYInternal ||
327
+ this._private_shadowBlurInternal !== value._private_shadowBlurInternal ||
328
+ this._private_shadowColorInternal !== value._private_shadowColorInternal ||
329
+ this._private_enableStrokeInternal !== value._private_enableStrokeInternal ||
330
+ this._private_strokeColorInternal !== value._private_strokeColorInternal ||
331
+ this._private_strokeThicknessInternal !== value._private_strokeThicknessInternal) {
332
+ this._private_colorInternal = value._private_colorInternal;
333
+ this._private_alignInternal = value._private_alignInternal;
334
+ this._private_fontFamilyInternal = value._private_fontFamilyInternal;
335
+ this._private_fontSizeInternal = value._private_fontSizeInternal;
336
+ this._private_fontStyleInternal = value._private_fontStyleInternal;
337
+ this._private_fontWeightInternal = value._private_fontWeightInternal;
338
+ this._private_lineHeightInternal = value._private_lineHeightInternal;
339
+ this._private_enableShadowInternal = value._private_enableShadowInternal;
340
+ this._private_shadowOffsetXInternal = value._private_shadowOffsetXInternal;
341
+ this._private_shadowOffsetYInternal = value._private_shadowOffsetYInternal;
342
+ this._private_shadowBlurInternal = value._private_shadowBlurInternal;
343
+ this._private_shadowColorInternal = value._private_shadowColorInternal;
344
+ this._private_enableStrokeInternal = value._private_enableStrokeInternal;
345
+ this._private_strokeColorInternal = value._private_strokeColorInternal;
346
+ this._private_strokeThicknessInternal = value._private_strokeThicknessInternal;
347
+ this._private_dirtyInternal = true;
348
+ }
349
+ }
350
+ /**
351
+ * Calculates maximum padding required for stroke and shadow.
352
+ * @returns Padding in pixels needed on all sides
353
+ */
354
+ calculatePadding() {
355
+ let padding = 0;
356
+ if (this._private_enableStrokeInternal !== undefined) {
357
+ padding += this._private_strokeThicknessInternal ?? 0;
358
+ }
359
+ if (this._private_enableShadowInternal !== undefined) {
360
+ const blur = this._private_shadowBlurInternal ?? 0;
361
+ const offsetX = this._private_shadowOffsetXInternal ?? 0;
362
+ const offsetY = this._private_shadowOffsetYInternal ?? 0;
363
+ const shadowSpread = blur * 2;
364
+ const shadowMaxX = Math.abs(offsetX) + shadowSpread;
365
+ const shadowMaxY = Math.abs(offsetY) + shadowSpread;
366
+ padding += Math.max(shadowMaxX, shadowMaxY);
367
+ }
368
+ return Math.ceil(padding);
369
+ }
370
+ }
371
+
372
+ export { UITextStyle };