laymur 0.11.4 → 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 (40) hide show
  1. package/dist/constraints/{UIAspectConstraint.Internal.d.ts → UIAspectConstraint/UIAspectConstraint.Internal.d.ts} +1 -1
  2. package/dist/constraints/{UIAspectConstraint.d.ts → UIAspectConstraint/UIAspectConstraint.d.ts} +2 -2
  3. package/dist/constraints/{UIHeightConstraint.Internal.d.ts → UIHeightConstraint/UIHeightConstraint.Internal.d.ts} +1 -1
  4. package/dist/constraints/{UIHeightConstraint.d.ts → UIHeightConstraint/UIHeightConstraint.d.ts} +2 -2
  5. package/dist/constraints/{UIHorizontalDistanceConstraint.Internal.d.ts → UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts} +1 -1
  6. package/dist/constraints/{UIHorizontalDistanceConstraint.d.ts → UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts} +2 -2
  7. package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +14 -0
  8. package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +44 -0
  9. package/dist/constraints/{UIHorizontalProportionConstraint.Internal.d.ts → UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts} +1 -1
  10. package/dist/constraints/{UIHorizontalProportionConstraint.d.ts → UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts} +2 -2
  11. package/dist/constraints/{UIVerticalDistanceConstraint.Internal.d.ts → UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts} +1 -1
  12. package/dist/constraints/{UIVerticalDistanceConstraint.d.ts → UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts} +2 -2
  13. package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +14 -0
  14. package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +44 -0
  15. package/dist/constraints/{UIVerticalProportionConstraint.Internal.d.ts → UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts} +1 -1
  16. package/dist/constraints/{UIVerticalProportionConstraint.d.ts → UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts} +2 -2
  17. package/dist/constraints/{UIWidthConstraint.Internal.d.ts → UIWidthConstraint/UIWidthConstraint.Internal.d.ts} +1 -1
  18. package/dist/constraints/{UIWidthConstraint.d.ts → UIWidthConstraint/UIWidthConstraint.d.ts} +2 -2
  19. package/dist/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +21 -2
  20. package/dist/constraints/builders/UIConstraint2DBuilder.d.ts +19 -8
  21. package/dist/constraints/builders/UICoverConstraintBuilder.d.ts +6 -6
  22. package/dist/constraints/builders/UIFitConstraintBuilder.d.ts +6 -6
  23. package/dist/elements/UIAnchor/UIAnchor.d.ts +1 -1
  24. package/dist/elements/UIGraphics/UIGraphics.Internal.d.ts +0 -2
  25. package/dist/elements/UIGraphics/UIGraphics.d.ts +1 -1
  26. package/dist/elements/UIImage/UIImage.Internal.d.ts +0 -2
  27. package/dist/elements/UIImage/UIImage.d.ts +1 -1
  28. package/dist/elements/UIInputDummy/UIInputDummy.d.ts +1 -1
  29. package/dist/elements/UIProgress/UIProgress.Internal.d.ts +0 -2
  30. package/dist/elements/UIProgress/UIProgress.d.ts +2 -2
  31. package/dist/index.d.ts +9 -7
  32. package/dist/index.js +667 -180
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.min.js +1 -1
  35. package/dist/index.min.js.map +1 -1
  36. package/dist/layers/UILayer.d.ts +1 -1
  37. package/dist/miscellaneous/asserts.d.ts +21 -54
  38. package/dist/miscellaneous/color/UIColor.d.ts +1 -0
  39. package/dist/miscellaneous/shared.d.ts +46 -0
  40. package/package.json +6 -3
@@ -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
1
  import type { UIElement } from "../../elements/UIElement/UIElement";
8
- import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/asserts";
9
- import type { UIConstraint2DResult, UIConstraintDistance2DOptions, UIConstraintProportion2DOptions, UIConstraintSize2DOptions } from "./UIConstraint2DBuilder.Internal";
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,6 +1,6 @@
1
1
  import { Eventail } from "eventail";
2
2
  import type { UILayer } from "../../layers/UILayer";
3
- import type { UILayerElement, UIPointElement } from "../../miscellaneous/asserts";
3
+ import type { UILayerElement, UIPointElement } from "../../miscellaneous/shared";
4
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 */
@@ -1,9 +1,7 @@
1
1
  import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
- import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
3
2
  import type { UIElementOptions } from "../UIElement/UIElement.Internal";
4
3
  /** Configuration options for UIGraphics */
5
4
  export interface UIGraphicsOptions extends UIElementOptions {
6
5
  /** Multiplicative tint */
7
6
  color: UIColorConfig;
8
7
  }
9
- export declare const GRAPHICS_TEMP_PROPERTIES: Record<string, UIPropertyType>;
@@ -2,7 +2,7 @@ import type { WebGLRenderer } from "three";
2
2
  import type { UILayer } from "../../layers/UILayer";
3
3
  import { UIColor } from "../../miscellaneous/color/UIColor";
4
4
  import { UIElement } from "../UIElement/UIElement";
5
- import { type UIGraphicsOptions } from "./UIGraphics.Internal";
5
+ import type { UIGraphicsOptions } from "./UIGraphics.Internal";
6
6
  /** Canvas-based 2D drawing element */
