babylonjs-gui-editor 5.31.2 → 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.
@@ -156,9 +156,6 @@ declare module BABYLON {
156
156
  }
157
157
  interface ICommonControlPropertyGridComponentState {
158
158
  fontFamilyOptions: IInspectableOptions[];
159
- value: number;
160
- invalidFonts: string[];
161
- invalidFontAlertName?: string;
162
159
  }
163
160
  export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps, ICommonControlPropertyGridComponentState> {
164
161
  private _onPropertyChangedObserver;
@@ -166,17 +163,21 @@ declare module BABYLON {
166
163
  constructor(props: ICommonControlPropertyGridComponentProps);
167
164
  componentWillMount(): void;
168
165
  private _checkFontsInLayout;
166
+ private _addFont;
169
167
  private _getTransformedReferenceCoordinate;
170
168
  private _updateAlignment;
171
169
  private _checkAndUpdateValues;
172
170
  private _markChildrenAsDirty;
173
- addVal: (newVal: {
174
- label: string;
175
- value: number;
176
- }, prevVal: number) => void;
177
- selectCustomVal(): void;
178
- keepPrevVal(prevVal: number): void;
179
171
  componentWillUnmount(): void;
172
+ _filterFontDuplicates(array: {
173
+ label: string;
174
+ value: string;
175
+ id: string;
176
+ }[]): {
177
+ label: string;
178
+ value: string;
179
+ id: string;
180
+ }[];
180
181
  render(): JSX.Element;
181
182
  }
182
183
 
@@ -1306,8 +1307,9 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1306
1307
  active?: boolean;
1307
1308
  onClick?: () => void;
1308
1309
  color: "light" | "dark";
1309
- size: "default" | "small" | "wide";
1310
+ size: "default" | "small" | "wide" | "smaller";
1310
1311
  title?: string;
1312
+ backgroundColor?: string;
1311
1313
  };
1312
1314
  export var Button: React.FC<ButtonProps>;
1313
1315
 
@@ -1990,6 +1992,34 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1990
1992
 
1991
1993
 
1992
1994
 
1995
+ }
1996
+ declare module BABYLON {
1997
+
1998
+ }
1999
+ declare module BABYLON.GuiEditor.SharedUIComponents {
2000
+ /// <reference types="react" />
2001
+ /**
2002
+ * This components represents an options menu with optional
2003
+ * customizable properties. Option IDs should be unique.
2004
+ */
2005
+ export interface IOption {
2006
+ label: string;
2007
+ value: string;
2008
+ id: string;
2009
+ }
2010
+ export interface IOptionsLineComponentProps {
2011
+ options: IOption[];
2012
+ addOptionPlaceholder?: string;
2013
+ onOptionAdded?: (newOption: IOption) => void;
2014
+ onOptionSelected: (selectedOptionValue: string) => void;
2015
+ selectedOptionValue: string;
2016
+ validateNewOptionValue?: (newOptionValue: string) => boolean;
2017
+ addOptionText?: string;
2018
+ }
2019
+ export const OptionsLineComponent: (props: IOptionsLineComponentProps) => JSX.Element;
2020
+
2021
+
2022
+
1993
2023
  }
1994
2024
  declare module BABYLON {
1995
2025
 
@@ -2004,6 +2034,26 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2004
2034
 
2005
2035
 
2006
2036
 
2037
+ }
2038
+ declare module BABYLON {
2039
+
2040
+ }
2041
+ declare module BABYLON.GuiEditor.SharedUIComponents {
2042
+ /// <reference types="react" />
2043
+ export interface ITextInputProps {
2044
+ label?: string;
2045
+ placeholder?: string;
2046
+ submitValue: (newValue: string) => void;
2047
+ validateValue?: (value: string) => boolean;
2048
+ cancelSubmit?: () => void;
2049
+ }
2050
+ /**
2051
+ * This component represents a text input that can be submitted or cancelled on buttons
2052
+ */
2053
+ export const TextInputWithSubmit: (props: ITextInputProps) => JSX.Element;
2054
+
2055
+
2056
+
2007
2057
  }
