@galacean/effects-plugin-gui 2.10.0-alpha.5 → 2.10.0
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,6 +1,6 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
+
import type { spec } from '@galacean/effects';
|
|
2
3
|
import { Container } from '../core/control';
|
|
3
|
-
import type { AspectRatioContainerData } from '../data';
|
|
4
4
|
import { AspectRatioStretchMode, LayoutAlignment } from './enums';
|
|
5
5
|
/** Fits every visible child into the same rectangle with a fixed width/height ratio. */
|
|
6
6
|
export declare class AspectRatioContainer extends Container {
|
|
@@ -22,5 +22,5 @@ export declare class AspectRatioContainer extends Container {
|
|
|
22
22
|
protected sortChildren(): void;
|
|
23
23
|
private measureChildren;
|
|
24
24
|
private getAlignedOffset;
|
|
25
|
-
fromData(data: AspectRatioContainerData): void;
|
|
25
|
+
fromData(data: spec.AspectRatioContainerData): void;
|
|
26
26
|
}
|
|
@@ -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 { Container } from '../core/control';
|
|
4
|
-
import type { BoxContainerData } from '../data';
|
|
5
4
|
import { LayoutAlignment, Orientation } from './enums';
|
|
6
5
|
/** Places visible children in a single horizontal or vertical row. */
|
|
7
6
|
export declare class BoxContainer extends Container {
|
|
@@ -23,7 +22,7 @@ export declare class BoxContainer extends Container {
|
|
|
23
22
|
private getCrossSize;
|
|
24
23
|
private isMainExpanded;
|
|
25
24
|
private invalidateMeasurement;
|
|
26
|
-
fromData(data: BoxContainerData): void;
|
|
25
|
+
fromData(data: spec.BoxContainerData): void;
|
|
27
26
|
}
|
|
28
27
|
export declare class HBoxContainer extends BoxContainer {
|
|
29
28
|
static readonly themeType: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
+
import type { spec } from '@galacean/effects';
|
|
2
3
|
import { Container } from '../core/control';
|
|
3
|
-
import type { CenterContainerData } from '../data';
|
|
4
4
|
/** Centers children at their bound minimum size. */
|
|
5
5
|
export declare class CenterContainer extends Container {
|
|
6
6
|
static readonly themeType: string;
|
|
@@ -11,5 +11,5 @@ export declare class CenterContainer extends Container {
|
|
|
11
11
|
getDesiredSize(): math.Vector2;
|
|
12
12
|
protected sortChildren(): void;
|
|
13
13
|
private measureChildren;
|
|
14
|
-
fromData(data: CenterContainerData): void;
|
|
14
|
+
fromData(data: spec.CenterContainerData): void;
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
+
import type { spec } from '@galacean/effects';
|
|
2
3
|
import { Container } from '../core/control';
|
|
3
|
-
import type { GridContainerData } from '../data';
|
|
4
4
|
/** Places visible children in LTR row-major cells without spanning. */
|
|
5
5
|
export declare class GridContainer extends Container {
|
|
6
6
|
static readonly themeType: string;
|
|
@@ -15,5 +15,5 @@ export declare class GridContainer extends Container {
|
|
|
15
15
|
private allocateTracks;
|
|
16
16
|
private getTrackPositions;
|
|
17
17
|
private invalidateMeasurement;
|
|
18
|
-
fromData(data: GridContainerData): void;
|
|
18
|
+
fromData(data: spec.GridContainerData): void;
|
|
19
19
|
}
|
package/dist/scroll/range.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Engine, EventEmitterListener } from '@galacean/effects';
|
|
1
|
+
import type { Engine, EventEmitterListener, spec } from '@galacean/effects';
|
|
2
2
|
import { Control } from '../core/control';
|
|
3
3
|
import type { ControlEvent } from '../core/control';
|
|
4
|
-
import type { RangeData } from '../data';
|
|
5
4
|
export type RangeEvent = ControlEvent & {
|
|
6
5
|
changed: [];
|
|
7
6
|
valueChanged: [value: number];
|
|
@@ -52,5 +51,5 @@ export declare class Range extends Control {
|
|
|
52
51
|
private attachShared;
|
|
53
52
|
private notifyValueChanged;
|
|
54
53
|
private notifyChanged;
|
|
55
|
-
fromData(data: RangeData): void;
|
|
54
|
+
fromData(data: spec.RangeData): void;
|
|
56
55
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, EventEmitterListener, InputEventKey, InputEventMouseButton, InputEventMouseMotion } from '@galacean/effects';
|
|
2
|
+
import type { Engine, EventEmitterListener, InputEventKey, InputEventMouseButton, InputEventMouseMotion, spec } from '@galacean/effects';
|
|
3
3
|
import { Orientation } from '../layout/enums';
|
|
4
4
|
import { Range } from './range';
|
|
5
5
|
import type { RangeEvent } from './range';
|
|
6
|
-
import type { ScrollBarData } from '../data';
|
|
7
6
|
export type ScrollBarEvent = RangeEvent & {
|
|
8
7
|
scrolling: [];
|
|
9
8
|
};
|
|
@@ -57,7 +56,7 @@ export declare class ScrollBar extends Range {
|
|
|
57
56
|
private getButtonIcon;
|
|
58
57
|
private getButtonAxisSize;
|
|
59
58
|
private getButtonCrossSize;
|
|
60
|
-
fromData(data: ScrollBarData): void;
|
|
59
|
+
fromData(data: spec.ScrollBarData): void;
|
|
61
60
|
}
|
|
62
61
|
export declare class HScrollBar extends ScrollBar {
|
|
63
62
|
static readonly themeType: string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { math } from '@galacean/effects';
|
|
2
|
-
import type { Engine, EventEmitterListener, InputEventMouseButton, InputEventScreenDrag, InputEventScreenTouch } from '@galacean/effects';
|
|
2
|
+
import type { Engine, EventEmitterListener, InputEventMouseButton, InputEventScreenDrag, InputEventScreenTouch, spec } from '@galacean/effects';
|
|
3
3
|
import { Container } from '../core/control';
|
|
4
4
|
import type { Control, ControlEvent, RootControl } from '../core/control';
|
|
5
5
|
import { ScrollMode } from './enums';
|
|
6
6
|
import { HScrollBar, VScrollBar } from './scroll-bar';
|
|
7
|
-
import type { ScrollContainerData } from '../data';
|
|
8
7
|
export type ScrollContainerEvent = ControlEvent & {
|
|
9
8
|
scrollStarted: [];
|
|
10
9
|
scrollEnded: [];
|
|
@@ -80,5 +79,5 @@ export declare class ScrollContainer extends Container {
|
|
|
80
79
|
private updateDragVelocity;
|
|
81
80
|
private updateInertia;
|
|
82
81
|
private cancelTouchDrag;
|
|
83
|
-
fromData(data: ScrollContainerData): void;
|
|
82
|
+
fromData(data: spec.ScrollContainerData): void;
|
|
84
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-plugin-gui",
|
|
3
|
-
"version": "2.10.0
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "GUI controls and layout containers for Galacean Effects",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"registry": "https://registry.npmjs.org"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@galacean/effects": "2.10.0
|
|
27
|
+
"@galacean/effects": "2.10.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"prebuild": "pnpm clean",
|
package/dist/core/data.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import type { FontStyle, FontWeight, spec } from '@galacean/effects';
|
|
2
|
-
export interface ThemeFontData {
|
|
3
|
-
family: string;
|
|
4
|
-
weight?: FontWeight;
|
|
5
|
-
style?: FontStyle;
|
|
6
|
-
}
|
|
7
|
-
export interface StyleBoxMarginsData {
|
|
8
|
-
left?: number;
|
|
9
|
-
top?: number;
|
|
10
|
-
right?: number;
|
|
11
|
-
bottom?: number;
|
|
12
|
-
}
|
|
13
|
-
export interface StyleBoxEmptyData {
|
|
14
|
-
type: 'empty';
|
|
15
|
-
contentMargins?: StyleBoxMarginsData;
|
|
16
|
-
}
|
|
17
|
-
export interface StyleBoxFlatData {
|
|
18
|
-
type: 'flat';
|
|
19
|
-
backgroundColor?: spec.ColorData;
|
|
20
|
-
borderColor?: spec.ColorData;
|
|
21
|
-
borderWidths?: StyleBoxMarginsData;
|
|
22
|
-
cornerRadii?: StyleBoxMarginsData;
|
|
23
|
-
contentMargins?: StyleBoxMarginsData;
|
|
24
|
-
}
|
|
25
|
-
export interface StyleBoxTextureData {
|
|
26
|
-
type: 'texture';
|
|
27
|
-
texture: spec.DataPath | null;
|
|
28
|
-
sourceRect?: RectData;
|
|
29
|
-
patchMargins?: StyleBoxMarginsData;
|
|
30
|
-
contentMargins?: StyleBoxMarginsData;
|
|
31
|
-
horizontalAxisStretchMode?: number;
|
|
32
|
-
verticalAxisStretchMode?: number;
|
|
33
|
-
drawCenter?: boolean;
|
|
34
|
-
tint?: spec.ColorData;
|
|
35
|
-
}
|
|
36
|
-
export type StyleBoxData = StyleBoxEmptyData | StyleBoxFlatData | StyleBoxTextureData;
|
|
37
|
-
export interface ThemeItemCollectionData {
|
|
38
|
-
colors?: Record<string, spec.ColorData>;
|
|
39
|
-
constants?: Record<string, number>;
|
|
40
|
-
fonts?: Record<string, ThemeFontData>;
|
|
41
|
-
fontSizes?: Record<string, number>;
|
|
42
|
-
icons?: Record<string, spec.DataPath | null>;
|
|
43
|
-
styleBoxes?: Record<string, StyleBoxData>;
|
|
44
|
-
}
|
|
45
|
-
export interface ThemeData {
|
|
46
|
-
types: Record<string, ThemeItemCollectionData>;
|
|
47
|
-
variations?: Record<string, string>;
|
|
48
|
-
}
|
|
49
|
-
export interface ThemeOverridesData extends ThemeItemCollectionData {
|
|
50
|
-
}
|
|
51
|
-
/** Common serialized properties shared by every GUI Control. */
|
|
52
|
-
export interface ControlData {
|
|
53
|
-
anchorMin?: spec.vec2;
|
|
54
|
-
anchorMax?: spec.vec2;
|
|
55
|
-
offsetMin?: spec.vec2;
|
|
56
|
-
offsetMax?: spec.vec2;
|
|
57
|
-
pivot?: spec.vec2;
|
|
58
|
-
scale?: spec.vec2;
|
|
59
|
-
shear?: spec.vec2;
|
|
60
|
-
rotation?: number;
|
|
61
|
-
customMinimumSize?: spec.vec2;
|
|
62
|
-
customMaximumSize?: spec.vec2;
|
|
63
|
-
horizontalSizeFlags?: number;
|
|
64
|
-
verticalSizeFlags?: number;
|
|
65
|
-
stretchRatio?: number;
|
|
66
|
-
horizontalGrowDirection?: number;
|
|
67
|
-
verticalGrowDirection?: number;
|
|
68
|
-
mouseFilter?: number;
|
|
69
|
-
mouseBehaviorRecursive?: number;
|
|
70
|
-
mouseForcePassScrollEvents?: boolean;
|
|
71
|
-
focusMode?: number;
|
|
72
|
-
focusBehaviorRecursive?: number;
|
|
73
|
-
defaultCursorShape?: number | string;
|
|
74
|
-
clipContents?: boolean;
|
|
75
|
-
themeTypeVariation?: string;
|
|
76
|
-
themeOverrides?: ThemeOverridesData;
|
|
77
|
-
}
|
|
78
|
-
export interface SerializedControlData<T extends ControlData = ControlData> {
|
|
79
|
-
type: string;
|
|
80
|
-
data: T;
|
|
81
|
-
}
|
|
82
|
-
export interface UIControlData<T extends ControlData = ControlData> extends spec.ComponentData {
|
|
83
|
-
control: SerializedControlData<T>;
|
|
84
|
-
}
|
|
85
|
-
export interface RectData {
|
|
86
|
-
position: spec.vec2;
|
|
87
|
-
size: spec.vec2;
|
|
88
|
-
}
|
package/dist/data.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import type { spec } from '@galacean/effects';
|
|
2
|
-
import type { ControlData, RectData } from './core/data';
|
|
3
|
-
import type { AspectRatioStretchMode, LayoutAlignment } from './layout/enums';
|
|
4
|
-
import type { ScrollMode } from './scroll/enums';
|
|
5
|
-
import type { AutowrapMode, AxisStretchMode, ButtonActionMode, HorizontalAlignment, ProgressFillMode, TextOverflow, TextureExpandMode, TextureStretchMode, VerticalAlignment } from './controls/enums';
|
|
6
|
-
export interface BoxContainerData extends ControlData {
|
|
7
|
-
alignment?: LayoutAlignment;
|
|
8
|
-
reverse?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface GridContainerData extends ControlData {
|
|
11
|
-
columns?: number;
|
|
12
|
-
}
|
|
13
|
-
export interface MarginContainerData extends ControlData {
|
|
14
|
-
}
|
|
15
|
-
export interface CenterContainerData extends ControlData {
|
|
16
|
-
useTopLeft?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface AspectRatioContainerData extends ControlData {
|
|
19
|
-
ratio?: number;
|
|
20
|
-
stretchMode?: AspectRatioStretchMode;
|
|
21
|
-
horizontalAlignment?: LayoutAlignment;
|
|
22
|
-
verticalAlignment?: LayoutAlignment;
|
|
23
|
-
}
|
|
24
|
-
export interface RangeData extends ControlData {
|
|
25
|
-
minValue?: number;
|
|
26
|
-
maxValue?: number;
|
|
27
|
-
step?: number;
|
|
28
|
-
page?: number;
|
|
29
|
-
value?: number;
|
|
30
|
-
exponentialRatio?: boolean;
|
|
31
|
-
rounded?: boolean;
|
|
32
|
-
allowGreater?: boolean;
|
|
33
|
-
allowLesser?: boolean;
|
|
34
|
-
}
|
|
35
|
-
export interface ScrollBarData extends RangeData {
|
|
36
|
-
customStep?: number;
|
|
37
|
-
}
|
|
38
|
-
export interface ScrollContainerData extends ControlData {
|
|
39
|
-
hScroll?: number;
|
|
40
|
-
vScroll?: number;
|
|
41
|
-
horizontalScrollMode?: ScrollMode;
|
|
42
|
-
verticalScrollMode?: ScrollMode;
|
|
43
|
-
horizontalCustomStep?: number;
|
|
44
|
-
verticalCustomStep?: number;
|
|
45
|
-
scrollHorizontalByDefault?: boolean;
|
|
46
|
-
deadzone?: number;
|
|
47
|
-
followFocus?: boolean;
|
|
48
|
-
}
|
|
49
|
-
export interface LabelData extends ControlData {
|
|
50
|
-
text?: string;
|
|
51
|
-
horizontalAlignment?: HorizontalAlignment;
|
|
52
|
-
verticalAlignment?: VerticalAlignment;
|
|
53
|
-
autowrapMode?: AutowrapMode;
|
|
54
|
-
textOverflow?: TextOverflow;
|
|
55
|
-
}
|
|
56
|
-
export interface TextureRectData extends ControlData {
|
|
57
|
-
texture?: spec.DataPath | null;
|
|
58
|
-
expandMode?: TextureExpandMode;
|
|
59
|
-
stretchMode?: TextureStretchMode;
|
|
60
|
-
flipH?: boolean;
|
|
61
|
-
flipV?: boolean;
|
|
62
|
-
tint?: spec.ColorData;
|
|
63
|
-
}
|
|
64
|
-
export interface NinePatchRectData extends ControlData {
|
|
65
|
-
texture?: spec.DataPath | null;
|
|
66
|
-
regionRect?: RectData;
|
|
67
|
-
patchMarginLeft?: number;
|
|
68
|
-
patchMarginTop?: number;
|
|
69
|
-
patchMarginRight?: number;
|
|
70
|
-
patchMarginBottom?: number;
|
|
71
|
-
drawCenter?: boolean;
|
|
72
|
-
horizontalAxisStretchMode?: AxisStretchMode;
|
|
73
|
-
verticalAxisStretchMode?: AxisStretchMode;
|
|
74
|
-
tint?: spec.ColorData;
|
|
75
|
-
}
|
|
76
|
-
export interface ColorRectData extends ControlData {
|
|
77
|
-
color?: spec.ColorData;
|
|
78
|
-
}
|
|
79
|
-
export interface PanelData extends ControlData {
|
|
80
|
-
}
|
|
81
|
-
export interface BaseButtonData extends ControlData {
|
|
82
|
-
disabled?: boolean;
|
|
83
|
-
toggleMode?: boolean;
|
|
84
|
-
buttonPressed?: boolean;
|
|
85
|
-
buttonMask?: number;
|
|
86
|
-
actionMode?: ButtonActionMode;
|
|
87
|
-
keepPressedOutside?: boolean;
|
|
88
|
-
}
|
|
89
|
-
export interface ButtonData extends BaseButtonData {
|
|
90
|
-
text?: string;
|
|
91
|
-
icon?: spec.DataPath | null;
|
|
92
|
-
flat?: boolean;
|
|
93
|
-
clipText?: boolean;
|
|
94
|
-
expandIcon?: boolean;
|
|
95
|
-
textAlignment?: HorizontalAlignment;
|
|
96
|
-
iconAlignment?: HorizontalAlignment;
|
|
97
|
-
iconVerticalAlignment?: VerticalAlignment;
|
|
98
|
-
}
|
|
99
|
-
export interface CheckboxData extends ButtonData {
|
|
100
|
-
}
|
|
101
|
-
export interface CheckButtonData extends ButtonData {
|
|
102
|
-
}
|
|
103
|
-
export interface SliderData extends RangeData {
|
|
104
|
-
editable?: boolean;
|
|
105
|
-
scrollable?: boolean;
|
|
106
|
-
}
|
|
107
|
-
export interface ProgressBarData extends RangeData {
|
|
108
|
-
showPercentage?: boolean;
|
|
109
|
-
fillMode?: ProgressFillMode;
|
|
110
|
-
}
|
|
111
|
-
export interface TextInputData extends ControlData {
|
|
112
|
-
text?: string;
|
|
113
|
-
placeholderText?: string;
|
|
114
|
-
editable?: boolean;
|
|
115
|
-
maxLength?: number;
|
|
116
|
-
}
|
|
117
|
-
export interface LineEditData extends TextInputData {
|
|
118
|
-
secret?: boolean;
|
|
119
|
-
secretCharacter?: string;
|
|
120
|
-
alignment?: HorizontalAlignment;
|
|
121
|
-
}
|
|
122
|
-
export interface TextEditData extends TextInputData {
|
|
123
|
-
}
|
|
124
|
-
export interface PopupMenuItemData {
|
|
125
|
-
id: number | string;
|
|
126
|
-
text: string;
|
|
127
|
-
disabled?: boolean;
|
|
128
|
-
separator?: boolean;
|
|
129
|
-
checked?: boolean;
|
|
130
|
-
}
|
|
131
|
-
export interface PopupMenuData extends ControlData {
|
|
132
|
-
items?: PopupMenuItemData[];
|
|
133
|
-
}
|
|
134
|
-
export interface MenuButtonData extends ButtonData {
|
|
135
|
-
items?: PopupMenuItemData[];
|
|
136
|
-
}
|
|
137
|
-
export interface OptionButtonData extends MenuButtonData {
|
|
138
|
-
selected?: number;
|
|
139
|
-
}
|
|
140
|
-
export interface ColorPickerData extends ControlData {
|
|
141
|
-
color?: spec.ColorData;
|
|
142
|
-
editAlpha?: boolean;
|
|
143
|
-
}
|
|
144
|
-
export interface ColorPickerButtonData extends ButtonData {
|
|
145
|
-
color?: spec.ColorData;
|
|
146
|
-
editAlpha?: boolean;
|
|
147
|
-
}
|