@reactunity/renderer 0.13.2 → 0.14.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 (44) hide show
  1. package/dist/src/helpers/icons.d.ts +2 -2
  2. package/dist/src/models/base.d.ts +8 -8
  3. package/dist/src/models/editor/components.d.ts +2 -2
  4. package/dist/src/models/editor/events.d.ts +4 -4
  5. package/dist/src/models/editor/jsx.d.ts +5 -5
  6. package/dist/src/models/environment/dom/common.d.ts +5 -5
  7. package/dist/src/models/environment/dom/fetch.d.ts +10 -10
  8. package/dist/src/models/environment/dom/xhr.d.ts +2 -2
  9. package/dist/src/models/environment/interop.d.ts +2 -2
  10. package/dist/src/models/generated/editor.d.ts +15016 -11979
  11. package/dist/src/models/generated/editor.js +1 -1
  12. package/dist/src/models/generated/react.d.ts +1336 -417
  13. package/dist/src/models/generated/react.js +1 -1
  14. package/dist/src/models/generated/system.d.ts +2602 -2704
  15. package/dist/src/models/generated/system.js +2 -2
  16. package/dist/src/models/generated/tests.d.ts +228 -231
  17. package/dist/src/models/generated/tests.js +1 -1
  18. package/dist/src/models/generated/unity.d.ts +7998 -14519
  19. package/dist/src/models/generated/unity.js +2 -2
  20. package/dist/src/models/generated/yoga.d.ts +1 -1
  21. package/dist/src/models/generated/yoga.js +1 -1
  22. package/dist/src/models/properties/colors.d.ts +1 -1
  23. package/dist/src/models/properties/style.d.ts +7 -2
  24. package/dist/src/models/properties/styles-enums.d.ts +24 -19
  25. package/dist/src/models/properties/styles.d.ts +76 -60
  26. package/dist/src/models/properties/values.d.ts +16 -16
  27. package/dist/src/models/properties/yoga-enums.d.ts +8 -8
  28. package/dist/src/models/properties/yoga.d.ts +16 -16
  29. package/dist/src/models/renderer.d.ts +14 -14
  30. package/dist/src/models/richtext.d.ts +2 -2
  31. package/dist/src/models/svg.d.ts +2 -2
  32. package/dist/src/models/ugui/components.d.ts +1 -1
  33. package/dist/src/models/ugui/events.d.ts +7 -7
  34. package/dist/src/models/ugui/input.d.ts +6 -6
  35. package/dist/src/models/ugui/jsx.d.ts +2 -2
  36. package/dist/src/models/uitoolkit/components.d.ts +2 -2
  37. package/dist/src/models/uitoolkit/events.d.ts +4 -4
  38. package/dist/src/models/uitoolkit/jsx.d.ts +2 -2
  39. package/dist/src/renderer/async/commands.d.ts +14 -14
  40. package/dist/src/renderer/async/types.d.ts +10 -10
  41. package/dist/src/renderer/diffing.d.ts +1 -1
  42. package/dist/src/version.d.ts +1 -1
  43. package/dist/src/version.js +1 -1
  44. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
1
  //
2
- // Types in assemblies: UnityEngine.CoreModule, UnityEngine.VideoModule, UnityEngine.AudioModule, UnityEngine.UIModule, UnityEngine.UI, UnityEngine.TextRenderingModule, UnityEngine.AnimationModule, UnityEngine.IMGUIModule, UnityEngine.AssetBundleModule, UnityEngine.UnityAnalyticsModule, UnityEngine.UIElementsModule, UnityEngine.ParticleSystemModule, UnityEngine.UIElementsNativeModule, UnityEngine.AIModule, UnityEngine.TestRunner, UnityEngine.TextCoreFontEngineModule, UnityEngine.TextCoreTextEngineModule, UnityEngine.XRModule, UnityEngine.PhysicsModule, UnityEngine.InputLegacyModule, UnityEngine.UI, Unity.InputSystem, Unity.InputSystem
3
- // Generated 30/06/2022 20:21:30
2
+ // Types in assemblies: UnityEngine.CoreModule, Unity.InputSystem, UnityEngine.AudioModule, UnityEngine.UIModule, UnityEngine.TextRenderingModule, UnityEngine.AnimationModule, UnityEngine.IMGUIModule, UnityEngine.UnityAnalyticsModule, UnityEngine.ParticleSystemModule, UnityEngine.PhysicsModule, UnityEngine.InputLegacyModule, UnityEngine.AIModule, UnityEngine.UI, UnityEngine.VideoModule, UnityEngine.TestRunner, UnityEngine.TextCoreFontEngineModule, UnityEngine.TextCoreTextEngineModule, UnityEngine.UIElementsModule, UnityEngine.XRModule
3
+ // Generated 15/01/2023 19:33:26
4
4
  //
5
5
  /* eslint-disable */
6
6
  export {};
@@ -139,7 +139,7 @@ export declare namespace Facebook {
139
139
  Row = 2,
140
140
  RowReverse = 3
141
141
  }
