laymur 0.11.3 → 0.11.5

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 (58) hide show
  1. package/README.md +0 -1
  2. package/dist/constraints/{UIAspectConstraint.Internal.d.ts → UIAspectConstraint/UIAspectConstraint.Internal.d.ts} +1 -1
  3. package/dist/constraints/{UIAspectConstraint.d.ts → UIAspectConstraint/UIAspectConstraint.d.ts} +2 -2
  4. package/dist/constraints/{UIHeightConstraint.Internal.d.ts → UIHeightConstraint/UIHeightConstraint.Internal.d.ts} +1 -1
  5. package/dist/constraints/{UIHeightConstraint.d.ts → UIHeightConstraint/UIHeightConstraint.d.ts} +2 -2
  6. package/dist/constraints/{UIHorizontalDistanceConstraint.Internal.d.ts → UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts} +1 -1
  7. package/dist/constraints/{UIHorizontalDistanceConstraint.d.ts → UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts} +2 -2
  8. package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +14 -0
  9. package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +44 -0
  10. package/dist/constraints/{UIHorizontalProportionConstraint.Internal.d.ts → UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts} +1 -1
  11. package/dist/constraints/{UIHorizontalProportionConstraint.d.ts → UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts} +2 -2
  12. package/dist/constraints/{UIVerticalDistanceConstraint.Internal.d.ts → UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts} +1 -1
  13. package/dist/constraints/{UIVerticalDistanceConstraint.d.ts → UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts} +2 -2
  14. package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +14 -0
  15. package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +44 -0
  16. package/dist/constraints/{UIVerticalProportionConstraint.Internal.d.ts → UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts} +1 -1
  17. package/dist/constraints/{UIVerticalProportionConstraint.d.ts → UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts} +2 -2
  18. package/dist/constraints/{UIWidthConstraint.Internal.d.ts → UIWidthConstraint/UIWidthConstraint.Internal.d.ts} +1 -1
  19. package/dist/constraints/{UIWidthConstraint.d.ts → UIWidthConstraint/UIWidthConstraint.d.ts} +2 -2
  20. package/dist/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +21 -2
  21. package/dist/constraints/builders/UIConstraint2DBuilder.d.ts +20 -9
  22. package/dist/constraints/builders/UICoverConstraintBuilder.d.ts +6 -6
  23. package/dist/constraints/builders/UIFitConstraintBuilder.d.ts +6 -6
  24. package/dist/elements/{UIAnchor.d.ts → UIAnchor/UIAnchor.d.ts} +3 -3
  25. package/dist/elements/{UIAnimatedImage.Internal.d.ts → UIAnimatedImage/UIAnimatedImage.Internal.d.ts} +2 -2
  26. package/dist/elements/{UIAnimatedImage.d.ts → UIAnimatedImage/UIAnimatedImage.d.ts} +6 -6
  27. package/dist/elements/UIElement/UIElement.Internal.d.ts +11 -0
  28. package/dist/elements/{UIElement.d.ts → UIElement/UIElement.d.ts} +9 -9
  29. package/dist/elements/{UIGraphics.Internal.d.ts → UIGraphics/UIGraphics.Internal.d.ts} +2 -2
  30. package/dist/elements/{UIGraphics.d.ts → UIGraphics/UIGraphics.d.ts} +3 -3
  31. package/dist/elements/{UIImage.Internal.d.ts → UIImage/UIImage.Internal.d.ts} +2 -2
  32. package/dist/elements/{UIImage.d.ts → UIImage/UIImage.d.ts} +6 -6
  33. package/dist/elements/{UIDummy.Internal.d.ts → UIInputDummy/UIInputDummy.Internal.d.ts} +5 -5
  34. package/dist/elements/{UIDummy.d.ts → UIInputDummy/UIInputDummy.d.ts} +11 -11
  35. package/dist/elements/{UINineSlice.Internal.d.ts → UINineSlice/UINineSlice.Internal.d.ts} +5 -5
  36. package/dist/elements/{UINineSlice.d.ts → UINineSlice/UINineSlice.d.ts} +9 -9
  37. package/dist/elements/{UIProgress.Internal.d.ts → UIProgress/UIProgress.Internal.d.ts} +3 -3
  38. package/dist/elements/{UIProgress.d.ts → UIProgress/UIProgress.d.ts} +10 -9
  39. package/dist/elements/{UIScene.Internal.d.ts → UIScene/UIScene.Internal.d.ts} +3 -3
  40. package/dist/elements/{UIScene.d.ts → UIScene/UIScene.d.ts} +3 -3
  41. package/dist/elements/UIText/UIText.Internal.d.ts +3 -3
  42. package/dist/elements/UIText/UIText.d.ts +3 -3
  43. package/dist/index.d.ts +19 -17
  44. package/dist/index.js +893 -295
  45. package/dist/index.js.map +1 -1
  46. package/dist/index.min.js +1 -1
  47. package/dist/index.min.js.map +1 -1
  48. package/dist/layers/UILayer.d.ts +1 -1
  49. package/dist/miscellaneous/asserts.d.ts +21 -54
  50. package/dist/miscellaneous/color/UIColor.d.ts +1 -0
  51. package/dist/miscellaneous/insets/UIInsets.Internal.d.ts +11 -0
  52. package/dist/miscellaneous/{padding/UIPadding.d.ts → insets/UIInsets.d.ts} +15 -15
  53. package/dist/miscellaneous/shared.d.ts +46 -0
  54. package/dist/miscellaneous/texture/UITextureView.d.ts +13 -9
  55. package/package.json +6 -3
  56. package/dist/elements/UIElement.Internal.d.ts +0 -11
  57. package/dist/miscellaneous/padding/UIPadding.Internal.d.ts +0 -11
  58. /package/dist/elements/{UIAnchor.Internal.d.ts → UIAnchor/UIAnchor.Internal.d.ts} +0 -0