2008
2058
  declare module BABYLON {
2009
2059
 
@@ -2608,14 +2658,9 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2608
2658
  target: any;
2609
2659
  propertyName: string;
2610
2660
  options: IInspectableOptions[];
2611
- addInput?: boolean;
2612
2661
  noDirectUpdate?: boolean;
2613
2662
  onSelect?: (value: number | string) => void;
2614
2663
  extractValue?: (target: any) => number | string;
2615
- addVal?: (newVal: {
2616
- label: string;
2617
- value: number;
2618
- }, prevVal: number) => void;
2619
2664
  onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
2620
2665
  allowNullValue?: boolean;
2621
2666
  icon?: string;
@@ -2623,13 +2668,9 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2623
2668
  className?: string;
2624
2669
  valuesAreStrings?: boolean;
2625
2670
  defaultIfNull?: number;
2626
- fromFontDropdown?: boolean;
2627
- valueProp?: number;
2628
- fallbackValue?: number;
2629
2671
  }
2630
2672
  export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
2631
2673
  value: number | string;
2632
- addCustom: boolean;
2633
2674
  }> {
2634
2675
  private _localChange;
2635
2676
  private _remapValueIn;
@@ -2638,12 +2679,10 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2638
2679
  constructor(props: IOptionsLineComponentProps);
2639
2680
  shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
2640
2681
  value: number;
2641
- addCustom: boolean;
2642
2682
  }): boolean;
2643
2683
  raiseOnPropertyChanged(newValue: number, previousValue: number): void;
2644
2684
  setValue(value: string | number): void;
2645
2685
  updateValue(valueString: string): void;
2646
- updateCustomValue(): void;
2647
2686
  render(): JSX.Element;
2648
2687
  }
2649
2688
 
@@ -3697,12 +3736,8 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
3697
3736
  var _default: {
3698
3737
  component: ICommandBarComponentProps>;
3699
3738
  };
3700
- export var Default: {};
3701
- export var WithArtboardColor: {
3702
- parameters: {
3703
- onArtboardColorChanged: (color: string) => void;
3704
- };
3705
- };
3739
+ export var Default: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.CommandBarComponent>;
3740
+ export var WithArtboardColor: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.CommandBarComponent>;
3706
3741
 
3707
3742
 
3708
3743
 
@@ -3715,7 +3750,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
3715
3750
  var _default: {
3716
3751
  component: ICommandButtonComponentProps>;
3717
3752
  };
3718
- export var Default: {};
3753
+ export var Default: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.CommandButtonComponent>;
3719
3754
 
3720
3755
 
3721
3756
 
@@ -3743,11 +3778,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
3743
3778
  var _default: {
3744
3779
  component: typeof BABYLON.GuiEditor.SharedUIComponents.ColorPicker;
3745
3780
  };
3746
- export var Default: {
3747
- args: {
3748
- color: Color3;
3749
- };
3750
- };
3781
+ export var Default: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.ColorPicker>;
3751
3782
 
3752
3783
 
3753
3784
 
@@ -3789,46 +3820,8 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
3789
3820
  var _default: {
3790
3821
  component: import("react").FC<BABYLON.GuiEditor.SharedUIComponents.IFlexibleGridLayoutProps>;
3791
3822
  };
