@reactunity/renderer 0.16.0 → 0.16.2

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,2 +1,3 @@
1
1
  export type SafeString = string & {};
2
2
  export type AnchorTarget = SafeString | '_parent' | '_self' | '_black' | '_top';
3
+ export type ScrollDirection = 'none' | 'horizontal' | 'vertical' | 'both';
@@ -1,6 +1,6 @@
1
1
  import { BaseCmpProps, ContentSrcProps } from '../base';
2
2
  import { ReactUnity, UnityEngine } from '../generated';
3
- import { AnchorTarget } from '../properties';
3
+ import { AnchorTarget, ScrollDirection } from '../properties';
4
4
  import { AssetReference, AssetReferenceOrHttp } from '../properties/values';
5
5
  import { ActionCallback, Events } from './events';
6
6
  export interface View<T = ReactUnity.UGUI.UGUIComponent> extends Events<T>, BaseCmpProps {
@@ -16,7 +16,6 @@ export interface Label extends View<ReactUnity.UGUI.LabelComponent> {
16
16
  export interface Icon extends View<ReactUnity.UGUI.IconComponent> {
17
17
  set?: ReactUnity.Styling.IconSet | string;
18
18
  }
19
- export type ScrollDirection = 'none' | 'horizontal' | 'vertical' | 'both';
20
19
  export interface Scroll extends View<ReactUnity.UGUI.ScrollComponent> {
21
20
  onValueChanged?: (ev: UnityEngine.Vector2, sender: ReactUnity.UGUI.ScrollComponent) => void;
22
21
  direction?: ScrollDirection;
@@ -1,6 +1,6 @@
1
1
  import { BaseCmpProps, ContentSrcProps } from '../base';
2
2
  import { ReactUnity, UnityEditor, UnityEngine } from '../generated';
3
- import { AnchorTarget, Style } from '../properties';
3
+ import { AnchorTarget, ScrollDirection, Style } from '../properties';
4
4
  import { AssetReference } from '../properties/values';
5
5
  import { ActionCallback, Events } from './events';
6
6
  import Cmp = ReactUnity.UIToolkit;
@@ -17,6 +17,13 @@ export interface Text<TSender = Cmp.TextComponent> extends View<TSender> {
17
17
  richText?: boolean;
18
18
  displayTooltipWhenElided?: boolean;
19
19
  }
20
+ export interface Scroll<TSender = Cmp.ScrollViewComponent> extends View<TSender> {
21
+ direction?: ScrollDirection;
22
+ alwaysShow?: ScrollDirection;
23
+ sensitivity?: number;
24
+ elasticity?: number;
25
+ smoothness?: number;
26
+ }
20
27
  export interface Bindable<TSender = BaseCmp> extends View<TSender> {
21
28
  bindingPath?: string;
22
29
  binding?: UnityEngine.UIElements.IBinding;
@@ -19,7 +19,7 @@ export interface UIToolkitElements extends BaseElements<BaseElement<any>> {
19
19
  richtext: Components.View & rc.RefAttributes<Cmp.TextComponent> & Children<Textable | Textable[]>;
20
20
  label: Components.View & rc.RefAttributes<Cmp.TextComponent> & Children<Textable | Textable[]>;
21
21
  button: Components.Button & rc.RefAttributes<Cmp.ButtonComponent> & Children;
22
- scroll: BaseElement;
22
+ scroll: Components.Scroll & rc.RefAttributes<Cmp.ScrollViewComponent> & Children;
23
23
  svg: Components.Svg & rc.RefAttributes<Cmp.SvgComponent> & Children<any> & SVGEelement;
24
24
  img: Components.Image & rc.RefAttributes<Cmp.ImageComponent> & Children<never>;
25
25
  image: Components.Image & rc.RefAttributes<Cmp.ImageComponent> & Children<never>;
@@ -1 +1 @@
1
- export declare const version = "0.16.0";
1
+ export declare const version = "0.16.2";
@@ -1 +1 @@
1
- export var version = '0.16.0';
1
+ export var version = '0.16.2';
package/package.json CHANGED
@@ -1,20 +1,23 @@
1
1
  {
2
2
  "name": "@reactunity/renderer",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "description": "React renderer for Unity3D",
5
5
  "types": "dist/index.d.ts",
6
6
  "typings": "dist/index.d.ts",
7
7
  "main": "dist/index.js",
8
8
  "sideEffects": false,
9
+ "files": [
10
+ "dist"
11
+ ],
9
12
  "exports": {
10
13
  ".": "./dist/index.js",
11
14
  "./test": "./dist/test.js",
12
15
  "./ugui": "./dist/ugui/index.js",
13
- "./ugui/*": "./dist/ugui/*",
16
+ "./ugui/*": "./dist/ugui/*.js",
14
17
  "./uitoolkit": "./dist/uitoolkit/index.js",
15
- "./uitoolkit/*": "./dist/uitoolkit/*",
18
+ "./uitoolkit/*": "./dist/uitoolkit/*.js",
16
19
  "./editor": "./dist/editor/index.js",
17
- "./editor/*": "./dist/editor/*",
20
+ "./editor/*": "./dist/editor/*.js",
18
21
  "./webgl-compat": "./dist/webgl-compat.js"
19
22
  },
20
23
  "scripts": {
@@ -46,7 +49,7 @@
46
49
  "react": "^18.0.0"
47
50
  },
48
51
  "devDependencies": {
49
- "@reactunity/scripts": "^0.16.0",
52
+ "@reactunity/scripts": "^0.16.1",
50
53
  "@types/react-reconciler": "^0.28.4",
51
54
  "react-unity-webgl": "^9.4.3",
52
55
  "rimraf": "^5.0.1",
@@ -1,4 +0,0 @@
1
- export * from 'react/jsx-dev-runtime';
2
-
3
- export type { JSX } from '../src/models/editor/jsx';
4
-
@@ -1,4 +0,0 @@
1
- export * from 'react/jsx-runtime';
2
-
3
- export type { JSX } from '../src/models/editor/jsx';
4
-
package/tests.ts DELETED
@@ -1 +0,0 @@
1
- export * from './src/models/tests';
@@ -1,4 +0,0 @@
1
- export * from 'react/jsx-dev-runtime';
2
-
3
- export type { JSX } from '../src/models/ugui/jsx';
4
-
@@ -1,4 +0,0 @@
1
- export * from 'react/jsx-runtime';
2
-
3
- export type { JSX } from '../src/models/ugui/jsx';
4
-
@@ -1,4 +0,0 @@
1
- export * from 'react/jsx-dev-runtime';
2
-
3
- export type { JSX } from '../src/models/uitoolkit/jsx';
4
-
@@ -1,4 +0,0 @@
1
- export * from 'react/jsx-runtime';
2
-
3
- export type { JSX } from '../src/models/uitoolkit/jsx';
4
-
package/version.js DELETED
@@ -1,3 +0,0 @@
1
- const fs = require('fs');
2
-
3
- fs.writeFileSync('./src/version.ts', `export const version = '${process.env.npm_package_version}';\n`);
package/webgl-compat.ts DELETED
@@ -1 +0,0 @@
1
- export * from './src/webgl-compat';