7
7
  export declare class UIGraphics extends UIElement {
8
8
  /** Multiplicative tint. Alpha channel controls opacity. */
@@ -1,9 +1,7 @@
1
1
  import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
- import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
3
2
  import type { UIElementOptions } from "../UIElement/UIElement.Internal";
4
3
  /** Configuration options for UIImage */
5
4
  export interface UIImageOptions extends UIElementOptions {
6
5
  /** Multiplicative tint */
7
6
  color: UIColorConfig;
8
7
  }
9
- export declare const IMAGE_TEMP_PROPERTIES: Record<string, UIPropertyType>;
@@ -3,7 +3,7 @@ import { UIColor } from "../../miscellaneous/color/UIColor";
3
3
  import { UITextureView } from "../../miscellaneous/texture/UITextureView";
4
4
  import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
5
5
  import { UIElement } from "../UIElement/UIElement";
6
- import { type UIImageOptions } from "./UIImage.Internal";
6
+ import type { UIImageOptions } from "./UIImage.Internal";
7
7
  /** Textured image element */
8
8
  export declare class UIImage extends UIElement {
9
9
  /** Texture displayed by this image */
@@ -1,6 +1,6 @@
1
1
  import type { UILayer } from "../../layers/UILayer";
2
2
  import type { UIArea } from "../../miscellaneous/area/UIArea";
3
- import type { UIPlaneElement } from "../../miscellaneous/asserts";
3
+ import type { UIPlaneElement } from "../../miscellaneous/shared";
4
4
  import { UIInputEvent } from "../../miscellaneous/UIInputEvent";
5
5
  import { UIMode } from "../../miscellaneous/UIMode";
6
6
  import type { UIInputWrapperInterface } from "../../wrappers/UIInputWrapper.Internal";
@@ -1,5 +1,4 @@
1
1
  import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
- import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
3
2
  import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
4
3
  import type { UIElementOptions } from "../UIElement/UIElement.Internal";
5
4
  /** Configuration options for UIProgress */
@@ -12,5 +11,4 @@ export interface UIProgressOptions extends UIElementOptions {
12
11
  progress: number;
13
12
  }
14
13
  export declare const PROGRESS_DEFAULT_VALUE = 1;
15
- export declare const PROGRESS_TEMP_PROPERTIES: Record<string, UIPropertyType>;
16
14
  export declare function simplifyGLSLSource(source: string): string;
@@ -1,4 +1,4 @@
1
- import type { Texture } from "three";
1
+ import { type Texture } from "three";
2
2
  import type { UILayer } from "../../layers/UILayer";
3
3
  import { UIColor } from "../../miscellaneous/color/UIColor";
4
4
  import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
@@ -30,7 +30,7 @@ export declare class UIProgress extends UIElement {
30
30
  constructor(layer: UILayer, texture: Texture, options?: Partial<UIProgressOptions>);
31
31
  /** Progress from 0 (empty) to 1 (full) */
32
32
  get progress(): number;
33
- /** Progress from 0 (empty) to 1 (full). Clamped by shader. */
33
+ /** Progress from 0 (empty) to 1 (full). Clamped. */
34
34
  set progress(value: number);
35
35
  protected setPlaneTransform(): void;
36
36
  private readonly onTextureDimensionsChanged;
package/dist/index.d.ts CHANGED
@@ -1,15 +1,17 @@
1
1
  export { UIConstraint2DBuilder } from "./constraints/builders/UIConstraint2DBuilder";
2
2
  export { UICoverConstraintBuilder } from "./constraints/builders/UICoverConstraintBuilder";
3
3
  export { UIFitConstraintBuilder } from "./constraints/builders/UIFitConstraintBuilder";
4
- export { UIAspectConstraint } from "./constraints/UIAspectConstraint";
4
+ export { UIAspectConstraint } from "./constraints/UIAspectConstraint/UIAspectConstraint";
5
5
  export { UICustomConstraint } from "./constraints/UICustomConstraint";
6
- export { UIHeightConstraint } from "./constraints/UIHeightConstraint";
7
- export { UIHorizontalDistanceConstraint } from "./constraints/UIHorizontalDistanceConstraint";
8
- export { UIHorizontalProportionConstraint } from "./constraints/UIHorizontalProportionConstraint";
6
+ export { UIHeightConstraint } from "./constraints/UIHeightConstraint/UIHeightConstraint";
7
+ export { UIHorizontalDistanceConstraint } from "./constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
8
+ export { UIHorizontalInterpolationConstraint } from "./constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint";
9
+ export { UIHorizontalProportionConstraint } from "./constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
9
10
  export { UISingleParameterConstraint } from "./constraints/UISingleParameterConstraint";
10
- export { UIVerticalDistanceConstraint } from "./constraints/UIVerticalDistanceConstraint";
11
- export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint";
12
- export { UIWidthConstraint } from "./constraints/UIWidthConstraint";
11
+ export { UIVerticalDistanceConstraint } from "./constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
12
+ export { UIVerticalInterpolationConstraint } from "./constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint";
13
+ export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint";
14
+ export { UIWidthConstraint } from "./constraints/UIWidthConstraint/UIWidthConstraint";
13
15
  export { UIAnchor } from "./elements/UIAnchor/UIAnchor";
14
16
  export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage";
15
17
  export { UIGraphics } from "./elements/UIGraphics/UIGraphics";