laymur 0.23.0 → 0.25.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 (314) hide show
  1. package/README.md +1 -1
  2. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +1 -1
  3. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.js +1 -0
  4. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +3 -3
  5. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +14 -16
  6. package/dist/core/constraints/UIConstraint.d.ts +22 -2
  7. package/dist/core/constraints/UIConstraint.js +26 -3
  8. package/dist/core/constraints/UICustomConstraint.d.ts +4 -4
  9. package/dist/core/constraints/UICustomConstraint.js +15 -15
  10. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +1 -1
  11. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.js +1 -0
  12. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +3 -3
  13. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +11 -13
  14. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +1 -1
  15. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +1 -3
  16. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +3 -3
  17. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +30 -30
  18. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +1 -1
  19. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +2 -4
  20. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +3 -3
  21. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +40 -39
  22. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +1 -1
  23. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.js +1 -0
  24. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +3 -3
  25. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +13 -15
  26. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +3 -3
  27. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.js +1 -0
  28. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +13 -7
  29. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +37 -30
  30. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +1 -1
  31. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +1 -3
  32. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +3 -3
  33. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +30 -30
  34. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +1 -1
  35. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +2 -4
  36. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +3 -3
  37. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +40 -39
  38. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +1 -1
  39. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.js +1 -0
  40. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +3 -3
  41. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +13 -15
  42. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +1 -1
  43. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.js +1 -0
  44. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +3 -3
  45. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +11 -13
  46. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +3 -3
  47. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +1 -3
  48. package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +11 -11
  49. package/dist/core/constraints/builders/UIConstraint2DBuilder.js +10 -13
  50. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +1 -1
  51. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +1 -3
  52. package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +7 -7
  53. package/dist/core/constraints/builders/UICoverConstraintBuilder.js +10 -13
  54. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +1 -1
  55. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +1 -3
  56. package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +7 -7
  57. package/dist/core/constraints/builders/UIFitConstraintBuilder.js +10 -13
  58. package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +3 -5
  59. package/dist/core/elements/UIAnchor/UIAnchor.d.ts +23 -5
  60. package/dist/core/elements/UIAnchor/UIAnchor.js +42 -8
  61. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +2 -2
  62. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +4 -6
  63. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +10 -10
  64. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +108 -111
  65. package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +4 -4
  66. package/dist/core/elements/UIDummy/UIDummy.Internal.js +5 -8
  67. package/dist/core/elements/UIDummy/UIDummy.d.ts +19 -11
  68. package/dist/core/elements/UIDummy/UIDummy.js +59 -42
  69. package/dist/core/elements/UIElement/UIElement.Internal.d.ts +5 -5
  70. package/dist/core/elements/UIElement/UIElement.Internal.js +9 -12
  71. package/dist/core/elements/UIElement/UIElement.d.ts +11 -11
  72. package/dist/core/elements/UIElement/UIElement.js +57 -60
  73. package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +3 -3
  74. package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +4 -7
  75. package/dist/core/elements/UIGraphics/UIGraphics.d.ts +7 -7
  76. package/dist/core/elements/UIGraphics/UIGraphics.js +44 -47
  77. package/dist/core/elements/UIImage/UIImage.Internal.d.ts +2 -2
  78. package/dist/core/elements/UIImage/UIImage.Internal.js +1 -0
  79. package/dist/core/elements/UIImage/UIImage.d.ts +9 -9
  80. package/dist/core/elements/UIImage/UIImage.js +21 -24
  81. package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +3 -3
  82. package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +3 -5
  83. package/dist/core/elements/UINineSlice/UINineSlice.d.ts +12 -12
  84. package/dist/core/elements/UINineSlice/UINineSlice.js +71 -73
  85. package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +3 -4
  86. package/dist/core/elements/UIProgress/UIProgress.Internal.js +1 -3
  87. package/dist/core/elements/UIProgress/UIProgress.d.ts +10 -10
  88. package/dist/core/elements/UIProgress/UIProgress.js +59 -62
  89. package/dist/core/elements/UIScene/UIScene.Internal.d.ts +3 -3
  90. package/dist/core/elements/UIScene/UIScene.Internal.js +11 -14
  91. package/dist/core/elements/UIScene/UIScene.d.ts +8 -8
  92. package/dist/core/elements/UIScene/UIScene.js +68 -69
  93. package/dist/core/elements/UIText/UIText.Bidi.d.ts +2 -2
  94. package/dist/core/elements/UIText/UIText.Bidi.js +3 -5
  95. package/dist/core/elements/UIText/UIText.Interfaces.d.ts +6 -2
  96. package/dist/core/elements/UIText/UIText.Interfaces.js +1 -0
  97. package/dist/core/elements/UIText/UIText.Internal.d.ts +4 -4
  98. package/dist/core/elements/UIText/UIText.Internal.js +5 -7
  99. package/dist/core/elements/UIText/UIText.Measuring.d.ts +14 -7
  100. package/dist/core/elements/UIText/UIText.Measuring.js +115 -55
  101. package/dist/core/elements/UIText/UIText.Rendering.d.ts +3 -3
  102. package/dist/core/elements/UIText/UIText.Rendering.js +6 -9
  103. package/dist/core/elements/UIText/UIText.d.ts +28 -14
  104. package/dist/core/elements/UIText/UIText.js +181 -141
  105. package/dist/core/index.d.ts +55 -54
  106. package/dist/core/index.js +53 -0
  107. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +4 -4
  108. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +2 -5
  109. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +4 -4
  110. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +43 -42
  111. package/dist/core/layers/UILayer/UILayer.Internal.d.ts +2 -2
  112. package/dist/core/layers/UILayer/UILayer.Internal.js +4 -7
  113. package/dist/core/layers/UILayer/UILayer.d.ts +19 -4
  114. package/dist/core/layers/UILayer/UILayer.js +125 -62
  115. package/dist/core/miscellaneous/UIBlendMode.js +1 -3
  116. package/dist/core/miscellaneous/UIExpression.js +16 -19
  117. package/dist/core/miscellaneous/UIMode.js +3 -5
  118. package/dist/core/miscellaneous/UIOrientation.js +2 -4
  119. package/dist/core/miscellaneous/UIPriority.js +5 -8
  120. package/dist/core/miscellaneous/UIRelation.js +5 -8
  121. package/dist/core/miscellaneous/UITransparencyMode.js +1 -3
  122. package/dist/core/miscellaneous/area/UIArea.js +1 -3
  123. package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -1
  124. package/dist/core/miscellaneous/area/UIAreaCircle.js +3 -6
  125. package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +2 -2
  126. package/dist/core/miscellaneous/area/UIAreaPolygon.js +3 -6
  127. package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -1
  128. package/dist/core/miscellaneous/area/UIAreaRectangle.js +3 -6
  129. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -1
  130. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +3 -6
  131. package/dist/core/miscellaneous/asserts.d.ts +20 -1
  132. package/dist/core/miscellaneous/asserts.js +71 -19
  133. package/dist/core/miscellaneous/canvas.js +13 -7
  134. package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +1 -1
  135. package/dist/core/miscellaneous/color/UIColor.Internal.js +1 -3
  136. package/dist/core/miscellaneous/color/UIColor.d.ts +1 -1
  137. package/dist/core/miscellaneous/color/UIColor.js +202 -205
  138. package/dist/core/miscellaneous/computeTransform.d.ts +1 -1
  139. package/dist/core/miscellaneous/computeTransform.js +4 -7
  140. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +2 -2
  141. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +13 -16
  142. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +115 -118
  143. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +3 -3
  144. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.js +1 -0
  145. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +208 -114
  146. package/dist/core/miscellaneous/generic-plane/shared.d.ts +2 -2
  147. package/dist/core/miscellaneous/generic-plane/shared.js +16 -19
  148. package/dist/core/miscellaneous/insets/UIInsets.Internal.js +1 -3
  149. package/dist/core/miscellaneous/insets/UIInsets.d.ts +1 -1
  150. package/dist/core/miscellaneous/insets/UIInsets.js +96 -99
  151. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +1 -3
  152. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +1 -1
  153. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +14 -17
  154. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -2
  155. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +13 -16
  156. package/dist/core/miscellaneous/math.js +3 -5
  157. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +6 -8
  158. package/dist/core/miscellaneous/micro/UIMicro.d.ts +1 -1
  159. package/dist/core/miscellaneous/micro/UIMicro.js +91 -94
  160. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +1 -3
  161. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +1 -1
  162. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +12 -15
  163. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +1 -1
  164. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +13 -16
  165. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +1 -1
  166. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +13 -16
  167. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +1 -1
  168. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +12 -15
  169. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +1 -1
  170. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +13 -16
  171. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +1 -1
  172. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +13 -16
  173. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +1 -1
  174. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +3 -6
  175. package/dist/core/miscellaneous/shared.d.ts +1 -1
  176. package/dist/core/miscellaneous/shared.js +4 -7
  177. package/dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts +1 -1
  178. package/dist/core/miscellaneous/text-span/UITextSpan.Internal.js +1 -0
  179. package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +2 -2
  180. package/dist/core/miscellaneous/text-span/UITextSpan.js +10 -13
  181. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +15 -17
  182. package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +13 -2
  183. package/dist/core/miscellaneous/text-style/UITextStyle.js +222 -207
  184. package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +7 -0
  185. package/dist/core/miscellaneous/texture/UITextureView.Internal.js +16 -6
  186. package/dist/core/miscellaneous/texture/UITextureView.d.ts +1 -1
  187. package/dist/core/miscellaneous/texture/UITextureView.js +113 -117
  188. package/dist/core/miscellaneous/webglCapabilities.js +3 -4
  189. package/dist/core/shaders/UIImage.d.ts +9 -0
  190. package/dist/core/shaders/UIImage.js +14 -0
  191. package/dist/core/shaders/UINineSlice.d.ts +11 -0
  192. package/dist/core/shaders/UINineSlice.js +57 -0
  193. package/dist/core/shaders/UIProgress.d.ts +14 -0
  194. package/dist/core/shaders/UIProgress.js +21 -0
  195. package/dist/core/shaders/UIProgressMaskFunctionCircular.d.ts +2 -0
  196. package/dist/core/shaders/UIProgressMaskFunctionCircular.js +16 -0
  197. package/dist/core/shaders/UIProgressMaskFunctionDirectional.d.ts +2 -0
  198. package/dist/core/shaders/UIProgressMaskFunctionDirectional.js +15 -0
  199. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +4 -0
  200. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.js +1 -0
  201. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +7 -1
  202. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +50 -47
  203. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +5 -2
  204. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.js +1 -0
  205. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +11 -3
  206. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +42 -26
  207. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +5 -3
  208. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.js +1 -0
  209. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +20 -4
  210. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +138 -117
  211. package/dist/debug/UIAspectDebug.d.ts +3 -3
  212. package/dist/debug/UIAspectDebug.js +64 -68
  213. package/dist/debug/UIConstraintDebug.d.ts +1 -1
  214. package/dist/debug/UIConstraintDebug.js +1 -0
  215. package/dist/debug/UIHeightDebug.d.ts +3 -3
  216. package/dist/debug/UIHeightDebug.js +63 -67
  217. package/dist/debug/UIHorizontalDistanceDebug.d.ts +3 -3
  218. package/dist/debug/UIHorizontalDistanceDebug.js +76 -81
  219. package/dist/debug/UIHorizontalInterpolationDebug.d.ts +3 -3
  220. package/dist/debug/UIHorizontalInterpolationDebug.js +74 -78
  221. package/dist/debug/UILayerDebug.d.ts +1 -1
  222. package/dist/debug/UILayerDebug.js +55 -64
  223. package/dist/debug/UIVerticalDistanceDebug.d.ts +3 -3
  224. package/dist/debug/UIVerticalDistanceDebug.js +76 -81
  225. package/dist/debug/UIVerticalInterpolationDebug.d.ts +3 -3
  226. package/dist/debug/UIVerticalInterpolationDebug.js +74 -78
  227. package/dist/debug/UIWidthDebug.d.ts +3 -3
  228. package/dist/debug/UIWidthDebug.js +63 -67
  229. package/dist/debug/index.d.ts +8 -8
  230. package/dist/debug/index.js +8 -8
  231. package/dist/debug/miscellaneous.js +8 -11
  232. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +3 -3
  233. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +13 -16
  234. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +1 -1
  235. package/dist/particles/behaviorModules/UIBehaviorModule.js +1 -3
  236. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +3 -3
  237. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +37 -40
  238. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +41 -0
  239. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +87 -0
  240. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +2 -2
  241. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +17 -20
  242. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +2 -2
  243. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +13 -16
  244. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +2 -2
  245. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +21 -24
  246. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +2 -2
  247. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +13 -16
  248. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +2 -2
  249. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +21 -24
  250. package/dist/particles/elements/UIEmitter.Internal.d.ts +2 -2
  251. package/dist/particles/elements/UIEmitter.Internal.js +6 -9
  252. package/dist/particles/elements/UIEmitter.d.ts +17 -11
  253. package/dist/particles/elements/UIEmitter.js +100 -88
  254. package/dist/particles/index.d.ts +20 -18
  255. package/dist/particles/index.js +19 -18
  256. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +1 -1
  257. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +14 -15
  258. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +1 -1
  259. package/dist/particles/instancedParticle/UIInstancedParticle.js +29 -32
  260. package/dist/particles/miscellaneous/miscellaneous.d.ts +3 -3
  261. package/dist/particles/miscellaneous/miscellaneous.js +26 -27
  262. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +2 -2
  263. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +5 -8
  264. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +2 -2
  265. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +6 -9
  266. package/dist/particles/renderingModules/UIRenderingModule.js +1 -3
  267. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +2 -2
  268. package/dist/particles/renderingModules/UIRenderingTexture.js +4 -7
  269. package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +2 -0
  270. package/dist/particles/shaders/UIRenderingColorOverLife.js +7 -0
  271. package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +9 -0
  272. package/dist/particles/shaders/UIRenderingColorOverVelocity.js +16 -0
  273. package/dist/particles/shaders/UIRenderingTexture.d.ts +2 -0
  274. package/dist/particles/shaders/UIRenderingTexture.js +7 -0
  275. package/dist/particles/spawnModules/UISpawnModule.d.ts +1 -1
  276. package/dist/particles/spawnModules/UISpawnModule.js +1 -3
  277. package/dist/particles/spawnModules/UISpawnOffset.d.ts +3 -3
  278. package/dist/particles/spawnModules/UISpawnOffset.js +12 -15
  279. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +2 -2
  280. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +13 -16
  281. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +2 -2
  282. package/dist/particles/spawnModules/UISpawnRandomRotation.js +13 -16
  283. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +2 -2
  284. package/dist/particles/spawnModules/UISpawnRandomScale.js +19 -22
  285. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +2 -2
  286. package/dist/particles/spawnModules/UISpawnRandomTorque.js +13 -16
  287. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +2 -2
  288. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +21 -24
  289. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +3 -3
  290. package/dist/particles/spawnModules/UISpawnRectangle.js +21 -24
  291. package/package.json +13 -17
  292. package/dist/_virtual/2d.js +0 -3
  293. package/dist/_virtual/3d.js +0 -3
  294. package/dist/_virtual/4d.js +0 -3
  295. package/dist/_virtual/mod.js +0 -5
  296. package/dist/_virtual/mod2.js +0 -3
  297. package/dist/core/shaders/UIImage.glsl.js +0 -3
  298. package/dist/core/shaders/UINineSlice.glsl.js +0 -3
  299. package/dist/core/shaders/UIProgress.glsl.js +0 -3
  300. package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +0 -3
  301. package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +0 -3
  302. package/dist/index.js +0 -52
  303. package/dist/node_modules/fast-simplex-noise/lib/2d.js +0 -93
  304. package/dist/node_modules/fast-simplex-noise/lib/3d.js +0 -142
  305. package/dist/node_modules/fast-simplex-noise/lib/4d.js +0 -196
  306. package/dist/node_modules/fast-simplex-noise/lib/mod.js +0 -24
  307. package/dist/node_modules/three/examples/jsm/lines/Line2.js +0 -56
  308. package/dist/node_modules/three/examples/jsm/lines/LineGeometry.js +0 -157
  309. package/dist/node_modules/three/examples/jsm/lines/LineMaterial.js +0 -691
  310. package/dist/node_modules/three/examples/jsm/lines/LineSegments2.js +0 -415
  311. package/dist/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -289
  312. package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +0 -3
  313. package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +0 -3
  314. package/dist/particles/shaders/UIRenderingTexture.glsl.js +0 -3
