@reactunity/renderer 0.12.0 → 0.13.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.
@@ -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.UIElementsNativeModule, UnityEngine.AIModule, UnityEngine.TestRunner, UnityEngine.TextCoreFontEngineModule, UnityEngine.TextCoreTextEngineModule, UnityEngine.XRModule, UnityEngine.PhysicsModule, UnityEngine.InputLegacyModule, UnityEngine.UI, Unity.InputSystem, Unity.InputSystem
3
- // Generated 23/05/2022 15:36:59
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
4
4
  //
5
5
  /* eslint-disable */
6
6
  export {};
@@ -6,7 +6,7 @@ export declare namespace Facebook {
6
6
  Method: System.Reflection.MethodInfo;
7
7
  Target: any;
8
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;
9
+ BeginInvoke(node: Facebook.Yoga.YogaNode, width: number, height: number, callback: ((ar: System.IAsyncResult) => void), object: any): System.IAsyncResult;
10
10
  EndInvoke(result: System.IAsyncResult): number;
11
11
  GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
12
12
  Equals(obj: any): boolean;
@@ -22,7 +22,7 @@ export declare namespace Facebook {
22
22
  Method: System.Reflection.MethodInfo;
23
23
  Target: any;
24
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;
25
+ BeginInvoke(config: Facebook.Yoga.YogaConfig, node: Facebook.Yoga.YogaNode, level: Facebook.Yoga.YogaLogLevel, message: string, callback: ((ar: System.IAsyncResult) => void), object: any): System.IAsyncResult;
26
26
  EndInvoke(result: System.IAsyncResult): void;
27
27
  GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
28
28
  Equals(obj: any): boolean;
@@ -38,7 +38,7 @@ export declare namespace Facebook {
38
38
  Method: System.Reflection.MethodInfo;
39
39
  Target: any;
40
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;
41
+ BeginInvoke(node: Facebook.Yoga.YogaNode, width: number, widthMode: Facebook.Yoga.YogaMeasureMode, height: number, heightMode: Facebook.Yoga.YogaMeasureMode, callback: ((ar: System.IAsyncResult) => void), object: any): System.IAsyncResult;
42
42
  EndInvoke(result: System.IAsyncResult): Facebook.Yoga.YogaSize;
43
43
  GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
44
44
  Equals(obj: any): boolean;
@@ -72,7 +72,7 @@ export declare namespace Facebook {
72
72
  Method: System.Reflection.MethodInfo;
73
73
  Target: any;
74
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;
75
+ BeginInvoke(unmanagedNodePtr: System.IntPtr, width: number, height: number, callback: ((ar: System.IAsyncResult) => void), object: any): System.IAsyncResult;
76
76
  EndInvoke(result: System.IAsyncResult): number;
77
77
  GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
78
78
  Equals(obj: any): boolean;
@@ -85,13 +85,13 @@ export declare namespace Facebook {
85
85
  }
86
86
  class YogaConfig {
87
87
  constructor();
88
- Logger: Facebook.Yoga.Logger;
88
+ Logger: ((config: Facebook.Yoga.YogaConfig, node: Facebook.Yoga.YogaNode, level: Facebook.Yoga.YogaLogLevel, message: string) => void);
89
89
  UseWebDefaults: boolean;
90
90
  PointScaleFactor: number;
91
91
  SetExperimentalFeatureEnabled(feature: Facebook.Yoga.YogaExperimentalFeature, enabled: boolean): void;
92
92
  IsExperimentalFeatureEnabled(feature: Facebook.Yoga.YogaExperimentalFeature): boolean;
93
93
  static GetInstanceCount(): number;
94
- static SetDefaultLogger(logger: Facebook.Yoga.Logger): void;
94
+ static SetDefaultLogger(logger: ((config: Facebook.Yoga.YogaConfig, node: Facebook.Yoga.YogaNode, level: Facebook.Yoga.YogaLogLevel, message: string) => void)): void;
95
95
  Equals(obj: any): boolean;
96
96
  GetHashCode(): number;
97
97
  GetType(): System.Type;
@@ -139,6 +139,11 @@ export declare namespace Facebook {
139
139
  Row = 2,
140
140
  RowReverse = 3
141
141
  }
142
+ enum YogaGap {
143
+ Column = 0,
144
+ Row = 1,
145
+ All = 2
146
+ }
142
147
  enum YogaJustify {
143
148
  FlexStart = 0,
144
149
  Center = 1,
@@ -152,7 +157,7 @@ export declare namespace Facebook {
152
157
  Method: System.Reflection.MethodInfo;
153
158
  Target: any;
154
159
  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;
160
+ BeginInvoke(unmanagedConfigPtr: System.IntPtr, unmanagedNotePtr: System.IntPtr, level: Facebook.Yoga.YogaLogLevel, message: string, callback: ((ar: System.IAsyncResult) => void), object: any): System.IAsyncResult;
156
161
  EndInvoke(result: System.IAsyncResult): void;
157
162
  GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
158
163
  Equals(obj: any): boolean;
@@ -176,7 +181,7 @@ export declare namespace Facebook {
176
181
  Method: System.Reflection.MethodInfo;
177
182
  Target: any;
178
183
  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;
184
+ BeginInvoke(unmanagedNodePtr: System.IntPtr, width: number, widthMode: Facebook.Yoga.YogaMeasureMode, height: number, heightMode: Facebook.Yoga.YogaMeasureMode, callback: ((ar: System.IAsyncResult) => void), object: any): System.IAsyncResult;
180
185
  EndInvoke(result: System.IAsyncResult): Facebook.Yoga.YogaSize;
181
186
  GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext): void;
182
187
  Equals(obj: any): boolean;
@@ -260,6 +265,9 @@ export declare namespace Facebook {
260
265
  BorderStartWidth: number;
261
266
  BorderEndWidth: number;
262
267
  BorderWidth: number;
268
+ Gap: number;
269
+ RowGap: number;
270
+ ColumnGap: number;
263
271
  LayoutMarginLeft: number;
264
272
  LayoutMarginTop: number;
265
273
  LayoutMarginRight: number;
@@ -284,8 +292,8 @@ export declare namespace Facebook {
284
292
  RemoveChild(child: Facebook.Yoga.YogaNode): void;
285
293
  Clear(): void;
286
294
  IndexOf(node: Facebook.Yoga.YogaNode): number;
287
- SetMeasureFunction(measureFunction: Facebook.Yoga.MeasureFunction): void;
288
- SetBaselineFunction(baselineFunction: Facebook.Yoga.BaselineFunction): void;
295
+ SetMeasureFunction(measureFunction: ((node: Facebook.Yoga.YogaNode, width: number, widthMode: Facebook.Yoga.YogaMeasureMode, height: number, heightMode: Facebook.Yoga.YogaMeasureMode) => Facebook.Yoga.YogaSize)): void;
296
+ SetBaselineFunction(baselineFunction: ((node: Facebook.Yoga.YogaNode, width: number, height: number) => number)): void;
289
297
  CalculateLayout(width?: number, height?: number): void;
290
298
  Print(options?: Facebook.Yoga.YogaPrintOptions): string;
291
299
  GetEnumerator(): System.Collections.Generic.IEnumerator<Facebook.Yoga.YogaNode>;
@@ -304,8 +312,10 @@ export declare namespace Facebook {
304
312
  Scroll = 2
305
313
  }
306
314
  enum YogaPositionType {
307
- Relative = 0,
308
- Absolute = 1
315
+ Default = 1,
316
+ Static = 0,
317
+ Relative = 1,
318
+ Absolute = 2
309
319
  }
310
320
  enum YogaPrintOptions {
311
321
  Layout = 1,
@@ -1,6 +1,6 @@
1
1
  //
2
2
  // Types in assemblies: Facebook.Yoga
3
- // Generated 23/05/2022 15:32:00
3
+ // Generated 30/06/2022 20:21:41
4
4
  //
5
5
  /* eslint-disable */
6
6
  export {};
@@ -103,5 +103,6 @@ export interface RenderStyle {
103
103
  motion?: string;
104
104
  audio?: string;
105
105
  transform?: string;
106
+ gap?: string | number;
106
107
  [variable: `--${string}`]: any;
107
108
  }
@@ -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' | 'fixed' | 'static' | 'sticky';
6
+ export declare type Position = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'inset';
7
7
  export declare type Overflow = 'visible' | 'hidden' | 'scroll';
8
8
  export declare type Direction = 'inherit' | 'ltr' | 'rtl';
@@ -14,17 +14,17 @@ export interface Layout {
14
14
  alignContent?: YogaAlign;
15
15
  alignSelf?: YogaAlign;
16
16
  alignItems?: YogaAlign;
17
- borderWidth?: number;
18
- borderStartWidth?: number;
19
- borderEndWidth?: number;
20
- borderTopWidth?: number;
21
- borderRightWidth?: number;
22
- borderBottomWidth?: number;
23
- borderLeftWidth?: number;
24
- aspectRatio?: number;
17
+ borderWidth?: number | string;
18
+ borderStartWidth?: number | string;
19
+ borderEndWidth?: number | string;
20
+ borderTopWidth?: number | string;
21
+ borderRightWidth?: number | string;
22
+ borderBottomWidth?: number | string;
23
+ borderLeftWidth?: number | string;
24
+ aspectRatio?: number | string;
25
25
  flexDirection?: FlexDirection;
26
- flexShrink?: number;
27
- flexGrow?: number;
26
+ flexShrink?: number | string;
27
+ flexGrow?: number | string;
28
28
  flexBasis?: YogaValueAux;
29
29
  minHeight?: YogaValueAux;
30
30
  minWidth?: YogaValueAux;
@@ -56,6 +56,8 @@ export interface Layout {
56
56
  paddingTop?: YogaValueAux;
57
57
  paddingEnd?: YogaValueAux;
58
58
  paddingLeft?: YogaValueAux;
59
+ rowGap?: number | string;
60
+ columnGap?: number | string;
59
61
  }
60
62
  export interface LayoutExtended {
61
63
  position?: Position;
@@ -6,6 +6,7 @@ import { ActionCallback, Events } from './events';
6
6
  export interface View<T = ReactUnity.UGUI.UGUIComponent> extends Events<T>, BaseCmpProps {
7
7
  active?: boolean;
8
8
  style?: Style | string;
9
+ data?: Record<string, any>;
9
10
  eventViewport?: UnityEngine.RectTransform | UnityEngine.GameObject | ReactUnity.UGUI.UGUIComponent;
10
11
  }
11
12
  export interface Text extends View<ReactUnity.UGUI.TextComponent> {
@@ -1 +1 @@
1
- export declare const version = "0.12.0";
1
+ export declare const version = "0.13.0";
@@ -1 +1 @@
1
- export var version = '0.12.0';
1
+ export var version = '0.13.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactunity/renderer",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "React renderer for Unity3D",
5
5
  "types": "dist/index.d.ts",
6
6
  "typings": "dist/index.d.ts",
@@ -61,9 +61,9 @@
61
61
  "react": "^18.0.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@reactunity/scripts": "^0.12.0",
64
+ "@reactunity/scripts": "^0.13.0",
65
65
  "@types/react-reconciler": "^0.28.0",
66
66
  "rimraf": "^3.0.2",
67
- "typescript": "^4.7.3"
67
+ "typescript": "^4.7.4"
68
68
  }
69
69
  }
@@ -1,7 +0,0 @@
1
- import { ReactElement } from 'react';
2
- interface ServerStyleSheet {
3
- getStyleElement(): Array<ReactElement<{}>>;
4
- seal(): void;
5
- }
6
- export declare function insertStyledComponentsSheet(sheet: ServerStyleSheet): void;
7
- export {};
@@ -1,16 +0,0 @@
1
- export function insertStyledComponentsSheet(sheet) {
2
- try {
3
- var styleElements = sheet.getStyleElement();
4
- for (var _i = 0, styleElements_1 = styleElements; _i < styleElements_1.length; _i++) {
5
- var element = styleElements_1[_i];
6
- var styleContent = element.props.dangerouslySetInnerHTML.__html;
7
- Context.InsertStyle(styleContent);
8
- }
9
- }
10
- catch (error) {
11
- console.error(error);
12
- }
13
- finally {
14
- sheet.seal();
15
- }
16
- }