@reactunity/renderer 0.14.6 → 0.15.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/src/helpers/dictionary-watcher.d.ts +1 -1
- package/dist/src/helpers/hooks/{use-watchable.d.ts → use-reactive-value.d.ts} +1 -1
- package/dist/src/helpers/hooks/{use-watchable.js → use-reactive-value.js} +8 -8
- package/dist/src/models/editor/jsx.d.ts +17 -14
- package/dist/src/models/environment/dom/global.d.ts +2 -0
- package/dist/src/models/environment/index.d.ts +2 -1
- package/dist/src/models/environment/index.js +1 -0
- package/dist/src/models/environment/jsx.d.ts +45 -0
- package/dist/src/models/environment/jsx.js +1 -0
- package/dist/src/models/generated/react.d.ts +320 -318
- package/dist/src/models/generated/react.js +1 -1
- package/dist/src/models/ugui/components.d.ts +1 -0
- package/dist/src/models/ugui/jsx.d.ts +18 -15
- package/dist/src/models/uitoolkit/components.d.ts +1 -0
- package/dist/src/models/uitoolkit/jsx.d.ts +17 -14
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/views/default-view.d.ts +1 -1
- package/dist/src/views/error-boundary.js +1 -1
- package/package.json +2 -2
|
@@ -38,6 +38,7 @@ export interface Toggle extends View<ReactUnity.UGUI.ToggleComponent> {
|
|
|
38
38
|
}
|
|
39
39
|
export interface Anchor extends View<ReactUnity.UGUI.AnchorComponent> {
|
|
40
40
|
url?: string;
|
|
41
|
+
href?: string;
|
|
41
42
|
disabled?: boolean;
|
|
42
43
|
/** Works in WebGL only */
|
|
43
44
|
target?: AnchorTarget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RefAttributes } from 'react';
|
|
2
2
|
import { BaseElements, Textable } from '../base';
|
|
3
3
|
import { ReactUnity } from '../generated';
|
|
4
4
|
import { SVGEelement } from '../svg';
|
|
@@ -13,6 +13,7 @@ export interface UGUIElements extends BaseElements<BaseCmp> {
|
|
|
13
13
|
view: Components.View & RefAttributes<NS.ContainerComponent> & {
|
|
14
14
|
tag?: string;
|
|
15
15
|
} & Children;
|
|
16
|
+
a: Components.Anchor & RefAttributes<NS.AnchorComponent> & Children;
|
|
16
17
|
anchor: Components.Anchor & RefAttributes<NS.AnchorComponent> & Children;
|
|
17
18
|
text: Components.Text & RefAttributes<NS.TextComponent> & Children<Textable | Textable[]>;
|
|
18
19
|
richtext: Components.Text & RefAttributes<NS.TextComponent> & Children<any>;
|
|
@@ -33,25 +34,27 @@ export interface UGUIElements extends BaseElements<BaseCmp> {
|
|
|
33
34
|
prefab: Components.Prefab & RefAttributes<NS.PrefabComponent> & Children<never>;
|
|
34
35
|
portal: Components.Portal & RefAttributes<NS.PortalComponent> & Children;
|
|
35
36
|
}
|
|
36
|
-
declare
|
|
37
|
+
declare global {
|
|
38
|
+
interface ReactUnityCustomElements {
|
|
39
|
+
}
|
|
40
|
+
interface DefaultComponentProps extends Components.View {
|
|
41
|
+
ref?: React.Ref<ReactUnity.UGUI.UGUIComponent>;
|
|
42
|
+
}
|
|
37
43
|
namespace JSX {
|
|
38
|
-
interface
|
|
39
|
-
props: {};
|
|
40
|
-
}
|
|
41
|
-
interface ElementChildrenAttribute {
|
|
42
|
-
children: {};
|
|
43
|
-
}
|
|
44
|
-
interface IntrinsicAttributes extends Attributes {
|
|
45
|
-
}
|
|
46
|
-
interface IntrinsicClassAttributes<T> extends ClassAttributes<T> {
|
|
44
|
+
interface IntrinsicElements extends UGUIElements, ReactUnityCustomElements {
|
|
47
45
|
}
|
|
48
|
-
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
declare module 'react' {
|
|
49
|
+
namespace JSX {
|
|
50
|
+
interface IntrinsicElements extends UGUIElements, ReactUnityCustomElements {
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
|
-
declare
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
declare module 'react/jsx-runtime' {
|
|
55
|
+
namespace JSX {
|
|
56
|
+
interface IntrinsicElements extends UGUIElements, ReactUnityCustomElements {
|
|
57
|
+
}
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
export {};
|
|
@@ -13,6 +13,7 @@ export interface UIToolkitElements extends BaseElements<BaseElement<any>> {
|
|
|
13
13
|
tag?: string;
|
|
14
14
|
};
|
|
15
15
|
box: BaseElement;
|
|
16
|
+
a: Components.Anchor & rc.RefAttributes<Cmp.UIToolkitComponent> & Children;
|
|
16
17
|
anchor: Components.Anchor & rc.RefAttributes<Cmp.UIToolkitComponent> & Children;
|
|
17
18
|
text: Components.View & rc.RefAttributes<Cmp.TextComponent> & Children<Textable | Textable[]>;
|
|
18
19
|
richtext: Components.View & rc.RefAttributes<Cmp.TextComponent> & Children<Textable | Textable[]>;
|
|
@@ -37,25 +38,27 @@ export interface UIToolkitElements extends BaseElements<BaseElement<any>> {
|
|
|
37
38
|
template: Components.Bindable;
|
|
38
39
|
progress: Components.ValueComponent<number>;
|
|
39
40
|
}
|
|
40
|
-
declare
|
|
41
|
+
declare global {
|
|
42
|
+
interface ReactUnityCustomElements {
|
|
43
|
+
}
|
|
44
|
+
interface DefaultComponentProps extends Components.View {
|
|
45
|
+
ref?: React.Ref<ReactUnity.UIToolkit.UIToolkitComponent>;
|
|
46
|
+
}
|
|
41
47
|
namespace JSX {
|
|
42
|
-
interface
|
|
43
|
-
props: {};
|
|
44
|
-
}
|
|
45
|
-
interface ElementChildrenAttribute {
|
|
46
|
-
children: {};
|
|
47
|
-
}
|
|
48
|
-
interface IntrinsicAttributes extends React.Attributes {
|
|
49
|
-
}
|
|
50
|
-
interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> {
|
|
48
|
+
interface IntrinsicElements extends UIToolkitElements, ReactUnityCustomElements {
|
|
51
49
|
}
|
|
52
|
-
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
declare module 'react' {
|
|
53
|
+
namespace JSX {
|
|
54
|
+
interface IntrinsicElements extends UIToolkitElements, ReactUnityCustomElements {
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
|
-
declare
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
declare module 'react/jsx-runtime' {
|
|
59
|
+
namespace JSX {
|
|
60
|
+
interface IntrinsicElements extends UIToolkitElements, ReactUnityCustomElements {
|
|
61
|
+
}
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
export {};
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "0.15.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '0.
|
|
1
|
+
export var version = '0.15.0';
|
|
@@ -44,7 +44,7 @@ var ErrorBoundary = /** @class */ (function (_super) {
|
|
|
44
44
|
ErrorBoundary.prototype.render = function () {
|
|
45
45
|
var _a, _b;
|
|
46
46
|
if (this.state.hasError) {
|
|
47
|
-
return _jsxs("view", __assign({ style: { color: 'crimson', padding: 20 } }, { children: [_jsx("view", __assign({ style: { marginBottom: '12px' } }, { children: ((_a = this.state.error) === null || _a === void 0 ? void 0 : _a.message) || '' })), _jsx("view", { children: ((_b = this.state.error) === null || _b === void 0 ? void 0 : _b.stack) || '' })] }));
|
|
47
|
+
return _jsxs("view", __assign({ id: '__react-unity-error-boundary', style: { color: 'crimson', padding: 20, fontSize: 16 } }, { children: [_jsx("view", __assign({ style: { marginBottom: '12px' } }, { children: ((_a = this.state.error) === null || _a === void 0 ? void 0 : _a.message) || '' })), _jsx("view", { children: ((_b = this.state.error) === null || _b === void 0 ? void 0 : _b.stack) || '' })] }));
|
|
48
48
|
}
|
|
49
49
|
return this.props.children;
|
|
50
50
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactunity/renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "React renderer for Unity3D",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react": "^18.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@reactunity/scripts": "^0.
|
|
68
|
+
"@reactunity/scripts": "^0.15.0",
|
|
69
69
|
"@types/react-reconciler": "^0.28.2",
|
|
70
70
|
"react-unity-webgl": "^9.4.0",
|
|
71
71
|
"rimraf": "^4.1.2",
|