@babylonjs/gui-editor 7.34.2 → 7.34.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,8 +34,6 @@ export class WorkbenchEditor extends React.Component<IGraphEditorProps, IGraphEd
34
34
  buildColumnLayout(): string;
35
35
  handlePopUp: () => void;
36
36
  handleClosingPopUp: () => void;
37
- createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
38
- copyStyles: (sourceDoc: HTMLDocument, targetDoc: HTMLDocument) => void;
39
37
  switchExpandedState(): void;
40
38
 
41
39
  onCreate(value: string): Control;
@@ -175,6 +173,8 @@ export interface IGUIEditorOptions {
175
173
  */
176
174
  export class GUIEditor {
177
175
  private static _CurrentState;
176
+ /** @internal */
177
+ static _PopupWindow: Window | null;
178
178
  /**
179
179
  * Show the gui editor
180
180
  * @param options defines the options to use to configure the gui editor
@@ -1499,6 +1499,15 @@ export class GuiListComponent extends React.Component<IGuiListComponentProps, {
1499
1499
  }
1500
1500
  export {};
1501
1501
 
1502
+ }
1503
+ declare module "@babylonjs/gui-editor/styleHelper" {
1504
+ /**
1505
+ * Copy all styles from a document to another document or shadow root
1506
+ * @param source document to copy styles from
1507
+ * @param target document or shadow root to copy styles to
1508
+ */
1509
+ export function CopyStyles(source: Document, target: Document): void;
1510
+
1502
1511
  }
1503
1512
  declare module "@babylonjs/gui-editor/stringTools" {
1504
1513
  export class StringTools {
@@ -1523,6 +1532,21 @@ export class PropertyChangedEvent {
1523
1532
  allowNullValue?: boolean;
1524
1533
  }
1525
1534
 
1535
+ }
1536
+ declare module "@babylonjs/gui-editor/popupHelper" {
1537
+ /**
1538
+ * Create a popup window
1539
+ * @param title default title for the popup
1540
+ * @param options options for the popup
1541
+ * @returns the parent control of the popup
1542
+ */
1543
+ export function CreatePopup(title: string, options: Partial<{
1544
+ onParentControlCreateCallback?: (parentControl: HTMLDivElement) => void;
1545
+ onWindowCreateCallback?: (newWindow: Window) => void;
1546
+ width?: number;
1547
+ height?: number;
1548
+ }>): HTMLDivElement | null;
1549
+
1526
1550
  }
1527
1551
  declare module "@babylonjs/gui-editor/historyStack" {
1528
1552
  import { IDisposable } from "@babylonjs/core/scene";
@@ -1895,6 +1919,157 @@ export class CheckboxPropertyGridComponent extends React.Component<ICheckboxProp
1895
1919
  }
1896
1920
  export {};
1897
1921
 
1922
+ }
1923
+ declare module "@babylonjs/gui-editor/split/splitter" {
1924
+ /// <reference types="react" />
1925
+ import { ControlledSize } from "@babylonjs/gui-editor/split/splitContext";
1926
+ /**
1927
+ * Splitter component properties
1928
+ */
1929
+ export interface ISplitterProps {
1930
+ /**
1931
+ * Unique identifier
1932
+ */
1933
+ id?: string;
1934
+ /**
1935
+ * Splitter size
1936
+ */
1937
+ size: number;
1938
+ /**
1939
+ * Minimum size for the controlled element
1940
+ */
1941
+ minSize?: number;
1942
+ /**
1943
+ * Maximum size for the controlled element
1944
+ */
1945
+ maxSize?: number;
1946
+ /**
1947
+ * Initial size for the controlled element
1948
+ */
1949
+ initialSize?: number;
1950
+ /**
1951
+ * Defines the controlled side
1952
+ */
1953
+ controlledSide: ControlledSize;
1954
+ /**
1955
+ * refObject to the splitter element
1956
+ */
1957
+ refObject?: React.RefObject<HTMLDivElement>;
1958
+ }
1959
+ /**
1960
+ * Creates a splitter component
1961
+ * @param props defines the splitter properties
1962
+ * @returns the splitter component
1963
+ */
1964
+ export const Splitter: React.FC<ISplitterProps>;
1965
+
1966
+ }
1967
+ declare module "@babylonjs/gui-editor/split/splitContext" {
1968
+ /// <reference types="react" />
1969
+ export enum ControlledSize {
1970
+ First = 0,
1971
+ Second = 1
1972
+ }
1973
+ export enum SplitDirection {
1974
+ Horizontal = 0,
1975
+ Vertical = 1
1976
+ }
1977
+ /**
1978
+ * Context used to share data with splitters
1979
+ */
1980
+ export interface ISplitContext {
1981
+ /**
1982
+ * Split direction
1983
+ */
1984
+ direction: SplitDirection;
1985
+ /**
1986
+ * Function called by splitters to update the offset
1987
+ * @param offset new offet
1988
+ * @param source source element
1989
+ * @param controlledSide defined controlled element
1990
+ */
1991
+ drag: (offset: number, source: HTMLElement, controlledSide: ControlledSize) => void;
1992
+ /**
1993
+ * Function called by splitters to begin dragging
1994
+ */
1995
+ beginDrag: () => void;
1996
+ /**
1997
+ * Function called by splitters to end dragging
1998
+ */
1999
+ endDrag: () => void;
2000
+ /**
2001
+ * Sync sizes for the elements
2002
+ * @param source source element
2003
+ * @param controlledSide defined controlled element
2004
+ * @param size size of the controlled element
2005
+ * @param minSize minimum size for the controlled element
2006
+ * @param maxSize maximum size for the controlled element
2007
+ */
2008
+ sync: (source: HTMLElement, controlledSide: ControlledSize, size?: number, minSize?: number, maxSize?: number) => void;
2009
+ }
2010
+ export const SplitContext: import("react").Context<ISplitContext>;
2011
+
2012
+ }
2013
+ declare module "@babylonjs/gui-editor/split/splitContainer" {
2014
+ /// <reference types="react" />
2015
+ import { SplitDirection } from "@babylonjs/gui-editor/split/splitContext";
2016
+ /**
2017
+ * Split container properties
2018
+ */
2019
+ export interface ISplitContainerProps {
2020
+ /**
2021
+ * Unique identifier
2022
+ */
2023
+ id?: string;
2024
+ /**
2025
+ * Split direction
2026
+ */
2027
+ direction: SplitDirection;
2028
+ /**
2029
+ * Minimum size for the floating elements
2030
+ */
2031
+ floatingMinSize?: number;
2032
+ /**
2033
+ * RefObject to the root div element
2034
+ */
2035
+ containerRef?: React.RefObject<HTMLDivElement>;
2036
+ /**
2037
+ * Optional class name
2038
+ */
2039
+ className?: string;
2040
+ /**
2041
+ * Pointer down
2042
+ * @param event pointer events
2043
+ */
2044
+ onPointerDown?: (event: React.PointerEvent) => void;
2045
+ /**
2046
+ * Pointer move
2047
+ * @param event pointer events
2048
+ */
2049
+ onPointerMove?: (event: React.PointerEvent) => void;
2050
+ /**
2051
+ * Pointer up
2052
+ * @param event pointer events
2053
+ */
2054
+ onPointerUp?: (event: React.PointerEvent) => void;
2055
+ /**
2056
+ * Drop
2057
+ * @param event drag events
2058
+ */
2059
+ onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
2060
+ /**
2061
+ * Drag over
2062
+ * @param event drag events
2063
+ */
2064
+ onDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
2065
+ }
2066
+ /**
2067
+ * Creates a split container component
2068
+ * @param props defines the split container properties
2069
+ * @returns the split container component
2070
+ */
2071
+ export const SplitContainer: React.FC<ISplitContainerProps>;
2072
+
1898
2073
  }
1899
2074
  declare module "@babylonjs/gui-editor/nodeGraphSystem/typeLedger" {
1900
2075
  import { INodeContainer } from "@babylonjs/gui-editor/nodeGraphSystem/interfaces/nodeContainer";
@@ -2998,13 +3173,6 @@ export class RadioButtonLineComponent extends React.Component<IRadioButtonLineCo
2998
3173
  }
2999
3174
  export {};
3000
3175
 
3001
- }
3002
- declare module "@babylonjs/gui-editor/lines/popup" {
3003
- export class Popup {
3004
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
3005
- private static _CopyStyles;
3006
- }
3007
-
3008
3176
  }
3009
3177
  declare module "@babylonjs/gui-editor/lines/optionsLineComponent" {
3010
3178
  import * as React from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/gui-editor",
3
- "version": "7.34.2",
3
+ "version": "7.34.3",
4
4
  "main": "dist/babylon.guiEditor.max.js",
5
5
  "module": "dist/babylon.guiEditor.max.js",
6
6
  "esnext": "dist/babylon.guiEditor.max.js",
@@ -24,8 +24,8 @@
24
24
  "@types/react-dom": ">=16.0.9"
25
25
  },
26
26
  "devDependencies": {
27
- "@babylonjs/core": "^7.34.2",
28
- "@babylonjs/gui": "^7.34.2",
27
+ "@babylonjs/core": "^7.34.3",
28
+ "@babylonjs/gui": "^7.34.3",
29
29
  "react": "^17.0.2",
30
30
  "react-dom": "^17.0.2"
31
31
  },