@babylonjs/node-editor 7.34.2 → 7.34.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.
@@ -46,6 +46,7 @@ export interface INodeEditorOptions {
46
46
  */
47
47
  export class NodeEditor {
48
48
  private static _CurrentState;
49
+ private static _PopupWindow;
49
50
  /**
50
51
  * Show the node editor
51
52
  * @param options defines the options to use to configure the node editor
@@ -87,11 +88,6 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
87
88
  private _graphCanvasRef;
88
89
  private _diagramContainerRef;
89
90
  private _graphCanvas;
90
- private _diagramContainer;
91
- private _startX;
92
- private _moveInProgress;
93
- private _leftWidth;
94
- private _rightWidth;
95
91
  private _historyStack;
96
92
  private _previewManager;
97
93
  private _mouseLocationX;
@@ -112,18 +108,13 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
112
108
  showWaitScreen(): void;
113
109
  hideWaitScreen(): void;
114
110
  reOrganize(editorData?: Nullable<IEditorData>, isImportingAFrame?: boolean): void;
115
- onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
116
- onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
117
111
  onWheel: (evt: WheelEvent) => void;
118
- resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
119
- buildColumnLayout(): string;
120
112
  emitNewBlock(blockType: string, targetX: number, targetY: number): GraphNode | undefined;
121
113
  dropNewBlock(event: React.DragEvent<HTMLDivElement>): void;
122
114
  handlePopUp: () => void;
123
115
  handleClosingPopUp: () => void;
124
116
  initiatePreviewArea: (canvas?: HTMLCanvasElement) => void;
125
117
  createPopUp: () => void;
126
- createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
127
118
  createPreviewMeshControlHost: (options: IInternalPreviewAreaOptions, parentControl: Nullable<HTMLElement>) => void;
128
119
  createPreviewHost: (options: IInternalPreviewAreaOptions, parentControl: Nullable<HTMLElement>) => void;
129
120
  fixPopUpStyles: (document: Document) => void;
@@ -359,13 +350,6 @@ export class TextureLineComponent extends React.Component<ITextureLineComponentP
359
350
  }
360
351
  export {};
361
352
 
362
- }
363
- declare module "@babylonjs/node-editor/sharedComponents/popup" {
364
- export class Popup {
365
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
366
- static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
367
- }
368
-
369
353
  }
370
354
  declare module "@babylonjs/node-editor/sharedComponents/checkBoxLineComponent" {
371
355
  import * as React from "react";
@@ -1254,7 +1238,6 @@ import * as React from "react";
1254
1238
  import { GlobalState } from "@babylonjs/node-editor/globalState";
1255
1239
  interface IPreviewAreaComponentProps {
1256
1240
  globalState: GlobalState;
1257
- width: number;
1258
1241
  }
1259
1242
  export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentProps, {
1260
1243
  isLoading: boolean;
@@ -1323,6 +1306,15 @@ export class LogComponent extends React.Component<ILogComponentProps, {
1323
1306
  }
1324
1307
  export {};
1325
1308
 
1309
+ }
1310
+ declare module "@babylonjs/node-editor/styleHelper" {
1311
+ /**
1312
+ * Copy all styles from a document to another document or shadow root
1313
+ * @param source document to copy styles from
1314
+ * @param target document or shadow root to copy styles to
1315
+ */
1316
+ export function CopyStyles(source: Document, target: Document): void;
1317
+
1326
1318
  }
1327
1319
  declare module "@babylonjs/node-editor/stringTools" {
1328
1320
  export class StringTools {
@@ -1347,6 +1339,21 @@ export class PropertyChangedEvent {
1347
1339
  allowNullValue?: boolean;
1348
1340
  }
1349
1341
 
1342
+ }
1343
+ declare module "@babylonjs/node-editor/popupHelper" {
1344
+ /**
1345
+ * Create a popup window
1346
+ * @param title default title for the popup
1347
+ * @param options options for the popup
1348
+ * @returns the parent control of the popup
1349
+ */
1350
+ export function CreatePopup(title: string, options: Partial<{
1351
+ onParentControlCreateCallback?: (parentControl: HTMLDivElement) => void;
1352
+ onWindowCreateCallback?: (newWindow: Window) => void;
1353
+ width?: number;
1354
+ height?: number;
1355
+ }>): HTMLDivElement | null;
1356
+
1350
1357
  }
1351
1358
  declare module "@babylonjs/node-editor/historyStack" {
1352
1359
  import { IDisposable } from "@babylonjs/core/scene";
@@ -1719,6 +1726,157 @@ export class CheckboxPropertyGridComponent extends React.Component<ICheckboxProp
1719
1726
  }
1720
1727
  export {};
1721
1728
 
1729
+ }
1730
+ declare module "@babylonjs/node-editor/split/splitter" {
1731
+ /// <reference types="react" />
1732
+ import { ControlledSize } from "@babylonjs/node-editor/split/splitContext";
1733
+ /**
1734
+ * Splitter component properties
1735
+ */
1736
+ export interface ISplitterProps {
1737
+ /**
1738
+ * Unique identifier
1739
+ */
1740
+ id?: string;
1741
+ /**
1742
+ * Splitter size
1743
+ */
1744
+ size: number;
1745
+ /**
1746
+ * Minimum size for the controlled element
1747
+ */
1748
+ minSize?: number;
1749
+ /**
1750
+ * Maximum size for the controlled element
1751
+ */
1752
+ maxSize?: number;
1753
+ /**
1754
+ * Initial size for the controlled element
1755
+ */
1756
+ initialSize?: number;
1757
+ /**
1758
+ * Defines the controlled side
1759
+ */
1760
+ controlledSide: ControlledSize;
1761
+ /**
1762
+ * refObject to the splitter element
1763
+ */
1764
+ refObject?: React.RefObject<HTMLDivElement>;
1765
+ }
1766
+ /**
1767
+ * Creates a splitter component
1768
+ * @param props defines the splitter properties
1769
+ * @returns the splitter component
1770
+ */
1771
+ export const Splitter: React.FC<ISplitterProps>;
1772
+
1773
+ }
1774
+ declare module "@babylonjs/node-editor/split/splitContext" {
1775
+ /// <reference types="react" />
1776
+ export enum ControlledSize {
1777
+ First = 0,
1778
+ Second = 1
1779
+ }
1780
+ export enum SplitDirection {
1781
+ Horizontal = 0,
1782
+ Vertical = 1
1783
+ }
1784
+ /**
1785
+ * Context used to share data with splitters
1786
+ */
1787
+ export interface ISplitContext {
1788
+ /**
1789
+ * Split direction
1790
+ */
1791
+ direction: SplitDirection;
1792
+ /**
1793
+ * Function called by splitters to update the offset
1794
+ * @param offset new offet
1795
+ * @param source source element
1796
+ * @param controlledSide defined controlled element
1797
+ */
1798
+ drag: (offset: number, source: HTMLElement, controlledSide: ControlledSize) => void;
1799
+ /**
1800
+ * Function called by splitters to begin dragging
1801
+ */
1802
+ beginDrag: () => void;
1803
+ /**
1804
+ * Function called by splitters to end dragging
1805
+ */
1806
+ endDrag: () => void;
1807
+ /**
1808
+ * Sync sizes for the elements
1809
+ * @param source source element
1810
+ * @param controlledSide defined controlled element
1811
+ * @param size size of the controlled element
1812
+ * @param minSize minimum size for the controlled element
1813
+ * @param maxSize maximum size for the controlled element
1814
+ */
1815
+ sync: (source: HTMLElement, controlledSide: ControlledSize, size?: number, minSize?: number, maxSize?: number) => void;
1816
+ }
1817
+ export const SplitContext: import("react").Context<ISplitContext>;
1818
+
1819
+ }
1820
+ declare module "@babylonjs/node-editor/split/splitContainer" {
1821
+ /// <reference types="react" />
1822
+ import { SplitDirection } from "@babylonjs/node-editor/split/splitContext";
1823
+ /**
1824
+ * Split container properties
1825
+ */
1826
+ export interface ISplitContainerProps {
1827
+ /**
1828
+ * Unique identifier
1829
+ */
1830
+ id?: string;
1831
+ /**
1832
+ * Split direction
1833
+ */
1834
+ direction: SplitDirection;
1835
+ /**
1836
+ * Minimum size for the floating elements
1837
+ */
1838
+ floatingMinSize?: number;
1839
+ /**
1840
+ * RefObject to the root div element
1841
+ */
1842
+ containerRef?: React.RefObject<HTMLDivElement>;
1843
+ /**
1844
+ * Optional class name
1845
+ */
1846
+ className?: string;
1847
+ /**
1848
+ * Pointer down
1849
+ * @param event pointer events
1850
+ */
1851
+ onPointerDown?: (event: React.PointerEvent) => void;
1852
+ /**
1853
+ * Pointer move
1854
+ * @param event pointer events
1855
+ */
1856
+ onPointerMove?: (event: React.PointerEvent) => void;
1857
+ /**
1858
+ * Pointer up
1859
+ * @param event pointer events
1860
+ */
1861
+ onPointerUp?: (event: React.PointerEvent) => void;
1862
+ /**
1863
+ * Drop
1864
+ * @param event drag events
1865
+ */
1866
+ onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
1867
+ /**
1868
+ * Drag over
1869
+ * @param event drag events
1870
+ */
1871
+ onDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
1872
+ }
1873
+ /**
1874
+ * Creates a split container component
1875
+ * @param props defines the split container properties
1876
+ * @returns the split container component
1877
+ */
1878
+ export const SplitContainer: React.FC<ISplitContainerProps>;
1879
+
1722
1880
  }
1723
1881
  declare module "@babylonjs/node-editor/nodeGraphSystem/typeLedger" {
1724
1882
  import { INodeContainer } from "@babylonjs/node-editor/nodeGraphSystem/interfaces/nodeContainer";
@@ -2822,13 +2980,6 @@ export class RadioButtonLineComponent extends React.Component<IRadioButtonLineCo
2822
2980
  }
2823
2981
  export {};
2824
2982
 
2825
- }
2826
- declare module "@babylonjs/node-editor/lines/popup" {
2827
- export class Popup {
2828
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
2829
- private static _CopyStyles;
2830
- }
2831
-
2832
2983
  }
2833
2984
  declare module "@babylonjs/node-editor/lines/optionsLineComponent" {
2834
2985
  import * as React from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/node-editor",
3
- "version": "7.34.2",
3
+ "version": "7.34.3",
4
4
  "main": "dist/babylon.nodeEditor.max.js",
5
5
  "module": "dist/babylon.nodeEditor.max.js",
6
6
  "esnext": "dist/babylon.nodeEditor.max.js",
@@ -23,7 +23,7 @@
23
23
  "@types/react-dom": ">=16.0.9"
24
24
  },
25
25
  "devDependencies": {
26
- "@babylonjs/core": "^7.34.2",
26
+ "@babylonjs/core": "^7.34.3",
27
27
  "react": "^17.0.2",
28
28
  "react-dom": "^17.0.2"
29
29
  },