@babylonjs/gui-editor 5.31.1 → 5.32.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.
@@ -216,9 +216,6 @@ interface ICommonControlPropertyGridComponentProps {
|
|
216
216
|
}
|
217
217
|
interface ICommonControlPropertyGridComponentState {
|
218
218
|
fontFamilyOptions: IInspectableOptions[];
|
219
|
-
value: number;
|
220
|
-
invalidFonts: string[];
|
221
|
-
invalidFontAlertName?: string;
|
222
219
|
}
|
223
220
|
export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps, ICommonControlPropertyGridComponentState> {
|
224
221
|
private _onPropertyChangedObserver;
|
@@ -226,17 +223,21 @@ export class CommonControlPropertyGridComponent extends React.Component<ICommonC
|
|
226
223
|
constructor(props: ICommonControlPropertyGridComponentProps);
|
227
224
|
componentWillMount(): void;
|
228
225
|
private _checkFontsInLayout;
|
226
|
+
private _addFont;
|
229
227
|
private _getTransformedReferenceCoordinate;
|
230
228
|
private _updateAlignment;
|
231
229
|
private _checkAndUpdateValues;
|
232
230
|
private _markChildrenAsDirty;
|
233
|
-
addVal: (newVal: {
|
234
|
-
label: string;
|
235
|
-
value: number;
|
236
|
-
}, prevVal: number) => void;
|
237
|
-
selectCustomVal(): void;
|
238
|
-
keepPrevVal(prevVal: number): void;
|
239
231
|
componentWillUnmount(): void;
|
232
|
+
_filterFontDuplicates(array: {
|
233
|
+
label: string;
|
234
|
+
value: string;
|
235
|
+
id: string;
|
236
|
+
}[]): {
|
237
|
+
label: string;
|
238
|
+
value: string;
|
239
|
+
id: string;
|
240
|
+
}[];
|
240
241
|
render(): JSX.Element;
|
241
242
|
}
|
242
243
|
export {};
|
@@ -1610,8 +1611,9 @@ export type ButtonProps = {
|
|
1610
1611
|
active?: boolean;
|
1611
1612
|
onClick?: () => void;
|
1612
1613
|
color: "light" | "dark";
|
1613
|
-
size: "default" | "small" | "wide";
|
1614
|
+
size: "default" | "small" | "wide" | "smaller";
|
1614
1615
|
title?: string;
|
1616
|
+
backgroundColor?: string;
|
1615
1617
|
};
|
1616
1618
|
export const Button: React.FC<ButtonProps>;
|
1617
1619
|
|
@@ -2221,6 +2223,29 @@ export class NumericInputComponent extends React.Component<INumericInputComponen
|
|
2221
2223
|
}
|
2222
2224
|
export {};
|
2223
2225
|
|
2226
|
+
}
|
2227
|
+
declare module "@babylonjs/gui-editor/components/lines/OptionsLineComponent" {
|
2228
|
+
/// <reference types="react" />
|
2229
|
+
/**
|
2230
|
+
* This components represents an options menu with optional
|
2231
|
+
* customizable properties. Option IDs should be unique.
|
2232
|
+
*/
|
2233
|
+
export interface IOption {
|
2234
|
+
label: string;
|
2235
|
+
value: string;
|
2236
|
+
id: string;
|
2237
|
+
}
|
2238
|
+
export interface IOptionsLineComponentProps {
|
2239
|
+
options: IOption[];
|
2240
|
+
addOptionPlaceholder?: string;
|
2241
|
+
onOptionAdded?: (newOption: IOption) => void;
|
2242
|
+
onOptionSelected: (selectedOptionValue: string) => void;
|
2243
|
+
selectedOptionValue: string;
|
2244
|
+
validateNewOptionValue?: (newOptionValue: string) => boolean;
|
2245
|
+
addOptionText?: string;
|
2246
|
+
}
|
2247
|
+
export const OptionsLineComponent: (props: IOptionsLineComponentProps) => JSX.Element;
|
2248
|
+
|
2224
2249
|
}
|
2225
2250
|
declare module "@babylonjs/gui-editor/components/MessageDialog" {
|
2226
2251
|
import * as React from "react";
|
@@ -2231,6 +2256,21 @@ export interface MessageDialogProps {
|
|
2231
2256
|
}
|
2232
2257
|
export const MessageDialog: React.FC<MessageDialogProps>;
|
2233
2258
|
|
2259
|
+
}
|
2260
|
+
declare module "@babylonjs/gui-editor/components/TextInputWithSubmit" {
|
2261
|
+
/// <reference types="react" />
|
2262
|
+
export interface ITextInputProps {
|
2263
|
+
label?: string;
|
2264
|
+
placeholder?: string;
|
2265
|
+
submitValue: (newValue: string) => void;
|
2266
|
+
validateValue?: (value: string) => boolean;
|
2267
|
+
cancelSubmit?: () => void;
|
2268
|
+
}
|
2269
|
+
/**
|
2270
|
+
* This component represents a text input that can be submitted or cancelled on buttons
|
2271
|
+
*/
|
2272
|
+
export const TextInputWithSubmit: (props: ITextInputProps) => JSX.Element;
|
2273
|
+
|
2234
2274
|
}
|
2235
2275
|
declare module "@babylonjs/gui-editor/components/Toggle" {
|
2236
2276
|
/// <reference types="react" />
|
@@ -2786,14 +2826,9 @@ export interface IOptionsLineComponentProps {
|
|
2786
2826
|
target: any;
|
2787
2827
|
propertyName: string;
|
2788
2828
|
options: IInspectableOptions[];
|
2789
|
-
addInput?: boolean;
|
2790
2829
|
noDirectUpdate?: boolean;
|
2791
2830
|
onSelect?: (value: number | string) => void;
|
2792
2831
|
extractValue?: (target: any) => number | string;
|
2793
|
-
addVal?: (newVal: {
|
2794
|
-
label: string;
|
2795
|
-
value: number;
|
2796
|
-
}, prevVal: number) => void;
|
2797
2832
|
onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
|
2798
2833
|
allowNullValue?: boolean;
|
2799
2834
|
icon?: string;
|
@@ -2801,13 +2836,9 @@ export interface IOptionsLineComponentProps {
|
|
2801
2836
|
className?: string;
|
2802
2837
|
valuesAreStrings?: boolean;
|
2803
2838
|
defaultIfNull?: number;
|
2804
|
-
fromFontDropdown?: boolean;
|
2805
|
-
valueProp?: number;
|
2806
|
-
fallbackValue?: number;
|
2807
2839
|
}
|
2808
2840
|
export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
|
2809
2841
|
value: number | string;
|
2810
|
-
addCustom: boolean;
|
2811
2842
|
}> {
|
2812
2843
|
private _localChange;
|
2813
2844
|
private _remapValueIn;
|
@@ -2816,12 +2847,10 @@ export class OptionsLineComponent extends React.Component<IOptionsLineComponentP
|
|
2816
2847
|
constructor(props: IOptionsLineComponentProps);
|
2817
2848
|
shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
|
2818
2849
|
value: number;
|
2819
|
-
addCustom: boolean;
|
2820
2850
|
}): boolean;
|
2821
2851
|
raiseOnPropertyChanged(newValue: number, previousValue: number): void;
|
2822
2852
|
setValue(value: string | number): void;
|
2823
2853
|
updateValue(valueString: string): void;
|
2824
|
-
updateCustomValue(): void;
|
2825
2854
|
render(): JSX.Element;
|
2826
2855
|
}
|
2827
2856
|
|
@@ -3836,25 +3865,25 @@ export class PropertyChangedEvent {
|
|
3836
3865
|
}
|
3837
3866
|
declare module "@babylonjs/gui-editor/stories/bars/CommandBarComponent.stories" {
|
3838
3867
|
/// <reference types="react" />
|
3868
|
+
import { CommandBarComponent } from "@babylonjs/gui-editor/components/bars/CommandBarComponent";
|
3869
|
+
|
3839
3870
|
const _default: {
|
3840
3871
|
|
3841
3872
|
};
|
3842
3873
|
export default _default;
|
3843
|
-
export const Default:
|
3844
|
-
export const WithArtboardColor:
|
3845
|
-
parameters: {
|
3846
|
-
onArtboardColorChanged: (color: string) => void;
|
3847
|
-
};
|
3848
|
-
};
|
3874
|
+
export const Default: StoryObj<typeof CommandBarComponent>;
|
3875
|
+
export const WithArtboardColor: StoryObj<typeof CommandBarComponent>;
|
3849
3876
|
|
3850
3877
|
}
|
3851
3878
|
declare module "@babylonjs/gui-editor/stories/bars/CommandButtonComponent.stories" {
|
3852
3879
|
/// <reference types="react" />
|
3880
|
+
import { CommandButtonComponent } from "@babylonjs/gui-editor/components/bars/CommandButtonComponent";
|
3881
|
+
|
3853
3882
|
const _default: {
|
3854
3883
|
|
3855
3884
|
};
|
3856
3885
|
export default _default;
|
3857
|
-
export const Default:
|
3886
|
+
export const Default: StoryObj<typeof CommandButtonComponent>;
|
3858
3887
|
|
3859
3888
|
}
|
3860
3889
|
declare module "@babylonjs/gui-editor/stories/Button.stories" {
|
@@ -3871,17 +3900,13 @@ export const Small: any;
|
|
3871
3900
|
|
3872
3901
|
}
|
3873
3902
|
declare module "@babylonjs/gui-editor/stories/colorPicker/ColorPicker.stories" {
|
3874
|
-
import { Color3 } from "@babylonjs/core/Maths/math.color";
|
3875
3903
|
import { ColorPicker } from "@babylonjs/gui-editor/components/colorPicker/ColorPicker";
|
3904
|
+
|
3876
3905
|
const _default: {
|
3877
3906
|
component: typeof ColorPicker;
|
3878
3907
|
};
|
3879
3908
|
export default _default;
|
3880
|
-
export const Default:
|
3881
|
-
args: {
|
3882
|
-
color: Color3;
|
3883
|
-
};
|
3884
|
-
};
|
3909
|
+
export const Default: StoryObj<typeof ColorPicker>;
|
3885
3910
|
|
3886
3911
|
}
|
3887
3912
|
declare module "@babylonjs/gui-editor/stories/Icon.stories" {
|
@@ -3910,114 +3935,67 @@ export const Default: any;
|
|
3910
3935
|
declare module "@babylonjs/gui-editor/stories/layout/FlexibleGridLayout.stories" {
|
3911
3936
|
/// <reference types="react" />
|
3912
3937
|
import { IFlexibleGridLayoutProps } from "@babylonjs/gui-editor/components/layout/FlexibleGridLayout";
|
3938
|
+
import { FlexibleGridLayout } from "@babylonjs/gui-editor/components/layout/FlexibleGridLayout";
|
3939
|
+
|
3913
3940
|
const _default: {
|
3914
3941
|
component: import("react").FC<IFlexibleGridLayoutProps>;
|
3915
3942
|
};
|
3916
3943
|
export default _default;
|
3917
|
-
export const Default:
|
3918
|
-
|
3919
|
-
args: {
|
3920
|
-
layoutDefinition: {
|
3921
|
-
columns: {
|
3922
|
-
id: string;
|
3923
|
-
width: string;
|
3924
|
-
rows: {
|
3925
|
-
id: string;
|
3926
|
-
height: string;
|
3927
|
-
selectedTab: string;
|
3928
|
-
tabs: {
|
3929
|
-
id: string;
|
3930
|
-
component: JSX.Element;
|
3931
|
-
}[];
|
3932
|
-
}[];
|
3933
|
-
}[];
|
3934
|
-
};
|
3935
|
-
};
|
3936
|
-
};
|
3937
|
-
export const TwoColumn: {
|
3938
|
-
render: (props: IFlexibleGridLayoutProps) => JSX.Element;
|
3939
|
-
args: {
|
3940
|
-
layoutDefinition: {
|
3941
|
-
columns: {
|
3942
|
-
id: string;
|
3943
|
-
width: string;
|
3944
|
-
rows: {
|
3945
|
-
id: string;
|
3946
|
-
height: string;
|
3947
|
-
selectedTab: string;
|
3948
|
-
tabs: {
|
3949
|
-
id: string;
|
3950
|
-
component: JSX.Element;
|
3951
|
-
}[];
|
3952
|
-
}[];
|
3953
|
-
}[];
|
3954
|
-
};
|
3955
|
-
};
|
3956
|
-
};
|
3944
|
+
export const Default: StoryObj<typeof FlexibleGridLayout>;
|
3945
|
+
export const TwoColumn: StoryObj<typeof FlexibleGridLayout>;
|
3957
3946
|
|
3958
3947
|
}
|
3959
3948
|
declare module "@babylonjs/gui-editor/stories/lines/ColorLineComponent.stories" {
|
3960
|
-
/// <reference types="react" />
|
3961
|
-
import { Observable } from "@babylonjs/core/Misc/observable";
|
3962
|
-
import { PropertyChangedEvent } from "@babylonjs/gui-editor/propertyChangedEvent";
|
3963
|
-
import { IColorLineComponentProps } from "@babylonjs/gui-editor/components/lines/ColorLineComponent";
|
3964
3949
|
import { ColorLineComponent } from "@babylonjs/gui-editor/components/lines/ColorLineComponent";
|
3950
|
+
|
3965
3951
|
const _default: {
|
3966
3952
|
component: typeof ColorLineComponent;
|
3967
3953
|
};
|
3968
3954
|
export default _default;
|
3969
|
-
export const Default:
|
3970
|
-
render: (args: IColorLineComponentProps) => JSX.Element;
|
3971
|
-
args: {
|
3972
|
-
target: {};
|
3973
|
-
label: string;
|
3974
|
-
propertyName: string;
|
3975
|
-
lockObject: {
|
3976
|
-
lock: boolean;
|
3977
|
-
};
|
3978
|
-
onPropertyChangedObservable: Observable<PropertyChangedEvent>;
|
3979
|
-
};
|
3980
|
-
};
|
3955
|
+
export const Default: StoryObj<typeof ColorLineComponent>;
|
3981
3956
|
|
3982
3957
|
}
|
3983
3958
|
declare module "@babylonjs/gui-editor/stories/lines/ColorPickerLineComponent.stories" {
|
3984
|
-
/// <reference types="react" />
|
3985
|
-
import { Color3 } from "@babylonjs/core/Maths/math.color";
|
3986
|
-
import { IColorPickerComponentProps } from "@babylonjs/gui-editor/components/lines/ColorPickerLineComponent";
|
3987
3959
|
import { ColorPickerLineComponent } from "@babylonjs/gui-editor/components/lines/ColorPickerLineComponent";
|
3960
|
+
|
3988
3961
|
const _default: {
|
3989
3962
|
component: typeof ColorPickerLineComponent;
|
3990
3963
|
};
|
3991
3964
|
export default _default;
|
3992
|
-
export const Default:
|
3993
|
-
render: (args: IColorPickerComponentProps) => JSX.Element;
|
3994
|
-
args: {
|
3995
|
-
value: Color3;
|
3996
|
-
};
|
3997
|
-
};
|
3965
|
+
export const Default: StoryObj<typeof ColorPickerLineComponent>;
|
3998
3966
|
|
3999
3967
|
}
|
4000
3968
|
declare module "@babylonjs/gui-editor/stories/lines/FileButtonLineComponent.stories" {
|
4001
3969
|
import { FileButtonLineComponent } from "@babylonjs/gui-editor/components/lines/FileButtonLineComponent";
|
3970
|
+
|
4002
3971
|
const _default: {
|
4003
3972
|
component: typeof FileButtonLineComponent;
|
4004
3973
|
};
|
4005
3974
|
export default _default;
|
4006
|
-
export const Default:
|
3975
|
+
export const Default: StoryObj<typeof FileButtonLineComponent>;
|
4007
3976
|
|
4008
3977
|
}
|
4009
3978
|
declare module "@babylonjs/gui-editor/stories/lines/NumericInputComponent.stories" {
|
4010
3979
|
import { NumericInputComponent } from "@babylonjs/gui-editor/components/lines/NumericInputComponent";
|
3980
|
+
|
4011
3981
|
const _default: {
|
4012
3982
|
component: typeof NumericInputComponent;
|
4013
3983
|
};
|
4014
3984
|
export default _default;
|
4015
|
-
export const Default:
|
4016
|
-
|
4017
|
-
|
4018
|
-
|
4019
|
-
|
3985
|
+
export const Default: StoryObj<typeof NumericInputComponent>;
|
3986
|
+
|
3987
|
+
}
|
3988
|
+
declare module "@babylonjs/gui-editor/stories/lines/OptionsLineComponent.stories" {
|
3989
|
+
/// <reference types="react" />
|
3990
|
+
|
3991
|
+
const _default: {
|
3992
|
+
component: (props: import("@babylonjs/gui-editor/components/lines/OptionsLineComponent").IOptionsLineComponentProps) => JSX.Element;
|
4020
3993
|
};
|
3994
|
+
export default _default;
|
3995
|
+
const RenderComponent: (args: any) => JSX.Element;
|
3996
|
+
export const Default: StoryObj<typeof RenderComponent>;
|
3997
|
+
export const WithCustomOptions: StoryObj<typeof RenderComponent>;
|
3998
|
+
export const WithValidation: StoryObj<typeof RenderComponent>;
|
4021
3999
|
|
4022
4000
|
}
|
4023
4001
|
declare module "@babylonjs/gui-editor/stories/MessageDialog.stories" {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@babylonjs/gui-editor",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.32.0",
|
4
4
|
"main": "dist/babylon.guiEditor.max.js",
|
5
5
|
"module": "dist/babylon.guiEditor.max.js",
|
6
6
|
"esnext": "dist/babylon.guiEditor.max.js",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"@types/react-dom": ">=16.0.9"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
|
-
"@babylonjs/core": "^5.
|
28
|
-
"@babylonjs/gui": "^5.
|
27
|
+
"@babylonjs/core": "^5.32.0",
|
28
|
+
"@babylonjs/gui": "^5.32.0",
|
29
29
|
"react": "^17.0.2",
|
30
30
|
"react-dom": "^17.0.2",
|
31
31
|
"rimraf": "^3.0.2",
|