@reactunity/renderer 0.20.1 → 0.21.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
2
  // Types in assemblies: UnityEngine.CoreModule, UnityEngine.PropertiesModule, Unity.InputSystem, UnityEngine.AudioModule, UnityEngine.UIModule, UnityEngine.TextRenderingModule, UnityEngine.AnimationModule, UnityEngine.IMGUIModule, UnityEngine.UnityAnalyticsModule, UnityEngine.ParticleSystemModule, UnityEngine.UnityWebRequestModule, UnityEngine.PhysicsModule, UnityEngine.InputLegacyModule, UnityEngine.AIModule, UnityEngine.UnityAnalyticsCommonModule, UnityEngine.UI, UnityEngine.VideoModule, UnityEngine.TestRunner, UnityEngine.TextCoreFontEngineModule, UnityEngine.TextCoreTextEngineModule, UnityEngine.UIElementsModule, UnityEngine.XRModule
3
- // Generated 09/04/2024 20:28:52
3
+ // Generated 01/07/2025 01:03:14
4
4
  //
5
5
  /* eslint-disable */
6
6
  export {};
@@ -83,6 +83,10 @@ export declare namespace Yoga {
83
83
  GetType(): System.Type;
84
84
  ToString(): string;
85
85
  }
86
+ enum YogaBoxSizing {
87
+ BorderBox = 0,
88
+ ContentBox = 1
89
+ }
86
90
  class YogaCloneNodeFunc {
87
91
  constructor(object: any, method: System.IntPtr);
88
92
  Method: System.Reflection.MethodInfo;
@@ -148,7 +152,8 @@ export declare namespace Yoga {
148
152
  }
149
153
  enum YogaDisplay {
150
154
  Flex = 0,
151
- None = 1
155
+ None = 1,
156
+ Contents = 2
152
157
  }
153
158
  enum YogaEdge {
154
159
  Left = 0,
@@ -251,6 +256,7 @@ export declare namespace Yoga {
251
256
  FlexDirection: Yoga.YogaFlexDirection;
252
257
  JustifyContent: Yoga.YogaJustify;
253
258
  Display: Yoga.YogaDisplay;
259
+ BoxSizing: Yoga.YogaBoxSizing;
254
260
  AlignItems: Yoga.YogaAlign;
255
261
  AlignSelf: Yoga.YogaAlign;
256
262
  AlignContent: Yoga.YogaAlign;
@@ -267,9 +273,9 @@ export declare namespace Yoga {
267
273
  MinWidth: Yoga.YogaValue;
268
274
  MinHeight: Yoga.YogaValue;
269
275
  AspectRatio: number;
270
- Gap: number;
271
- ColumnGap: number;
272
- RowGap: number;
276
+ Gap: Yoga.YogaValue;
277
+ ColumnGap: Yoga.YogaValue;
278
+ RowGap: Yoga.YogaValue;
273
279
  LayoutLeft: number;
274
280
  LayoutTop: number;
275
281
  LayoutRight: number;
@@ -1,6 +1,6 @@
1
1
  //
2
2
  // Types in assemblies: LibYoga
3
- // Generated 09/04/2024 18:59:49
3
+ // Generated 01/07/2025 01:03:16
4
4
  //
5
5
  /* eslint-disable */
6
6
  export {};
@@ -1,7 +1,8 @@
1
1
  export type FlexDirection = 'column' | 'column-reverse' | 'row' | 'row-reverse';
2
2
  export type YogaAlign = 'auto' | 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline' | 'space-between' | 'space-around';
3
3
  export type YogaJustify = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
4
- export type Display = 'flex' | 'none';
4
+ export type Display = 'flex' | 'none' | 'contents';
5
+ export type BoxSizing = 'border-box' | 'content-box';
5
6
  export type Wrap = 'no-wrap' | 'wrap' | 'wrap-reverse';
6
7
  export type Position = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'inset';
7
8
  export type Overflow = 'visible' | 'hidden' | 'scroll';
@@ -1,5 +1,5 @@
1
1
  import { Array2Aux, Array4Aux, PositioningLiteral } from './values';
2
- import { Direction, Display, FlexDirection, Overflow, Position, Wrap, YogaAlign, YogaJustify } from './yoga-enums';
2
+ import { BoxSizing, Direction, Display, FlexDirection, Overflow, Position, Wrap, YogaAlign, YogaJustify } from './yoga-enums';
3
3
  export type YogaValueAux = 'auto' | number | null | undefined | boolean | (string & {});
4
4
  export type YogaValue2Aux = Array2Aux<YogaValueAux> | PositioningLiteral;
5
5
  export type YogaValue4Aux = Array4Aux<YogaValueAux>;
@@ -7,6 +7,7 @@ export interface Layout {
7
7
  overflow?: Overflow;
8
8
  styleDirection?: Direction;
9
9
  display?: Display;
10
+ boxSizing?: BoxSizing;
10
11
  wrap?: Wrap;
11
12
  positionType?: Position;
12
13
  justifyContent?: YogaJustify;
@@ -17,6 +17,9 @@ export interface Text<TSender = Cmp.TextComponent> extends View<TSender> {
17
17
  richText?: boolean;
18
18
  displayTooltipWhenElided?: boolean;
19
19
  }
20
+ export interface Icon extends Text<Cmp.IconComponent> {
21
+ set?: ReactUnity.Styling.IconSet | string;
22
+ }
20
23
  export interface Scroll<TSender = Cmp.ScrollViewComponent> extends View<TSender> {
21
24
  direction?: ScrollDirection;
22
25
  alwaysShow?: ScrollDirection;
@@ -24,6 +27,11 @@ export interface Scroll<TSender = Cmp.ScrollViewComponent> extends View<TSender>
24
27
  elasticity?: number;
25
28
  smoothness?: number;
26
29
  }
30
+ export interface Portal<T = Cmp.PortalComponent> extends View<T> {
31
+ target?: UnityEngine.UIElements.VisualElement | Cmp.UIToolkitComponent;
32
+ onMount?: (camera: UnityEngine.Transform, sender: T) => void;
33
+ onUnmount?: (camera: UnityEngine.Transform, sender: T) => void;
34
+ }
27
35
  export interface Bindable<TSender = BaseCmp> extends View<TSender> {
28
36
  bindingPath?: string;
29
37
  binding?: UnityEngine.UIElements.IBinding;
@@ -15,7 +15,8 @@ export interface UIToolkitElements extends BaseElements<BaseElement<any>> {
15
15
  box: BaseElement;
16
16
  a: Components.Anchor & rc.RefAttributes<Cmp.UIToolkitComponent> & Children;
17
17
  anchor: Components.Anchor & rc.RefAttributes<Cmp.UIToolkitComponent> & Children;
18
- text: Components.View & rc.RefAttributes<Cmp.TextComponent> & Children<Textable | Textable[]>;
18
+ text: Components.Text & rc.RefAttributes<Cmp.TextComponent> & Children<Textable | Textable[]>;
19
+ icon: Components.Icon & rc.RefAttributes<Cmp.IconComponent> & Children<Textable | Textable[]>;
19
20
  richtext: Components.View & rc.RefAttributes<Cmp.TextComponent> & Children<Textable | Textable[]>;
20
21
  label: Components.View & rc.RefAttributes<Cmp.TextComponent> & Children<Textable | Textable[]>;
21
22
  button: Components.Button & rc.RefAttributes<Cmp.ButtonComponent> & Children;
@@ -37,6 +38,7 @@ export interface UIToolkitElements extends BaseElements<BaseElement<any>> {
37
38
  imgui: Components.IMGUI & rc.RefAttributes<Cmp.IMGUIComponent> & Children<never>;
38
39
  template: Components.Bindable;
39
40
  progress: Components.ValueComponent<number>;
41
+ portal: Components.Portal & rc.RefAttributes<Cmp.PortalComponent> & Children;
40
42
  }
41
43
  declare global {
42
44
  interface ReactUnityCustomElements {
@@ -1 +1 @@
1
- export declare const version = "0.20.1";
1
+ export declare const version = "0.21.0";
@@ -1,2 +1,2 @@
1
- export var version = '0.20.1';
1
+ export var version = '0.21.0';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactunity/renderer",
3
- "version": "0.20.1",
3
+ "version": "0.21.0",
4
4
  "description": "React renderer for Unity3D",
5
5
  "types": "dist/index.d.ts",
6
6
  "typings": "dist/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "react": "^19.0.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@reactunity/scripts": "^0.20.0",
52
+ "@reactunity/scripts": "^0.21.0",
53
53
  "@types/react-reconciler": "^0.32.0",
54
54
  "react-unity-webgl": "^9.9.0",
55
55
  "rimraf": "^6.0.1",