babylonjs-gui-editor 8.22.1 → 8.22.3

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.
@@ -3919,6 +3919,25 @@ export class BooleanLineComponent extends React.Component<IBooleanLineComponentP
3919
3919
 
3920
3920
  }
3921
3921
 
3922
+ }
3923
+ declare module "babylonjs-gui-editor/fluent/primitives/toggleButton" {
3924
+ import { PrimitiveProps } from "babylonjs-gui-editor/fluent/primitives/primitive";
3925
+ import { FunctionComponent } from "react";
3926
+
3927
+ type ToggleButtonProps = PrimitiveProps<boolean> & {
3928
+ enabledIcon: any;
3929
+ disabledIcon?: any;
3930
+ };
3931
+ /**
3932
+ * Toggles between two states using a button with icons.
3933
+ * If no disabledIcon is provided, the button will toggle between visual enabled/disabled states without an icon change
3934
+ *
3935
+ * @param props
3936
+ * @returns
3937
+ */
3938
+ export const ToggleButton: FunctionComponent<ToggleButtonProps>;
3939
+ export {};
3940
+
3922
3941
  }
3923
3942
  declare module "babylonjs-gui-editor/fluent/primitives/textarea" {
3924
3943
  import { FunctionComponent } from "react";
@@ -4061,11 +4080,11 @@ export {};
4061
4080
 
4062
4081
  }
4063
4082
  declare module "babylonjs-gui-editor/fluent/primitives/list" {
4064
- import { FunctionComponent, ReactNode } from "react";
4083
+ import { ReactNode, ReactElement } from "react";
4065
4084
  /**
4066
4085
  * Represents an item in a list
4067
4086
  */
4068
- export type ListItem<T = any> = {
4087
+ export type ListItem<T> = {
4069
4088
  /** Unique identifier for the item */
4070
4089
  id: number;
4071
4090
  /** The data associated with the item */
@@ -4073,7 +4092,7 @@ export type ListItem<T = any> = {
4073
4092
  /** Value to use for sorting the list */
4074
4093
  sortBy: number;
4075
4094
  };
4076
- type ListProps<T = any> = {
4095
+ type ListProps<T> = {
4077
4096
  items: ListItem<T>[];
4078
4097
  renderItem: (item: ListItem<T>, index: number) => ReactNode;
4079
4098
  onDelete: (item: ListItem<T>, index: number) => void;
@@ -4085,7 +4104,7 @@ type ListProps<T = any> = {
4085
4104
  * @returns A React component that renders a list of items with add/delete functionality
4086
4105
  * @param props - The properties for the List component
4087
4106
  */
4088
- export const List: FunctionComponent<ListProps<any>>;
4107
+ export function List<T>(props: ListProps<T>): ReactElement;
4089
4108
  export {};
4090
4109
 
4091
4110
  }
@@ -9516,6 +9535,27 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
9516
9535
 
9517
9536
 
9518
9537
 
9538
+ }
9539
+ declare module BABYLON {
9540
+
9541
+
9542
+ }
9543
+ declare module BABYLON.GuiEditor.SharedUIComponents {
9544
+ type ToggleButtonProps = BABYLON.GuiEditor.SharedUIComponents.PrimitiveProps<boolean> & {
9545
+ enabledIcon: any;
9546
+ disabledIcon?: any;
9547
+ };
9548
+ /**
9549
+ * Toggles between two states using a button with icons.
9550
+ * If no disabledIcon is provided, the button will toggle between visual enabled/disabled states without an icon change
9551
+ *
9552
+ * @param props
9553
+ * @returns
9554
+ */
9555
+ export var ToggleButton: React.FunctionComponent<ToggleButtonProps>;
9556
+
9557
+
9558
+
9519
9559
  }
9520
9560
  declare module BABYLON {
9521
9561
 
@@ -9704,7 +9744,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
9704
9744
  /**
9705
9745
  * Represents an item in a list
9706
9746
  */
9707
- export type ListItem<T = any> = {
9747
+ export type ListItem<T> = {
9708
9748
  /** Unique identifier for the item */
9709
9749
  id: number;
9710
9750
  /** The data associated with the item */
@@ -9712,7 +9752,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
9712
9752
  /** Value to use for sorting the list */
9713
9753
  sortBy: number;
9714
9754
  };
9715
- type ListProps<T = any> = {
9755
+ type ListProps<T> = {
9716
9756
  items: ListItem<T>[];
9717
9757
  renderItem: (item: ListItem<T>, index: number) => React.ReactNode;
9718
9758
  onDelete: (item: ListItem<T>, index: number) => void;
@@ -9724,7 +9764,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
9724
9764
  * @returns A React component that renders a list of items with add/delete functionality
9725
9765
  * @param props - The properties for the List component
9726
9766
  */
9727
- export var List: React.FunctionComponent<ListProps<any>>;
9767
+ export function List<T>(props: ListProps<T>): React.ReactElement;
9728
9768
 
9729
9769
 
9730
9770
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui-editor",
3
- "version": "8.22.1",
3
+ "version": "8.22.3",
4
4
  "main": "babylon.guiEditor.js",
5
5
  "types": "babylon.guiEditor.module.d.ts",
6
6
  "files": [
@@ -14,8 +14,8 @@
14
14
  "clean": "rimraf dist && rimraf babylon*.* -g"
15
15
  },
16
16
  "dependencies": {
17
- "babylonjs": "^8.22.1",
18
- "babylonjs-gui": "^8.22.1"
17
+ "babylonjs": "^8.22.3",
18
+ "babylonjs-gui": "^8.22.3"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@dev/build-tools": "1.0.0",