@galacean/effects-plugin-gui 2.10.0-alpha.5 → 2.10.1
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/controls/base-button.d.ts +2 -3
- package/dist/controls/button.d.ts +2 -3
- package/dist/controls/color-picker.d.ts +3 -4
- package/dist/controls/color-rect.d.ts +2 -3
- package/dist/controls/label.d.ts +2 -3
- package/dist/controls/line-edit.d.ts +2 -3
- package/dist/controls/menu-button.d.ts +3 -4
- package/dist/controls/nine-patch-rect.d.ts +2 -3
- package/dist/controls/popup-menu.d.ts +2 -3
- package/dist/controls/progress-bar.d.ts +2 -3
- package/dist/controls/slider.d.ts +2 -3
- package/dist/controls/text-edit.d.ts +2 -3
- package/dist/controls/texture-rect.d.ts +2 -3
- package/dist/core/control.d.ts +2 -3
- package/dist/core/index.d.ts +0 -1
- package/dist/core/theme.d.ts +3 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/layout/aspect-ratio-container.d.ts +2 -2
- package/dist/layout/box-container.d.ts +2 -3
- package/dist/layout/center-container.d.ts +2 -2
- package/dist/layout/grid-container.d.ts +2 -2
- package/dist/scroll/range.d.ts +2 -3
- package/dist/scroll/scroll-bar.d.ts +2 -3
- package/dist/scroll/scroll-container.d.ts +2 -3
- package/package.json +2 -2
- package/dist/core/data.d.ts +0 -88
- package/dist/data.d.ts +0 -147
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { MouseButtonMask } from '@galacean/effects';
|
|
2
|
-
import type { Engine, EventEmitterListener, InputEventKey, InputEventMouseButton, InputEventMouseMotion, InputEventScreenDrag, InputEventScreenTouch } from '@galacean/effects';
|
|
2
|
+
import type { Engine, EventEmitterListener, InputEventKey, InputEventMouseButton, InputEventMouseMotion, InputEventScreenDrag, InputEventScreenTouch, spec } from '@galacean/effects';
|
|
3
3
|
import { Control } from '../core/control';
|
|
4
4
|
import type { ControlEvent, RootControl } from '../core/control';
|
|
5
5
|
import { FocusMode, MouseFilter } from '../core/enums';
|
|
6
6
|
import { ButtonActionMode, ButtonDrawMode } from './enums';
|
|
7
|
-
import type { BaseButtonData } from '../data';
|
|
8
7
|
export type BaseButtonEvent = ControlEvent & {
|
|
9
8
|
buttonDown: [];
|
|
10
9
|
buttonUp: [];
|
|
@@ -81,5 +80,5 @@ export declare class BaseButton extends Control {
|
|
|
81
80
|
private finishPress;
|
|
82
81
|
private cancelPress;
|
|
83
82
|
private activate;
|
|
84
|
-
fromData(data: BaseButtonData): void;
|
|
83
|
+
fromData(data: spec.BaseButtonData): void;
|
|
85
84
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, Texture } from '@galacean/effects';
|
|
3
|
-
import type { ButtonData } from '../data';
|
|
2
|
+
import type { Engine, Texture, spec } from '@galacean/effects';
|
|
4
3
|
import { BaseButton } from './base-button';
|
|
5
4
|
import { ButtonDrawMode, HorizontalAlignment, VerticalAlignment } from './enums';
|
|
6
5
|
export type ContentInsets = {
|
|
@@ -40,5 +39,5 @@ export declare class Button extends BaseButton {
|
|
|
40
39
|
private getAlignedX;
|
|
41
40
|
private getAlignedY;
|
|
42
41
|
private ellipsizeText;
|
|
43
|
-
fromData(data: ButtonData): void;
|
|
42
|
+
fromData(data: spec.ButtonData): void;
|
|
44
43
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, EventEmitterListener } from '@galacean/effects';
|
|
3
|
-
import type { ColorPickerButtonData, ColorPickerData } from '../data';
|
|
2
|
+
import type { Engine, EventEmitterListener, spec } from '@galacean/effects';
|
|
4
3
|
import type { ControlEvent } from '../core/control';
|
|
5
4
|
import { VBoxContainer } from '../layout/box-container';
|
|
6
5
|
import { PopupPanel } from './popup';
|
|
@@ -36,7 +35,7 @@ export declare class ColorPicker extends VBoxContainer {
|
|
|
36
35
|
private syncEditors;
|
|
37
36
|
private submitChannel;
|
|
38
37
|
private submitHex;
|
|
39
|
-
fromData(data: ColorPickerData): void;
|
|
38
|
+
fromData(data: spec.ColorPickerData): void;
|
|
40
39
|
}
|
|
41
40
|
export declare class ColorPickerButton extends Button {
|
|
42
41
|
static readonly themeType: string;
|
|
@@ -55,5 +54,5 @@ export declare class ColorPickerButton extends Button {
|
|
|
55
54
|
protected getContentInsets(): ContentInsets;
|
|
56
55
|
protected drawDecoration(_mode: ButtonDrawMode): void;
|
|
57
56
|
onDestroy(): void;
|
|
58
|
-
fromData(data: ColorPickerButtonData): void;
|
|
57
|
+
fromData(data: spec.ColorPickerButtonData): void;
|
|
59
58
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine } from '@galacean/effects';
|
|
2
|
+
import type { Engine, spec } from '@galacean/effects';
|
|
3
3
|
import { Control } from '../core/control';
|
|
4
|
-
import type { ColorRectData } from '../data';
|
|
5
4
|
export declare class ColorRect extends Control {
|
|
6
5
|
static readonly themeType: string;
|
|
7
6
|
color: math.Color;
|
|
8
7
|
constructor(engine: Engine);
|
|
9
8
|
draw(): void;
|
|
10
|
-
fromData(data: ColorRectData): void;
|
|
9
|
+
fromData(data: spec.ColorRectData): void;
|
|
11
10
|
}
|
package/dist/controls/label.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine } from '@galacean/effects';
|
|
2
|
+
import type { Engine, spec } from '@galacean/effects';
|
|
3
3
|
import { Control } from '../core/control';
|
|
4
|
-
import type { LabelData } from '../data';
|
|
5
4
|
import { AutowrapMode, HorizontalAlignment, TextOverflow, VerticalAlignment } from './enums';
|
|
6
5
|
export declare class Label extends Control {
|
|
7
6
|
static readonly themeType: string;
|
|
@@ -42,5 +41,5 @@ export declare class Label extends Control {
|
|
|
42
41
|
private ellipsize;
|
|
43
42
|
private drawFilledLine;
|
|
44
43
|
private drawThemedText;
|
|
45
|
-
fromData(data: LabelData): void;
|
|
44
|
+
fromData(data: spec.LabelData): void;
|
|
46
45
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine } from '@galacean/effects';
|
|
3
|
-
import type { LineEditData } from '../data';
|
|
2
|
+
import type { Engine, spec } from '@galacean/effects';
|
|
4
3
|
import { HorizontalAlignment } from './enums';
|
|
5
4
|
import { TextInput } from './text-input';
|
|
6
5
|
export declare class LineEdit extends TextInput {
|
|
@@ -24,5 +23,5 @@ export declare class LineEdit extends TextInput {
|
|
|
24
23
|
private measurePrefix;
|
|
25
24
|
private updateScrollOffset;
|
|
26
25
|
private getAlignedTextX;
|
|
27
|
-
fromData(data: LineEditData): void;
|
|
26
|
+
fromData(data: spec.LineEditData): void;
|
|
28
27
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Engine, EventEmitterListener } from '@galacean/effects';
|
|
2
|
-
import type { MenuButtonData, OptionButtonData } from '../data';
|
|
1
|
+
import type { Engine, EventEmitterListener, spec } from '@galacean/effects';
|
|
3
2
|
import { Button } from './button';
|
|
4
3
|
import type { ContentInsets } from './button';
|
|
5
4
|
import { ButtonDrawMode } from './enums';
|
|
@@ -12,7 +11,7 @@ export declare class MenuButton extends Button {
|
|
|
12
11
|
constructor(engine: Engine, text?: string);
|
|
13
12
|
showPopup(): void;
|
|
14
13
|
onDestroy(): void;
|
|
15
|
-
fromData(data: MenuButtonData): void;
|
|
14
|
+
fromData(data: spec.MenuButtonData): void;
|
|
16
15
|
}
|
|
17
16
|
export type OptionButtonEvent = {
|
|
18
17
|
itemSelected: [id: PopupMenuItemId];
|
|
@@ -35,5 +34,5 @@ export declare class OptionButton extends MenuButton {
|
|
|
35
34
|
select(index: number, signal?: boolean): void;
|
|
36
35
|
selectId(id: PopupMenuItemId, signal?: boolean): void;
|
|
37
36
|
onDestroy(): void;
|
|
38
|
-
fromData(data: OptionButtonData): void;
|
|
37
|
+
fromData(data: spec.OptionButtonData): void;
|
|
39
38
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, EventEmitterListener, Texture } from '@galacean/effects';
|
|
2
|
+
import type { Engine, EventEmitterListener, Texture, spec } from '@galacean/effects';
|
|
3
3
|
import { Control } from '../core/control';
|
|
4
4
|
import type { ControlEvent, Rect } from '../core/control';
|
|
5
5
|
import { AxisStretchMode, Side } from './enums';
|
|
6
|
-
import type { NinePatchRectData } from '../data';
|
|
7
6
|
export type NinePatchRectEvent = ControlEvent & {
|
|
8
7
|
textureChanged: [texture: Texture | null];
|
|
9
8
|
};
|
|
@@ -31,5 +30,5 @@ export declare class NinePatchRect extends Control {
|
|
|
31
30
|
getDesiredSize(): math.Vector2;
|
|
32
31
|
draw(): void;
|
|
33
32
|
private getSourceRect;
|
|
34
|
-
fromData(data: NinePatchRectData): void;
|
|
33
|
+
fromData(data: spec.NinePatchRectData): void;
|
|
35
34
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { EventEmitterListener, InputEventKey, InputEventMouseButton, InputEventMouseMotion, Texture } from '@galacean/effects';
|
|
3
|
-
import type { PopupMenuData } from '../data';
|
|
2
|
+
import type { EventEmitterListener, InputEventKey, InputEventMouseButton, InputEventMouseMotion, Texture, spec } from '@galacean/effects';
|
|
4
3
|
import type { ControlEvent } from '../core/control';
|
|
5
4
|
import { Popup } from './popup';
|
|
6
5
|
export type PopupMenuItemId = number | string;
|
|
@@ -40,5 +39,5 @@ export declare class PopupMenu extends Popup {
|
|
|
40
39
|
private getIndexAt;
|
|
41
40
|
private activateIndex;
|
|
42
41
|
private findEnabledIndex;
|
|
43
|
-
fromData(data: PopupMenuData): void;
|
|
42
|
+
fromData(data: spec.PopupMenuData): void;
|
|
44
43
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine } from '@galacean/effects';
|
|
2
|
+
import type { Engine, spec } from '@galacean/effects';
|
|
3
3
|
import { Range } from '../scroll/range';
|
|
4
4
|
import { ProgressFillMode } from './enums';
|
|
5
|
-
import type { ProgressBarData } from '../data';
|
|
6
5
|
export declare class ProgressBar extends Range {
|
|
7
6
|
static readonly themeType: string;
|
|
8
7
|
private _showPercentage;
|
|
@@ -15,5 +14,5 @@ export declare class ProgressBar extends Range {
|
|
|
15
14
|
getMinimumSize(): math.Vector2;
|
|
16
15
|
getDesiredSize(): math.Vector2;
|
|
17
16
|
draw(): void;
|
|
18
|
-
fromData(data: ProgressBarData): void;
|
|
17
|
+
fromData(data: spec.ProgressBarData): void;
|
|
19
18
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, EventEmitterListener, InputEventKey, InputEventMouseButton, InputEventMouseMotion, InputEventScreenDrag, InputEventScreenTouch } from '@galacean/effects';
|
|
2
|
+
import type { Engine, EventEmitterListener, InputEventKey, InputEventMouseButton, InputEventMouseMotion, InputEventScreenDrag, InputEventScreenTouch, spec } from '@galacean/effects';
|
|
3
3
|
import type { RootControl } from '../core/control';
|
|
4
4
|
import { Orientation } from '../layout/enums';
|
|
5
5
|
import { Range } from '../scroll/range';
|
|
6
6
|
import type { RangeEvent } from '../scroll/range';
|
|
7
|
-
import type { SliderData } from '../data';
|
|
8
7
|
export type SliderEvent = RangeEvent & {
|
|
9
8
|
dragStarted: [];
|
|
10
9
|
dragEnded: [valueChanged: boolean];
|
|
@@ -51,7 +50,7 @@ export declare class Slider extends Range {
|
|
|
51
50
|
private getRatioAt;
|
|
52
51
|
private getIncrement;
|
|
53
52
|
private getGrabberRect;
|
|
54
|
-
fromData(data: SliderData): void;
|
|
53
|
+
fromData(data: spec.SliderData): void;
|
|
55
54
|
}
|
|
56
55
|
export declare class HSlider extends Slider {
|
|
57
56
|
static readonly themeType: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, InputEventKey, InputEventMouseButton } from '@galacean/effects';
|
|
3
|
-
import type { TextEditData } from '../data';
|
|
2
|
+
import type { Engine, InputEventKey, InputEventMouseButton, spec } from '@galacean/effects';
|
|
4
3
|
import { TextInput } from './text-input';
|
|
5
4
|
export declare class TextEdit extends TextInput {
|
|
6
5
|
static readonly themeType: string;
|
|
@@ -17,5 +16,5 @@ export declare class TextEdit extends TextInput {
|
|
|
17
16
|
private getVerticalCaretIndex;
|
|
18
17
|
private ensureCaretLineVisible;
|
|
19
18
|
protected onTextValueChanged(): void;
|
|
20
|
-
fromData(data: TextEditData): void;
|
|
19
|
+
fromData(data: spec.TextEditData): void;
|
|
21
20
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, Texture } from '@galacean/effects';
|
|
2
|
+
import type { Engine, Texture, spec } from '@galacean/effects';
|
|
3
3
|
import { Control } from '../core/control';
|
|
4
|
-
import type { TextureRectData } from '../data';
|
|
5
4
|
import { TextureExpandMode, TextureStretchMode } from './enums';
|
|
6
5
|
export declare class TextureRect extends Control {
|
|
7
6
|
static readonly themeType: string;
|
|
@@ -26,5 +25,5 @@ export declare class TextureRect extends Control {
|
|
|
26
25
|
private drawTiled;
|
|
27
26
|
private drawRegion;
|
|
28
27
|
private controlSizeChanged;
|
|
29
|
-
fromData(data: TextureRectData): void;
|
|
28
|
+
fromData(data: spec.TextureRectData): void;
|
|
30
29
|
}
|
package/dist/core/control.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, EventEmitterListener, FontStyle, FontWeight, InputEventKey, InputEventMouseButton, InputEventMouseMotion, InputEventScreenDrag, InputEventScreenTouch, NinePatchDrawOptions, TextMeasurement, Texture, TextureRegion, VFXItem } from '@galacean/effects';
|
|
2
|
+
import type { Engine, EventEmitterListener, FontStyle, FontWeight, InputEventKey, InputEventMouseButton, InputEventMouseMotion, InputEventScreenDrag, InputEventScreenTouch, NinePatchDrawOptions, TextMeasurement, Texture, TextureRegion, VFXItem, spec } from '@galacean/effects';
|
|
3
3
|
import { EventEmitter } from '@galacean/effects';
|
|
4
4
|
import type { UIControl } from '../components/ui-control';
|
|
5
|
-
import type { ControlData } from './data';
|
|
6
5
|
import type { CursorStyle } from './enums';
|
|
7
6
|
import { FocusBehaviorRecursive, FocusMode, MouseBehaviorRecursive, MouseFilter } from './enums';
|
|
8
7
|
import { StyleBox } from './theme';
|
|
@@ -317,7 +316,7 @@ export declare class Control {
|
|
|
317
316
|
private computeAnchors;
|
|
318
317
|
private isMouseRecursiveEnabled;
|
|
319
318
|
private isFocusRecursiveEnabled;
|
|
320
|
-
fromData(data: ControlData): void;
|
|
319
|
+
fromData(data: spec.ControlData): void;
|
|
321
320
|
private applyThemeOverridesFromData;
|
|
322
321
|
}
|
|
323
322
|
/**
|
package/dist/core/index.d.ts
CHANGED
package/dist/core/theme.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, EventEmitterListener, FontStyle, FontWeight, Graphics, Texture } from '@galacean/effects';
|
|
3
|
-
import type { StyleBoxData, ThemeData } from './data';
|
|
2
|
+
import type { Engine, EventEmitterListener, FontStyle, FontWeight, Graphics, Texture, spec } from '@galacean/effects';
|
|
4
3
|
type Color = math.Color;
|
|
5
4
|
type Vector2 = math.Vector2;
|
|
6
5
|
declare const Color: typeof math.Color;
|
|
@@ -166,7 +165,7 @@ export declare class Theme {
|
|
|
166
165
|
getItem(type: string, itemType: ThemeItemType, name: string): ThemeValue | undefined;
|
|
167
166
|
clearItem(type: string, itemType: ThemeItemType, name: string): void;
|
|
168
167
|
clear(): void;
|
|
169
|
-
static fromData(engine: Engine, data: ThemeData): Theme;
|
|
168
|
+
static fromData(engine: Engine, data: spec.ThemeData): Theme;
|
|
170
169
|
private setCollectionFromData;
|
|
171
170
|
private setItem;
|
|
172
171
|
private retainStyleBox;
|
|
@@ -174,7 +173,7 @@ export declare class Theme {
|
|
|
174
173
|
private notifyChanged;
|
|
175
174
|
private affectsLayout;
|
|
176
175
|
}
|
|
177
|
-
export declare function styleBoxFromData(engine: Engine, data: StyleBoxData): StyleBox;
|
|
176
|
+
export declare function styleBoxFromData(engine: Engine, data: spec.StyleBoxData): StyleBox;
|
|
178
177
|
export declare const themeFallbacks: {
|
|
179
178
|
color: math.Color;
|
|
180
179
|
constant: number;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: GUI controls and layout containers for Galacean Effects
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors:
|
|
6
|
-
* Version: v2.10.
|
|
6
|
+
* Version: v2.10.1
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -4265,12 +4265,12 @@ exports.UIControl = /*#__PURE__*/ function(Component) {
|
|
|
4265
4265
|
};
|
|
4266
4266
|
_proto.fromData = function fromData(data) {
|
|
4267
4267
|
Component.prototype.fromData.call(this, data);
|
|
4268
|
-
var
|
|
4269
|
-
var Constructor = effects.getClass(
|
|
4268
|
+
var uiControlData = data;
|
|
4269
|
+
var Constructor = effects.getClass(uiControlData.control);
|
|
4270
4270
|
var control = new Constructor(this.engine);
|
|
4271
4271
|
this.attachControl(control);
|
|
4272
4272
|
this.syncingLocation = true;
|
|
4273
|
-
control.fromData(
|
|
4273
|
+
control.fromData(uiControlData.data);
|
|
4274
4274
|
this.syncingLocation = false;
|
|
4275
4275
|
this.syncControlLocationToItem();
|
|
4276
4276
|
};
|
|
@@ -10856,7 +10856,7 @@ function colorFromHex(value, fallbackAlpha) {
|
|
|
10856
10856
|
}
|
|
10857
10857
|
|
|
10858
10858
|
effects.registerPlugin("gui", GUIPlugin);
|
|
10859
|
-
/** GUI plugin package version. Importing this package registers the GUI runtime and native fallback theme. */ var version = "2.10.
|
|
10859
|
+
/** GUI plugin package version. Importing this package registers the GUI runtime and native fallback theme. */ var version = "2.10.1";
|
|
10860
10860
|
|
|
10861
10861
|
exports.BaseButton = BaseButton;
|
|
10862
10862
|
exports.BoxContainer = BoxContainer;
|