@galacean/engine-ui 2.0.0-alpha.13 → 2.0.0-alpha.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-ui",
3
- "version": "2.0.0-alpha.13",
3
+ "version": "2.0.0-alpha.15",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,10 +26,10 @@
26
26
  "types/**/*"
27
27
  ],
28
28
  "devDependencies": {
29
- "@galacean/engine": "2.0.0-alpha.13"
29
+ "@galacean/engine": "2.0.0-alpha.15"
30
30
  },
31
31
  "peerDependencies": {
32
- "@galacean/engine": "2.0.0-alpha.13"
32
+ "@galacean/engine": "2.0.0-alpha.15"
33
33
  },
34
34
  "scripts": {
35
35
  "b:types": "tsc"
@@ -7,7 +7,6 @@ import { IElement } from "../interface/IElement";
7
7
  * handling rendering and events based on it.
8
8
  */
9
9
  export declare class UICanvas extends Component implements IElement {
10
- private static _targetTempPath;
11
10
  private static _tempGroupAbleList;
12
11
  private static _tempVec3;
13
12
  private static _tempMat;
@@ -1,21 +1,19 @@
1
- import { PointerEventData } from "@galacean/engine";
1
+ import { Entity, PointerEventData, Signal } from "@galacean/engine";
2
2
  import { UIInteractive } from "../interactive/UIInteractive";
3
3
  export declare class Button extends UIInteractive {
4
- private _listeners;
4
+ /** Signal emitted when the button is clicked. */
5
+ readonly onClick: Signal<[PointerEventData]>;
6
+ onPointerClick(event: PointerEventData): void;
7
+ onDestroy(): void;
8
+ _cloneTo(target: Button, srcRoot: Entity, targetRoot: Entity): void;
5
9
  /**
6
10
  * Add a listening function for click.
7
- * @param listener - The listening function
11
+ * @deprecated Use `onClick.on(listener, context)` instead.
8
12
  */
9
13
  addClicked(listener: (event: PointerEventData) => void): void;
10
14
  /**
11
15
  * Remove a listening function of click.
12
- * @param listener - The listening function
16
+ * @deprecated Use `onClick.off(listener, context)` instead.
13
17
  */
14
18
  removeClicked(listener: (event: PointerEventData) => void): void;
15
- onPointerClick(event: PointerEventData): void;
16
- onDestroy(): void;
17
- }
18
- export interface IUIListener {
19
- fn: (event: PointerEventData) => void;
20
- destroyed?: boolean;
21
19
  }
@@ -5,7 +5,6 @@ import { Transition } from "./transition/Transition";
5
5
  * Interactive component.
6
6
  */
7
7
  export declare class UIInteractive extends Script implements IGroupAble {
8
- private static _targetTempPath;
9
8
  protected _transitions: Transition[];
10
9
  protected _interactive: boolean;
11
10
  protected _state: InteractiveState;
package/types/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Material } from "@galacean/engine";
2
2
  export * from "./component";
3
3
  export { CanvasRenderMode } from "./enums/CanvasRenderMode";
4
- export { ResolutionAdaptationMode } from "./enums/ResolutionAdaptationMode";
5
- export { UIPointerEventEmitter } from "./input/UIPointerEventEmitter";
6
4
  export { HorizontalAlignmentMode } from "./enums/HorizontalAlignmentMode";
5
+ export { ResolutionAdaptationMode } from "./enums/ResolutionAdaptationMode";
7
6
  export { VerticalAlignmentMode } from "./enums/VerticalAlignmentMode";
7
+ export { UIPointerEventEmitter } from "./input/UIPointerEventEmitter";
8
8
  export declare class EngineExtension {
9
9
  _uiDefaultMaterial: Material;
10
10
  _getUIDefaultMaterial(): Material;