@reactunity/renderer 0.4.1 → 0.6.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.
@@ -0,0 +1,358 @@
1
+ import { System } from './system';
2
+ export declare namespace Facebook {
3
+ namespace Yoga {
4
+ class BaselineFunction {
5
+ constructor(object: any, method: System.IntPtr);
6
+ Method: System.Reflection.MethodInfo;
7
+ Target: any;
8
+ Invoke(node: Facebook.Yoga.YogaNode, width: number, height: number): number;
9
+ BeginInvoke(node: Facebook.Yoga.YogaNode, width: number, height: number, callback: System.AsyncCallback, object: any): System.IAsyncResult;
10
+ EndInvoke(result: System.IAsyncResult): number;
11
+ GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
12
+ Equals(obj: any): boolean;
13
+ GetHashCode(): number;
14
+ GetInvocationList(): System.Delegate[];
15
+ DynamicInvoke(...args: any[]): any;
16
+ Clone(): any;
17
+ GetType(): System.Type;
18
+ ToString(): string;
19
+ }
20
+ class Logger {
21
+ constructor(object: any, method: System.IntPtr);
22
+ Method: System.Reflection.MethodInfo;
23
+ Target: any;
24
+ Invoke(config: Facebook.Yoga.YogaConfig, node: Facebook.Yoga.YogaNode, level: Facebook.Yoga.YogaLogLevel, message: string): void;
25
+ BeginInvoke(config: Facebook.Yoga.YogaConfig, node: Facebook.Yoga.YogaNode, level: Facebook.Yoga.YogaLogLevel, message: string, callback: System.AsyncCallback, object: any): System.IAsyncResult;
26
+ EndInvoke(result: System.IAsyncResult): void;
27
+ GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
28
+ Equals(obj: any): boolean;
29
+ GetHashCode(): number;
30
+ GetInvocationList(): System.Delegate[];
31
+ DynamicInvoke(...args: any[]): any;
32
+ Clone(): any;
33
+ GetType(): System.Type;
34
+ ToString(): string;
35
+ }
36
+ class MeasureFunction {
37
+ constructor(object: any, method: System.IntPtr);
38
+ Method: System.Reflection.MethodInfo;
39
+ Target: any;
40
+ Invoke(node: Facebook.Yoga.YogaNode, width: number, widthMode: Facebook.Yoga.YogaMeasureMode, height: number, heightMode: Facebook.Yoga.YogaMeasureMode): Facebook.Yoga.YogaSize;
41
+ BeginInvoke(node: Facebook.Yoga.YogaNode, width: number, widthMode: Facebook.Yoga.YogaMeasureMode, height: number, heightMode: Facebook.Yoga.YogaMeasureMode, callback: System.AsyncCallback, object: any): System.IAsyncResult;
42
+ EndInvoke(result: System.IAsyncResult): Facebook.Yoga.YogaSize;
43
+ GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
44
+ Equals(obj: any): boolean;
45
+ GetHashCode(): number;
46
+ GetInvocationList(): System.Delegate[];
47
+ DynamicInvoke(...args: any[]): any;
48
+ Clone(): any;
49
+ GetType(): System.Type;
50
+ ToString(): string;
51
+ }
52
+ class MeasureOutput {
53
+ constructor();
54
+ static Make(width: number, height: number): Facebook.Yoga.YogaSize;
55
+ Equals(obj: any): boolean;
56
+ GetHashCode(): number;
57
+ GetType(): System.Type;
58
+ ToString(): string;
59
+ }
60
+ enum YogaAlign {
61
+ Auto = 0,
62
+ FlexStart = 1,
63
+ Center = 2,
64
+ FlexEnd = 3,
65
+ Stretch = 4,
66
+ Baseline = 5,
67
+ SpaceBetween = 6,
68
+ SpaceAround = 7
69
+ }
70
+ class YogaBaselineFunc {
71
+ constructor(object: any, method: System.IntPtr);
72
+ Method: System.Reflection.MethodInfo;
73
+ Target: any;
74
+ Invoke(unmanagedNodePtr: System.IntPtr, width: number, height: number): number;
75
+ BeginInvoke(unmanagedNodePtr: System.IntPtr, width: number, height: number, callback: System.AsyncCallback, object: any): System.IAsyncResult;
76
+ EndInvoke(result: System.IAsyncResult): number;
77
+ GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
78
+ Equals(obj: any): boolean;
79
+ GetHashCode(): number;
80
+ GetInvocationList(): System.Delegate[];
81
+ DynamicInvoke(...args: any[]): any;
82
+ Clone(): any;
83
+ GetType(): System.Type;
84
+ ToString(): string;
85
+ }
86
+ class YogaConfig {
87
+ constructor();
88
+ Logger: Facebook.Yoga.Logger;
89
+ UseWebDefaults: boolean;
90
+ PointScaleFactor: number;
91
+ SetExperimentalFeatureEnabled(feature: Facebook.Yoga.YogaExperimentalFeature, enabled: boolean): void;
92
+ IsExperimentalFeatureEnabled(feature: Facebook.Yoga.YogaExperimentalFeature): boolean;
93
+ static GetInstanceCount(): number;
94
+ static SetDefaultLogger(logger: Facebook.Yoga.Logger): void;
95
+ Equals(obj: any): boolean;
96
+ GetHashCode(): number;
97
+ GetType(): System.Type;
98
+ ToString(): string;
99
+ }
100
+ class YogaConstants {
101
+ static Undefined: number;
102
+ static IsUndefined(value: number): boolean;
103
+ static IsUndefined(value: Facebook.Yoga.YogaValue): boolean;
104
+ Equals(obj: any): boolean;
105
+ GetHashCode(): number;
106
+ GetType(): System.Type;
107
+ ToString(): string;
108
+ }
109
+ enum YogaDimension {
110
+ Width = 0,
111
+ Height = 1
112
+ }
113
+ enum YogaDirection {
114
+ Inherit = 0,
115
+ LTR = 1,
116
+ RTL = 2
117
+ }
118
+ enum YogaDisplay {
119
+ Flex = 0,
120
+ None = 1
121
+ }
122
+ enum YogaEdge {
123
+ Left = 0,
124
+ Top = 1,
125
+ Right = 2,
126
+ Bottom = 3,
127
+ Start = 4,
128
+ End = 5,
129
+ Horizontal = 6,
130
+ Vertical = 7,
131
+ All = 8
132
+ }
133
+ enum YogaExperimentalFeature {
134
+ WebFlexBasis = 0
135
+ }
136
+ enum YogaFlexDirection {
137
+ Column = 0,
138
+ ColumnReverse = 1,
139
+ Row = 2,
140
+ RowReverse = 3
141
+ }
142
+ enum YogaJustify {
143
+ FlexStart = 0,
144
+ Center = 1,
145
+ FlexEnd = 2,
146
+ SpaceBetween = 3,
147
+ SpaceAround = 4,
148
+ SpaceEvenly = 5
149
+ }
150
+ class YogaLogger {
151
+ constructor(object: any, method: System.IntPtr);
152
+ Method: System.Reflection.MethodInfo;
153
+ Target: any;
154
+ Invoke(unmanagedConfigPtr: System.IntPtr, unmanagedNotePtr: System.IntPtr, level: Facebook.Yoga.YogaLogLevel, message: string): void;
155
+ BeginInvoke(unmanagedConfigPtr: System.IntPtr, unmanagedNotePtr: System.IntPtr, level: Facebook.Yoga.YogaLogLevel, message: string, callback: System.AsyncCallback, object: any): System.IAsyncResult;
156
+ EndInvoke(result: System.IAsyncResult): void;
157
+ GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
158
+ Equals(obj: any): boolean;
159
+ GetHashCode(): number;
160
+ GetInvocationList(): System.Delegate[];
161
+ DynamicInvoke(...args: any[]): any;
162
+ Clone(): any;
163
+ GetType(): System.Type;
164
+ ToString(): string;
165
+ }
166
+ enum YogaLogLevel {
167
+ Error = 0,
168
+ Warn = 1,
169
+ Info = 2,
170
+ Debug = 3,
171
+ Verbose = 4,
172
+ Fatal = 5
173
+ }
174
+ class YogaMeasureFunc {
175
+ constructor(object: any, method: System.IntPtr);
176
+ Method: System.Reflection.MethodInfo;
177
+ Target: any;
178
+ Invoke(unmanagedNodePtr: System.IntPtr, width: number, widthMode: Facebook.Yoga.YogaMeasureMode, height: number, heightMode: Facebook.Yoga.YogaMeasureMode): Facebook.Yoga.YogaSize;
179
+ BeginInvoke(unmanagedNodePtr: System.IntPtr, width: number, widthMode: Facebook.Yoga.YogaMeasureMode, height: number, heightMode: Facebook.Yoga.YogaMeasureMode, callback: System.AsyncCallback, object: any): System.IAsyncResult;
180
+ EndInvoke(result: System.IAsyncResult): Facebook.Yoga.YogaSize;
181
+ GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
182
+ Equals(obj: any): boolean;
183
+ GetHashCode(): number;
184
+ GetInvocationList(): System.Delegate[];
185
+ DynamicInvoke(...args: any[]): any;
186
+ Clone(): any;
187
+ GetType(): System.Type;
188
+ ToString(): string;
189
+ }
190
+ enum YogaMeasureMode {
191
+ Undefined = 0,
192
+ Exactly = 1,
193
+ AtMost = 2
194
+ }
195
+ class YogaNode {
196
+ constructor(config?: Facebook.Yoga.YogaConfig);
197
+ constructor(srcNode: Facebook.Yoga.YogaNode);
198
+ [key: string]: any;
199
+ IsDirty: boolean;
200
+ HasNewLayout: boolean;
201
+ Parent: Facebook.Yoga.YogaNode;
202
+ IsMeasureDefined: boolean;
203
+ IsBaselineDefined: boolean;
204
+ StyleDirection: Facebook.Yoga.YogaDirection;
205
+ FlexDirection: Facebook.Yoga.YogaFlexDirection;
206
+ JustifyContent: Facebook.Yoga.YogaJustify;
207
+ Display: Facebook.Yoga.YogaDisplay;
208
+ AlignItems: Facebook.Yoga.YogaAlign;
209
+ AlignSelf: Facebook.Yoga.YogaAlign;
210
+ AlignContent: Facebook.Yoga.YogaAlign;
211
+ PositionType: Facebook.Yoga.YogaPositionType;
212
+ Wrap: Facebook.Yoga.YogaWrap;
213
+ Flex: number;
214
+ FlexGrow: number;
215
+ FlexShrink: number;
216
+ FlexBasis: Facebook.Yoga.YogaValue;
217
+ Width: Facebook.Yoga.YogaValue;
218
+ Height: Facebook.Yoga.YogaValue;
219
+ MaxWidth: Facebook.Yoga.YogaValue;
220
+ MaxHeight: Facebook.Yoga.YogaValue;
221
+ MinWidth: Facebook.Yoga.YogaValue;
222
+ MinHeight: Facebook.Yoga.YogaValue;
223
+ AspectRatio: number;
224
+ LayoutX: number;
225
+ LayoutY: number;
226
+ LayoutWidth: number;
227
+ LayoutHeight: number;
228
+ LayoutDirection: Facebook.Yoga.YogaDirection;
229
+ Overflow: Facebook.Yoga.YogaOverflow;
230
+ Data: any;
231
+ Count: number;
232
+ Left: Facebook.Yoga.YogaValue;
233
+ Top: Facebook.Yoga.YogaValue;
234
+ Right: Facebook.Yoga.YogaValue;
235
+ Bottom: Facebook.Yoga.YogaValue;
236
+ Start: Facebook.Yoga.YogaValue;
237
+ End: Facebook.Yoga.YogaValue;
238
+ MarginLeft: Facebook.Yoga.YogaValue;
239
+ MarginTop: Facebook.Yoga.YogaValue;
240
+ MarginRight: Facebook.Yoga.YogaValue;
241
+ MarginBottom: Facebook.Yoga.YogaValue;
242
+ MarginStart: Facebook.Yoga.YogaValue;
243
+ MarginEnd: Facebook.Yoga.YogaValue;
244
+ MarginHorizontal: Facebook.Yoga.YogaValue;
245
+ MarginVertical: Facebook.Yoga.YogaValue;
246
+ Margin: Facebook.Yoga.YogaValue;
247
+ PaddingLeft: Facebook.Yoga.YogaValue;
248
+ PaddingTop: Facebook.Yoga.YogaValue;
249
+ PaddingRight: Facebook.Yoga.YogaValue;
250
+ PaddingBottom: Facebook.Yoga.YogaValue;
251
+ PaddingStart: Facebook.Yoga.YogaValue;
252
+ PaddingEnd: Facebook.Yoga.YogaValue;
253
+ PaddingHorizontal: Facebook.Yoga.YogaValue;
254
+ PaddingVertical: Facebook.Yoga.YogaValue;
255
+ Padding: Facebook.Yoga.YogaValue;
256
+ BorderLeftWidth: number;
257
+ BorderTopWidth: number;
258
+ BorderRightWidth: number;
259
+ BorderBottomWidth: number;
260
+ BorderStartWidth: number;
261
+ BorderEndWidth: number;
262
+ BorderWidth: number;
263
+ LayoutMarginLeft: number;
264
+ LayoutMarginTop: number;
265
+ LayoutMarginRight: number;
266
+ LayoutMarginBottom: number;
267
+ LayoutMarginStart: number;
268
+ LayoutMarginEnd: number;
269
+ LayoutPaddingLeft: number;
270
+ LayoutPaddingTop: number;
271
+ LayoutPaddingRight: number;
272
+ LayoutPaddingBottom: number;
273
+ LayoutPaddingStart: number;
274
+ LayoutPaddingEnd: number;
275
+ Reset(): void;
276
+ MarkDirty(): void;
277
+ MarkHasNewLayout(): void;
278
+ CopyStyle(srcNode: Facebook.Yoga.YogaNode): void;
279
+ MarkLayoutSeen(): void;
280
+ ValuesEqual(f1: number, f2: number): boolean;
281
+ Insert(index: number, node: Facebook.Yoga.YogaNode): void;
282
+ RemoveAt(index: number): void;
283
+ AddChild(child: Facebook.Yoga.YogaNode): void;
284
+ RemoveChild(child: Facebook.Yoga.YogaNode): void;
285
+ Clear(): void;
286
+ IndexOf(node: Facebook.Yoga.YogaNode): number;
287
+ SetMeasureFunction(measureFunction: Facebook.Yoga.MeasureFunction): void;
288
+ SetBaselineFunction(baselineFunction: Facebook.Yoga.BaselineFunction): void;
289
+ CalculateLayout(width?: number, height?: number): void;
290
+ Print(options?: Facebook.Yoga.YogaPrintOptions): string;
291
+ GetEnumerator(): System.Collections.Generic.IEnumerator<Facebook.Yoga.YogaNode>;
292
+ Equals(obj: any): boolean;
293
+ GetHashCode(): number;
294
+ GetType(): System.Type;
295
+ ToString(): string;
296
+ }
297
+ enum YogaNodeType {
298
+ Default = 0,
299
+ Text = 1
300
+ }
301
+ enum YogaOverflow {
302
+ Visible = 0,
303
+ Hidden = 1,
304
+ Scroll = 2
305
+ }
306
+ enum YogaPositionType {
307
+ Relative = 0,
308
+ Absolute = 1
309
+ }
310
+ enum YogaPrintOptions {
311
+ Layout = 1,
312
+ Style = 2,
313
+ Children = 4
314
+ }
315
+ class YogaSize {
316
+ width: number;
317
+ height: number;
318
+ Equals(obj: any): boolean;
319
+ GetHashCode(): number;
320
+ ToString(): string;
321
+ GetType(): System.Type;
322
+ }
323
+ enum YogaUnit {
324
+ Undefined = 0,
325
+ Point = 1,
326
+ Percent = 2,
327
+ Auto = 3
328
+ }
329
+ class YogaValue {
330
+ Unit: Facebook.Yoga.YogaUnit;
331
+ Value: number;
332
+ static Point(value: number): Facebook.Yoga.YogaValue;
333
+ Equals(other: Facebook.Yoga.YogaValue): boolean;
334
+ Equals(obj: any): boolean;
335
+ GetHashCode(): number;
336
+ static Undefined(): Facebook.Yoga.YogaValue;
337
+ static Auto(): Facebook.Yoga.YogaValue;
338
+ static Percent(value: number): Facebook.Yoga.YogaValue;
339
+ ToString(): string;
340
+ GetType(): System.Type;
341
+ }
342
+ class YogaValueExtensions {
343
+ static Percent(value: number): Facebook.Yoga.YogaValue;
344
+ static Pt(value: number): Facebook.Yoga.YogaValue;
345
+ static Percent(value: number): Facebook.Yoga.YogaValue;
346
+ static Pt(value: number): Facebook.Yoga.YogaValue;
347
+ Equals(obj: any): boolean;
348
+ GetHashCode(): number;
349
+ GetType(): System.Type;
350
+ ToString(): string;
351
+ }
352
+ enum YogaWrap {
353
+ NoWrap = 0,
354
+ Wrap = 1,
355
+ WrapReverse = 2
356
+ }
357
+ }
358
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -6,4 +6,11 @@ export declare type Visibility = 'visible' | 'hidden';
6
6
  export declare type Appearance = 'none' | 'button' | 'input' | 'toggle';
7
7
  export declare type NavigationMode = 'none' | 'horizontal' | 'vertical' | 'automatic' | 'explicit';
8
8
  export declare type WhiteSpace = 'normal' | 'nowrap';
9
+ export declare type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
10
+ export declare type BackgroundBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
9
11
  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';
12
+ 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';
13
+ export declare type TimingFunctionType = 'ease' | 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end';
14
+ export declare type AnimationFillMode = 'none' | 'both' | 'forwards' | 'backwards';
15
+ export declare type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
16
+ export declare type AnimationPlayState = 'running' | 'paused';
@@ -1,4 +1,4 @@
1
- import { Appearance, CursorType, FontStyles, FontWeight, NavigationMode, PointerEvents, TextOverflowModes, Visibility, WhiteSpace } from './styles-enums';
1
+ import { AnimationDirection, AnimationFillMode, AnimationPlayState, Appearance, BackgroundBlendMode, CursorType, FontStyles, FontWeight, NavigationMode, ObjectFit, PointerEvents, TextAlign, TextOverflowModes, TimingFunctionType, Visibility, WhiteSpace } from './styles-enums';
2
2
  import { AssetReference, ColorAux, NumberAux, Vector2Aux, Vector3Aux } from './values';
3
3
  import { YogaValue2Aux, YogaValueAux } from './yoga';
4
4
  export interface RenderStyle {
@@ -10,9 +10,9 @@ export interface RenderStyle {
10
10
  content?: string;
11
11
  appearance?: Appearance;
12
12
  navigation?: NavigationMode;
13
+ backgroundBlendMode?: BackgroundBlendMode;
13
14
  backgroundColor?: ColorAux;
14
15
  backgroundImage?: AssetReference;
15
- mask?: AssetReference;
16
16
  maskImage?: AssetReference;
17
17
  borderRadius?: NumberAux;
18
18
  borderTopLeftRadius?: NumberAux;
@@ -25,22 +25,45 @@ export interface RenderStyle {
25
25
  borderBottomColor?: ColorAux;
26
26
  borderLeftColor?: ColorAux;
27
27
  boxShadow?: string;
28
- objectFit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
28
+ objectFit?: ObjectFit;
29
29
  objectPosition?: YogaValue2Aux;
30
30
  transformOrigin?: Vector2Aux;
31
31
  translate?: YogaValue2Aux;
32
32
  scale?: Vector2Aux;
33
33
  rotate?: Vector3Aux;
34
- animation?: string;
35
- transition?: string;
36
- audio?: string;
34
+ stateDuration?: number;
37
35
  color?: ColorAux;
38
36
  fontFamily?: AssetReference;
39
37
  fontWeight?: FontWeight;
40
38
  fontStyle?: FontStyles;
41
39
  fontSize?: YogaValueAux;
42
40
  textOverflow?: TextOverflowModes;
41
+ textAlign?: TextAlign;
43
42
  whiteSpace?: WhiteSpace;
43
+ textStrokeWidth?: NumberAux;
44
+ textStrokeColor?: ColorAux;
45
+ lineHeight?: number;
46
+ letterSpacing?: number;
47
+ wordSpacing?: number;
48
+ maxLines?: number;
49
+ transitionProperty?: keyof RenderStyle | string;
50
+ transitionDuration?: number | string;
51
+ transitionTimingFunction?: TimingFunctionType | string;
52
+ transitionDelay?: number | string;
53
+ transitionPlayState?: AnimationPlayState | string;
54
+ animationDelay?: number | string;
55
+ animationDirection?: AnimationDirection | string;
56
+ animationDuration?: number | string;
57
+ animationFillMode?: AnimationFillMode | string;
58
+ animationIterationCount?: number | string;
59
+ animationName?: string | string;
60
+ animationPlayState?: AnimationPlayState | string;
61
+ animationTimingFunction?: TimingFunctionType | string;
62
+ audioClip?: AssetReference;
63
+ audioIterationCount?: number | string;
64
+ audioDelay?: number | string;
65
+ all?: string;
66
+ background?: string;
44
67
  border?: string;
45
68
  borderTop?: string;
46
69
  borderRight?: string;
@@ -48,9 +71,15 @@ export interface RenderStyle {
48
71
  borderLeft?: string;
49
72
  borderWidth?: string;
50
73
  margin?: string;
74
+ mask?: string;
51
75
  padding?: string;
52
76
  inset?: string;
53
77
  flex?: string;
54
78
  flexFlow?: string;
55
79
  font?: string;
80
+ textStroke?: string;
81
+ animation?: string;
82
+ transition?: string;
83
+ audio?: string;
84
+ [variable: `--${string}`]: any;
56
85
  }
@@ -11,7 +11,7 @@ export declare type Vector3Aux = string | Array3Aux<number>;
11
11
  export declare type RectOffsetAux = Array4Aux<number>;
12
12
  export declare type KnownColor = keyof KnownColors;
13
13
  export declare type HexColor = string;
14
- export declare type ColorAux = KnownColor | HexColor | number | Array4Aux<number> | [ColorAux, number?, ColorAux?] | UnityEngine.Color;
14
+ export declare type ColorAux = KnownColor | HexColor | number | Array4Aux<number> | UnityEngine.Color;
15
15
  export declare type NumberAux = string | number;
16
16
  export declare type AssetReference = string | UnityEngine.Object;
17
17
  export {};
@@ -3,6 +3,6 @@ export declare type YogaAlign = 'auto' | 'flex-start' | 'center' | 'flex-end' |
3
3
  export declare type YogaJustify = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
4
4
  export declare type Display = 'flex' | 'none';
5
5
  export declare type Wrap = 'no-wrap' | 'wrap' | 'wrap-reverse';
6
- export declare type Position = 'relative' | 'absolute';
6
+ export declare type Position = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky';
7
7
  export declare type Overflow = 'visible' | 'hidden' | 'scroll';
8
8
  export declare type Direction = 'inherit' | 'ltr' | 'rtl';
@@ -4,7 +4,7 @@ export declare type Unique<T, K> = T & {
4
4
  };
5
5
  export declare type NativeInstance = ReactUnity.IReactComponent;
6
6
  export declare type NativeTextInstance = ReactUnity.ITextComponent;
7
- export declare type NativeContainerInstance = ReactUnity.IHostComponent;
7
+ export declare type NativeContainerInstance = ReactUnity.IReactComponent;
8
8
  export declare type InstanceTag = string;
9
9
  export declare type Props = React.RefAttributes<NativeInstance> & {
10
10
  [key: string]: any;
@@ -10,6 +10,7 @@ export interface View<T = ReactUnity.UGUI.UGUIComponent> extends Events<T> {
10
10
  style?: Style;
11
11
  }
12
12
  export interface Text extends View<ReactUnity.UGUI.TextComponent> {
13
+ richText?: boolean;
13
14
  }
14
15
  export interface Label extends View<ReactUnity.UGUI.LabelComponent> {
15
16
  for?: ReactUnity.UGUI.UGUIComponent | string;
@@ -23,6 +24,8 @@ export interface Scroll extends View<ReactUnity.UGUI.ScrollComponent> {
23
24
  direction?: ScrollDirection;
24
25
  alwaysShow?: ScrollDirection;
25
26
  sensitivity?: number;
27
+ elasticity?: number;
28
+ smoothness?: number;
26
29
  }
27
30
  export interface Button extends View<ReactUnity.UGUI.ButtonComponent> {
28
31
  onClick?: ActionCallback<ReactUnity.UGUI.ButtonComponent>;
@@ -22,7 +22,7 @@ export function createDictionaryWatcher(dictionary, displayName) {
22
22
  var Provider = function Provider(_a) {
23
23
  var children = _a.children;
24
24
  var _b = React.useState(0), render = _b[0], setRender = _b[1];
25
- React.useEffect(function () {
25
+ React.useLayoutEffect(function () {
26
26
  var remove = dictionary === null || dictionary === void 0 ? void 0 : dictionary.AddListener(function (key, value, dic) {
27
27
  setRender(function (x) { return x + 1; });
28
28
  });
@@ -1,2 +1,7 @@
1
- import type { ServerStyleSheet } from 'styled-components';
1
+ import { ReactElement } from 'react';
2
+ interface ServerStyleSheet {
3
+ getStyleElement(): Array<ReactElement<{}>>;
4
+ seal(): void;
5
+ }
2
6
  export declare function insertStyledComponentsSheet(sheet: ServerStyleSheet): void;
7
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactunity/renderer",
3
- "version": "0.4.1",
3
+ "version": "0.6.0",
4
4
  "description": "React renderer for Unity3D",
5
5
  "types": "dist/index.d.ts",
6
6
  "typings": "dist/index.d.ts",
@@ -62,12 +62,11 @@
62
62
  "react": "^17.0.2"
63
63
  },
64
64
  "devDependencies": {
65
- "@types/react": "^17.0.19",
65
+ "@types/react": "^17.0.21",
66
66
  "@types/react-reconciler": "^0.26.3",
67
- "@types/styled-components": "5.1.13",
68
67
  "@types/webpack-env": "^1.16.2",
69
68
  "eslint": "^7.32.0",
70
69
  "rimraf": "^3.0.2",
71
- "typescript": "^4.4.2"
70
+ "typescript": "^4.4.3"
72
71
  }
73
72
  }