@dcl/react-ecs 7.5.1-9299912306.commit-7629bda → 7.5.1-9349876127.commit-ca3ef96
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/components/Label/index.js +1 -3
- package/dist/components/Label/types.d.ts +0 -6
- package/dist/components/types.d.ts +2 -1
- package/dist/components/uiTransform/index.js +2 -3
- package/dist/components/uiTransform/types.d.ts +0 -2
- package/dist/react-ecs.d.ts +30 -6
- package/dist/reconciler/index.d.ts +1 -1
- package/dist/system.d.ts +1 -1
- package/package.json +5 -4
|
@@ -28,9 +28,7 @@ export function Label(props) {
|
|
|
28
28
|
...textProps,
|
|
29
29
|
...getFont(font),
|
|
30
30
|
...getTextAlign(textAlign),
|
|
31
|
-
...getFontSize(fontSize)
|
|
32
|
-
outlineWidth: props.outlineWidth,
|
|
33
|
-
outlineColor: props.outlineColor
|
|
31
|
+
...getFontSize(fontSize)
|
|
34
32
|
};
|
|
35
33
|
return ReactEcs.createElement("entity", { ...commonProps, uiText: uiText });
|
|
36
34
|
}
|
|
@@ -15,12 +15,6 @@ export interface UiLabelProps {
|
|
|
15
15
|
textAlign?: TextAlignType | undefined;
|
|
16
16
|
/** Label font type. @defaultValue 'sans-serif' */
|
|
17
17
|
font?: UiFontType | undefined;
|
|
18
|
-
/** Outline width of the text. @defaultValue 0 */
|
|
19
|
-
outlineWidth?: number | undefined;
|
|
20
|
-
/** Outline color of the text. @defaultValue `{ r: 0, g: 0, b: 0, a: 1 }` */
|
|
21
|
-
outlineColor?: Color4 | undefined;
|
|
22
|
-
/** Text wrapping. @defaultValue false */
|
|
23
|
-
textWrapping?: boolean | undefined;
|
|
24
18
|
}
|
|
25
19
|
/**
|
|
26
20
|
* @public
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from '../react-ecs';
|
|
1
2
|
import { Listeners } from './listeners/types';
|
|
2
3
|
import { UiBackgroundProps } from './uiBackground/types';
|
|
3
4
|
import { UiTransformProps } from './uiTransform/types';
|
|
@@ -19,7 +20,7 @@ export interface EntityPropTypes extends Listeners {
|
|
|
19
20
|
* @public
|
|
20
21
|
*/
|
|
21
22
|
export type Key = number | string;
|
|
22
|
-
export type Children =
|
|
23
|
+
export type Children = ReactNode;
|
|
23
24
|
/**
|
|
24
25
|
* unit value type. i.e. 'vw' || 'vh'
|
|
25
26
|
* @public
|
|
@@ -49,10 +49,9 @@ const defaultUiTransform = {
|
|
|
49
49
|
positionTop: 0,
|
|
50
50
|
positionTopUnit: 0 /* YGUnit.YGU_UNDEFINED */,
|
|
51
51
|
flexBasisUnit: 0 /* YGUnit.YGU_UNDEFINED */,
|
|
52
|
-
widthUnit:
|
|
52
|
+
widthUnit: 3 /* YGUnit.YGU_AUTO */,
|
|
53
53
|
heightUnit: 0 /* YGUnit.YGU_UNDEFINED */,
|
|
54
|
-
pointerFilter: 0 /* PointerFilterMode.PFM_NONE
|
|
55
|
-
opacity: 1
|
|
54
|
+
pointerFilter: 0 /* PointerFilterMode.PFM_NONE */
|
|
56
55
|
};
|
|
57
56
|
/**
|
|
58
57
|
* @public
|
|
@@ -113,6 +113,4 @@ export interface UiTransformProps {
|
|
|
113
113
|
overflow?: OverflowType;
|
|
114
114
|
/** The pointer filter property determines if the ui element blocks the pointer or not (elements with pointer events always block the pointer regardless of this property) **/
|
|
115
115
|
pointerFilter?: PointerFilterType;
|
|
116
|
-
/** The opacity property sets the opacity level for an element, it's accumulated across children @defaultValue 1 */
|
|
117
|
-
opacity?: number;
|
|
118
116
|
}
|
package/dist/react-ecs.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PBUiBackground, PBUiText, PBUiTransform, PBUiInput, PBUiDropdown } from '@dcl/ecs';
|
|
2
|
-
import { Callback,
|
|
2
|
+
import { Callback, Key } from './components';
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
6
|
export interface EcsElements {
|
|
7
7
|
entity: Partial<EntityComponents> & {
|
|
8
|
-
children?:
|
|
8
|
+
children?: ReactNode;
|
|
9
9
|
key?: Key;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
@@ -25,11 +25,29 @@ export type EntityComponents = {
|
|
|
25
25
|
* @hidden
|
|
26
26
|
*/
|
|
27
27
|
export declare namespace JSX {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
interface Element extends ReactElement<any, any> {
|
|
29
|
+
}
|
|
30
|
+
interface IntrinsicElements extends EcsElements {
|
|
31
|
+
}
|
|
30
32
|
interface Component {
|
|
31
33
|
}
|
|
32
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export type JSXElementConstructor<P> = (props: P) => ReactElement<any, any> | null;
|
|
39
|
+
/**
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export interface ReactElement<P = any, T extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>> {
|
|
43
|
+
type: T;
|
|
44
|
+
props: P;
|
|
45
|
+
key: Key | null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export type ReactNode = ReactElement | string | number | boolean | null | undefined;
|
|
33
51
|
/**
|
|
34
52
|
* @public
|
|
35
53
|
*/
|
|
@@ -38,12 +56,18 @@ export declare namespace ReactEcs {
|
|
|
38
56
|
/**
|
|
39
57
|
* @public
|
|
40
58
|
*/
|
|
41
|
-
type
|
|
59
|
+
type ReactNode = ReactElement | string | number | boolean | null | undefined | ReactElement[];
|
|
60
|
+
/**
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
interface Element extends ReactElement<any, any> {
|
|
64
|
+
}
|
|
42
65
|
/**
|
|
43
66
|
* @public
|
|
44
67
|
* HTML tag elements
|
|
45
68
|
*/
|
|
46
|
-
|
|
69
|
+
interface IntrinsicElements extends EcsElements {
|
|
70
|
+
}
|
|
47
71
|
/**
|
|
48
72
|
* @public
|
|
49
73
|
* Component empty interface
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Entity, IEngine, PointerEventsSystem } from '@dcl/ecs';
|
|
2
2
|
import { ReactEcs } from '../react-ecs';
|
|
3
3
|
export declare function createReconciler(engine: Pick<IEngine, 'getComponent' | 'addEntity' | 'removeEntity' | 'defineComponentFromSchema' | 'getEntitiesWith'>, pointerEvents: PointerEventsSystem): {
|
|
4
|
-
update: (component: ReactEcs.JSX.
|
|
4
|
+
update: (component: ReactEcs.JSX.ReactNode) => number;
|
|
5
5
|
getEntities: () => Entity[];
|
|
6
6
|
};
|
package/dist/system.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/react-ecs",
|
|
3
3
|
"description": "Decentraland ECS",
|
|
4
|
-
"version": "7.5.1-
|
|
4
|
+
"version": "7.5.1-9349876127.commit-ca3ef96",
|
|
5
5
|
"author": "DCL",
|
|
6
6
|
"bugs": "https://github.com/decentraland/js-sdk-toolchain/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@dcl/ecs": "7.5.1-
|
|
8
|
+
"@dcl/ecs": "7.5.1-9349876127.commit-ca3ef96",
|
|
9
9
|
"react": "^18.2.0",
|
|
10
10
|
"react-reconciler": "^0.29.0"
|
|
11
11
|
},
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"directory": "packages/@dcl/react-ecs"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "tsc -p tsconfig.json"
|
|
33
|
+
"build": "tsc -p tsconfig.json",
|
|
34
|
+
"start": "tsc -p tsconfig.json --watch"
|
|
34
35
|
},
|
|
35
36
|
"typedoc": {
|
|
36
37
|
"entryPoint": "./src/index.ts",
|
|
@@ -39,5 +40,5 @@
|
|
|
39
40
|
"tsconfig": "./tsconfig.json"
|
|
40
41
|
},
|
|
41
42
|
"types": "./dist/index.d.ts",
|
|
42
|
-
"commit": "
|
|
43
|
+
"commit": "ca3ef964cedc719294f9794e0a8584c3d1e132ca"
|
|
43
44
|
}
|