@babylonjs/gui-editor 9.6.1 → 9.7.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.
@@ -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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/gui-editor",
3
- "version": "9.6.1",
3
+ "version": "9.7.0",
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": "9.6.1",
28
- "@babylonjs/gui": "9.6.1",
27
+ "@babylonjs/core": "9.7.0",
28
+ "@babylonjs/gui": "9.7.0",
29
29
  "@tools/gui-editor": "1.0.0",
30
30
  "react": "^18.2.0",
31
31
  "react-dom": "^18.2.0"