@reactunity/renderer 0.15.2 → 0.16.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 (175) hide show
  1. package/dist/editor/index.d.ts +1 -0
  2. package/dist/editor/index.js +1 -0
  3. package/dist/editor/jsx-dev-runtime.d.ts +2 -0
  4. package/dist/editor/jsx-dev-runtime.js +1 -0
  5. package/dist/editor/jsx-runtime.d.ts +2 -0
  6. package/dist/editor/jsx-runtime.js +1 -0
  7. package/dist/index.d.ts +9 -9
  8. package/dist/index.js +9 -9
  9. package/dist/src/helpers/dictionary-watcher.d.ts +66 -66
  10. package/dist/src/helpers/dictionary-watcher.js +100 -98
  11. package/dist/src/helpers/hooks/use-globals.d.ts +6 -6
  12. package/dist/src/helpers/hooks/use-globals.js +6 -6
  13. package/dist/src/helpers/hooks/use-reactive-value.d.ts +4 -4
  14. package/dist/src/helpers/hooks/use-reactive-value.js +27 -27
  15. package/dist/src/helpers/icons.d.ts +11 -7
  16. package/dist/src/helpers/icons.js +29 -29
  17. package/dist/src/models/base.d.ts +56 -56
  18. package/dist/src/models/base.js +2 -2
  19. package/dist/src/models/editor/components.d.ts +22 -22
  20. package/dist/src/models/editor/components.js +1 -1
  21. package/dist/src/models/editor/environment.d.ts +9 -10
  22. package/dist/src/models/editor/environment.js +1 -1
  23. package/dist/src/models/editor/index.d.ts +3 -3
  24. package/dist/src/models/editor/index.js +3 -3
  25. package/dist/src/models/editor/jsx.d.ts +111 -104
  26. package/dist/src/models/editor/jsx.js +1 -1
  27. package/dist/src/models/environment/dom/common.d.ts +85 -85
  28. package/dist/src/models/environment/dom/common.js +1 -1
  29. package/dist/src/models/environment/dom/fetch.d.ts +111 -111
  30. package/dist/src/models/environment/dom/fetch.js +1 -1
  31. package/dist/src/models/environment/dom/global.d.ts +11 -11
  32. package/dist/src/models/environment/dom/global.js +1 -1
  33. package/dist/src/models/environment/dom/xhr.d.ts +161 -161
  34. package/dist/src/models/environment/dom/xhr.js +1 -1
  35. package/dist/src/models/environment/index.d.ts +43 -47
  36. package/dist/src/models/environment/index.js +2 -3
  37. package/dist/src/models/environment/interop.d.ts +23 -23
  38. package/dist/src/models/environment/interop.js +1 -1
  39. package/dist/src/models/generated/editor.d.ts +18501 -18501
  40. package/dist/src/models/generated/editor.js +6 -6
  41. package/dist/src/models/generated/index.d.ts +6 -6
  42. package/dist/src/models/generated/index.js +6 -6
  43. package/dist/src/models/generated/react.d.ts +15214 -15214
  44. package/dist/src/models/generated/react.js +6 -6
  45. package/dist/src/models/generated/system.d.ts +36731 -36731
  46. package/dist/src/models/generated/system.js +6 -6
  47. package/dist/src/models/generated/tests.d.ts +5023 -5023
  48. package/dist/src/models/generated/tests.js +6 -6
  49. package/dist/src/models/generated/unity.d.ts +43446 -43446
  50. package/dist/src/models/generated/unity.js +6 -6
  51. package/dist/src/models/generated/yoga.d.ts +368 -368
  52. package/dist/src/models/generated/yoga.js +6 -6
  53. package/dist/src/models/properties/colors.d.ts +150 -150
  54. package/dist/src/models/properties/colors.js +1 -1
  55. package/dist/src/models/properties/common.d.ts +2 -2
  56. package/dist/src/models/properties/common.js +1 -1
  57. package/dist/src/models/properties/index.d.ts +7 -7
  58. package/dist/src/models/properties/index.js +7 -7
  59. package/dist/src/models/properties/style.d.ts +10 -10
  60. package/dist/src/models/properties/style.js +1 -1
  61. package/dist/src/models/properties/styles-enums.d.ts +23 -23
  62. package/dist/src/models/properties/styles-enums.js +1 -1
  63. package/dist/src/models/properties/styles.d.ts +127 -127
  64. package/dist/src/models/properties/styles.js +1 -1
  65. package/dist/src/models/properties/values.d.ts +24 -24
  66. package/dist/src/models/properties/values.js +1 -1
  67. package/dist/src/models/properties/yoga-enums.d.ts +8 -8
  68. package/dist/src/models/properties/yoga-enums.js +1 -1
  69. package/dist/src/models/properties/yoga.d.ts +66 -66
  70. package/dist/src/models/properties/yoga.js +1 -1
  71. package/dist/src/models/renderer.d.ts +20 -20
  72. package/dist/src/models/renderer.js +1 -1
  73. package/dist/src/models/richtext.d.ts +69 -69
  74. package/dist/src/models/richtext.js +2 -2
  75. package/dist/src/models/svg.d.ts +68 -68
  76. package/dist/src/models/svg.js +1 -1
  77. package/dist/src/models/tests/index.d.ts +12 -12
  78. package/dist/src/models/tests/index.js +1 -1
  79. package/dist/src/models/ugui/components.d.ts +86 -86
  80. package/dist/src/models/ugui/components.js +1 -1
  81. package/dist/src/models/ugui/events.d.ts +74 -74
  82. package/dist/src/models/ugui/events.js +2 -2
  83. package/dist/src/models/ugui/index.d.ts +4 -4
  84. package/dist/src/models/ugui/index.js +4 -4
  85. package/dist/src/models/ugui/input.d.ts +26 -26
  86. package/dist/src/models/ugui/input.js +1 -1
  87. package/dist/src/models/ugui/jsx.d.ts +67 -60
  88. package/dist/src/models/ugui/jsx.js +1 -1
  89. package/dist/src/models/uitoolkit/components.d.ts +82 -82
  90. package/dist/src/models/uitoolkit/components.js +1 -1
  91. package/dist/src/models/uitoolkit/events.d.ts +64 -64
  92. package/dist/src/models/uitoolkit/events.js +1 -1
  93. package/dist/src/models/uitoolkit/index.d.ts +3 -3
  94. package/dist/src/models/uitoolkit/index.js +3 -3
  95. package/dist/src/models/uitoolkit/jsx.d.ts +71 -64
  96. package/dist/src/models/uitoolkit/jsx.js +1 -1
  97. package/dist/src/renderer/async/callbacks.d.ts +5 -6
  98. package/dist/src/renderer/async/callbacks.js +52 -52
  99. package/dist/src/renderer/async/commands.d.ts +98 -47
  100. package/dist/src/renderer/async/commands.js +1 -1
  101. package/dist/src/renderer/async/objects.d.ts +7 -8
  102. package/dist/src/renderer/async/objects.js +31 -31
  103. package/dist/src/renderer/async/reconciler.d.ts +2 -2
  104. package/dist/src/renderer/async/reconciler.js +304 -283
  105. package/dist/src/renderer/async/serializer.d.ts +6 -9
  106. package/dist/src/renderer/async/serializer.js +31 -31
  107. package/dist/src/renderer/async/types.d.ts +45 -45
  108. package/dist/src/renderer/async/types.js +1 -1
  109. package/dist/src/renderer/constants.d.ts +30 -30
  110. package/dist/src/renderer/constants.js +70 -70
  111. package/dist/src/renderer/diffing.d.ts +3 -3
  112. package/dist/src/renderer/diffing.js +83 -83
  113. package/dist/src/renderer/renderer.d.ts +26 -26
  114. package/dist/src/renderer/renderer.js +93 -93
  115. package/dist/src/renderer/subcontexts/index.d.ts +6 -6
  116. package/dist/src/renderer/subcontexts/index.js +6 -6
  117. package/dist/src/renderer/subcontexts/richtext.d.ts +3 -3
  118. package/dist/src/renderer/subcontexts/richtext.js +52 -52
  119. package/dist/src/renderer/subcontexts/svg.d.ts +3 -3
  120. package/dist/src/renderer/subcontexts/svg.js +70 -70
  121. package/dist/src/renderer/sync/reconciler.d.ts +2 -2
  122. package/dist/src/renderer/sync/reconciler.js +35 -35
  123. package/dist/src/version.d.ts +1 -1
  124. package/dist/src/version.js +1 -1
  125. package/dist/src/views/default-view.d.ts +8 -8
  126. package/dist/src/views/default-view.js +7 -7
  127. package/dist/src/views/error-boundary.d.ts +10 -10
  128. package/dist/src/views/error-boundary.js +42 -53
  129. package/dist/src/webgl-compat/error-messages.d.ts +9 -9
  130. package/dist/src/webgl-compat/error-messages.js +10 -10
  131. package/dist/src/webgl-compat/index.d.ts +13 -13
  132. package/dist/src/webgl-compat/index.js +8 -8
  133. package/dist/src/webgl-compat/types.d.ts +21 -21
  134. package/dist/src/webgl-compat/types.js +1 -1
  135. package/dist/src/webgl-compat/use-event-system.d.ts +3 -3
  136. package/dist/src/webgl-compat/use-event-system.js +77 -76
  137. package/dist/src/webgl-compat/use-unity-context.d.ts +31 -31
  138. package/dist/src/webgl-compat/use-unity-context.js +92 -91
  139. package/dist/tests.d.ts +1 -1
  140. package/dist/tests.js +1 -1
  141. package/dist/ugui/index.d.ts +1 -0
  142. package/dist/ugui/index.js +1 -0
  143. package/dist/ugui/jsx-dev-runtime.d.ts +2 -0
  144. package/dist/ugui/jsx-dev-runtime.js +1 -0
  145. package/dist/ugui/jsx-runtime.d.ts +2 -0
  146. package/dist/ugui/jsx-runtime.js +1 -0
  147. package/dist/uitoolkit/index.d.ts +1 -0
  148. package/dist/uitoolkit/index.js +1 -0
  149. package/dist/uitoolkit/jsx-dev-runtime.d.ts +2 -0
  150. package/dist/uitoolkit/jsx-dev-runtime.js +1 -0
  151. package/dist/uitoolkit/jsx-runtime.d.ts +2 -0
  152. package/dist/uitoolkit/jsx-runtime.js +1 -0
  153. package/dist/webgl-compat.d.ts +1 -1
  154. package/dist/webgl-compat.js +1 -1
  155. package/editor/jsx-dev-runtime.ts +4 -0
  156. package/editor/jsx-runtime.ts +4 -0
  157. package/package.json +13 -32
  158. package/ugui/jsx-dev-runtime.ts +4 -0
  159. package/ugui/jsx-runtime.ts +4 -0
  160. package/uitoolkit/jsx-dev-runtime.ts +4 -0
  161. package/uitoolkit/jsx-runtime.ts +4 -0
  162. package/dist/editor.d.ts +0 -1
  163. package/dist/editor.js +0 -1
  164. package/dist/src/models/environment/jsx.d.ts +0 -45
  165. package/dist/src/models/environment/jsx.js +0 -1
  166. package/dist/ugui.d.ts +0 -1
  167. package/dist/ugui.js +0 -1
  168. package/dist/uitoolkit.d.ts +0 -1
  169. package/dist/uitoolkit.js +0 -1
  170. package/editor.ts +0 -1
  171. package/tsconfig.editor.json +0 -6
  172. package/tsconfig.ugui.json +0 -6
  173. package/tsconfig.uitoolkit.json +0 -6
  174. package/ugui.ts +0 -1
  175. package/uitoolkit.ts +0 -1
