@dcl/react-ecs 0.0.1-3330279025.commit-cfcab49 → 0.0.1-3339673898.commit-05b2027
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 +10 -1
- package/dist/index.js +102 -39
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -25,13 +25,14 @@ export declare function Container({ width, height, children }: ContainerPropType
|
|
|
25
25
|
export declare type ContainerPropTypes = Partial<CommonProps> & EntityPropTypes['uiTransform'];
|
|
26
26
|
|
|
27
27
|
export declare type EcsElements = {
|
|
28
|
-
entity: Partial<EntityComponents & CommonProps>;
|
|
28
|
+
entity: Partial<Omit<EntityComponents, 'onClick'> & CommonProps>;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export declare type EntityComponents = {
|
|
32
32
|
uiTransform: PBUiTransform;
|
|
33
33
|
uiText: PBUiText;
|
|
34
34
|
uiBackground: PBUiBackground;
|
|
35
|
+
onClick: OnClick;
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -49,6 +50,8 @@ export declare enum Font {
|
|
|
49
50
|
UNRECOGNIZED = -1
|
|
50
51
|
}
|
|
51
52
|
|
|
53
|
+
export declare const isListener: (key: string) => key is "onClick";
|
|
54
|
+
|
|
52
55
|
export declare namespace JSX {
|
|
53
56
|
export interface Element {
|
|
54
57
|
}
|
|
@@ -59,6 +62,12 @@ export declare namespace JSX {
|
|
|
59
62
|
|
|
60
63
|
export declare type Key = number | string;
|
|
61
64
|
|
|
65
|
+
export declare type Listeners = {
|
|
66
|
+
onClick?: OnClick;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export declare type OnClick = () => Promise<void> | void;
|
|
70
|
+
|
|
62
71
|
export declare interface PBUiBackground {
|
|
63
72
|
/** default=(0.0, 0.0, 0.0, 0.0) */
|
|
64
73
|
backgroundColor?: Color4 | undefined;
|