3792
- export var Default: {
3793
- render: (props: BABYLON.GuiEditor.SharedUIComponents.IFlexibleGridLayoutProps) => JSX.Element;
3794
- args: {
3795
- layoutDefinition: {
3796
- columns: {
3797
- id: string;
3798
- width: string;
3799
- rows: {
3800
- id: string;
3801
- height: string;
3802
- selectedTab: string;
3803
- tabs: {
3804
- id: string;
3805
- component: JSX.Element;
3806
- }[];
3807
- }[];
3808
- }[];
3809
- };
3810
- };
3811
- };
3812
- export var TwoColumn: {
3813
- render: (props: BABYLON.GuiEditor.SharedUIComponents.IFlexibleGridLayoutProps) => JSX.Element;
3814
- args: {
3815
- layoutDefinition: {
3816
- columns: {
3817
- id: string;
3818
- width: string;
3819
- rows: {
3820
- id: string;
3821
- height: string;
3822
- selectedTab: string;
3823
- tabs: {
3824
- id: string;
3825
- component: JSX.Element;
3826
- }[];
3827
- }[];
3828
- }[];
3829
- };
3830
- };
3831
- };
3823
+ export var Default: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.FlexibleGridLayout>;
3824
+ export var TwoColumn: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.FlexibleGridLayout>;
3832
3825
 
3833
3826
 
3834
3827
 
@@ -3837,22 +3830,10 @@ declare module BABYLON {
3837
3830
 
3838
3831
  }
3839
3832
  declare module BABYLON.GuiEditor.SharedUIComponents {
3840
- /// <reference types="react" />
3841
- var _default: {
3833
+ var _default: {
3842
3834
  component: typeof BABYLON.GuiEditor.SharedUIComponents.ColorLineComponent;
3843
3835
  };
3844
- export var Default: {
3845
- render: (args: BABYLON.GuiEditor.SharedUIComponents.IColorLineComponentProps) => JSX.Element;
3846
- args: {
3847
- target: {};
3848
- label: string;
3849
- propertyName: string;
3850
- lockObject: {
3851
- lock: boolean;
3852
- };
3853
- onPropertyChangedObservable: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
3854
- };
3855
- };
3836
+ export var Default: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.ColorLineComponent>;
3856
3837
 
3857
3838
 
3858
3839
 
@@ -3861,16 +3842,10 @@ declare module BABYLON {
3861
3842
 
3862
3843
  }
3863
3844
  declare module BABYLON.GuiEditor.SharedUIComponents {
3864
- /// <reference types="react" />
3865
- var _default: {
3845
+ var _default: {
3866
3846
  component: typeof BABYLON.GuiEditor.SharedUIComponents.ColorPickerLineComponent;
3867
3847
  };
3868
- export var Default: {
3869
- render: (args: BABYLON.GuiEditor.SharedUIComponents.IColorPickerComponentProps) => JSX.Element;
3870
- args: {
3871
- value: Color3;
3872
- };
3873
- };
3848
+ export var Default: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.ColorPickerLineComponent>;
3874
3849
 
3875
3850
 
3876
3851
 
@@ -3882,7 +3857,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
3882
3857
  var _default: {
3883
3858
  component: typeof BABYLON.GuiEditor.SharedUIComponents.FileButtonLineComponent;
3884
3859
  };
3885
- export var Default: {};
3860
+ export var Default: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.FileButtonLineComponent>;
3886
3861
 
3887
3862
 
3888
3863
 
@@ -3894,12 +3869,23 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
3894
3869
  var _default: {
3895
3870
  component: typeof BABYLON.GuiEditor.SharedUIComponents.NumericInputComponent;
3896
3871
  };
3897
- export var Default: {
3898
- args: {
3899
- label: string;
3900
- value: number;
3901
- };
3872
+ export var Default: StoryObj<typeof BABYLON.GuiEditor.SharedUIComponents.NumericInputComponent>;
3873
+
3874
+
3875
+
3876
+ }
3877
+ declare module BABYLON {
3878
+
3879
+ }
3880
+ declare module BABYLON.GuiEditor.SharedUIComponents {
3881
+ /// <reference types="react" />
3882
+ var _default: {
3883
+ component: (props: => JSX.Element;
3902
3884
  };
3885
+ const RenderComponent: (args: any) => JSX.Element;
3886
+ export var Default: StoryObj<typeof RenderComponent>;
3887
+ export var WithCustomOptions: StoryObj<typeof RenderComponent>;
3888
+ export var WithValidation: StoryObj<typeof RenderComponent>;
3903
3889
 
3904
3890
 
3905
3891