babylonjs-gui-editor 9.6.2 → 9.8.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.
@@ -6854,6 +6854,63 @@ declare namespace BABYLON.GuiEditor.SharedUIComponents {
6854
6854
 
6855
6855
 
6856
6856
 
6857
+ }
6858
+ declare namespace BABYLON {
6859
+
6860
+
6861
+ }
6862
+ declare namespace BABYLON.GuiEditor.SharedUIComponents {
6863
+ /**
6864
+ * Props for an action button in the dialog footer.
6865
+ */
6866
+ export type DialogActionProps = {
6867
+ /** Button label text. */
6868
+ label: string;
6869
+ /** Click handler. */
6870
+ onClick: () => void;
6871
+ /** Button appearance. Defaults to "secondary". */
6872
+ appearance?: "primary" | "secondary";
6873
+ };
6874
+ /**
6875
+ * Props for the shared Dialog primitive.
6876
+ */
6877
+ export type DialogProps = {
6878
+ /** Whether the dialog is open. */
6879
+ open: boolean;
6880
+ /** Dialog title. */
6881
+ title: string;
6882
+ /** Dialog content (body). */
6883
+ children: React.ReactNode;
6884
+ /** Action buttons rendered in the footer. */
6885
+ actions?: DialogActionProps[];
6886
+ /** Called when the dialog is dismissed via the close button. */
6887
+ onDismiss?: () => void;
6888
+ };
6889
+ /**
6890
+ * A shared dialog component wrapping Fluent UI Dialog with Babylon conventions.
6891
+ *
6892
+ * @example
6893
+ * ```tsx
6894
+ * <Dialog
6895
+ * open={isOpen}
6896
+ * title="Confirm Action"
6897
+ * onDismiss={() => setIsOpen(false)}
6898
+ * actions={[
6899
+ * { label: "Cancel", onClick: () => setIsOpen(false) },
6900
+ * { label: "Confirm", onClick: handleConfirm, appearance: "primary" },
6901
+ * ]}
6902
+ * >
6903
+ * <Text>Are you sure you want to proceed?</Text>
6904
+ * </Dialog>
6905
+ * ```
6906
+ *
6907
+ * @param props - The dialog props.
6908
+ * @returns The dialog element.
6909
+ */
6910
+ export var Dialog: React.FC<DialogProps>;
6911
+
6912
+
6913
+
6857
6914
  }
6858
6915
  declare namespace BABYLON {
6859
6916
 
@@ -6723,6 +6723,58 @@ export type DraggableLineProps = {
6723
6723
  };
6724
6724
  export const DraggableLine: React.FunctionComponent<DraggableLineProps>;
6725
6725
 
6726
+ }
6727
+ declare module "babylonjs-gui-editor/fluent/primitives/dialog" {
6728
+ import { ReactNode, FC } from "react";
6729
+ /**
6730
+ * Props for an action button in the dialog footer.
6731
+ */
6732
+ export type DialogActionProps = {
6733
+ /** Button label text. */
6734
+ label: string;
6735
+ /** Click handler. */
6736
+ onClick: () => void;
6737
+ /** Button appearance. Defaults to "secondary". */
6738
+ appearance?: "primary" | "secondary";
6739
+ };
6740
+ /**
6741
+ * Props for the shared Dialog primitive.
6742
+ */
6743
+ export type DialogProps = {
6744
+ /** Whether the dialog is open. */
6745
+ open: boolean;
6746
+ /** Dialog title. */
6747
+ title: string;
6748
+ /** Dialog content (body). */
6749
+ children: ReactNode;
6750
+ /** Action buttons rendered in the footer. */
6751
+ actions?: DialogActionProps[];
6752
+ /** Called when the dialog is dismissed via the close button. */
6753
+ onDismiss?: () => void;
6754
+ };
6755
+ /**
6756
+ * A shared dialog component wrapping Fluent UI Dialog with Babylon conventions.
6757
+ *
6758
+ * @example
6759
+ * ```tsx
6760
+ * <Dialog
6761
+ * open={isOpen}
6762
+ * title="Confirm Action"
6763
+ * onDismiss={() => setIsOpen(false)}
6764
+ * actions={[
6765
+ * { label: "Cancel", onClick: () => setIsOpen(false) },
6766
+ * { label: "Confirm", onClick: handleConfirm, appearance: "primary" },
6767
+ * ]}
6768
+ * >
6769
+ * <Text>Are you sure you want to proceed?</Text>
6770
+ * </Dialog>
6771
+ * ```
6772
+ *
6773
+ * @param props - The dialog props.
6774
+ * @returns The dialog element.
6775
+ */
6776
+ export const Dialog: FC<DialogProps>;
6777
+
6726
6778
  }
