@dcl/react-ecs 7.0.6-3999809037.commit-0a47a3c → 7.0.6-4009020955.commit-08722f5

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.
@@ -7,9 +7,7 @@ const parseTextureMode = {
7
7
  * @internal
8
8
  */
9
9
  export function getTextureMode(mode) {
10
- const value = mode
11
- ? parseTextureMode[mode]
12
- : 1 /* BackgroundTextureMode.CENTER */;
10
+ const value = mode ? parseTextureMode[mode] : 1 /* BackgroundTextureMode.CENTER */;
13
11
  return { textureMode: value };
14
12
  }
15
13
  function isAvatarTexture(props) {
@@ -65,9 +65,7 @@ const parseDisplay = {
65
65
  * @internal
66
66
  */
67
67
  export function getJustify(justify) {
68
- const value = justify
69
- ? parseJustify[justify]
70
- : 0 /* YGJustify.YGJ_FLEX_START */;
68
+ const value = justify ? parseJustify[justify] : 0 /* YGJustify.YGJ_FLEX_START */;
71
69
  return { justifyContent: value };
72
70
  }
73
71
  const parseJustify = {
@@ -99,9 +97,7 @@ const parseAligns = {
99
97
  * @internal
100
98
  */
101
99
  export function getFlexDirection(flexDirection) {
102
- const value = flexDirection
103
- ? parseFlexDirection[flexDirection]
104
- : 0 /* YGFlexDirection.YGFD_ROW */;
100
+ const value = flexDirection ? parseFlexDirection[flexDirection] : 0 /* YGFlexDirection.YGFD_ROW */;
105
101
  return { flexDirection: value };
106
102
  }
107
103
  const parseFlexDirection = {
@@ -126,9 +122,7 @@ const parseFlexWrap = {
126
122
  * @internal
127
123
  */
128
124
  export function getOverflow(overflow) {
129
- const value = overflow
130
- ? parseOverflow[overflow]
131
- : 0 /* YGOverflow.YGO_VISIBLE */;
125
+ const value = overflow ? parseOverflow[overflow] : 0 /* YGOverflow.YGO_VISIBLE */;
132
126
  return { overflow: value };
133
127
  }
134
128
  const parseOverflow = {
@@ -140,9 +134,7 @@ const parseOverflow = {
140
134
  * @internal
141
135
  */
142
136
  export function getPoistionType(position) {
143
- const value = position
144
- ? parsePositionType[position]
145
- : 0 /* YGPositionType.YGPT_RELATIVE */;
137
+ const value = position ? parsePositionType[position] : 0 /* YGPositionType.YGPT_RELATIVE */;
146
138
  return { positionType: value };
147
139
  }
148
140
  const parsePositionType = {
@@ -6,9 +6,7 @@ import { parseUiTransform } from './uiTransform';
6
6
  export function parseProps(props) {
7
7
  const { uiTransform, uiBackground, ...otherProps } = props;
8
8
  const uiTransformProps = parseUiTransform(uiTransform);
9
- const uiBackgroundProps = uiBackground
10
- ? { uiBackground: parseUiBackground(uiBackground) }
11
- : undefined;
9
+ const uiBackgroundProps = uiBackground ? { uiBackground: parseUiBackground(uiBackground) } : undefined;
12
10
  return {
13
11
  ...otherProps,
14
12
  uiTransform: uiTransformProps,
@@ -38,9 +38,7 @@ export function createReconciler(engine, pointerEvents) {
38
38
  return;
39
39
  }
40
40
  if (update.props) {
41
- const pointerEvent = update.component === 'onMouseDown'
42
- ? pointerEvents.onPointerDown
43
- : pointerEvents.onPointerUp;
41
+ const pointerEvent = update.component === 'onMouseDown' ? pointerEvents.onPointerDown : pointerEvents.onPointerUp;
44
42
  pointerEvent(instance.entity, update.props, {
45
43
  button: 0 /* InputAction.IA_POINTER */,
46
44
  // We add this showFeedBack so the pointerEventSystem creates a PointerEvent component with our entity
@@ -57,8 +55,7 @@ export function createReconciler(engine, pointerEvents) {
57
55
  function upsertComponent(instance, props, componentName) {
58
56
  const componentId = getComponentId[componentName];
59
57
  const Component = engine.getComponent(componentId);
60
- const component = Component.getMutableOrNull(instance.entity) ||
61
- Component.create(instance.entity);
58
+ const component = Component.getMutableOrNull(instance.entity) || Component.create(instance.entity);
62
59
  for (const key in props) {
63
60
  const keyProp = key;
64
61
  if (key === 'onChange') {
@@ -119,8 +116,7 @@ export function createReconciler(engine, pointerEvents) {
119
116
  removeChildEntity(child);
120
117
  }
121
118
  function updateOnChange(entity, componentId, state) {
122
- const event = changeEvents.get(entity) ||
123
- changeEvents.set(entity, new Map()).get(entity);
119
+ const event = changeEvents.get(entity) || changeEvents.set(entity, new Map()).get(entity);
124
120
  const oldState = event.get(componentId);
125
121
  const fn = state?.fn;
126
122
  const value = state?.value ?? oldState?.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/react-ecs",
3
- "version": "7.0.6-3999809037.commit-0a47a3c",
3
+ "version": "7.0.6-4009020955.commit-08722f5",
4
4
  "description": "Decentraland ECS",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -42,5 +42,5 @@
42
42
  "displayName": "React ECS",
43
43
  "tsconfig": "./tsconfig.json"
44
44
  },
45
- "commit": "0a47a3c6e7e075d98d04c5ceab1eb8185c70bd9c"
45
+ "commit": "08722f5fb9539e46f90cc94b5f9634ef0ef314ea"
46
46
  }