@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.
- package/dist/src/helpers/icons.d.ts +2 -2
- package/dist/src/models/base.d.ts +8 -8
- package/dist/src/models/editor/components.d.ts +2 -2
- package/dist/src/models/editor/events.d.ts +4 -4
- package/dist/src/models/editor/jsx.d.ts +5 -5
- package/dist/src/models/environment/dom/common.d.ts +5 -5
- package/dist/src/models/environment/dom/fetch.d.ts +10 -10
- package/dist/src/models/environment/dom/xhr.d.ts +2 -2
- package/dist/src/models/environment/interop.d.ts +2 -2
- package/dist/src/models/generated/editor.d.ts +15016 -11979
- package/dist/src/models/generated/editor.js +1 -1
- package/dist/src/models/generated/react.d.ts +1336 -417
- package/dist/src/models/generated/react.js +1 -1
- package/dist/src/models/generated/system.d.ts +2602 -2704
- package/dist/src/models/generated/system.js +2 -2
- package/dist/src/models/generated/tests.d.ts +228 -231
- package/dist/src/models/generated/tests.js +1 -1
- package/dist/src/models/generated/unity.d.ts +7998 -14519
- package/dist/src/models/generated/unity.js +2 -2
- package/dist/src/models/generated/yoga.d.ts +1 -1
- package/dist/src/models/generated/yoga.js +1 -1
- package/dist/src/models/properties/colors.d.ts +1 -1
- package/dist/src/models/properties/style.d.ts +7 -2
- package/dist/src/models/properties/styles-enums.d.ts +24 -19
- package/dist/src/models/properties/styles.d.ts +76 -60
- package/dist/src/models/properties/values.d.ts +16 -16
- package/dist/src/models/properties/yoga-enums.d.ts +8 -8
- package/dist/src/models/properties/yoga.d.ts +16 -16
- package/dist/src/models/renderer.d.ts +14 -14
- package/dist/src/models/richtext.d.ts +2 -2
- package/dist/src/models/svg.d.ts +2 -2
- package/dist/src/models/ugui/components.d.ts +1 -1
- package/dist/src/models/ugui/events.d.ts +7 -7
- package/dist/src/models/ugui/input.d.ts +6 -6
- package/dist/src/models/ugui/jsx.d.ts +2 -2
- package/dist/src/models/uitoolkit/components.d.ts +2 -2
- package/dist/src/models/uitoolkit/events.d.ts +4 -4
- package/dist/src/models/uitoolkit/jsx.d.ts +2 -2
- package/dist/src/renderer/async/commands.d.ts +14 -14
- package/dist/src/renderer/async/types.d.ts +10 -10
- package/dist/src/renderer/diffing.d.ts +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Types in assemblies: UnityEngine.CoreModule,
|
|
3
|
-
// Generated
|
|
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 {};
|
|
@@ -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
|
-
|
|
5
|
-
|
|
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
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
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
|
|
7
|
-
sortingLayer?: number
|
|
8
|
-
order?: number
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
sortingLayer?: number;
|
|
8
|
+
order?: number;
|
|
9
9
|
visibility?: Visibility | boolean;
|
|
10
|
-
cursor?: CursorType
|
|
10
|
+
cursor?: CursorType;
|
|
11
11
|
pointerEvents?: PointerEvents;
|
|
12
|
-
content?:
|
|
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?:
|
|
22
|
-
backgroundRepeatY?:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
61
|
-
letterSpacing?: number
|
|
62
|
-
wordSpacing?: number
|
|
63
|
-
maxLines?: number
|
|
64
|
-
transitionProperty?: keyof RenderStyle
|
|
65
|
-
transitionDuration?: number
|
|
66
|
-
transitionTimingFunction?: TimingFunctionType
|
|
67
|
-
transitionDelay?: number
|
|
68
|
-
transitionPlayState?: AnimationPlayState
|
|
69
|
-
motionDuration?: number
|
|
70
|
-
motionTimingFunction?: TimingFunctionType
|
|
71
|
-
motionDelay?: number
|
|
72
|
-
animationDelay?: number
|
|
73
|
-
animationDirection?: AnimationDirection
|
|
74
|
-
animationDuration?: number
|
|
75
|
-
animationFillMode?: AnimationFillMode
|
|
76
|
-
animationIterationCount?: number
|
|
77
|
-
animationName?:
|
|
78
|
-
animationPlayState?: AnimationPlayState
|
|
79
|
-
animationTimingFunction?: TimingFunctionType
|
|
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
|
|
82
|
-
audioDelay?: number
|
|
83
|
-
all?:
|
|
84
|
-
background?:
|
|
85
|
-
backgroundPosition?:
|
|
86
|
-
backgroundRepeat?:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
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
|
|
23
|
-
export
|
|
22
|
+
export type AssetReference = string | UnityEngine.Object;
|
|
23
|
+
export type AssetReferenceOrHttp = AssetReference | HttpSource;
|
|
24
24
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
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
|
|
4
|
-
export
|
|
5
|
-
export
|
|
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
|
|
17
|
-
borderStartWidth?: number
|
|
18
|
-
borderEndWidth?: number
|
|
19
|
-
borderTopWidth?: number
|
|
20
|
-
borderRightWidth?: number
|
|
21
|
-
borderBottomWidth?: number
|
|
22
|
-
borderLeftWidth?: number
|
|
23
|
-
aspectRatio?: number
|
|
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
|
|
26
|
-
flexGrow?: number
|
|
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
|
|
59
|
-
columnGap?: number
|
|
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
|
|
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
|
|
2
|
+
export type Unique<T, K> = T & {
|
|
3
3
|
$type: K;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
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
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
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
|
|
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 {
|
package/dist/src/models/svg.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import { Style } from './properties';
|
|
3
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
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
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
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
|
-
|
|
8
|
+
type Children<T = any> = {
|
|
9
9
|
children?: T;
|
|
10
10
|
};
|
|
11
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
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
|
-
|
|
7
|
+
type Children<T = any> = {
|
|
8
8
|
children?: T;
|
|
9
9
|
};
|
|
10
|
-
|
|
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;
|