6727
6779
  declare module "babylonjs-gui-editor/fluent/primitives/contextMenu" {
6728
6780
  import { ReactElement } from "react";
@@ -15718,6 +15770,63 @@ declare namespace BABYLON.GuiEditor.SharedUIComponents {
15718
15770
 
15719
15771
 
15720
15772
 
15773
+ }
15774
+ declare namespace BABYLON {
15775
+
15776
+
15777
+ }
15778
+ declare namespace BABYLON.GuiEditor.SharedUIComponents {
15779
+ /**
15780
+ * Props for an action button in the dialog footer.
15781
+ */
15782
+ export type DialogActionProps = {
15783
+ /** Button label text. */
15784
+ label: string;
15785
+ /** Click handler. */
15786
+ onClick: () => void;
15787
+ /** Button appearance. Defaults to "secondary". */
15788
+ appearance?: "primary" | "secondary";
15789
+ };
15790
+ /**
15791
+ * Props for the shared Dialog primitive.
15792
+ */
15793
+ export type DialogProps = {
15794
+ /** Whether the dialog is open. */
15795
+ open: boolean;
15796
+ /** Dialog title. */
15797
+ title: string;
15798
+ /** Dialog content (body). */
15799
+ children: React.ReactNode;
15800
+ /** Action buttons rendered in the footer. */
15801
+ actions?: DialogActionProps[];
15802
+ /** Called when the dialog is dismissed via the close button. */
15803
+ onDismiss?: () => void;
15804
+ };
15805
+ /**
15806
+ * A shared dialog component wrapping Fluent UI Dialog with Babylon conventions.
15807
+ *
15808
+ * @example
15809
+ * ```tsx
15810
+ * <Dialog
15811
+ * open={isOpen}
15812
+ * title="Confirm Action"
15813
+ * onDismiss={() => setIsOpen(false)}
15814
+ * actions={[
15815
+ * { label: "Cancel", onClick: () => setIsOpen(false) },
15816
+ * { label: "Confirm", onClick: handleConfirm, appearance: "primary" },
15817
+ * ]}
15818
+ * >
15819
+ * <Text>Are you sure you want to proceed?</Text>
15820
+ * </Dialog>
15821
+ * ```
15822
+ *
15823
+ * @param props - The dialog props.
15824
+ * @returns The dialog element.
15825
+ */
15826
+ export var Dialog: React.FC<DialogProps>;
15827
+
15828
+
15829
+
15721
15830
  }
15722
15831
  declare namespace BABYLON {
15723
15832
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui-editor",
3
- "version": "9.6.2",
3
+ "version": "9.8.0",
4
4
  "main": "babylon.guiEditor.js",
5
5
  "types": "babylon.guiEditor.module.d.ts",
6
6
  "files": [
@@ -15,8 +15,8 @@
15
15
  "clean": "rimraf dist && rimraf babylon*.* -g"
16
16
  },
17
17
  "dependencies": {
18
- "babylonjs": "9.6.2",
19
- "babylonjs-gui": "9.6.2"
18
+ "babylonjs": "9.8.0",
19
+ "babylonjs-gui": "9.8.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@dev/build-tools": "1.0.0",