@dcl/react-ecs 7.3.24-6613667972.commit-84b272f → 7.3.24-6620605375.commit-3a46fcf
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,4 +1,4 @@
|
|
|
1
|
-
import { getAlign,
|
|
1
|
+
import { getAlign, getDisplay, getFlexDirection, getFlexWrap, getJustify, getOverflow, getPointerFilter, getPositionType, parsePosition, parseSize } from './utils';
|
|
2
2
|
/**
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
@@ -50,7 +50,8 @@ const defaultUiTransform = {
|
|
|
50
50
|
positionTopUnit: 0 /* YGUnit.YGU_UNDEFINED */,
|
|
51
51
|
flexBasisUnit: 0 /* YGUnit.YGU_UNDEFINED */,
|
|
52
52
|
widthUnit: 0 /* YGUnit.YGU_UNDEFINED */,
|
|
53
|
-
heightUnit: 0 /* YGUnit.YGU_UNDEFINED
|
|
53
|
+
heightUnit: 0 /* YGUnit.YGU_UNDEFINED */,
|
|
54
|
+
pointerFilter: 0 /* PointerFilterMode.PFM_NONE */
|
|
54
55
|
};
|
|
55
56
|
/**
|
|
56
57
|
* @public
|
|
@@ -75,7 +76,8 @@ export function parseUiTransform(props = {}) {
|
|
|
75
76
|
...getJustify(props.justifyContent),
|
|
76
77
|
...getFlexDirection(props.flexDirection),
|
|
77
78
|
...getOverflow(props.overflow),
|
|
78
|
-
...
|
|
79
|
+
...getPointerFilter(props.pointerFilter),
|
|
80
|
+
...getPositionType(props.positionType),
|
|
79
81
|
// Optional values
|
|
80
82
|
...(alignContent && getAlign('alignContent', alignContent)),
|
|
81
83
|
...(alignItems && getAlign('alignItems', alignItems)),
|
|
@@ -48,7 +48,7 @@ export type FlexDirectionType = 'row' | 'column' | 'column-reverse' | 'row-rever
|
|
|
48
48
|
export type FlexWrapType = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
49
49
|
/**
|
|
50
50
|
* @public
|
|
51
|
-
* The overflow property controls what happens to content that is too big to fit into an area
|
|
51
|
+
* The overflow property controls what happens to content that is too big to fit into an area
|
|
52
52
|
*/
|
|
53
53
|
export type OverflowType = 'hidden' | 'scroll' | 'visible';
|
|
54
54
|
/**
|
|
@@ -56,6 +56,11 @@ export type OverflowType = 'hidden' | 'scroll' | 'visible';
|
|
|
56
56
|
* The position property specifies the type of positioning method used for an element
|
|
57
57
|
*/
|
|
58
58
|
export type PositionType = 'absolute' | 'relative';
|
|
59
|
+
/**
|
|
60
|
+
* @public
|
|
61
|
+
* 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)
|
|
62
|
+
*/
|
|
63
|
+
export type PointerFilterType = 'none' | 'block';
|
|
59
64
|
/**
|
|
60
65
|
* Layout props to position things in the canvas
|
|
61
66
|
* @public
|
|
@@ -105,4 +110,6 @@ export interface UiTransformProps {
|
|
|
105
110
|
flexShrink?: number;
|
|
106
111
|
/** The overflow property controls what happens to content that is too big to fit into an area */
|
|
107
112
|
overflow?: OverflowType;
|
|
113
|
+
/** 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) **/
|
|
114
|
+
pointerFilter?: PointerFilterType;
|
|
108
115
|
}
|
|
@@ -152,7 +152,7 @@ const parseOverflow = {
|
|
|
152
152
|
/**
|
|
153
153
|
* @internal
|
|
154
154
|
*/
|
|
155
|
-
export function
|
|
155
|
+
export function getPositionType(position) {
|
|
156
156
|
const value = position ? parsePositionType[position] : 0 /* YGPositionType.YGPT_RELATIVE */;
|
|
157
157
|
return { positionType: value };
|
|
158
158
|
}
|
|
@@ -160,3 +160,14 @@ const parsePositionType = {
|
|
|
160
160
|
relative: 0 /* YGPositionType.YGPT_RELATIVE */,
|
|
161
161
|
absolute: 1 /* YGPositionType.YGPT_ABSOLUTE */
|
|
162
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
export function getPointerFilter(pointerFilter) {
|
|
167
|
+
const value = pointerFilter ? parsePointerFilter[pointerFilter] : 0 /* PointerFilterMode.PFM_NONE */;
|
|
168
|
+
return { pointerFilter: value };
|
|
169
|
+
}
|
|
170
|
+
const parsePointerFilter = {
|
|
171
|
+
none: 0 /* PointerFilterMode.PFM_NONE */,
|
|
172
|
+
block: 1 /* PointerFilterMode.PFM_BLOCK */
|
|
173
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/react-ecs",
|
|
3
3
|
"description": "Decentraland ECS",
|
|
4
|
-
"version": "7.3.24-
|
|
4
|
+
"version": "7.3.24-6620605375.commit-3a46fcf",
|
|
5
5
|
"author": "DCL",
|
|
6
6
|
"bugs": "https://github.com/decentraland/js-sdk-toolchain/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@dcl/ecs": "7.3.24-
|
|
8
|
+
"@dcl/ecs": "7.3.24-6620605375.commit-3a46fcf",
|
|
9
9
|
"react": "^18.2.0",
|
|
10
10
|
"react-reconciler": "^0.29.0"
|
|
11
11
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"tsconfig": "./tsconfig.json"
|
|
40
40
|
},
|
|
41
41
|
"types": "./dist/index.d.ts",
|
|
42
|
-
"commit": "
|
|
42
|
+
"commit": "3a46fcffc10dd97e8af664027868c84746ac9a80"
|
|
43
43
|
}
|