@dcl/react-ecs 7.0.6-3991588905.commit-2387247 → 7.0.6-3999809037.commit-0a47a3c
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/Button/types.d.ts +1 -1
- package/dist/components/Dropdown/types.d.ts +1 -1
- package/dist/components/Input/types.d.ts +1 -1
- package/dist/components/Label/types.d.ts +3 -3
- package/dist/components/listeners/types.d.ts +2 -2
- package/dist/components/types.d.ts +4 -4
- package/dist/components/uiBackground/types.d.ts +7 -7
- package/dist/components/uiTransform/types.d.ts +9 -9
- package/dist/components/uiTransform/utils.d.ts +8 -8
- package/dist/react-ecs.d.ts +2 -2
- package/dist/reconciler/types.d.ts +16 -16
- package/dist/system.d.ts +2 -2
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { TextAlignType, UiFontType } from '../Label/types';
|
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type UiDropdownProps = Partial<Omit<PBUiDropdown, 'textAlign' | 'font'>> & {
|
|
7
7
|
onChange?(value: number): void;
|
|
8
8
|
font?: UiFontType;
|
|
9
9
|
textAlign?: TextAlignType;
|
|
@@ -3,7 +3,7 @@ import { TextAlignType, UiFontType } from '../Label/types';
|
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type UiInputProps = Omit<PBUiInput, 'font' | 'textAlign'> & {
|
|
7
7
|
onChange?(value: string): void;
|
|
8
8
|
font?: UiFontType;
|
|
9
9
|
textAlign?: TextAlignType;
|
|
@@ -2,7 +2,7 @@ import { PBUiText } from '@dcl/ecs';
|
|
|
2
2
|
/**
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type UiLabelProps = Omit<PBUiText, 'textAlign' | 'font'> & {
|
|
6
6
|
/** default='middle-center' */
|
|
7
7
|
textAlign?: TextAlignType | undefined;
|
|
8
8
|
/** default='sans-serif' */
|
|
@@ -11,8 +11,8 @@ export declare type UiLabelProps = Omit<PBUiText, 'textAlign' | 'font'> & {
|
|
|
11
11
|
/**
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type UiFontType = 'sans-serif' | 'serif' | 'monospace';
|
|
15
15
|
/**
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type TextAlignType = 'top-left' | 'top-center' | 'top-right' | 'middle-left' | 'middle-center' | 'middle-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
@@ -4,13 +4,13 @@ import { UiTransformProps } from './uiTransform/types';
|
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type EntityPropTypes = {
|
|
8
8
|
uiTransform?: UiTransformProps;
|
|
9
9
|
uiBackground?: UiBackgroundProps;
|
|
10
10
|
} & Listeners & Pick<CommonProps, 'key'>;
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
11
|
+
export type Key = number | string;
|
|
12
|
+
export type Children = unknown;
|
|
13
|
+
export type CommonProps = {
|
|
14
14
|
key?: Key;
|
|
15
15
|
children?: Children;
|
|
16
16
|
};
|
|
@@ -3,7 +3,7 @@ import { Color4 } from '@dcl/ecs/dist/components/generated/pb/decentraland/commo
|
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type UiBackgroundProps = {
|
|
7
7
|
color?: Color4 | undefined;
|
|
8
8
|
textureMode?: TextureMode;
|
|
9
9
|
textureSlices?: BorderRect | undefined;
|
|
@@ -12,11 +12,11 @@ export declare type UiBackgroundProps = {
|
|
|
12
12
|
/**
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type UiTextureUnion = UiAvatarTexture | UiTexture;
|
|
16
16
|
/**
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type UiAvatarTexture = {
|
|
20
20
|
avatarTexture?: {
|
|
21
21
|
userId: string;
|
|
22
22
|
wrapMode?: TextureWrapType;
|
|
@@ -26,7 +26,7 @@ export declare type UiAvatarTexture = {
|
|
|
26
26
|
/**
|
|
27
27
|
* @public
|
|
28
28
|
*/
|
|
29
|
-
export
|
|
29
|
+
export type UiTexture = {
|
|
30
30
|
texture?: {
|
|
31
31
|
src: string;
|
|
32
32
|
wrapMode?: TextureWrapType;
|
|
@@ -36,11 +36,11 @@ export declare type UiTexture = {
|
|
|
36
36
|
/**
|
|
37
37
|
* @public
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
39
|
+
export type TextureWrapType = 'repeat' | 'clamp' | 'mirror' | 'mirror-once';
|
|
40
40
|
/**
|
|
41
41
|
* @public
|
|
42
42
|
*/
|
|
43
|
-
export
|
|
43
|
+
export type TextureFilterType = 'point' | 'bi-linear' | 'tri-linear';
|
|
44
44
|
/**
|
|
45
45
|
* @public
|
|
46
46
|
* NINE_SLICES - https://docs.unity3d.com/Manual/UIE-USS-SupportedProperties.html (Slicing section)
|
|
@@ -55,4 +55,4 @@ export declare type TextureFilterType = 'point' | 'bi-linear' | 'tri-linear';
|
|
|
55
55
|
* STRETCH - STRETCH enables the texture to cover all the area of the container,
|
|
56
56
|
* adopting its aspect ratio.
|
|
57
57
|
*/
|
|
58
|
-
export
|
|
58
|
+
export type TextureMode = 'nine-slices' | 'center' | 'stretch';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type PositionUnit = `${number}px` | `${number}%` | number;
|
|
2
2
|
/**
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type Position = {
|
|
6
6
|
top: PositionUnit;
|
|
7
7
|
right: PositionUnit;
|
|
8
8
|
bottom: PositionUnit;
|
|
@@ -11,31 +11,31 @@ export declare type Position = {
|
|
|
11
11
|
/**
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type DisplayType = 'flex' | 'none';
|
|
15
15
|
/**
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type JustifyType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
19
19
|
/**
|
|
20
20
|
* @public
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type AlignType = 'auto' | 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline' | 'space-between' | 'space-around';
|
|
23
23
|
/**
|
|
24
24
|
* @public
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export type FlexDirectionType = 'row' | 'column' | 'column-reverse' | 'row-reverse';
|
|
27
27
|
/**
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type FlexWrapType = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
31
31
|
/**
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export type OverflowType = 'hidden' | 'scroll' | 'visible';
|
|
35
35
|
/**
|
|
36
36
|
* @public
|
|
37
37
|
*/
|
|
38
|
-
export
|
|
38
|
+
export type PositionType = 'absolute' | 'relative';
|
|
39
39
|
/**
|
|
40
40
|
* @public
|
|
41
41
|
*/
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { YGUnit } from '@dcl/ecs';
|
|
2
2
|
import { Position, PositionUnit } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type PropName = 'position' | 'margin' | 'padding';
|
|
4
|
+
type PropKey = `${PropName}${Capitalize<keyof Position>}`;
|
|
5
|
+
type PropKeyUnit = `${PropName}${Capitalize<keyof Position>}Unit`;
|
|
6
|
+
type PositionParsed = {
|
|
7
7
|
[key in PropKey]?: number;
|
|
8
8
|
} & {
|
|
9
9
|
[key in PropKeyUnit]?: YGUnit;
|
|
10
10
|
};
|
|
11
11
|
export declare function parsePosition<T extends PropName>(position: Partial<Position> | undefined, prop: T): Partial<PositionParsed>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
type HeightWidth = 'height' | 'width';
|
|
13
|
+
type SizePropName = HeightWidth | `max${Capitalize<HeightWidth>}` | `min${Capitalize<HeightWidth>}`;
|
|
14
|
+
type SizePropKeyUnit = `${SizePropName}Unit`;
|
|
15
|
+
type SizeReturnType = {
|
|
16
16
|
[key in SizePropName]: number;
|
|
17
17
|
} & {
|
|
18
18
|
[key in SizePropKeyUnit]: YGUnit;
|
package/dist/react-ecs.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PBUiBackground, PBUiText, PBUiTransform, PBUiInput, PBUiDropdown } from '@dcl/ecs';
|
|
2
2
|
import { Callback } from './components';
|
|
3
3
|
import { CommonProps } from './components/types';
|
|
4
|
-
export
|
|
4
|
+
export type EcsElements = {
|
|
5
5
|
entity: Partial<EntityComponents & CommonProps>;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type EntityComponents = {
|
|
8
8
|
uiTransform: PBUiTransform;
|
|
9
9
|
uiText: PBUiText;
|
|
10
10
|
uiBackground: PBUiBackground;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import type { Entity } from '@dcl/ecs';
|
|
2
2
|
import { CommonProps, Listeners } from '../components';
|
|
3
3
|
import type { EntityComponents } from '../react-ecs';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
4
|
+
export type EngineComponents = Omit<EntityComponents, keyof Listeners>;
|
|
5
|
+
export type OpaqueHandle = any;
|
|
6
|
+
export type Type = 'entity';
|
|
7
|
+
export type Props = EntityComponents & CommonProps;
|
|
8
|
+
export type Container = Document | Instance | any;
|
|
9
|
+
export type Instance = {
|
|
10
10
|
entity: Entity;
|
|
11
11
|
parent?: Entity;
|
|
12
12
|
rightOf?: Entity;
|
|
13
13
|
_child: Instance[];
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
15
|
+
export type TextInstance = never;
|
|
16
|
+
export type SuspenseInstance = never;
|
|
17
|
+
export type HydratableInstance = never;
|
|
18
|
+
export type PublicInstance = Instance;
|
|
19
|
+
export type HostContext = null;
|
|
20
|
+
export type UpdatePayload = Changes[];
|
|
21
|
+
export type _ChildSet = never;
|
|
22
|
+
export type TimeoutHandle = any;
|
|
23
|
+
export type NoTimeout = number;
|
|
24
|
+
export type Changes<K extends keyof EntityComponents = keyof EntityComponents> = {
|
|
25
25
|
type: 'delete' | 'add' | 'put';
|
|
26
26
|
props?: Partial<EntityComponents[K]>;
|
|
27
27
|
component: K;
|
package/dist/system.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IEngine, PointerEventsSystem } from '@dcl/ecs';
|
|
2
2
|
import type { JSX } from './react-ecs';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type UiComponent = () => JSX.Element;
|
|
4
|
+
export type ReactBasedUiSystem = {
|
|
5
5
|
destroy(): void;
|
|
6
6
|
setUiRenderer(ui: UiComponent): void;
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/react-ecs",
|
|
3
|
-
"version": "7.0.6-
|
|
3
|
+
"version": "7.0.6-3999809037.commit-0a47a3c",
|
|
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": "
|
|
45
|
+
"commit": "0a47a3c6e7e075d98d04c5ceab1eb8185c70bd9c"
|
|
46
46
|
}
|