package/README.md CHANGED
@@ -77,7 +77,6 @@ animate();
77
77
  - **UIProgress** - Progress bars
78
78
  - **UINineSlice** - Scalable UI panels with border preservation
79
79
  - **UIAnchor** - Positioning points
80
- - **UIDummy** - Invisible layout helpers
81
80
 
82
81
  ### Constraints
83
82
  - **UIWidthConstraint** / **UIHeightConstraint** - Fixed sizes
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
2
  /** Aspect constraint options */
3
3
  export interface UIAspectConstraintOptions extends UISingleParameterConstraintOptions {
4
4
  /** Target aspect ratio (width/height) */
@@ -1,6 +1,6 @@
1
- import type { UILayerElement, UIPlaneElement } from "../miscellaneous/asserts";
1
+ import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
2
3
  import type { UIAspectConstraintOptions } from "./UIAspectConstraint.Internal";
3
- import { UISingleParameterConstraint } from "./UISingleParameterConstraint";
4
4
  /** Maintains element aspect ratio (width = height * aspect) */
5
5
  export declare class UIAspectConstraint extends UISingleParameterConstraint {
6
6
  private readonly element;
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
2
  /** Height constraint options */
3
3
  export interface UIHeightConstraintOptions extends UISingleParameterConstraintOptions {
4
4
  /** Target height in world units */
@@ -1,6 +1,6 @@
1
- import type { UILayerElement, UIPlaneElement } from "../miscellaneous/asserts";
1
+ import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
2
3
  import type { UIHeightConstraintOptions } from "./UIHeightConstraint.Internal";
3
- import { UISingleParameterConstraint } from "./UISingleParameterConstraint";
4
4
  /** Fixes element height to constant value */
5
5
  export declare class UIHeightConstraint extends UISingleParameterConstraint {
6
6
  private readonly element;
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
2
  export declare const DEFAULT_ANCHOR = 0.5;
3
3
  /** Horizontal distance constraint options */
4
4
  export interface UIHorizontalDistanceConstraintOptions extends UISingleParameterConstraintOptions {
@@ -1,6 +1,6 @@
1
- import type { UIPlaneElement, UIPointElement } from "../miscellaneous/asserts";
1
+ import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
2
3
  import type { UIHorizontalDistanceConstraintOptions } from "./UIHorizontalDistanceConstraint.Internal";
3
- import { UISingleParameterConstraint } from "./UISingleParameterConstraint";
4
4
  /** Maintains horizontal distance between elements with configurable anchors */
5
5
  export declare class UIHorizontalDistanceConstraint extends UISingleParameterConstraint {
6
6
  private readonly a;
@@ -0,0 +1,14 @@
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
+ export declare const DEFAULT_ANCHOR = 0.5;
3
+ export declare const DEFAULT_T = 0.5;
4
+ /** Horizontal interpolation constraint options */
5
+ export interface UIHorizontalInterpolationConstraintOptions extends UISingleParameterConstraintOptions {
6
+ /** Anchor on element A (0 = left, 0.5 = center, 1 = right) */
7
+ anchorA: number;
8
+ /** Anchor on element B (0 = left, 0.5 = center, 1 = right) */
9
+ anchorB: number;
10
+ /** Anchor on element C (0 = left, 0.5 = center, 1 = right) */
11
+ anchorC: number;
12
+ /** Interpolation factor (0 = A position, 1 = B position) */
13
+ t: number;
14
+ }
@@ -0,0 +1,44 @@
1
+ import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
3
+ import type { UIHorizontalInterpolationConstraintOptions } from "./UIHorizontalInterpolationConstraint.Internal";
4
+ /** Positions element C horizontally between A and B based on interpolation factor */
5
+ export declare class UIHorizontalInterpolationConstraint extends UISingleParameterConstraint {
6
+ private readonly a;
7
+ private readonly b;
8
+ private readonly c;
9
+ /** Solver constraint descriptor */
10
+ protected readonly constraint: number;
11
+ /** Anchor on element A */
12
+ private anchorAInternal;
13
+ /** Anchor on element B */
14
+ private anchorBInternal;
15
+ /** Anchor on element C */
16
+ private anchorCInternal;
17
+ /** Interpolation factor */
18
+ private tInternal;
19
+ /**
20
+ * @param a First element
21
+ * @param b Second element
22
+ * @param c Element to position between A and B
23
+ * @param options Interpolation configuration
24
+ */
25
+ constructor(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, c: UIPointElement | UIPlaneElement, options?: Partial<UIHorizontalInterpolationConstraintOptions>);
26
+ /** Interpolation factor (0 = A position, 1 = B position) */
27
+ get t(): number;
28
+ /** Anchor on element A (0 = left, 0.5 = center, 1 = right) */
29
+ get anchorA(): number;
30
+ /** Anchor on element B (0 = left, 0.5 = center, 1 = right) */
31
+ get anchorB(): number;
32
+ /** Anchor on element C (0 = left, 0.5 = center, 1 = right) */
33
+ get anchorC(): number;
34
+ /** Updates interpolation factor */
35
+ set t(value: number);
36
+ /** Updates anchor on element A */
37
+ set anchorA(value: number);
38
+ /** Updates anchor on element B */
39
+ set anchorB(value: number);
40
+ /** Updates anchor on element C */
41
+ set anchorC(value: number);
42
+ /** Builds constraint expression: C - A*(1-t) - B*t = 0 */
43
+ private buildLHS;
44
+ }
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
2
  /** Horizontal proportion constraint options */
3
3
  export interface UIHorizontalProportionConstraintOptions extends UISingleParameterConstraintOptions {
4
4
  /** Proportion multiplier (A.width * proportion = B.width) */
@@ -1,6 +1,6 @@
1
- import type { UIPlaneElement } from "../miscellaneous/asserts";
1
+ import type { UIPlaneElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
2
3
  import type { UIHorizontalProportionConstraintOptions } from "./UIHorizontalProportionConstraint.Internal";
3
- import { UISingleParameterConstraint } from "./UISingleParameterConstraint";
4
4
  /** Maintains proportional width relationship (A.width * proportion = B.width) */
5
5
  export declare class UIHorizontalProportionConstraint extends UISingleParameterConstraint {
6
6
  private readonly a;
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
2
  export declare const DEFAULT_ANCHOR = 0.5;
3
3
  /** Vertical distance constraint options */
4
4
  export interface UIVerticalDistanceConstraintOptions extends UISingleParameterConstraintOptions {
@@ -1,5 +1,5 @@
1
- import type { UIPlaneElement, UIPointElement } from "../miscellaneous/asserts";
2
- import { UISingleParameterConstraint } from "./UISingleParameterConstraint";
1
+ import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
3
3
  import type { UIVerticalDistanceConstraintOptions } from "./UIVerticalDistanceConstraint.Internal";
4
4
  /** Maintains vertical distance between elements with configurable anchors */
5
5
  export declare class UIVerticalDistanceConstraint extends UISingleParameterConstraint {
@@ -0,0 +1,14 @@
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
+ export declare const DEFAULT_ANCHOR = 0.5;
3
+ export declare const DEFAULT_T = 0.5;
4
+ /** Vertical interpolation constraint options */
5
+ export interface UIVerticalInterpolationConstraintOptions extends UISingleParameterConstraintOptions {
6
+ /** Anchor on element A (0 = bottom, 0.5 = center, 1 = top) */
7
+ anchorA: number;
8
+ /** Anchor on element B (0 = bottom, 0.5 = center, 1 = top) */
9
+ anchorB: number;
10
+ /** Anchor on element C (0 = bottom, 0.5 = center, 1 = top) */
11
+ anchorC: number;
12
+ /** Interpolation factor (0 = A position, 1 = B position) */
13
+ t: number;
14
+ }
@@ -0,0 +1,44 @@
1
+ import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
3
+ import type { UIVerticalInterpolationConstraintOptions } from "./UIVerticalInterpolationConstraint.Internal";
4
+ /** Positions element C vertically between A and B based on interpolation factor */
5
+ export declare class UIVerticalInterpolationConstraint extends UISingleParameterConstraint {
6
+ private readonly a;
7
+ private readonly b;
8
+ private readonly c;
9
+ /** Solver constraint descriptor */
10
+ protected readonly constraint: number;
11
+ /** Anchor on element A */
12
+ private anchorAInternal;
13
+ /** Anchor on element B */
14
+ private anchorBInternal;
15
+ /** Anchor on element C */
16
+ private anchorCInternal;
17
+ /** Interpolation factor */
18
+ private tInternal;
19
+ /**
20
+ * @param a First element
21
+ * @param b Second element
22
+ * @param c Element to position between A and B
23
+ * @param options Interpolation configuration
24
+ */
25
+ constructor(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, c: UIPointElement | UIPlaneElement, options?: Partial<UIVerticalInterpolationConstraintOptions>);
26
+ /** Interpolation factor (0 = A position, 1 = B position) */
27
+ get t(): number;
28
+ /** Anchor on element A (0 = bottom, 0.5 = center, 1 = top) */
29
+ get anchorA(): number;
30
+ /** Anchor on element B (0 = bottom, 0.5 = center, 1 = top) */
31
+ get anchorB(): number;
32
+ /** Anchor on element C (0 = bottom, 0.5 = center, 1 = top) */
33
+ get anchorC(): number;
34
+ /** Updates interpolation factor */
35
+ set t(value: number);
36
+ /** Updates anchor on element A */
37
+ set anchorA(value: number);
38
+ /** Updates anchor on element B */
39
+ set anchorB(value: number);
40
+ /** Updates anchor on element C */
41
+ set anchorC(value: number);
42
+ /** Builds constraint expression: C - A*(1-t) - B*t = 0 */
43
+ private buildLHS;
44
+ }
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
2
  /** Vertical proportion constraint options */
3
3
  export interface UIVerticalProportionConstraintOptions extends UISingleParameterConstraintOptions {
4
4
  /** Proportion multiplier (A.height * proportion = B.height) */
@@ -1,5 +1,5 @@
1
- import type { UIPlaneElement } from "../miscellaneous/asserts";
2
- import { UISingleParameterConstraint } from "./UISingleParameterConstraint";
1
+ import type { UIPlaneElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
3
3
  import type { UIVerticalProportionConstraintOptions } from "./UIVerticalProportionConstraint.Internal";
4
4
  /** Maintains proportional height relationship (A.height * proportion = B.height) */
5
5
  export declare class UIVerticalProportionConstraint extends UISingleParameterConstraint {
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint.Internal";
2
2
  /** Width constraint options */
3
3
  export interface UIWidthConstraintOptions extends UISingleParameterConstraintOptions {
4
4
  /** Target width in world units */
@@ -1,5 +1,5 @@
1
- import type { UILayerElement, UIPlaneElement } from "../miscellaneous/asserts";
2
- import { UISingleParameterConstraint } from "./UISingleParameterConstraint";
1
+ import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint";
3
3
  import type { UIWidthConstraintOptions } from "./UIWidthConstraint.Internal";
4
4
  /** Fixes element width to constant value */
5
5
  export declare class UIWidthConstraint extends UISingleParameterConstraint {
@@ -1,13 +1,21 @@
1
1
  import type { UIOrientation } from "../../miscellaneous/UIOrientation";
2
2
  import type { UIPriority } from "../../miscellaneous/UIPriority";
3
3
  import type { UIRelation } from "../../miscellaneous/UIRelation";
4
- /** Horizontal and vertical values */
5
- export interface UIType2D<T> {
4
+ /** Horizontal and vertical values object */
5
+ export interface UIType2DObject<T> {
6
6
  /** Horizontal value */
7
7
  h?: T;
8
8
  /** Vertical value */
9
9
  v?: T;
10
10
  }
11
+ /** Horizontal and vertical values as object, tuple, or single value */
12
+ export type UIType2D<T> = UIType2DObject<T> | [T, T] | T;
13
+ /**
14
+ * Normalizes UIType2D input to object form.
15
+ * @param value Object, tuple, or single value
16
+ * @returns Normalized object with h and v properties
17
+ */
18
+ export declare function normalizeUIType2D<T>(value: UIType2D<T> | undefined): UIType2DObject<T>;
11
19
  /** Base 2D constraint options */
12
20
  export interface UIConstraint2DOptions {
13
21
  /** Priority for each axis */
@@ -36,6 +44,17 @@ export interface UIConstraintProportion2DOptions extends UIConstraint2DOptions {
36
44
  /** Proportion for each axis */
37
45
  proportion: UIType2D<number>;
38
46
  }
47
+ /** 2D interpolation constraint options */
48
+ export interface UIConstraintInterpolation2DOptions extends UIConstraint2DOptions {
49
+ /** Anchor on element A for each axis */
50
+ anchorA: UIType2D<number>;
51
+ /** Anchor on element B for each axis */
52
+ anchorB: UIType2D<number>;
53
+ /** Anchor on element C for each axis */
54
+ anchorC: UIType2D<number>;
55
+ /** Interpolation factor for each axis */
56
+ t: UIType2D<number>;
57
+ }
39
58
  /** Horizontal and vertical constraint pair */
40
59
  export interface UIConstraint2DResult<TH, TV> {
41
60
  /** Horizontal constraint */
@@ -1,12 +1,14 @@
1
- import { UIHeightConstraint } from "../../constraints/UIHeightConstraint";
2
- import { UIHorizontalDistanceConstraint } from "../../constraints/UIHorizontalDistanceConstraint";
3
- import { UIHorizontalProportionConstraint } from "../../constraints/UIHorizontalProportionConstraint";
4
- import { UIVerticalDistanceConstraint } from "../../constraints/UIVerticalDistanceConstraint";
5
- import { UIVerticalProportionConstraint } from "../../constraints/UIVerticalProportionConstraint";
6
- import { UIWidthConstraint } from "../../constraints/UIWidthConstraint";
7
- import type { UIElement } from "../../elements/UIElement";
8
- import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/asserts";
9
- import type { UIConstraint2DResult, UIConstraintDistance2DOptions, UIConstraintProportion2DOptions, UIConstraintSize2DOptions } from "./UIConstraint2DBuilder.Internal";
1
+ import type { UIElement } from "../../elements/UIElement/UIElement";
2
+ import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
3
+ import { UIHeightConstraint } from "../UIHeightConstraint/UIHeightConstraint";
4
+ import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
5
+ import { UIHorizontalInterpolationConstraint } from "../UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint";
6
+ import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
7
+ import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
8
+ import { UIVerticalInterpolationConstraint } from "../UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint";
9
+ import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
10
+ import { UIWidthConstraint } from "../UIWidthConstraint/UIWidthConstraint";
11
+ import type { UIConstraint2DResult, UIConstraintDistance2DOptions, UIConstraintInterpolation2DOptions, UIConstraintProportion2DOptions, UIConstraintSize2DOptions } from "./UIConstraint2DBuilder.Internal";
10
12
  /** Builder for paired horizontal and vertical constraints */
11
13
  export declare class UIConstraint2DBuilder {
12
14
  /**
@@ -32,4 +34,13 @@ export declare class UIConstraint2DBuilder {
32
34
  * @returns Horizontal and vertical proportion constraints
33
35
  */
34
36
  static proportion(a: UIPlaneElement, b: UIPlaneElement, options?: Partial<UIConstraintProportion2DOptions>): UIConstraint2DResult<UIHorizontalProportionConstraint, UIVerticalProportionConstraint>;
37
+ /**
38
+ * Creates horizontal and vertical interpolation constraints.
39
+ * @param a First element
40
+ * @param b Second element
41
+ * @param c Element to position between A and B
42
+ * @param options Interpolation configuration for both axes
43
+ * @returns Horizontal and vertical interpolation constraints
44
+ */
45
+ static interpolation(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, c: UIPointElement | UIPlaneElement, options?: Partial<UIConstraintInterpolation2DOptions>): UIConstraint2DResult<UIHorizontalInterpolationConstraint, UIVerticalInterpolationConstraint>;
35
46
  }
@@ -1,9 +1,9 @@
1
- import { UIHorizontalDistanceConstraint } from "../../constraints/UIHorizontalDistanceConstraint";
2
- import { UIHorizontalProportionConstraint } from "../../constraints/UIHorizontalProportionConstraint";
3
- import { UIVerticalDistanceConstraint } from "../../constraints/UIVerticalDistanceConstraint";
4
- import { UIVerticalProportionConstraint } from "../../constraints/UIVerticalProportionConstraint";
5
- import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/asserts";
6
- import { UIAspectConstraint } from "../UIAspectConstraint";
1
+ import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
2
+ import { UIAspectConstraint } from "../UIAspectConstraint/UIAspectConstraint";
3
+ import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
4
+ import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
5
+ import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
6
+ import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
7
7
  import type { UICoverConstraintBuilderOptions } from "./UICoverConstraintBuilder.Internal";
8
8
  /** Builder for cover layout (like CSS object-fit: cover) */
9
9
  export declare class UICoverConstraintBuilder {
@@ -1,9 +1,9 @@
1
- import { UIHorizontalDistanceConstraint } from "../../constraints/UIHorizontalDistanceConstraint";
2
- import { UIHorizontalProportionConstraint } from "../../constraints/UIHorizontalProportionConstraint";
3
- import { UIVerticalDistanceConstraint } from "../../constraints/UIVerticalDistanceConstraint";
4
- import { UIVerticalProportionConstraint } from "../../constraints/UIVerticalProportionConstraint";
5
- import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/asserts";
6
- import { UIAspectConstraint } from "../UIAspectConstraint";
1
+ import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
2
+ import { UIAspectConstraint } from "../UIAspectConstraint/UIAspectConstraint";
3
+ import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
4
+ import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
5
+ import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
6
+ import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
7
7
  import type { UIFitConstraintBuilderOptions } from "./UIFitConstraintBuilder.Internal";
8
8
  /** Builder for fit layout (like CSS object-fit: contain) */
9
9
  export declare class UIFitConstraintBuilder {
@@ -1,7 +1,7 @@
1
1
  import { Eventail } from "eventail";
2
- import type { UILayer } from "../layers/UILayer";
3
- import type { UILayerElement, UIPointElement } from "../miscellaneous/asserts";
4
- import type { UISolverWrapperInterface } from "../wrappers/UISolverWrapper.Internal";
2
+ import type { UILayer } from "../../layers/UILayer";
3
+ import type { UILayerElement, UIPointElement } from "../../miscellaneous/shared";
4
+ import type { UISolverWrapperInterface } from "../../wrappers/UISolverWrapper.Internal";
5
5
  import type { UIAnchorOptions } from "./UIAnchor.Internal";
6
6
  /** Point in 2D space with constraint-based positioning */
7
7
  export declare class UIAnchor extends Eventail implements UILayerElement, UIPointElement {
@@ -1,5 +1,5 @@
1
- import type { UIColorConfig } from "../miscellaneous/color/UIColor.Internal";
2
- import type { UIElementOptions } from "./UIElement.Internal";
1
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
+ import type { UIElementOptions } from "../UIElement/UIElement.Internal";
3
3
  /** Animation playback events */
4
4
  export declare enum UIAnimatedImageEvent {
5
5
  /** Animation started or resumed */
@@ -1,10 +1,10 @@
1
1
  import type { WebGLRenderer } from "three";
2
- import type { UILayer } from "../layers/UILayer";
3
- import { UIColor } from "../miscellaneous/color/UIColor";
4
- import { UITextureView } from "../miscellaneous/texture/UITextureView";
5
- import type { UITextureConfig } from "../miscellaneous/texture/UITextureView.Internal";
2
+ import type { UILayer } from "../../layers/UILayer";
3
+ import { UIColor } from "../../miscellaneous/color/UIColor";
4
+ import { UITextureView } from "../../miscellaneous/texture/UITextureView";
5
+ import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
6
+ import { UIElement } from "../UIElement/UIElement";
6
7
  import type { UIAnimatedImageOptions } from "./UIAnimatedImage.Internal";
7
- import { UIElement } from "./UIElement";
8
8
  /** Frame-based texture animation element */
9
9
  export declare class UIAnimatedImage extends UIElement {
10
10
  /** Multiplicative tint. Alpha channel controls opacity. */
@@ -50,7 +50,7 @@ export declare class UIAnimatedImage extends UIElement {
50
50
  /** Stops animation and resets to first frame */
51
51
  stop(): void;
52
52
  protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
53
- protected updatePlaneTransform(): void;
53
+ protected setPlaneTransform(): void;
54
54
  private readonly onTextureDimensionsChanged;
55
55
  private subscribeSequenceEvents;
56
56
  private unsubscribeSequenceEvents;
@@ -0,0 +1,11 @@
1
+ import type { UIMicroConfig } from "../../miscellaneous/micro/UIMicro.Internal";
2
+ import { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
3
+ import type { UIInputDummyOptions } from "../UIInputDummy/UIInputDummy.Internal";
4
+ /** Configuration options for UIElement */
5
+ export interface UIElementOptions extends UIInputDummyOptions {
6
+ /** Transforms that don't affect constraints */
7
+ micro: UIMicroConfig;
8
+ /** Alpha blending mode */
9
+ transparencyMode: UITransparencyMode;
10
+ }
11
+ export declare const ELEMENT_DEFAULT_TRANSPARENCY_MODE = UITransparencyMode.BLEND;
@@ -1,14 +1,14 @@
1
1
  import type { WebGLRenderer } from "three";
2
- import type { UILayer } from "../layers/UILayer";
3
- import type { UIPropertyType } from "../miscellaneous/generic-plane/shared";
4
- import { UIMicro } from "../miscellaneous/micro/UIMicro";
5
- import type { UIMode } from "../miscellaneous/UIMode";
6
- import type { UITransparencyMode } from "../miscellaneous/UITransparencyMode";
7
- import type { UISceneWrapperInterface } from "../wrappers/UISceneWrapper.Internal";
8
- import { UIDummy } from "./UIDummy";
2
+ import type { UILayer } from "../../layers/UILayer";
3
+ import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
4
+ import { UIMicro } from "../../miscellaneous/micro/UIMicro";
5
+ import type { UIMode } from "../../miscellaneous/UIMode";
6
+ import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
7
+ import type { UISceneWrapperInterface } from "../../wrappers/UISceneWrapper.Internal";
8
+ import { UIInputDummy } from "../UIInputDummy/UIInputDummy";
9
9
  import type { UIElementOptions } from "./UIElement.Internal";
10
10
  /** Base class for renderable UI elements */
11
- export declare abstract class UIElement extends UIDummy {
11
+ export declare abstract class UIElement extends UIInputDummy {
12
12
  /** Transforms that don't affect constraints */
13
13
  readonly micro: UIMicro;
14
14
  protected readonly sceneWrapper: UISceneWrapperInterface;
@@ -32,6 +32,6 @@ export declare abstract class UIElement extends UIDummy {
32
32
  set mode(value: UIMode);
33
33
  /** Removes element and frees resources */
34
34
  destroy(): void;
35
- protected updatePlaneTransform(): void;
35
+ protected setPlaneTransform(): void;
36
36
  protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
37
37
  }
@@ -1,5 +1,5 @@
1
- import type { UIColorConfig } from "../miscellaneous/color/UIColor.Internal";
2
- import type { UIElementOptions } from "./UIElement.Internal";
1
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
+ import type { UIElementOptions } from "../UIElement/UIElement.Internal";
3
3
  /** Configuration options for UIGraphics */
4
4
  export interface UIGraphicsOptions extends UIElementOptions {
5
5
  /** Multiplicative tint */
@@ -1,7 +1,7 @@
1
1
  import type { WebGLRenderer } from "three";
2
- import type { UILayer } from "../layers/UILayer";
3
- import { UIColor } from "../miscellaneous/color/UIColor";
4
- import { UIElement } from "./UIElement";
2
+ import type { UILayer } from "../../layers/UILayer";
3
+ import { UIColor } from "../../miscellaneous/color/UIColor";
4
+ import { UIElement } from "../UIElement/UIElement";
5
5
  import type { UIGraphicsOptions } from "./UIGraphics.Internal";
6
6
  /** Canvas-based 2D drawing element */
7
7
  export declare class UIGraphics extends UIElement {
@@ -1,5 +1,5 @@
1
- import type { UIColorConfig } from "../miscellaneous/color/UIColor.Internal";
2
- import type { UIElementOptions } from "./UIElement.Internal";
1
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
+ import type { UIElementOptions } from "../UIElement/UIElement.Internal";
3
3
  /** Configuration options for UIImage */
4
4
  export interface UIImageOptions extends UIElementOptions {
5
5
  /** Multiplicative tint */
@@ -1,8 +1,8 @@
1
- import type { UILayer } from "../layers/UILayer";
2
- import { UIColor } from "../miscellaneous/color/UIColor";
3
- import { UITextureView } from "../miscellaneous/texture/UITextureView";
4
- import type { UITextureConfig } from "../miscellaneous/texture/UITextureView.Internal";
5
- import { UIElement } from "./UIElement";
1
+ import type { UILayer } from "../../layers/UILayer";
2
+ import { UIColor } from "../../miscellaneous/color/UIColor";
3
+ import { UITextureView } from "../../miscellaneous/texture/UITextureView";
4
+ import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
5
+ import { UIElement } from "../UIElement/UIElement";
6
6
  import type { UIImageOptions } from "./UIImage.Internal";
7
7
  /** Textured image element */
8
8
  export declare class UIImage extends UIElement {
@@ -23,6 +23,6 @@ export declare class UIImage extends UIElement {
23
23
  constructor(layer: UILayer, texture: UITextureConfig, options?: Partial<UIImageOptions>);
24
24
  /** Removes image and frees resources */
25
25
  destroy(): void;
26
- protected updatePlaneTransform(): void;
26
+ protected setPlaneTransform(): void;
27
27
  private readonly onTextureDimensionsChanged;
28
28
  }
@@ -1,8 +1,8 @@
1
- import type { UIArea } from "../miscellaneous/area/UIArea";
2
- import { UIMode } from "../miscellaneous/UIMode";
3
- import type { UIAnchorOptions } from "./UIAnchor.Internal";
4
- /** Configuration options for UIDummy */
5
- export interface UIDummyOptions extends UIAnchorOptions {
1
+ import type { UIArea } from "../../miscellaneous/area/UIArea";
2
+ import { UIMode } from "../../miscellaneous/UIMode";
3
+ import type { UIAnchorOptions } from "../UIAnchor/UIAnchor.Internal";
4
+ /** Configuration options for UIInputDummy */
5
+ export interface UIInputDummyOptions extends UIAnchorOptions {
6
6
  /** Width in world units */
7
7
  width: number;
8
8
  /** Height in world units */
@@ -1,13 +1,13 @@
1
- import type { UILayer } from "../layers/UILayer";
2
- import type { UIArea } from "../miscellaneous/area/UIArea";
3
- import type { UIPlaneElement } from "../miscellaneous/asserts";
4
- import { UIInputEvent } from "../miscellaneous/UIInputEvent";
5
- import { UIMode } from "../miscellaneous/UIMode";
6
- import type { UIInputWrapperInterface } from "../wrappers/UIInputWrapper.Internal";
7
- import { UIAnchor } from "./UIAnchor";
8
- import type { UIDummyOptions } from "./UIDummy.Internal";
1
+ import type { UILayer } from "../../layers/UILayer";
2
+ import type { UIArea } from "../../miscellaneous/area/UIArea";
3
+ import type { UIPlaneElement } from "../../miscellaneous/shared";
4
+ import { UIInputEvent } from "../../miscellaneous/UIInputEvent";
5
+ import { UIMode } from "../../miscellaneous/UIMode";
6
+ import type { UIInputWrapperInterface } from "../../wrappers/UIInputWrapper.Internal";
7
+ import { UIAnchor } from "../UIAnchor/UIAnchor";
8
+ import type { UIInputDummyOptions } from "./UIInputDummy.Internal";
9
9
  /** Rectangular area with dimensions but no rendering */
10
- export declare class UIDummy extends UIAnchor implements UIPlaneElement {
10
+ export declare class UIInputDummy extends UIAnchor implements UIPlaneElement {
11
11
  /** Shape defining interactive region in normalized coordinates */
12
12
  interactionArea: UIArea;
13
13
  /** Solver variable for width */
@@ -19,12 +19,12 @@ export declare class UIDummy extends UIAnchor implements UIPlaneElement {
19
19
  private readonly catcherHandler;
20
20
  private lastPointerInside;
21
21
  /**
22
- * Creates a new UIDummy instance.
22
+ * Creates a new UIInputDummy instance.
23
23
  *
24
24
  * @param layer - Layer containing this element
25
25
  * @param options - Configuration options
26
26
  */
27
- constructor(layer: UILayer, options?: Partial<UIDummyOptions>);
27
+ constructor(layer: UILayer, options?: Partial<UIInputDummyOptions>);
28
28
  /** Width in world units */
29
29
  get width(): number;
30
30
  /** Height in world units */
@@ -1,6 +1,6 @@
1
- import type { UIColorConfig } from "../miscellaneous/color/UIColor.Internal";
2
- import type { UIPaddingConfig } from "../miscellaneous/padding/UIPadding.Internal";
3
- import type { UIElementOptions } from "./UIElement.Internal";
1
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
+ import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal";
3
+ import type { UIElementOptions } from "../UIElement/UIElement.Internal";
4
4
  /** Controls how sliceRegions values are interpreted */
5
5
  export declare enum UINineSliceRegionMode {
6
6
  /** sliceRegions in normalized coordinates (0 to 1) */
@@ -13,9 +13,9 @@ export interface UINineSliceOptions extends UIElementOptions {
13
13
  /** Multiplicative tint */
14
14
  color: UIColorConfig;
15
15
  /** Border size in normalized texture coordinates (0 to 1) */
16
- sliceBorders: UIPaddingConfig;
16
+ sliceBorders: UIInsetsConfig;
17
17
  /** Region size. Interpretation depends on regionMode. */
18
- sliceRegions: UIPaddingConfig;
18
+ sliceRegions: UIInsetsConfig;
19
19
  /** How sliceRegions values are interpreted */
20
20
  regionMode: UINineSliceRegionMode;
21
21
  }