@@ -1,2 +1,2 @@
1
- ;
2
- export {};
1
+ ;
2
+ export {};
@@ -1,68 +1,68 @@
1
- import type * as React from 'react';
2
- import { Style } from './properties';
3
- type SVGProps<T> = React.Attributes & Omit<React.SVGAttributes<T>, keyof React.DOMAttributes<T> | keyof React.AriaAttributes | 'style'> & {
4
- style?: Style | React.CSSProperties | string | undefined;
5
- children?: any;
6
- };
7
- export type SVGEelement = SVGProps<SVGSVGElement>;
8
- export interface SVGElements {
9
- svg: SVGEelement;
10
- animate: SVGProps<SVGElement>;
11
- animateMotion: SVGProps<SVGElement>;
12
- animateTransform: SVGProps<SVGElement>;
13
- circle: SVGProps<SVGCircleElement>;
14
- clipPath: SVGProps<SVGClipPathElement>;
15
- defs: SVGProps<SVGDefsElement>;
16
- desc: SVGProps<SVGDescElement>;
17
- ellipse: SVGProps<SVGEllipseElement>;
18
- feBlend: SVGProps<SVGFEBlendElement>;
19
- feColorMatrix: SVGProps<SVGFEColorMatrixElement>;
20
- feComponentTransfer: SVGProps<SVGFEComponentTransferElement>;
21
- feComposite: SVGProps<SVGFECompositeElement>;
22
- feConvolveMatrix: SVGProps<SVGFEConvolveMatrixElement>;
23
- feDiffuseLighting: SVGProps<SVGFEDiffuseLightingElement>;
24
- feDisplacementMap: SVGProps<SVGFEDisplacementMapElement>;
25
- feDistantLight: SVGProps<SVGFEDistantLightElement>;
26
- feDropShadow: SVGProps<SVGFEDropShadowElement>;
27
- feFlood: SVGProps<SVGFEFloodElement>;
28
- feFuncA: SVGProps<SVGFEFuncAElement>;
29
- feFuncB: SVGProps<SVGFEFuncBElement>;
30
- feFuncG: SVGProps<SVGFEFuncGElement>;
31
- feFuncR: SVGProps<SVGFEFuncRElement>;
32
- feGaussianBlur: SVGProps<SVGFEGaussianBlurElement>;
33
- feImage: SVGProps<SVGFEImageElement>;
34
- feMerge: SVGProps<SVGFEMergeElement>;
35
- feMergeNode: SVGProps<SVGFEMergeNodeElement>;
36
- feMorphology: SVGProps<SVGFEMorphologyElement>;
37
- feOffset: SVGProps<SVGFEOffsetElement>;
38
- fePointLight: SVGProps<SVGFEPointLightElement>;
39
- feSpecularLighting: SVGProps<SVGFESpecularLightingElement>;
40
- feSpotLight: SVGProps<SVGFESpotLightElement>;
41
- feTile: SVGProps<SVGFETileElement>;
42
- feTurbulence: SVGProps<SVGFETurbulenceElement>;
43
- filter: SVGProps<SVGFilterElement>;
44
- foreignObject: SVGProps<SVGForeignObjectElement>;
45
- g: SVGProps<SVGGElement>;
46
- image: SVGProps<SVGImageElement>;
47
- line: SVGProps<SVGLineElement>;
48
- linearGradient: SVGProps<SVGLinearGradientElement>;
49
- marker: SVGProps<SVGMarkerElement>;
50
- mask: SVGProps<SVGMaskElement>;
51
- metadata: SVGProps<SVGMetadataElement>;
52
- mpath: SVGProps<SVGElement>;
53
- path: SVGProps<SVGPathElement>;
54
- pattern: SVGProps<SVGPatternElement>;
55
- polygon: SVGProps<SVGPolygonElement>;
56
- polyline: SVGProps<SVGPolylineElement>;
57
- radialGradient: SVGProps<SVGRadialGradientElement>;
58
- rect: SVGProps<SVGRectElement>;
59
- stop: SVGProps<SVGStopElement>;
60
- switch: SVGProps<SVGSwitchElement>;
61
- symbol: SVGProps<SVGSymbolElement>;
62
- text: SVGProps<SVGTextElement>;
63
- textPath: SVGProps<SVGTextPathElement>;
64
- tspan: SVGProps<SVGTSpanElement>;
65
- use: SVGProps<SVGUseElement>;
66
- view: SVGProps<SVGViewElement>;
67
- }
68
- export {};
1
+ import type * as React from 'react';
2
+ import { Style } from './properties';
3
+ type SVGProps<T> = React.Attributes & Omit<React.SVGAttributes<T>, keyof React.DOMAttributes<T> | keyof React.AriaAttributes | 'style'> & {
4
+ style?: Style | React.CSSProperties | string | undefined;
5
+ children?: any;
6
+ };
7
+ export type SVGEelement = SVGProps<SVGSVGElement>;
8
+ export interface SVGElements {
9
+ svg: SVGEelement;
10
+ animate: SVGProps<SVGElement>;
11
+ animateMotion: SVGProps<SVGElement>;
12
+ animateTransform: SVGProps<SVGElement>;
13
+ circle: SVGProps<SVGCircleElement>;
14
+ clipPath: SVGProps<SVGClipPathElement>;
15
+ defs: SVGProps<SVGDefsElement>;
16
+ desc: SVGProps<SVGDescElement>;
17
+ ellipse: SVGProps<SVGEllipseElement>;
18
+ feBlend: SVGProps<SVGFEBlendElement>;
19
+ feColorMatrix: SVGProps<SVGFEColorMatrixElement>;
20
+ feComponentTransfer: SVGProps<SVGFEComponentTransferElement>;
21
+ feComposite: SVGProps<SVGFECompositeElement>;
22
+ feConvolveMatrix: SVGProps<SVGFEConvolveMatrixElement>;
23
+ feDiffuseLighting: SVGProps<SVGFEDiffuseLightingElement>;
24
+ feDisplacementMap: SVGProps<SVGFEDisplacementMapElement>;
25
+ feDistantLight: SVGProps<SVGFEDistantLightElement>;
26
+ feDropShadow: SVGProps<SVGFEDropShadowElement>;
27
+ feFlood: SVGProps<SVGFEFloodElement>;
28
+ feFuncA: SVGProps<SVGFEFuncAElement>;
29
+ feFuncB: SVGProps<SVGFEFuncBElement>;
30
+ feFuncG: SVGProps<SVGFEFuncGElement>;
31
+ feFuncR: SVGProps<SVGFEFuncRElement>;
32
+ feGaussianBlur: SVGProps<SVGFEGaussianBlurElement>;
33
+ feImage: SVGProps<SVGFEImageElement>;
34
+ feMerge: SVGProps<SVGFEMergeElement>;
35
+ feMergeNode: SVGProps<SVGFEMergeNodeElement>;
36
+ feMorphology: SVGProps<SVGFEMorphologyElement>;
37
+ feOffset: SVGProps<SVGFEOffsetElement>;
38
+ fePointLight: SVGProps<SVGFEPointLightElement>;
39
+ feSpecularLighting: SVGProps<SVGFESpecularLightingElement>;
40
+ feSpotLight: SVGProps<SVGFESpotLightElement>;
41
+ feTile: SVGProps<SVGFETileElement>;
42
+ feTurbulence: SVGProps<SVGFETurbulenceElement>;
43
+ filter: SVGProps<SVGFilterElement>;
44
+ foreignObject: SVGProps<SVGForeignObjectElement>;
45
+ g: SVGProps<SVGGElement>;
46
+ image: SVGProps<SVGImageElement>;
47
+ line: SVGProps<SVGLineElement>;
48
+ linearGradient: SVGProps<SVGLinearGradientElement>;
49
+ marker: SVGProps<SVGMarkerElement>;
50
+ mask: SVGProps<SVGMaskElement>;
51
+ metadata: SVGProps<SVGMetadataElement>;
52
+ mpath: SVGProps<SVGElement>;
53
+ path: SVGProps<SVGPathElement>;
54
+ pattern: SVGProps<SVGPatternElement>;
55
+ polygon: SVGProps<SVGPolygonElement>;
56
+ polyline: SVGProps<SVGPolylineElement>;
57
+ radialGradient: SVGProps<SVGRadialGradientElement>;
58
+ rect: SVGProps<SVGRectElement>;
59
+ stop: SVGProps<SVGStopElement>;
60
+ switch: SVGProps<SVGSwitchElement>;
61
+ symbol: SVGProps<SVGSymbolElement>;
62
+ text: SVGProps<SVGTextElement>;
63
+ textPath: SVGProps<SVGTextPathElement>;
64
+ tspan: SVGProps<SVGTSpanElement>;
65
+ use: SVGProps<SVGUseElement>;
66
+ view: SVGProps<SVGViewElement>;
67
+ }
68
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,12 +1,12 @@
1
- import { NUnit, UnityEngine } from '../generated';
2
- declare global {
3
- var Assert: NUnit.Framework.Assert;
4
- var Has: NUnit.Framework.Has;
5
- var Is: NUnit.Framework.Is;
6
- var Iz: NUnit.Framework.Iz;
7
- var Contains: NUnit.Framework.Contains;
8
- var Does: NUnit.Framework.Does;
9
- var Assume: NUnit.Framework.Assume;
10
- var Throws: NUnit.Framework.Throws;
11
- var LogAssert: UnityEngine.TestTools.LogAssert;
12
- }
1
+ import { NUnit, UnityEngine } from '../generated';
2
+ declare global {
3
+ var Assert: NUnit.Framework.Assert;
4
+ var Has: NUnit.Framework.Has;
5
+ var Is: NUnit.Framework.Is;
6
+ var Iz: NUnit.Framework.Iz;
7
+ var Contains: NUnit.Framework.Contains;
8
+ var Does: NUnit.Framework.Does;
9
+ var Assume: NUnit.Framework.Assume;
10
+ var Throws: NUnit.Framework.Throws;
11
+ var LogAssert: UnityEngine.TestTools.LogAssert;
12
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,86 +1,86 @@
1
- import { BaseCmpProps, ContentSrcProps } from '../base';
2
- import { ReactUnity, UnityEngine } from '../generated';
3
- import { AnchorTarget } from '../properties';
4
- import { AssetReference, AssetReferenceOrHttp } from '../properties/values';
5
- import { ActionCallback, Events } from './events';
6
- export interface View<T = ReactUnity.UGUI.UGUIComponent> extends Events<T>, BaseCmpProps {
7
- active?: boolean;
8
- eventViewport?: UnityEngine.RectTransform | UnityEngine.GameObject | ReactUnity.UGUI.UGUIComponent;
9
- }
10
- export interface Text extends View<ReactUnity.UGUI.TextComponent> {
11
- richText?: boolean;
12
- }
13
- export interface Label extends View<ReactUnity.UGUI.LabelComponent> {
14
- for?: ReactUnity.UGUI.UGUIComponent | string;
15
- }
16
- export interface Icon extends View<ReactUnity.UGUI.IconComponent> {
17
- set?: ReactUnity.Styling.IconSet | string;
18
- }
19
- export type ScrollDirection = 'none' | 'horizontal' | 'vertical' | 'both';
20
- export interface Scroll extends View<ReactUnity.UGUI.ScrollComponent> {
21
- onValueChanged?: (ev: UnityEngine.Vector2, sender: ReactUnity.UGUI.ScrollComponent) => void;
22
- direction?: ScrollDirection;
23
- alwaysShow?: ScrollDirection;
24
- sensitivity?: number;
25
- elasticity?: number;
26
- smoothness?: number;
27
- }
28
- export interface Button extends Omit<View<ReactUnity.UGUI.ButtonComponent>, 'onClick'> {
29
- onClick?: ActionCallback<ReactUnity.UGUI.ButtonComponent>;
30
- disabled?: boolean;
31
- }
32
- export interface Toggle extends View<ReactUnity.UGUI.ToggleComponent> {
33
- value?: any;
34
- checked?: boolean;
35
- onChange?: (val: boolean, sender: ReactUnity.UGUI.ToggleComponent) => void;
36
- disabled?: boolean;
37
- indeterminate?: boolean;
38
- }
39
- export interface Anchor extends View<ReactUnity.UGUI.AnchorComponent> {
40
- url?: string;
41
- href?: string;
42
- disabled?: boolean;
43
- /** Works in WebGL only */
44
- target?: AnchorTarget;
45
- }
46
- export interface BaseImage<T = ReactUnity.UGUI.ImageComponent> extends View<T> {
47
- src?: AssetReferenceOrHttp;
48
- source?: AssetReferenceOrHttp;
49
- alt?: string;
50
- }
51
- export interface Image<T = ReactUnity.UGUI.ImageComponent> extends BaseImage<T> {
52
- preserveAspect?: boolean;
53
- }
54
- export interface RawImage extends BaseImage<ReactUnity.UGUI.RawImageComponent> {
55
- }
56
- export interface Video extends BaseImage<ReactUnity.UGUI.VideoComponent> {
57
- src?: AssetReference;
58
- source?: AssetReference;
59
- }
60
- export interface SvgImage<T = ReactUnity.UGUI.SvgImageComponent> extends Image<T> {
61
- }
62
- export interface Render<T = ReactUnity.UGUI.RenderComponent> extends BaseImage<T> {
63
- width: number;
64
- height: number;
65
- src?: never;
66
- source?: never;
67
- camera?: UnityEngine.Camera | UnityEngine.GameObject;
68
- onMount?: (camera: UnityEngine.Camera, sender: T) => void;
69
- onUnmount?: (camera: UnityEngine.Camera, sender: T) => void;
70
- }
71
- export interface Object extends Render<ReactUnity.UGUI.ObjectComponent> {
72
- target?: UnityEngine.GameObject;
73
- }
74
- export interface Prefab<T = ReactUnity.UGUI.PrefabComponent> extends View<T> {
75
- target?: UnityEngine.GameObject | UnityEngine.Component;
76
- onMount?: (camera: UnityEngine.GameObject, sender: T) => void;
77
- onUnmount?: (camera: UnityEngine.GameObject, sender: T) => void;
78
- }
79
- export interface Portal<T = ReactUnity.UGUI.PortalComponent> extends View<T> {
80
- target?: UnityEngine.GameObject | UnityEngine.Component | UnityEngine.Transform | ReactUnity.UGUI.UGUIComponent;
81
- eventCamera?: UnityEngine.Camera | UnityEngine.GameObject;
82
- onMount?: (camera: UnityEngine.Transform, sender: T) => void;
83
- onUnmount?: (camera: UnityEngine.Transform, sender: T) => void;
84
- }
85
- export interface Svg<T = ReactUnity.UGUI.SvgComponent> extends SvgImage<T>, ContentSrcProps {
86
- }
1
+ import { BaseCmpProps, ContentSrcProps } from '../base';
2
+ import { ReactUnity, UnityEngine } from '../generated';
3
+ import { AnchorTarget } from '../properties';
4
+ import { AssetReference, AssetReferenceOrHttp } from '../properties/values';
5
+ import { ActionCallback, Events } from './events';
6
+ export interface View<T = ReactUnity.UGUI.UGUIComponent> extends Events<T>, BaseCmpProps {
7
+ active?: boolean;
8
+ eventViewport?: UnityEngine.RectTransform | UnityEngine.GameObject | ReactUnity.UGUI.UGUIComponent;
9
+ }
10
+ export interface Text extends View<ReactUnity.UGUI.TextComponent> {
11
+ richText?: boolean;
12
+ }
13
+ export interface Label extends View<ReactUnity.UGUI.LabelComponent> {
14
+ for?: ReactUnity.UGUI.UGUIComponent | string;
15
+ }
16
+ export interface Icon extends View<ReactUnity.UGUI.IconComponent> {
17
+ set?: ReactUnity.Styling.IconSet | string;
18
+ }
19
+ export type ScrollDirection = 'none' | 'horizontal' | 'vertical' | 'both';
20
+ export interface Scroll extends View<ReactUnity.UGUI.ScrollComponent> {
21
+ onValueChanged?: (ev: UnityEngine.Vector2, sender: ReactUnity.UGUI.ScrollComponent) => void;
22
+ direction?: ScrollDirection;
23
+ alwaysShow?: ScrollDirection;
24
+ sensitivity?: number;
25
+ elasticity?: number;
26
+ smoothness?: number;
27
+ }
28
+ export interface Button extends Omit<View<ReactUnity.UGUI.ButtonComponent>, 'onClick'> {
29
+ onClick?: ActionCallback<ReactUnity.UGUI.ButtonComponent>;
30
+ disabled?: boolean;
31
+ }
32
+ export interface Toggle extends View<ReactUnity.UGUI.ToggleComponent> {
33
+ value?: any;
34
+ checked?: boolean;
35
+ onChange?: (val: boolean, sender: ReactUnity.UGUI.ToggleComponent) => void;
36
+ disabled?: boolean;
37
+ indeterminate?: boolean;
38
+ }
39
+ export interface Anchor extends View<ReactUnity.UGUI.AnchorComponent> {
40
+ url?: string;
41
+ href?: string;
42
+ disabled?: boolean;
43
+ /** Works in WebGL only */
44
+ target?: AnchorTarget;
45
+ }
46
+ export interface BaseImage<T = ReactUnity.UGUI.ImageComponent> extends View<T> {
47
+ src?: AssetReferenceOrHttp;
48
+ source?: AssetReferenceOrHttp;
49
+ alt?: string;
50
+ }
51
+ export interface Image<T = ReactUnity.UGUI.ImageComponent> extends BaseImage<T> {
52
+ preserveAspect?: boolean;
53
+ }
54
+ export interface RawImage extends BaseImage<ReactUnity.UGUI.RawImageComponent> {
55
+ }
56
+ export interface Video extends BaseImage<ReactUnity.UGUI.VideoComponent> {
57
+ src?: AssetReference;
58
+ source?: AssetReference;
59
+ }
60
+ export interface SvgImage<T = ReactUnity.UGUI.SvgImageComponent> extends Image<T> {
61
+ }
62
+ export interface Render<T = ReactUnity.UGUI.RenderComponent> extends BaseImage<T> {
63
+ width: number;
64
+ height: number;
65
+ src?: never;
66
+ source?: never;
67
+ camera?: UnityEngine.Camera | UnityEngine.GameObject;
68
+ onMount?: (camera: UnityEngine.Camera, sender: T) => void;
69
+ onUnmount?: (camera: UnityEngine.Camera, sender: T) => void;
70
+ }
71
+ export interface Object extends Render<ReactUnity.UGUI.ObjectComponent> {
72
+ target?: UnityEngine.GameObject;
73
+ }
74
+ export interface Prefab<T = ReactUnity.UGUI.PrefabComponent> extends View<T> {
75
+ target?: UnityEngine.GameObject | UnityEngine.Component;
76
+ onMount?: (camera: UnityEngine.GameObject, sender: T) => void;
77
+ onUnmount?: (camera: UnityEngine.GameObject, sender: T) => void;
78
+ }
79
+ export interface Portal<T = ReactUnity.UGUI.PortalComponent> extends View<T> {
80
+ target?: UnityEngine.GameObject | UnityEngine.Component | UnityEngine.Transform | ReactUnity.UGUI.UGUIComponent;
81
+ eventCamera?: UnityEngine.Camera | UnityEngine.GameObject;
82
+ onMount?: (camera: UnityEngine.Transform, sender: T) => void;
83
+ onUnmount?: (camera: UnityEngine.Transform, sender: T) => void;
84
+ }
85
+ export interface Svg<T = ReactUnity.UGUI.SvgComponent> extends SvgImage<T>, ContentSrcProps {
86
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,74 +1,74 @@
1
- import { BaseEvents } from '../base';
2
- import { ReactUnity, UnityEngine } from '../generated';
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
- export interface Events<T = BaseCmp> extends BaseEvents<T> {
11
- onPointerClick?: PointerEventCallback<T>;
12
- onPointerUp?: PointerEventCallback<T>;
13
- onPointerDown?: PointerEventCallback<T>;
14
- onPointerEnter?: PointerEventCallback<T>;
15
- onPointerExit?: PointerEventCallback<T>;
16
- onPointerMove?: PointerEventCallback<T>;
17
- onSubmit?: BaseEventCallback<T>;
18
- onCancel?: BaseEventCallback<T>;
19
- onSelect?: BaseEventCallback<T>;
20
- onDeselect?: BaseEventCallback<T>;
21
- onMove?: AxisEventCallback<T>;
22
- onUpdateSelected?: BaseEventCallback<T>;
23
- onScroll?: PointerEventCallback<T>;
24
- onDrag?: PointerEventCallback<T>;
25
- onBeginDrag?: PointerEventCallback<T>;
26
- onEndDrag?: PointerEventCallback<T>;
27
- onPotentialDrag?: PointerEventCallback<T>;
28
- onDrop?: PointerEventCallback<T>;
29
- onKeyDown?: KeyEventCallback<T>;
30
- onResize?: ResizeEventCallback<T>;
31
- onDoubleClick?: PointerEventCallback<T>;
32
- onContextMenu?: PointerEventCallback<T>;
33
- /**
34
- * @alias onPointerClick
35
- */
36
- onClick?: PointerEventCallback<T>;
37
- /**
38
- * @alias onPointerUp
39
- */
40
- onMouseUp?: PointerEventCallback<T>;
41
- /**
42
- * @alias onPointerDown
43
- */
44
- onMouseDown?: PointerEventCallback<T>;
45
- /**
46
- * @alias onPointerEnter
47
- */
48
- onMouseEnter?: PointerEventCallback<T>;
49
- /**
50
- * @alias onPointerExit
51
- */
52
- onMouseLeave?: PointerEventCallback<T>;
53
- /**
54
- * @alias onPointerMove
55
- */
56
- onMouseMove?: PointerEventCallback<T>;
57
- /**
58
- * @alias onPointerEnter
59
- */
60
- onMouseOver?: PointerEventCallback<T>;
61
- /**
62
- * @alias onPointerExit
63
- */
64
- onMouseOut?: PointerEventCallback<T>;
65
- /**
66
- * @alias onSelect
67
- */
68
- onFocus?: BaseEventCallback<T>;
69
- /**
70
- * @alias onDeselect
71
- */
72
- onBlur?: BaseEventCallback<T>;
73
- }
74
- export {};
1
+ import { BaseEvents } from '../base';
2
+ import { ReactUnity, UnityEngine } from '../generated';
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
+ export interface Events<T = BaseCmp> extends BaseEvents<T> {
11
+ onPointerClick?: PointerEventCallback<T>;
12
+ onPointerUp?: PointerEventCallback<T>;
13
+ onPointerDown?: PointerEventCallback<T>;
14
+ onPointerEnter?: PointerEventCallback<T>;
15
+ onPointerExit?: PointerEventCallback<T>;
16
+ onPointerMove?: PointerEventCallback<T>;
17
+ onSubmit?: BaseEventCallback<T>;
18
+ onCancel?: BaseEventCallback<T>;
19
+ onSelect?: BaseEventCallback<T>;
20
+ onDeselect?: BaseEventCallback<T>;
21
+ onMove?: AxisEventCallback<T>;
22
+ onUpdateSelected?: BaseEventCallback<T>;
23
+ onScroll?: PointerEventCallback<T>;
24
+ onDrag?: PointerEventCallback<T>;
25
+ onBeginDrag?: PointerEventCallback<T>;
26
+ onEndDrag?: PointerEventCallback<T>;
27
+ onPotentialDrag?: PointerEventCallback<T>;
28
+ onDrop?: PointerEventCallback<T>;
29
+ onKeyDown?: KeyEventCallback<T>;
30
+ onResize?: ResizeEventCallback<T>;
31
+ onDoubleClick?: PointerEventCallback<T>;
32
+ onContextMenu?: PointerEventCallback<T>;
33
+ /**
34
+ * @alias onPointerClick
35
+ */
36
+ onClick?: PointerEventCallback<T>;
37
+ /**
38
+ * @alias onPointerUp
39
+ */
40
+ onMouseUp?: PointerEventCallback<T>;
41
+ /**
42
+ * @alias onPointerDown
43
+ */
44
+ onMouseDown?: PointerEventCallback<T>;
45
+ /**
46
+ * @alias onPointerEnter
47
+ */
48
+ onMouseEnter?: PointerEventCallback<T>;
49
+ /**
50
+ * @alias onPointerExit
51
+ */
52
+ onMouseLeave?: PointerEventCallback<T>;
53
+ /**
54
+ * @alias onPointerMove
55
+ */
56
+ onMouseMove?: PointerEventCallback<T>;
57
+ /**
58
+ * @alias onPointerEnter
59
+ */
60
+ onMouseOver?: PointerEventCallback<T>;
61
+ /**
62
+ * @alias onPointerExit
63
+ */
64
+ onMouseOut?: PointerEventCallback<T>;
65
+ /**
66
+ * @alias onSelect
67
+ */
68
+ onFocus?: BaseEventCallback<T>;
69
+ /**
70
+ * @alias onDeselect
71
+ */
72
+ onBlur?: BaseEventCallback<T>;
73
+ }
74
+ export {};
@@ -1,2 +1,2 @@
1
- ;
2
- export {};
1
+ ;
2
+ export {};
@@ -1,4 +1,4 @@
1
- export * from './components';
2
- export * from './events';
3
- export * from './input';
4
- export * from './jsx';
1
+ export * from './components';
2
+ export * from './events';
3
+ export * from './input';
4
+ export * from './jsx';
@@ -1,4 +1,4 @@
1
- export * from './components';
2
- export * from './events';
3
- export * from './input';
4
- export * from './jsx';
1
+ export * from './components';
2
+ export * from './events';
3
+ export * from './input';
4
+ export * from './jsx';
@@ -1,26 +1,26 @@
1
- import { ReactUnity } from '../generated';
2
- import { View } from './components';
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
- export interface Input extends View<ReactUnity.UGUI.InputComponent> {
10
- placeholder?: string;
11
- value?: string;
12
- characterLimit?: number;
13
- lineLimit?: number;
14
- readonly?: boolean;
15
- richText?: boolean;
16
- contentType?: ContentType;
17
- keyboardType?: TouchScreenKeyboardType;
18
- lineType?: LineType;
19
- validation?: CharacterValidation;
20
- disabled?: boolean;
21
- onReturn?: InputEvent;
22
- onEndEdit?: InputEvent;
23
- onChange?: InputEvent;
24
- onTextSelection?: TextSelectionEvent;
25
- onEndTextSelection?: TextSelectionEvent;
26
- }
1
+ import { ReactUnity } from '../generated';
2
+ import { View } from './components';
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
+ export interface Input extends View<ReactUnity.UGUI.InputComponent> {
10
+ placeholder?: string;
11
+ value?: string;
12
+ characterLimit?: number;
13
+ lineLimit?: number;
14
+ readonly?: boolean;
15
+ richText?: boolean;
16
+ contentType?: ContentType;
17
+ keyboardType?: TouchScreenKeyboardType;
18
+ lineType?: LineType;
19
+ validation?: CharacterValidation;
20
+ disabled?: boolean;
21
+ onReturn?: InputEvent;
22
+ onEndEdit?: InputEvent;
23
+ onChange?: InputEvent;
24
+ onTextSelection?: TextSelectionEvent;
25
+ onEndTextSelection?: TextSelectionEvent;
26
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};