@@ -1,8 +1,7 @@
1
- import { Solver, Variable, Constraint, Expression } from '@lume/kiwi';
2
- import { UIExpression } from '../../miscellaneous/UIExpression.js';
3
- import { UIPriority, convertPriority } from '../../miscellaneous/UIPriority.js';
4
- import { UIRelation, convertRelation } from '../../miscellaneous/UIRelation.js';
5
-
1
+ import { Constraint, Expression, Solver, Variable } from "@lume/kiwi";
2
+ import { UIExpression } from "../../miscellaneous/UIExpression.js";
3
+ import { convertPriority, UIPriority } from "../../miscellaneous/UIPriority.js";
4
+ import { convertRelation, UIRelation } from "../../miscellaneous/UIRelation.js";
6
5
  /**
7
6
  * Wrapper around the Kiwi constraint solver providing enhanced UI-specific functionality.
8
7
  *
@@ -23,22 +22,22 @@ import { UIRelation, convertRelation } from '../../miscellaneous/UIRelation.js';
23
22
  * @see {@link UIPriority} - Priority levels for variables and constraints
24
23
  * @see {@link UIRelation} - Relational operators for constraints
25
24
  */
26
- class UISolverWrapper {
25
+ export class UISolverWrapper {
27
26
  constructor() {
28
27
  /** @internal */
29
28
  this.dirty = false;
30
29
  /** The underlying Kiwi solver instance, undefined when solver needs rebuilding. */
31
- this._private_solver = new Solver();
30
+ this.solver = new Solver();
32
31
  /** Flag indicating whether variable values need recalculation. */
33
- this._private_recalculationRequired = false;
32
+ this.recalculationRequired = false;
34
33
  /** Map of variable indices to their descriptions. */
35
- this._private_variables = new Map();
34
+ this.variables = new Map();
36
35
  /** Counter for generating unique variable indices. */
37
- this._private_lastVariableIndex = 0;
36
+ this.lastVariableIndex = 0;
38
37
  /** Map of constraint indices to their descriptions. */
39
- this._private_constraints = new Map();
38
+ this.constraints = new Map();
40
39
  /** Counter for generating unique constraint indices. */
41
- this._private_lastConstraintIndex = 0;
40
+ this.lastConstraintIndex = 0;
42
41
  }
43
42
  /**
44
43
  * Creates a new solver variable with the specified value and priority.
@@ -52,30 +51,30 @@ class UISolverWrapper {
52
51
  * @returns Unique index identifier for the created variable
53
52
  */
54
53
  createVariable(value, priority) {
55
- const index = this._private_lastVariableIndex++;
54
+ const index = this.lastVariableIndex++;
56
55
  const variable = new Variable();
57
56
  if (priority === UIPriority.P0) {
58
57
  const description = { variable, priority, value };
59
- this._private_variables.set(index, description);
60
- description.constraint = this._private_buildConstraint(new UIExpression(0, [[index, 1]]), new UIExpression(value), UIRelation.EQUAL, priority);
58
+ this.variables.set(index, description);
59
+ description.constraint = this.buildConstraint(new UIExpression(0, [[index, 1]]), new UIExpression(value), UIRelation.EQUAL, priority);
61
60
  try {
62
- this._private_solver?.addConstraint(description.constraint);
61
+ this.solver?.addConstraint(description.constraint);
63
62
  }
64
63
  catch {
65
- this._private_solver = undefined;
64
+ this.solver = undefined;
66
65
  }
67
66
  }
68
67
  else {
69
- this._private_variables.set(index, { variable, priority, value });
68
+ this.variables.set(index, { variable, priority, value });
70
69
  try {
71
- this._private_solver?.addEditVariable(variable, convertPriority(priority));
72
- this._private_solver?.suggestValue(variable, value);
70
+ this.solver?.addEditVariable(variable, convertPriority(priority));
71
+ this.solver?.suggestValue(variable, value);
73
72
  }
74
73
  catch {
75
- this._private_solver = undefined;
74
+ this.solver = undefined;
76
75
  }
77
76
  }
78
- this._private_recalculationRequired = true;
77
+ this.recalculationRequired = true;
79
78
  this.dirty = true;
80
79
  return index;
81
80
  }
@@ -89,27 +88,36 @@ class UISolverWrapper {
89
88
  * @throws Will throw an error if the variable doesn't exist or is still in use
90
89
  */
91
90
  removeVariable(index) {
92
- const description = this._private_variables.get(index);
91
+ const description = this.variables.get(index);
93
92
  if (description === undefined) {
94
- throw new Error(`UISolverWrapper.removeVariable.index: variable does not exist`);
93
+ throw new Error(`UISolverWrapper.removeVariable.index: variable ${index} does not exist; its element may be destroyed`);
95
94
  }
96
- for (const cDescription of this._private_constraints.values()) {
95
+ for (const [cIndex, cDescription] of this.constraints) {
97
96
  if (cDescription.lhs.hasTerm(index) || cDescription.rhs.hasTerm(index)) {
98
- throw new Error(`UISolverWrapper.removeVariable.index: variable is used in constraint`);
97
+ throw new Error(`UISolverWrapper.removeVariable.index: variable ${index} is used in constraint ${cIndex}; destroy the constraint first`);
99
98
  }
100
99
  }
101
100
  try {
102
101
  description.constraint
103
- ? this._private_solver?.removeConstraint(description.constraint)
104
- : this._private_solver?.removeEditVariable(description.variable);
102
+ ? this.solver?.removeConstraint(description.constraint)
103
+ : this.solver?.removeEditVariable(description.variable);
105
104
  }
106
105
  catch {
107
- this._private_solver = undefined;
106
+ this.solver = undefined;
108
107
  }
109
- this._private_variables.delete(index);
110
- this._private_recalculationRequired = true;
108
+ this.variables.delete(index);
109
+ this.recalculationRequired = true;
111
110
  this.dirty = true;
112
111
  }
112
+ /**
113
+ * Checks whether a variable exists.
114
+ *
115
+ * @param index - Index of the variable
116
+ * @returns True if the variable was created and not removed
117
+ */
118
+ hasVariable(index) {
119
+ return this.variables.has(index);
120
+ }
113
121
  /**
114
122
  * Suggests a new value for an existing variable.
115
123
  *
@@ -122,19 +130,19 @@ class UISolverWrapper {
122
130
  * @throws Will throw an error if the variable doesn't exist
123
131
  */
124
132
  suggestVariableValue(index, value) {
125
- const description = this._private_variables.get(index);
133
+ const description = this.variables.get(index);
126
134
  if (description === undefined) {
127
- throw new Error(`UISolverWrapper.suggestVariableValue.index: variable does not exist`);
135
+ throw new Error(`UISolverWrapper.suggestVariableValue.index: variable ${index} does not exist; its element may be destroyed`);
128
136
  }
129
137
  if (description.value !== value) {
130
138
  description.value = value;
131
139
  if (description.constraint) {
132
- description.constraint = this._private_rebuildConstraint(description.constraint, new UIExpression().plus(index, 1), new UIExpression(description.value), UIRelation.EQUAL, description.priority);
140
+ description.constraint = this.rebuildConstraint(description.constraint, new UIExpression().plus(index, 1), new UIExpression(description.value), UIRelation.EQUAL, description.priority);
133
141
  }
134
142
  else {
135
- this._private_solver?.suggestValue(description.variable, value);
143
+ this.solver?.suggestValue(description.variable, value);
136
144
  }
137
- this._private_recalculationRequired = true;
145
+ this.recalculationRequired = true;
138
146
  this.dirty = true;
139
147
  }
140
148
  }
@@ -150,36 +158,36 @@ class UISolverWrapper {
150
158
  * @throws Will throw an error if the variable doesn't exist
151
159
  */
152
160
  setVariablePriority(index, priority) {
153
- const description = this._private_variables.get(index);
161
+ const description = this.variables.get(index);
154
162
  if (description === undefined) {
155
- throw new Error(`UISolverWrapper.setVariablePriority.index: variable does not exist`);
163
+ throw new Error(`UISolverWrapper.setVariablePriority.index: variable ${index} does not exist; its element may be destroyed`);
156
164
  }
157
165
  if (priority !== description.priority) {
158
166
  description.priority = priority;
159
167
  if (description.priority === UIPriority.P0) {
160
168
  const lhs = new UIExpression().plus(index, 1);
161
169
  const rhs = new UIExpression(description.value);
162
- description.constraint = this._private_buildConstraint(lhs, rhs, UIRelation.EQUAL, description.priority);
170
+ description.constraint = this.buildConstraint(lhs, rhs, UIRelation.EQUAL, description.priority);
163
171
  try {
164
- this._private_solver?.addConstraint(description.constraint);
172
+ this.solver?.addConstraint(description.constraint);
165
173
  }
166
174
  catch {
167
- this._private_solver = undefined;
175
+ this.solver = undefined;
168
176
  }
169
177
  }
170
178
  else {
171
179
  if (description.constraint) {
172
180
  try {
173
- this._private_solver?.removeConstraint(description.constraint);
181
+ this.solver?.removeConstraint(description.constraint);
174
182
  }
175
183
  catch {
176
- this._private_solver = undefined;
184
+ this.solver = undefined;
177
185
  }
178
186
  }
179
187
  description.constraint = undefined;
180
- this._private_rebuildVariable(index, description);
188
+ this.rebuildVariable(index, description);
181
189
  }
182
- this._private_recalculationRequired = true;
190
+ this.recalculationRequired = true;
183
191
  this.dirty = true;
184
192
  }
185
193
  }
@@ -194,16 +202,16 @@ class UISolverWrapper {
194
202
  * @throws Will throw an error if the variable doesn't exist
195
203
  */
196
204
  readVariableValue(index) {
197
- const description = this._private_variables.get(index);
205
+ const description = this.variables.get(index);
198
206
  if (description === undefined) {
199
- throw new Error(`UISolverWrapper.readVariableValue.index: variable does not exist`);
207
+ throw new Error(`UISolverWrapper.readVariableValue.index: variable ${index} does not exist; its element may be destroyed`);
200
208
  }
201
- if (this._private_solver === undefined) {
202
- this._private_rebuildSolver();
209
+ if (this.solver === undefined) {
210
+ this.rebuildSolver();
203
211
  }
204
- if (this._private_recalculationRequired) {
205
- this._private_solver?.updateVariables();
206
- this._private_recalculationRequired = false;
212
+ if (this.recalculationRequired) {
213
+ this.solver?.updateVariables();
214
+ this.recalculationRequired = false;
207
215
  }
208
216
  return description.variable.value();
209
217
  }
@@ -221,9 +229,9 @@ class UISolverWrapper {
221
229
  * @returns Unique index identifier for the created constraint
222
230
  */
223
231
  createConstraint(lhs, rhs, relation, priority, enabled) {
224
- const index = this._private_lastConstraintIndex++;
225
- const constraint = this._private_buildConstraint(lhs, rhs, relation, priority);
226
- this._private_constraints.set(index, {
232
+ const index = this.lastConstraintIndex++;
233
+ const constraint = this.buildConstraint(lhs, rhs, relation, priority);
234
+ this.constraints.set(index, {
227
235
  constraint,
228
236
  lhs: lhs.clone(),
229
237
  rhs: rhs.clone(),
@@ -233,12 +241,12 @@ class UISolverWrapper {
233
241
  });
234
242
  if (enabled) {
235
243
  try {
236
- this._private_solver?.addConstraint(constraint);
244
+ this.solver?.addConstraint(constraint);
237
245
  }
238
246
  catch {
239
- this._private_solver = undefined;
247
+ this.solver = undefined;
240
248
  }
241
- this._private_recalculationRequired = true;
249
+ this.recalculationRequired = true;
242
250
  this.dirty = true;
243
251
  }
244
252
  return index;
@@ -253,22 +261,37 @@ class UISolverWrapper {
253
261
  * @throws Will throw an error if the constraint doesn't exist
254
262
  */
255
263
  removeConstraint(index) {
256
- const description = this._private_constraints.get(index);
264
+ const description = this.constraints.get(index);
257
265
  if (description === undefined) {
258
- throw new Error(`UISolverWrapper.removeConstraint.index: constraint does not exist`);
266
+ throw new Error(`UISolverWrapper.removeConstraint.index: constraint ${index} does not exist; it may be destroyed`);
259
267
  }
260
268
  if (description.enabled) {
261
269
  try {
262
- this._private_solver?.removeConstraint(description.constraint);
270
+ this.solver?.removeConstraint(description.constraint);
263
271
  }
264
272
  catch {
265
- this._private_solver = undefined;
273
+ this.solver = undefined;
266
274
  }
267
275
  }
268
- this._private_constraints.delete(index);
269
- this._private_recalculationRequired = true;
276
+ this.constraints.delete(index);
277
+ this.recalculationRequired = true;
270
278
  this.dirty = true;
271
279
  }
280
+ /**
281
+ * Checks whether a constraint references a variable in either of its expressions.
282
+ *
283
+ * @param constraintIndex - Index of the constraint to check
284
+ * @param variableIndex - Index of the variable to look for
285
+ * @returns True if the variable is a term of the constraint
286
+ * @throws Will throw an error if the constraint doesn't exist
287
+ */
288
+ isConstraintUsingVariable(constraintIndex, variableIndex) {
289
+ const description = this.constraints.get(constraintIndex);
290
+ if (description === undefined) {
291
+ throw new Error(`UISolverWrapper.isConstraintUsingVariable.constraintIndex: constraint ${constraintIndex} does not exist; it may be destroyed`);
292
+ }
293
+ return description.lhs.hasTerm(variableIndex) || description.rhs.hasTerm(variableIndex);
294
+ }
272
295
  /**
273
296
  * Updates the left-hand side expression of an existing constraint.
274
297
  *
@@ -280,13 +303,13 @@ class UISolverWrapper {
280
303
  * @throws Will throw an error if the constraint doesn't exist
281
304
  */
282
305
  setConstraintLHS(index, lhs) {
283
- const description = this._private_constraints.get(index);
306
+ const description = this.constraints.get(index);
284
307
  if (description === undefined) {
285
- throw new Error(`UISolverWrapper.setConstraintLHS.index: constraint does not exist`);
308
+ throw new Error(`UISolverWrapper.setConstraintLHS.index: constraint ${index} does not exist; it may be destroyed`);
286
309
  }
287
310
  description.lhs.copy(lhs);
288
- this._private_rebuildConstraintByDescription(description);
289
- this._private_recalculationRequired = true;
311
+ this.rebuildConstraintByDescription(description);
312
+ this.recalculationRequired = true;
290
313
  this.dirty = true;
291
314
  }
292
315
  /**
@@ -300,13 +323,13 @@ class UISolverWrapper {
300
323
  * @throws Will throw an error if the constraint doesn't exist
301
324
  */
302
325
  setConstraintRHS(index, rhs) {
303
- const description = this._private_constraints.get(index);
326
+ const description = this.constraints.get(index);
304
327
  if (description === undefined) {
305
- throw new Error(`UISolverWrapper.setConstraintRHS.index: constraint does not exist`);
328
+ throw new Error(`UISolverWrapper.setConstraintRHS.index: constraint ${index} does not exist; it may be destroyed`);
306
329
  }
307
330
  description.rhs.copy(rhs);
308
- this._private_rebuildConstraintByDescription(description);
309
- this._private_recalculationRequired = true;
331
+ this.rebuildConstraintByDescription(description);
332
+ this.recalculationRequired = true;
310
333
  this.dirty = true;
311
334
  }
312
335
  /**
@@ -320,14 +343,14 @@ class UISolverWrapper {
320
343
  * @throws Will throw an error if the constraint doesn't exist
321
344
  */
322
345
  setConstraintRelation(index, relation) {
323
- const description = this._private_constraints.get(index);
346
+ const description = this.constraints.get(index);
324
347
  if (description === undefined) {
325
- throw new Error(`UISolverWrapper.setConstraintRelation.index: constraint does not exist`);
348
+ throw new Error(`UISolverWrapper.setConstraintRelation.index: constraint ${index} does not exist; it may be destroyed`);
326
349
  }
327
350
  if (description.relation !== relation) {
328
351
  description.relation = relation;
329
- this._private_rebuildConstraintByDescription(description);
330
- this._private_recalculationRequired = true;
352
+ this.rebuildConstraintByDescription(description);
353
+ this.recalculationRequired = true;
331
354
  this.dirty = true;
332
355
  }
333
356
  }
@@ -342,14 +365,14 @@ class UISolverWrapper {
342
365
  * @throws Will throw an error if the constraint doesn't exist
343
366
  */
344
367
  setConstraintPriority(index, priority) {
345
- const description = this._private_constraints.get(index);
368
+ const description = this.constraints.get(index);
346
369
  if (description === undefined) {
347
- throw new Error(`UISolverWrapper.setConstraintPriority.index: constraint does not exist`);
370
+ throw new Error(`UISolverWrapper.setConstraintPriority.index: constraint ${index} does not exist; it may be destroyed`);
348
371
  }
349
372
  if (description.priority !== priority) {
350
373
  description.priority = priority;
351
- this._private_rebuildConstraintByDescription(description);
352
- this._private_recalculationRequired = true;
374
+ this.rebuildConstraintByDescription(description);
375
+ this.recalculationRequired = true;
353
376
  this.dirty = true;
354
377
  }
355
378
  }
@@ -364,21 +387,21 @@ class UISolverWrapper {
364
387
  * @throws Will throw an error if the constraint doesn't exist
365
388
  */
366
389
  setConstraintEnabled(index, enabled) {
367
- const description = this._private_constraints.get(index);
390
+ const description = this.constraints.get(index);
368
391
  if (description === undefined) {
369
- throw new Error(`UISolverWrapper.setConstraintEnabled.index: constraint does not exist`);
392
+ throw new Error(`UISolverWrapper.setConstraintEnabled.index: constraint ${index} does not exist; it may be destroyed`);
370
393
  }
371
394
  if (enabled !== description.enabled) {
372
395
  description.enabled = enabled;
373
396
  try {
374
397
  description.enabled
375
- ? this._private_solver?.addConstraint(description.constraint)
376
- : this._private_solver?.removeConstraint(description.constraint);
398
+ ? this.solver?.addConstraint(description.constraint)
399
+ : this.solver?.removeConstraint(description.constraint);
377
400
  }
378
401
  catch {
379
- this._private_solver = undefined;
402
+ this.solver = undefined;
380
403
  }
381
- this._private_recalculationRequired = true;
404
+ this.recalculationRequired = true;
382
405
  this.dirty = true;
383
406
  }
384
407
  }
@@ -389,30 +412,30 @@ class UISolverWrapper {
389
412
  * updates the variable configuration, then rebuilds and re-adds
390
413
  * the dependent constraints.
391
414
  */
392
- _private_rebuildVariable(index, description) {
415
+ rebuildVariable(index, description) {
393
416
  const dependConstraints = [];
394
- for (const cDescription of this._private_constraints.values()) {
417
+ for (const cDescription of this.constraints.values()) {
395
418
  if (cDescription.lhs.hasTerm(index) || cDescription.rhs.hasTerm(index)) {
396
419
  try {
397
- this._private_solver?.removeConstraint(cDescription.constraint);
420
+ this.solver?.removeConstraint(cDescription.constraint);
398
421
  }
399
422
  catch {
400
- this._private_solver = undefined;
423
+ this.solver = undefined;
401
424
  }
402
425
  dependConstraints.push(cDescription);
403
426
  }
404
427
  }
405
- this._private_solver?.removeEditVariable(description.variable);
406
- this._private_solver?.addEditVariable(description.variable, convertPriority(description.priority));
428
+ this.solver?.removeEditVariable(description.variable);
429
+ this.solver?.addEditVariable(description.variable, convertPriority(description.priority));
407
430
  for (const cDescription of dependConstraints) {
408
- cDescription.constraint = this._private_buildConstraint(cDescription.lhs, cDescription.rhs, cDescription.relation, cDescription.priority);
431
+ cDescription.constraint = this.buildConstraint(cDescription.lhs, cDescription.rhs, cDescription.relation, cDescription.priority);
409
432
  }
410
433
  for (const cDescription of dependConstraints) {
411
434
  try {
412
- this._private_solver?.addConstraint(cDescription.constraint);
435
+ this.solver?.addConstraint(cDescription.constraint);
413
436
  }
414
437
  catch {
415
- this._private_solver = undefined;
438
+ this.solver = undefined;
416
439
  break;
417
440
  }
418
441
  }
@@ -423,29 +446,29 @@ class UISolverWrapper {
423
446
  * Uses different rebuild strategies depending on whether the
424
447
  * constraint is currently enabled.
425
448
  */
426
- _private_rebuildConstraintByDescription(description) {
449
+ rebuildConstraintByDescription(description) {
427
450
  description.constraint = description.enabled
428
- ? this._private_rebuildConstraint(description.constraint, description.lhs, description.rhs, description.relation, description.priority)
429
- : this._private_buildConstraint(description.lhs, description.rhs, description.relation, description.priority);
451
+ ? this.rebuildConstraint(description.constraint, description.lhs, description.rhs, description.relation, description.priority)
452
+ : this.buildConstraint(description.lhs, description.rhs, description.relation, description.priority);
430
453
  }
431
454
  /**
432
455
  * Rebuilds a constraint by removing the old one and creating a new one.
433
456
  *
434
457
  * Safely handles solver state transitions and constraint replacement.
435
458
  */
436
- _private_rebuildConstraint(oldConstraint, lhs, rhs, relation, priority) {
459
+ rebuildConstraint(oldConstraint, lhs, rhs, relation, priority) {
437
460
  try {
438
- this._private_solver?.removeConstraint(oldConstraint);
461
+ this.solver?.removeConstraint(oldConstraint);
439
462
  }
440
463
  catch {
441
- this._private_solver = undefined;
464
+ this.solver = undefined;
442
465
  }
443
- const constraint = this._private_buildConstraint(lhs, rhs, relation, priority);
466
+ const constraint = this.buildConstraint(lhs, rhs, relation, priority);
444
467
  try {
445
- this._private_solver?.addConstraint(constraint);
468
+ this.solver?.addConstraint(constraint);
446
469
  }
447
470
  catch {
448
- this._private_solver = undefined;
471
+ this.solver = undefined;
449
472
  }
450
473
  return constraint;
451
474
  }
@@ -454,8 +477,8 @@ class UISolverWrapper {
454
477
  *
455
478
  * Converts UI-level expressions and enums to Kiwi-compatible formats.
456
479
  */
457
- _private_buildConstraint(lhs, rhs, relation, priority) {
458
- return new Constraint(this._private_convertExpression(lhs), convertRelation(relation), this._private_convertExpression(rhs), convertPriority(priority));
480
+ buildConstraint(lhs, rhs, relation, priority) {
481
+ return new Constraint(this.convertExpression(lhs), convertRelation(relation), this.convertExpression(rhs), convertPriority(priority));
459
482
  }
460
483
  /**
461
484
  * Converts a UIExpression to a Kiwi Expression.
@@ -463,11 +486,11 @@ class UISolverWrapper {
463
486
  * Maps variable indices to their corresponding Kiwi Variable instances
464
487
  * and preserves coefficients and constants.
465
488
  */
466
- _private_convertExpression(expression) {
489
+ convertExpression(expression) {
467
490
  return new Expression(...expression.prepareTerms().map(([variableIndex, coefficient]) => {
468
- const description = this._private_variables.get(variableIndex);
491
+ const description = this.variables.get(variableIndex);
469
492
  if (description === undefined) {
470
- throw new Error(`UISolverWrapper.convertExpression.expression: variable does not exist`);
493
+ throw new Error(`UISolverWrapper.convertExpression.expression: variable ${variableIndex} does not exist; its element may be destroyed`);
471
494
  }
472
495
  return [coefficient, description.variable];
473
496
  }), expression.constant);
@@ -485,12 +508,12 @@ class UISolverWrapper {
485
508
  * already in. The fresh solver is only published once the replay is complete,
486
509
  * so a rejection can never leave a half-built solver in place.
487
510
  */
488
- _private_rebuildSolver() {
489
- if (this._private_solver) {
511
+ rebuildSolver() {
512
+ if (this.solver) {
490
513
  throw new Error("UISolverWrapper.rebuildSolver: solver already exists");
491
514
  }
492
515
  const solver = new Solver();
493
- for (const description of this._private_variables.values()) {
516
+ for (const description of this.variables.values()) {
494
517
  try {
495
518
  if (description.constraint) {
496
519
  solver.addConstraint(description.constraint);
@@ -504,7 +527,7 @@ class UISolverWrapper {
504
527
  continue;
505
528
  }
506
529
  }
507
- for (const description of this._private_constraints.values()) {
530
+ for (const description of this.constraints.values()) {
508
531
  if (description.enabled) {
509
532
  try {
510
533
  solver.addConstraint(description.constraint);
@@ -514,10 +537,8 @@ class UISolverWrapper {
514
537
  }
515
538
  }
516
539
  }
517
- this._private_solver = solver;
518
- this._private_recalculationRequired = true;
540
+ this.solver = solver;
541
+ this.recalculationRequired = true;
519
542
  this.dirty = true;
520
543
  }
521
544
  }
522
-
523
- export { UISolverWrapper };
@@ -1,6 +1,6 @@
1
- import type { UIAspectConstraint } from "../core";
2
- import { UIColor } from "../core";
3
- import type { UIConstraintDebug } from "./UIConstraintDebug";
1
+ import type { UIAspectConstraint } from "../core/index.js";
2
+ import { UIColor } from "../core/index.js";
3
+ import type { UIConstraintDebug } from "./UIConstraintDebug.js";
4
4
  export declare class UIAspectDebug implements UIConstraintDebug {
5
5
  readonly constraint: UIAspectConstraint;
6
6
  readonly tint: UIColor;