142
- enum YogaGap {
142
+ enum YogaGutter {
143
143
  Column = 0,
144
144
  Row = 1,
145
145
  All = 2
@@ -1,6 +1,6 @@
1
1
  //
2
2
  // Types in assemblies: Facebook.Yoga
3
- // Generated 30/06/2022 20:21:41
3
+ // Generated 15/01/2023 19:33:28
4
4
  //
5
5
  /* eslint-disable */
6
6
  export {};
@@ -1,4 +1,4 @@
1
- export declare type KnownColors = {
1
+ export type KnownColors = {
2
2
  aliceblue: '#f0f8ff';
3
3
  antiquewhite: '#faebd7';
4
4
  aqua: '#00ffff';
@@ -1,5 +1,10 @@
1
1
  import { ReactUnity } from '../generated';
2
2
  import { RenderStyle } from './styles';
3
+ import { CssKeyword } from './styles-enums';
3
4
  import { LayoutCssCompatible } from './yoga';
4
- export declare type Style = RenderStyle & LayoutCssCompatible;
5
- export declare type InlineStyleRemap = Style & ReactUnity.Styling.InlineStyles;
5
+ type AllPropsAsStringOrKeyword<T> = {
6
+ [Key in keyof T]: T[Key] | (string & {}) | CssKeyword;
7
+ };
8
+ export type Style = AllPropsAsStringOrKeyword<RenderStyle & LayoutCssCompatible>;
9
+ export type InlineStyleRemap = Style & ReactUnity.Styling.InlineStyles;
10
+ export {};
@@ -1,19 +1,24 @@
1
- export declare type FontWeight = 'thin' | 100 | 'extra-light' | 200 | 'light' | 300 | 'regular' | 400 | 'medium' | 500 | 'semi-bold' | 600 | 'bold' | 700 | 'heavy' | 800 | 'black' | 900;
2
- export declare type FontStyles = 'normal' | 'bold' | 'italic' | 'underline' | 'lowercase' | 'uppercase' | 'smallcaps' | 'strikethrough' | 'superscript' | 'subscript' | 'highlight';
3
- export declare type TextTransform = 'none' | 'lowercase' | 'uppercase' | 'smallcaps' | 'capitalize';
4
- export declare type TextOverflowModes = 'overflow' | 'ellipsis' | 'masking' | 'truncate' | 'scroll-rect' | 'page' | 'linked';
5
- export declare type PointerEvents = 'auto' | 'visible' | 'all' | 'none';
6
- export declare type Visibility = 'visible' | 'hidden';
7
- export declare type Appearance = 'none' | 'button' | 'input' | 'toggle';
8
- export declare type NavigationMode = 'none' | 'horizontal' | 'vertical' | 'automatic' | 'explicit';
9
- export declare type WhiteSpace = 'normal' | 'nowrap';
10
- export declare type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
11
- export declare type BackgroundBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
12
- export declare type CursorType = 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out' | 'grab' | 'grabbing';
13
- export declare type TextAlign = 'top-left' | 'top' | 'top-right' | 'top-justified' | 'top-flush' | 'top-geo-aligned' | 'left' | 'center' | 'right' | 'justified' | 'flush' | 'center-geo-aligned' | 'bottom-left' | 'bottom' | 'bottom-right' | 'bottom-justified' | 'bottom-flush' | 'bottom-geo-aligned' | 'baseline-left' | 'baseline' | 'baseline-right' | 'baseline-justified' | 'baseline-flush' | 'baseline-geo-aligned' | 'midline-left' | 'midline' | 'midline-right' | 'midline-justified' | 'midline-flush' | 'midline-geo-aligned' | 'capline-left' | 'capline' | 'capline-right' | 'capline-justified' | 'capline-flush' | 'capline-geo-aligned' | 'converted';
14
- export declare type VerticalAlign = 'top' | 'middle' | 'bottom' | 'baseline' | 'geometry' | 'capline';
15
- export declare type TimingFunctionType = 'ease' | 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end';
16
- export declare type AnimationFillMode = 'none' | 'both' | 'forwards' | 'backwards';
17
- export declare type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
18
- export declare type AnimationPlayState = 'running' | 'paused';
19
- export declare type BackgroundSize = 'cover' | 'contain';
1
+ export type SafeString = string & {};
2
+ export type CssKeyword = 'initial' | 'inherit' | 'auto' | 'none' | 'unset' | 'default' | 'revert';
3
+ export type FontWeight = 'thin' | 100 | 'extra-light' | 200 | 'light' | 300 | 'regular' | 400 | 'medium' | 500 | 'semi-bold' | 600 | 'bold' | 700 | 'heavy' | 800 | 'black' | 900;
4
+ export type FontStyles = 'normal' | 'bold' | 'italic' | 'underline' | 'lowercase' | 'uppercase' | 'smallcaps' | 'strikethrough' | 'superscript' | 'subscript' | 'highlight';
5
+ export type TextTransform = 'none' | 'lowercase' | 'uppercase' | 'smallcaps' | 'capitalize';
6
+ export type TextOverflowModes = 'overflow' | 'ellipsis' | 'masking' | 'truncate' | 'scroll-rect' | 'page' | 'linked';
7
+ export type PointerEvents = 'auto' | 'visible' | 'all' | 'none';
8
+ export type Visibility = 'visible' | 'hidden';
9
+ export type Appearance = 'none' | 'button' | 'input' | 'toggle';
10
+ export type NavigationMode = 'none' | 'horizontal' | 'vertical' | 'automatic' | 'explicit';
11
+ export type WhiteSpace = 'normal' | 'nowrap';
12
+ export type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
13
+ export type BorderStyle = 'solid' | 'none' | 'hidden' | 'dotted' | 'dashed' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset';
14
+ export type BackgroundBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
15
+ export type CursorType = 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out' | 'grab' | 'grabbing';
16
+ export type TextAlign = 'top-left' | 'top' | 'top-right' | 'top-justified' | 'top-flush' | 'top-geo-aligned' | 'left' | 'center' | 'right' | 'justified' | 'flush' | 'center-geo-aligned' | 'bottom-left' | 'bottom' | 'bottom-right' | 'bottom-justified' | 'bottom-flush' | 'bottom-geo-aligned' | 'baseline-left' | 'baseline' | 'baseline-right' | 'baseline-justified' | 'baseline-flush' | 'baseline-geo-aligned' | 'midline-left' | 'midline' | 'midline-right' | 'midline-justified' | 'midline-flush' | 'midline-geo-aligned' | 'capline-left' | 'capline' | 'capline-right' | 'capline-justified' | 'capline-flush' | 'capline-geo-aligned' | 'converted';
17
+ export type VerticalAlign = 'top' | 'middle' | 'bottom' | 'baseline' | 'geometry' | 'capline';
18
+ export type TimingFunctionType = 'ease' | 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end';
19
+ export type AnimationFillMode = 'none' | 'both' | 'forwards' | 'backwards';
20
+ export type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
21
+ export type AnimationPlayState = 'running' | 'paused';
22
+ export type BackgroundSize = 'cover' | 'contain';
23
+ export type BackgroundRepeat = 'repeat' | 'space' | 'round' | 'no-repeat';
24
+ export type BorderImageRepeat = 'stretch' | 'repeat' | 'space' | 'round';
@@ -1,15 +1,15 @@
1
- import { AnimationDirection, AnimationFillMode, AnimationPlayState, Appearance, BackgroundBlendMode, BackgroundSize, CursorType, FontStyles, FontWeight, NavigationMode, ObjectFit, PointerEvents, TextAlign, TextOverflowModes, TextTransform, TimingFunctionType, VerticalAlign, Visibility, WhiteSpace } from './styles-enums';
1
+ import { AnimationDirection, AnimationFillMode, AnimationPlayState, Appearance, BackgroundBlendMode, BackgroundRepeat, BackgroundSize, BorderImageRepeat, BorderStyle, CursorType, FontStyles, FontWeight, NavigationMode, ObjectFit, PointerEvents, SafeString, TextAlign, TextOverflowModes, TextTransform, TimingFunctionType, VerticalAlign, Visibility, WhiteSpace } from './styles-enums';
2
2
  import { Array2Aux, AssetReference, AssetReferenceOrHttp, ColorAux, NumberAux, Vector2Aux, Vector3Aux } from './values';
3
3
  import { YogaValue2Aux, YogaValueAux } from './yoga';
4
4
  export interface RenderStyle {
5
5
  opacity?: NumberAux;
6
- zIndex?: number | string;
7
- sortingLayer?: number | string;
8
- order?: number | string;
6
+ zIndex?: number;
7
+ sortingLayer?: number;
8
+ order?: number;
9
9
  visibility?: Visibility | boolean;
10
- cursor?: CursorType | string;
10
+ cursor?: CursorType;
11
11
  pointerEvents?: PointerEvents;
12
- content?: string;
12
+ content?: SafeString;
13
13
  appearance?: Appearance;
14
14
  navigation?: NavigationMode;
15
15
  backgroundBlendMode?: BackgroundBlendMode;
@@ -18,25 +18,36 @@ export interface RenderStyle {
18
18
  backgroundPositionX?: YogaValueAux;
19
19
  backgroundPositionY?: YogaValueAux;
20
20
  backgroundSize?: BackgroundSize | YogaValue2Aux;
21
- backgroundRepeatX?: YogaValueAux;
22
- backgroundRepeatY?: YogaValueAux;
21
+ backgroundRepeatX?: BackgroundRepeat;
22
+ backgroundRepeatY?: BackgroundRepeat;
23
23
  maskImage?: AssetReferenceOrHttp;
24
24
  maskPositionX?: YogaValueAux;
25
25
  maskPositionY?: YogaValueAux;
26
26
  maskSize?: BackgroundSize | YogaValue2Aux;
27
27
  maskRepeatX?: YogaValueAux;
28
28
  maskRepeatY?: YogaValueAux;
29
- borderRadius?: Array2Aux<YogaValueAux> | string;
29
+ outlineColor?: ColorAux;
30
+ outlineStyle?: BorderStyle;
31
+ outlineWidth?: number;
32
+ outlineOffset?: number;
30
33
  borderTopLeftRadius?: Array2Aux<YogaValueAux>;
31
34
  borderTopRightRadius?: Array2Aux<YogaValueAux>;
32
35
  borderBottomRightRadius?: Array2Aux<YogaValueAux>;
33
36
  borderBottomLeftRadius?: Array2Aux<YogaValueAux>;
34
- borderColor?: ColorAux;
35
37
  borderTopColor?: ColorAux;
36
38
  borderRightColor?: ColorAux;
37
39
  borderBottomColor?: ColorAux;
38
40
  borderLeftColor?: ColorAux;
39
- boxShadow?: string;
41
+ borderTopStyle?: BorderStyle;
42
+ borderRightStyle?: BorderStyle;
43
+ borderBottomStyle?: BorderStyle;
44
+ borderLeftStyle?: BorderStyle;
45
+ borderImageSource?: AssetReferenceOrHttp;
46
+ borderImageSlice?: YogaValueAux;
47
+ borderImageRepeat?: BorderImageRepeat;
48
+ borderImageOutset?: YogaValueAux;
49
+ borderImageWidth?: YogaValueAux;
50
+ boxShadow?: SafeString;
40
51
  objectFit?: ObjectFit;
41
52
  objectPosition?: YogaValue2Aux;
42
53
  transformOrigin?: Vector2Aux;
@@ -44,7 +55,7 @@ export interface RenderStyle {
44
55
  translateZ?: YogaValueAux;
45
56
  scale?: Vector2Aux;
46
57
  rotate?: Vector3Aux;
47
- stateDuration?: number | string;
58
+ stateDuration?: number;
48
59
  color?: ColorAux;
49
60
  fontFamily?: AssetReference;
50
61
  fontWeight?: FontWeight;
@@ -57,54 +68,59 @@ export interface RenderStyle {
57
68
  whiteSpace?: WhiteSpace;
58
69
  textStrokeWidth?: NumberAux;
59
70
  textStrokeColor?: ColorAux;
60
- lineHeight?: number | string;
61
- letterSpacing?: number | string;
62
- wordSpacing?: number | string;
63
- maxLines?: number | string;
64
- transitionProperty?: keyof RenderStyle | string;
65
- transitionDuration?: number | string;
66
- transitionTimingFunction?: TimingFunctionType | string;
67
- transitionDelay?: number | string;
68
- transitionPlayState?: AnimationPlayState | string;
69
- motionDuration?: number | string;
70
- motionTimingFunction?: TimingFunctionType | string;
71
- motionDelay?: number | string;
72
- animationDelay?: number | string;
73
- animationDirection?: AnimationDirection | string;
74
- animationDuration?: number | string;
75
- animationFillMode?: AnimationFillMode | string;
76
- animationIterationCount?: number | string;
77
- animationName?: string | string;
78
- animationPlayState?: AnimationPlayState | string;
79
- animationTimingFunction?: TimingFunctionType | string;
71
+ lineHeight?: number;
72
+ letterSpacing?: number;
73
+ wordSpacing?: number;
74
+ maxLines?: number;
75
+ transitionProperty?: keyof RenderStyle;
76
+ transitionDuration?: number;
77
+ transitionTimingFunction?: TimingFunctionType;
78
+ transitionDelay?: number;
79
+ transitionPlayState?: AnimationPlayState;
80
+ motionDuration?: number;
81
+ motionTimingFunction?: TimingFunctionType;
82
+ motionDelay?: number;
83
+ animationDelay?: number;
84
+ animationDirection?: AnimationDirection;
85
+ animationDuration?: number;
86
+ animationFillMode?: AnimationFillMode;
87
+ animationIterationCount?: number;
88
+ animationName?: SafeString;
89
+ animationPlayState?: AnimationPlayState;
90
+ animationTimingFunction?: TimingFunctionType;
80
91
  audioClip?: AssetReferenceOrHttp;
81
- audioIterationCount?: number | string;
82
- audioDelay?: number | string;
83
- all?: string;
84
- background?: string;
85
- backgroundPosition?: string;
86
- backgroundRepeat?: string;
87
- border?: string;
88
- borderTop?: string;
89
- borderRight?: string;
90
- borderBottom?: string;
91
- borderLeft?: string;
92
- borderWidth?: string;
93
- margin?: string | number;
94
- mask?: string;
95
- maskPosition?: string;
96
- maskRepeat?: string;
97
- padding?: string | number;
98
- inset?: string | number;
99
- flex?: string;
100
- flexFlow?: string;
101
- font?: string;
102
- textStroke?: string;
103
- animation?: string;
104
- transition?: string;
105
- motion?: string;
106
- audio?: string;
107
- transform?: string;
108
- gap?: string | number;
92
+ audioIterationCount?: number;
93
+ audioDelay?: number;
94
+ all?: SafeString;
95
+ background?: SafeString;
96
+ backgroundPosition?: SafeString;
97
+ backgroundRepeat?: BackgroundRepeat;
98
+ outline?: SafeString;
99
+ border?: SafeString;
100
+ borderTop?: SafeString;
101
+ borderRight?: SafeString;
102
+ borderBottom?: SafeString;
103
+ borderLeft?: SafeString;
104
+ borderWidth?: SafeString;
105
+ borderStyle?: BorderStyle;
106
+ borderColor?: ColorAux;
107
+ borderRadius?: Array2Aux<YogaValueAux>;
108
+ borderImage?: SafeString;
109
+ margin?: SafeString | number;
110
+ mask?: SafeString;
111
+ maskPosition?: SafeString;
112
+ maskRepeat?: SafeString;
113
+ padding?: SafeString | number;
114
+ inset?: SafeString | number;
115
+ flex?: SafeString;
116
+ flexFlow?: SafeString;
117
+ font?: SafeString;
118
+ textStroke?: SafeString;
119
+ animation?: SafeString;
120
+ transition?: SafeString;
121
+ motion?: SafeString;
122
+ audio?: SafeString;
123
+ transform?: SafeString;
124
+ gap?: SafeString | number;
109
125
  [variable: `--${string}`]: any;
110
126
  }
@@ -1,24 +1,24 @@
1
1
  import { UnityEngine } from '../generated';
2
2
  import { KnownColors } from './colors';
3
- declare type PositioningLiteralHorizontal = 'left' | 'right' | 'center';
4
- declare type PositioningLiteralVertical = 'top' | 'bottom' | 'center';
5
- export declare type PositioningLiteral = PositioningLiteralVertical | PositioningLiteralHorizontal | `${PositioningLiteralVertical} ${PositioningLiteralHorizontal}` | `${PositioningLiteralHorizontal} ${PositioningLiteralVertical}`;
6
- export declare type Array2Aux<T> = T | [] | [T] | [T, T] | T[];
7
- export declare type Array3Aux<T> = Array2Aux<T> | [T, T, T];
8
- export declare type Array4Aux<T> = Array3Aux<T> | [T, T, T, T];
9
- export declare type Vector2Aux = string | Array2Aux<number> | PositioningLiteral;
10
- export declare type Vector3Aux = string | Array3Aux<number>;
11
- export declare type RectOffsetAux = Array4Aux<number>;
12
- export declare type KnownColor = keyof KnownColors;
13
- export declare type HexColor = string;
14
- export declare type ColorAux = KnownColor | HexColor | number | Array4Aux<number> | UnityEngine.Color;
15
- export declare type NumberAux = string | number;
16
- export declare type HttpSource = {
3
+ type PositioningLiteralHorizontal = 'left' | 'right' | 'center';
4
+ type PositioningLiteralVertical = 'top' | 'bottom' | 'center';
5
+ export type PositioningLiteral = PositioningLiteralVertical | PositioningLiteralHorizontal | `${PositioningLiteralVertical} ${PositioningLiteralHorizontal}` | `${PositioningLiteralHorizontal} ${PositioningLiteralVertical}`;
6
+ export type Array2Aux<T> = T | [] | [T] | [T, T] | T[];
7
+ export type Array3Aux<T> = Array2Aux<T> | [T, T, T];
8
+ export type Array4Aux<T> = Array3Aux<T> | [T, T, T, T];
9
+ export type Vector2Aux = (string & {}) | Array2Aux<number> | PositioningLiteral;
10
+ export type Vector3Aux = (string & {}) | Array3Aux<number>;
11
+ export type RectOffsetAux = Array4Aux<number>;
12
+ export type KnownColor = keyof KnownColors;
13
+ export type HexColor = (string & {});
14
+ export type ColorAux = KnownColor | HexColor | number | Array4Aux<number> | UnityEngine.Color;
15
+ export type NumberAux = (string & {}) | number;
16
+ export type HttpSource = {
17
17
  url: string;
18
18
  body?: string;
19
19
  headers?: Record<string, string>;
20
20
  method?: string;
21
21
  };
22
- export declare type AssetReference = string | UnityEngine.Object;
23
- export declare type AssetReferenceOrHttp = AssetReference | HttpSource;
22
+ export type AssetReference = string | UnityEngine.Object;
23
+ export type AssetReferenceOrHttp = AssetReference | HttpSource;
24
24
  export {};
@@ -1,8 +1,8 @@
1
- export declare type FlexDirection = 'column' | 'column-reverse' | 'row' | 'row-reverse';
2
- export declare type YogaAlign = 'auto' | 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline' | 'space-between' | 'space-around';
3
- export declare type YogaJustify = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
4
- export declare type Display = 'flex' | 'none';
5
- export declare type Wrap = 'no-wrap' | 'wrap' | 'wrap-reverse';
6
- export declare type Position = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'inset';
7
- export declare type Overflow = 'visible' | 'hidden' | 'scroll';
8
- export declare type Direction = 'inherit' | 'ltr' | 'rtl';
1
+ export type FlexDirection = 'column' | 'column-reverse' | 'row' | 'row-reverse';
2
+ export type YogaAlign = 'auto' | 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline' | 'space-between' | 'space-around';
3
+ export type YogaJustify = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
4
+ export type Display = 'flex' | 'none';
5
+ export type Wrap = 'no-wrap' | 'wrap' | 'wrap-reverse';
6
+ export type Position = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'inset';
7
+ export type Overflow = 'visible' | 'hidden' | 'scroll';
8
+ export type Direction = 'inherit' | 'ltr' | 'rtl';
@@ -1,8 +1,8 @@
1
1
  import { Array2Aux, Array4Aux, PositioningLiteral } from './values';
2
2
  import { Direction, Display, FlexDirection, Overflow, Position, Wrap, YogaAlign, YogaJustify } from './yoga-enums';
3
- export declare type YogaValueAux = 'auto' | string | number | null | undefined | boolean;
4
- export declare type YogaValue2Aux = Array2Aux<YogaValueAux> | PositioningLiteral;
5
- export declare type YogaValue4Aux = Array4Aux<YogaValueAux>;
3
+ export type YogaValueAux = 'auto' | number | null | undefined | boolean | (string & {});
4
+ export type YogaValue2Aux = Array2Aux<YogaValueAux> | PositioningLiteral;
5
+ export type YogaValue4Aux = Array4Aux<YogaValueAux>;
6
6
  export interface Layout {
7
7
  overflow?: Overflow;
8
8
  styleDirection?: Direction;
@@ -13,17 +13,17 @@ export interface Layout {
13
13
  alignContent?: YogaAlign;
14
14
  alignSelf?: YogaAlign;
15
15
  alignItems?: YogaAlign;
16
- borderWidth?: number | string;
17
- borderStartWidth?: number | string;
18
- borderEndWidth?: number | string;
19
- borderTopWidth?: number | string;
20
- borderRightWidth?: number | string;
21
- borderBottomWidth?: number | string;
22
- borderLeftWidth?: number | string;
23
- aspectRatio?: number | string;
16
+ borderWidth?: number;
17
+ borderStartWidth?: number;
18
+ borderEndWidth?: number;
19
+ borderTopWidth?: number;
20
+ borderRightWidth?: number;
21
+ borderBottomWidth?: number;
22
+ borderLeftWidth?: number;
23
+ aspectRatio?: number;
24
24
  flexDirection?: FlexDirection;
25
- flexShrink?: number | string;
26
- flexGrow?: number | string;
25
+ flexShrink?: number;
26
+ flexGrow?: number;
27
27
  flexBasis?: YogaValueAux;
28
28
  minHeight?: YogaValueAux;
29
29
  minWidth?: YogaValueAux;
@@ -55,12 +55,12 @@ export interface Layout {
55
55
  paddingTop?: YogaValueAux;
56
56
  paddingEnd?: YogaValueAux;
57
57
  paddingLeft?: YogaValueAux;
58
- rowGap?: number | string;
59
- columnGap?: number | string;
58
+ rowGap?: number;
59
+ columnGap?: number;
60
60
  }
61
61
  export interface LayoutExtended {
62
62
  position?: Position;
63
63
  direction?: Direction;
64
64
  flexWrap?: Wrap;
65
65
  }
66
- export declare type LayoutCssCompatible = Omit<Layout, 'styleDirection' | 'position' | 'wrap' | 'margin' | 'padding' | 'borderWidth'> & LayoutExtended;
66
+ export type LayoutCssCompatible = Omit<Layout, 'styleDirection' | 'position' | 'wrap' | 'margin' | 'padding' | 'borderWidth'> & LayoutExtended;
@@ -1,20 +1,20 @@
1
1
  import { ReactUnity } from './generated';
2
- export declare type Unique<T, K> = T & {
2
+ export type Unique<T, K> = T & {
3
3
  $type: K;
4
4
  };
5
- export declare type NativeInstance = ReactUnity.IReactComponent;
6
- export declare type NativeTextInstance = ReactUnity.ITextComponent;
7
- export declare type NativeContainerInstance = ReactUnity.IReactComponent;
8
- export declare type InstanceTag = string;
9
- export declare type Props = React.RefAttributes<NativeInstance> & {
5
+ export type NativeInstance = ReactUnity.IReactComponent;
6
+ export type NativeTextInstance = ReactUnity.ITextComponent;
7
+ export type NativeContainerInstance = ReactUnity.IReactComponent;
8
+ export type InstanceTag = string;
9
+ export type Props = React.RefAttributes<NativeInstance> & {
10
10
  [key: string]: any;
11
11
  children?: React.ReactNode;
12
12
  };
13
- export declare type SuspenseInstance = NativeInstance;
14
- export declare type HydratableInstance = NativeInstance;
15
- export declare type PublicInstance = any;
16
- export declare type HostContext = Record<string, unknown>;
17
- export declare type UpdatePayload = Record<string, unknown>;
18
- export declare type ChildSet = Record<string, unknown>;
19
- export declare type TimeoutHandle = number;
20
- export declare type NoTimeout = -1;
13
+ export type SuspenseInstance = NativeInstance;
14
+ export type HydratableInstance = NativeInstance;
15
+ export type PublicInstance = any;
16
+ export type HostContext = Record<string, unknown>;
17
+ export type UpdatePayload = Record<string, unknown>;
18
+ export type ChildSet = Record<string, unknown>;
19
+ export type TimeoutHandle = number;
20
+ export type NoTimeout = -1;
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { UnityEngine } from './generated';
3
- export declare type RichTextTags = RichTextValueTag;
3
+ export type RichTextTags = RichTextValueTag;
4
4
  export interface RichTextVoidTag extends React.Attributes {
5
5
  children?: any;
6
6
  }
7
7
  export interface RichTextValueTag<T = string | number> extends React.Attributes {
8
- value?: T | string;
8
+ value?: T | (string & {});
9
9
  children?: any;
10
10
  }
11
11
  export interface RichTextColorTag extends React.Attributes {
@@ -1,10 +1,10 @@
1
1
  import type * as React from 'react';
2
2
  import { Style } from './properties';
3
- declare type SVGProps<T> = React.Attributes & Omit<React.SVGAttributes<T>, keyof React.DOMAttributes<T> | keyof React.AriaAttributes | 'style'> & {
3
+ type SVGProps<T> = React.Attributes & Omit<React.SVGAttributes<T>, keyof React.DOMAttributes<T> | keyof React.AriaAttributes | 'style'> & {
4
4
  style?: Style | React.CSSProperties | string | undefined;
5
5
  children?: any;
6
6
  };
7
- export declare type SVGEelement = SVGProps<SVGSVGElement>;
7
+ export type SVGEelement = SVGProps<SVGSVGElement>;
8
8
  export interface SVGElements {
9
9
  svg: SVGEelement;
10
10
  animate: SVGProps<SVGElement>;
@@ -15,7 +15,7 @@ export interface Label extends View<ReactUnity.UGUI.LabelComponent> {
15
15
  export interface Icon extends View<ReactUnity.UGUI.IconComponent> {
16
16
  set?: ReactUnity.Styling.IconSet | string;
17
17
  }
18
- export declare type ScrollDirection = 'none' | 'horizontal' | 'vertical' | 'both';
18
+ export type ScrollDirection = 'none' | 'horizontal' | 'vertical' | 'both';
19
19
  export interface Scroll extends View<ReactUnity.UGUI.ScrollComponent> {
20
20
  onValueChanged?: (ev: UnityEngine.Vector2, sender: ReactUnity.UGUI.ScrollComponent) => void;
21
21
  direction?: ScrollDirection;
@@ -1,12 +1,12 @@
1
1
  import { BaseEvents } from '../base';
2
2
  import { ReactUnity, UnityEngine } from '../generated';
3
- declare type BaseCmp = ReactUnity.UGUI.UGUIComponent;
4
- export declare type ActionCallback<T = BaseCmp> = (sender: T) => void;
5
- export declare type BaseEventCallback<T = BaseCmp> = (ev: UnityEngine.EventSystems.BaseEventData, sender: T) => void;
6
- export declare type PointerEventCallback<T = BaseCmp> = (ev: UnityEngine.EventSystems.PointerEventData, sender: T) => void;
7
- export declare type AxisEventCallback<T = BaseCmp> = (ev: UnityEngine.EventSystems.AxisEventData, sender: T) => void;
8
- export declare type KeyEventCallback<T = BaseCmp> = (ev: ReactUnity.UGUI.EventHandlers.KeyEventData, sender: T) => void;
9
- export declare type ResizeEventCallback<T = BaseCmp> = (ev: ReactUnity.UGUI.EventHandlers.ResizeEventData, sender: T) => void;
3
+ type BaseCmp = ReactUnity.UGUI.UGUIComponent;
4
+ export type ActionCallback<T = BaseCmp> = (sender: T) => void;
5
+ export type BaseEventCallback<T = BaseCmp> = (ev: UnityEngine.EventSystems.BaseEventData, sender: T) => void;
6
+ export type PointerEventCallback<T = BaseCmp> = (ev: UnityEngine.EventSystems.PointerEventData, sender: T) => void;
7
+ export type AxisEventCallback<T = BaseCmp> = (ev: UnityEngine.EventSystems.AxisEventData, sender: T) => void;
8
+ export type KeyEventCallback<T = BaseCmp> = (ev: ReactUnity.UGUI.EventHandlers.KeyEventData, sender: T) => void;
9
+ export type ResizeEventCallback<T = BaseCmp> = (ev: ReactUnity.UGUI.EventHandlers.ResizeEventData, sender: T) => void;
10
10
  export interface Events<T = BaseCmp> extends BaseEvents<T> {
11
11
  onPointerClick?: PointerEventCallback<T>;
12
12
  onPointerUp?: PointerEventCallback<T>;
@@ -1,11 +1,11 @@
1
1
  import { ReactUnity } from '../generated';
2
2
  import { View } from './components';
3
- export declare type TouchScreenKeyboardType = 'default' | 'ascii-capable' | 'numbers-and-punctuation' | 'url' | 'number-pad' | 'phone-pad' | 'name-phone-pad' | 'email-address' | 'nintendo-network-account' | 'social' | 'search ' | 'decimal-pad ';
4
- export declare type ContentType = 'standard' | 'autocorrected' | 'integer-number' | 'decimal-number' | 'alphanumeric' | 'name' | 'email-address' | 'password' | 'pin' | 'custom';
5
- export declare type CharacterValidation = 'none' | 'digit' | 'integer' | 'decimal' | 'alphanumeric' | 'name' | 'regex' | 'email-address' | 'custom-validator';
6
- export declare type LineType = 'single-line' | 'multiline-submit' | 'multiline-newline';
7
- export declare type InputEvent = (val: string, sender: ReactUnity.UGUI.InputComponent) => void;
8
- export declare type TextSelectionEvent = (val: string, start: number, end: number, sender: ReactUnity.UGUI.InputComponent) => void;
3
+ export type TouchScreenKeyboardType = 'default' | 'ascii-capable' | 'numbers-and-punctuation' | 'url' | 'number-pad' | 'phone-pad' | 'name-phone-pad' | 'email-address' | 'nintendo-network-account' | 'social' | 'search ' | 'decimal-pad ';
4
+ export type ContentType = 'standard' | 'autocorrected' | 'integer-number' | 'decimal-number' | 'alphanumeric' | 'name' | 'email-address' | 'password' | 'pin' | 'custom';
5
+ export type CharacterValidation = 'none' | 'digit' | 'integer' | 'decimal' | 'alphanumeric' | 'name' | 'regex' | 'email-address' | 'custom-validator';
6
+ export type LineType = 'single-line' | 'multiline-submit' | 'multiline-newline';
7
+ export type InputEvent = (val: string, sender: ReactUnity.UGUI.InputComponent) => void;
8
+ export type TextSelectionEvent = (val: string, start: number, end: number, sender: ReactUnity.UGUI.InputComponent) => void;
9
9
  export interface Input extends View<ReactUnity.UGUI.InputComponent> {
10
10
  placeholder?: string;
11
11
  value?: string;
@@ -5,10 +5,10 @@ import { SVGEelement } from '../svg';
5
5
  import * as Components from './components';
6
6
  import { Input } from './input';
7
7
  import NS = ReactUnity.UGUI;
8
- declare type Children<T = any> = {
8
+ type Children<T = any> = {
9
9
  children?: T;
10
10
  };
11
- declare type BaseCmp = Components.View<any> & RefAttributes<NS.UGUIComponent> & Children;
11
+ type BaseCmp = Components.View<any> & RefAttributes<NS.UGUIComponent> & Children;
12
12
  export interface UGUIElements extends BaseElements<BaseCmp> {
13
13
  view: Components.View & RefAttributes<NS.ContainerComponent> & {
14
14
  tag?: string;
@@ -4,7 +4,7 @@ import { Style } from '../properties';
4
4
  import { AssetReference } from '../properties/values';
5
5
  import { ActionCallback, Events } from './events';
6
6
  import Cmp = ReactUnity.UIToolkit;
7
- declare type BaseCmp = Cmp.UIToolkitComponent;
7
+ type BaseCmp = Cmp.UIToolkitComponent;
8
8
  export interface View<TSender = BaseCmp> extends Events<TSender>, BaseCmpProps {
9
9
  tooltip?: string;
10
10
  viewDataKey?: string;
@@ -56,7 +56,7 @@ export interface Anchor extends View {
56
56
  export interface Image extends View<Cmp.ImageComponent> {
57
57
  source?: AssetReference;
58
58
  }
59
- export declare type ToggleEvent = (val: boolean) => void;
59
+ export type ToggleEvent = (val: boolean) => void;
60
60
  export interface Toggle extends BaseField<boolean, Cmp.ToggleComponent> {
61
61
  text?: string;
62
62
  }
@@ -1,10 +1,10 @@
1
1
  import { BaseEvents } from '../base';
2
2
  import { ReactUnity, UnityEngine } from '../generated';
3
3
  import ui = UnityEngine.UIElements;
4
- declare type BaseCmp = ReactUnity.UIToolkit.UIToolkitComponent;
5
- export declare type Handler<T, TSender = BaseCmp> = (ev: T, sender: TSender) => void;
6
- export declare type ActionCallback<TSender = BaseCmp> = (sender: TSender) => void;
7
- export declare type BaseEventCallback = (e: ui.EventBase) => void;
4
+ type BaseCmp = ReactUnity.UIToolkit.UIToolkitComponent;
5
+ export type Handler<T, TSender = BaseCmp> = (ev: T, sender: TSender) => void;
6
+ export type ActionCallback<TSender = BaseCmp> = (sender: TSender) => void;
7
+ export type BaseEventCallback = (e: ui.EventBase) => void;
8
8
  export interface Events<TSender = BaseCmp> extends BaseEvents<TSender> {
9
9
  onClick?: Handler<ui.ClickEvent, TSender>;
10
10
  onPointerUp?: Handler<ui.PointerUpEvent, TSender>;
@@ -4,10 +4,10 @@ import { ReactUnity } from '../generated';
4
4
  import { SVGEelement } from '../svg';
5
5
  import * as Components from './components';
6
6
  import Cmp = ReactUnity.UIToolkit;
7
- declare type Children<T = any> = {
7
+ type Children<T = any> = {
8
8
  children?: T;
9
9
  };
10
- declare type BaseElement<T = Cmp.UIToolkitComponent> = Components.View<T> & rc.RefAttributes<Cmp.UIToolkitComponent> & Children;
10
+ type BaseElement<T = Cmp.UIToolkitComponent> = Components.View<T> & rc.RefAttributes<Cmp.UIToolkitComponent> & Children;
11
11
  export interface UIToolkitElements extends BaseElements<BaseElement<any>> {
12
12
  view: BaseElement & {
13
13
  tag?: string;