@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
  }
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": "dist/babylon.guiEditor.js",
5
5
  "module": "dist/babylon.guiEditor.js",
6
6
  "esnext": "dist/babylon.guiEditor.js",
@@ -24,8 +24,8 @@
24
24
  "@types/react-dom": ">=16.0.9"
25
25
  },
26
26
  "devDependencies": {
27
- "@babylonjs/core": "^8.22.1",
28
- "@babylonjs/gui": "^8.22.1",
27
+ "@babylonjs/core": "^8.22.3",
28
+ "@babylonjs/gui": "^8.22.3",
29
29
  "react": "^18.2.0",
30
30
  "react-dom": "^18.2.0"
31
31
  },