babylonjs-node-editor 7.34.2 → 7.34.4

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/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";
@@ -4588,6 +4739,7 @@ declare module BABYLON.NodeEditor {
4588
4739
  */
4589
4740
  export class NodeEditor {
4590
4741
  private static _CurrentState;
4742
+ private static _PopupWindow;
4591
4743
  /**
4592
4744
  * Show the node editor
4593
4745
  * @param options defines the options to use to configure the node editor
@@ -4617,11 +4769,6 @@ declare module BABYLON.NodeEditor {
4617
4769
  private _graphCanvasRef;
4618
4770
  private _diagramContainerRef;
4619
4771
  private _graphCanvas;
4620
- private _diagramContainer;
4621
- private _startX;
4622
- private _moveInProgress;
4623
- private _leftWidth;
4624
- private _rightWidth;
4625
4772
  private _historyStack;
4626
4773
  private _previewManager;
4627
4774
  private _mouseLocationX;
@@ -4642,18 +4789,13 @@ declare module BABYLON.NodeEditor {
4642
4789
  showWaitScreen(): void;
4643
4790
  hideWaitScreen(): void;
4644
4791
  reOrganize(editorData?: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.IEditorData>, isImportingAFrame?: boolean): void;
4645
- onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
4646
- onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
4647
4792
  onWheel: (evt: WheelEvent) => void;
4648
- resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
4649
- buildColumnLayout(): string;
4650
4793
  emitNewBlock(blockType: string, targetX: number, targetY: number): BABYLON.NodeEditor.SharedUIComponents.GraphNode | undefined;
4651
4794
  dropNewBlock(event: React.DragEvent<HTMLDivElement>): void;
4652
4795
  handlePopUp: () => void;
4653
4796
  handleClosingPopUp: () => void;
4654
4797
  initiatePreviewArea: (canvas?: HTMLCanvasElement) => void;
4655
4798
  createPopUp: () => void;
4656
- createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
4657
4799
  createPreviewMeshControlHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
4658
4800
  createPreviewHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
4659
4801
  fixPopUpStyles: (document: Document) => void;
@@ -4764,12 +4906,6 @@ declare module BABYLON.NodeEditor {
4764
4906
  }
4765
4907
 
4766
4908
 
4767
- export class Popup {
4768
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
4769
- static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
4770
- }
4771
-
4772
-
4773
4909
  export interface ICheckBoxLineComponentProps {
4774
4910
  label: string;
4775
4911
  target?: any;
@@ -5432,7 +5568,6 @@ declare module BABYLON.NodeEditor {
5432
5568
 
5433
5569
  interface IPreviewAreaComponentProps {
5434
5570
  globalState: GlobalState;
5435
- width: number;
5436
5571
  }
5437
5572
  export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentProps, {
5438
5573
  isLoading: boolean;
@@ -5492,6 +5627,21 @@ declare module BABYLON.NodeEditor {
5492
5627
 
5493
5628
 
5494
5629
 
5630
+ }
5631
+ declare module BABYLON.NodeEditor.SharedUIComponents {
5632
+ /**
5633
+ * Copy all styles from a document to another document or shadow root
5634
+ * @param source document to copy styles from
5635
+ * @param target document or shadow root to copy styles to
5636
+ */
5637
+ export function CopyStyles(source: Document, target: Document): void;
5638
+
5639
+
5640
+
5641
+ }
5642
+ declare module BABYLON.NodeEditor {
5643
+
5644
+
5495
5645
  }
5496
5646
  declare module BABYLON.NodeEditor.SharedUIComponents {
5497
5647
  export class StringTools {
@@ -5524,6 +5674,27 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
5524
5674
 
5525
5675
 
5526
5676
 
5677
+ }
5678
+ declare module BABYLON.NodeEditor {
5679
+
5680
+
5681
+ }
5682
+ declare module BABYLON.NodeEditor.SharedUIComponents {
5683
+ /**
5684
+ * Create a popup window
5685
+ * @param title default title for the popup
5686
+ * @param options options for the popup
5687
+ * @returns the parent control of the popup
5688
+ */
5689
+ export function CreatePopup(title: string, options: Partial<{
5690
+ onParentControlCreateCallback?: (parentControl: HTMLDivElement) => void;
5691
+ onWindowCreateCallback?: (newWindow: Window) => void;
5692
+ width?: number;
5693
+ height?: number;
5694
+ }>): HTMLDivElement | null;
5695
+
5696
+
5697
+
5527
5698
  }
5528
5699
  declare module BABYLON.NodeEditor {
5529
5700
 
@@ -5913,6 +6084,173 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
5913
6084
 
5914
6085
 
5915
6086
 
6087
+ }
6088
+ declare module BABYLON.NodeEditor {
6089
+
6090
+
6091
+ }
6092
+ declare module BABYLON.NodeEditor.SharedUIComponents {
6093
+ /// <reference types="react" />
6094
+ /**
6095
+ * Splitter component properties
6096
+ */
6097
+ export interface ISplitterProps {
6098
+ /**
6099
+ * Unique identifier
6100
+ */
6101
+ id?: string;
6102
+ /**
6103
+ * Splitter size
6104
+ */
6105
+ size: number;
6106
+ /**
6107
+ * Minimum size for the controlled element
6108
+ */
6109
+ minSize?: number;
6110
+ /**
6111
+ * Maximum size for the controlled element
6112
+ */
6113
+ maxSize?: number;
6114
+ /**
6115
+ * Initial size for the controlled element
6116
+ */
6117
+ initialSize?: number;
6118
+ /**
6119
+ * Defines the controlled side
6120
+ */
6121
+ controlledSide: BABYLON.NodeEditor.SharedUIComponents.ControlledSize;
6122
+ /**
6123
+ * refObject to the splitter element
6124
+ */
6125
+ refObject?: React.RefObject<HTMLDivElement>;
6126
+ }
6127
+ /**
6128
+ * Creates a splitter component
6129
+ * @param props defines the splitter properties
6130
+ * @returns the splitter component
6131
+ */
6132
+ export var Splitter: React.FC<ISplitterProps>;
6133
+
6134
+
6135
+
6136
+ }
6137
+ declare module BABYLON.NodeEditor {
6138
+
6139
+
6140
+ }
6141
+ declare module BABYLON.NodeEditor.SharedUIComponents {
6142
+ /// <reference types="react" />
6143
+ export enum ControlledSize {
6144
+ First = 0,
6145
+ Second = 1
6146
+ }
6147
+ export enum SplitDirection {
6148
+ Horizontal = 0,
6149
+ Vertical = 1
6150
+ }
6151
+ /**
6152
+ * Context used to share data with splitters
6153
+ */
6154
+ export interface ISplitContext {
6155
+ /**
6156
+ * Split direction
6157
+ */
6158
+ direction: SplitDirection;
6159
+ /**
6160
+ * Function called by splitters to update the offset
6161
+ * @param offset new offet
6162
+ * @param source source element
6163
+ * @param controlledSide defined controlled element
6164
+ */
6165
+ drag: (offset: number, source: HTMLElement, controlledSide: ControlledSize) => void;
6166
+ /**
6167
+ * Function called by splitters to begin dragging
6168
+ */
6169
+ beginDrag: () => void;
6170
+ /**
6171
+ * Function called by splitters to end dragging
6172
+ */
6173
+ endDrag: () => void;
6174
+ /**
6175
+ * Sync sizes for the elements
6176
+ * @param source source element
6177
+ * @param controlledSide defined controlled element
6178
+ * @param size size of the controlled element
6179
+ * @param minSize minimum size for the controlled element
6180
+ * @param maxSize maximum size for the controlled element
6181
+ */
6182
+ sync: (source: HTMLElement, controlledSide: ControlledSize, size?: number, minSize?: number, maxSize?: number) => void;
6183
+ }
6184
+ export var SplitContext: import("react").Context<ISplitContext>;
6185
+
6186
+
6187
+
6188
+ }
6189
+ declare module BABYLON.NodeEditor {
6190
+
6191
+
6192
+ }
6193
+ declare module BABYLON.NodeEditor.SharedUIComponents {
6194
+ /// <reference types="react" />
6195
+ /**
6196
+ * Split container properties
6197
+ */
6198
+ export interface ISplitContainerProps {
6199
+ /**
6200
+ * Unique identifier
6201
+ */
6202
+ id?: string;
6203
+ /**
6204
+ * Split direction
6205
+ */
6206
+ direction: BABYLON.NodeEditor.SharedUIComponents.SplitDirection;
6207
+ /**
6208
+ * Minimum size for the floating elements
6209
+ */
6210
+ floatingMinSize?: number;
6211
+ /**
6212
+ * RefObject to the root div element
6213
+ */
6214
+ containerRef?: React.RefObject<HTMLDivElement>;
6215
+ /**
6216
+ * Optional class name
6217
+ */
6218
+ className?: string;
6219
+ /**
6220
+ * Pointer down
6221
+ * @param event pointer events
6222
+ */
6223
+ onPointerDown?: (event: React.PointerEvent) => void;
6224
+ /**
6225
+ * Pointer move
6226
+ * @param event pointer events
6227
+ */
6228
+ onPointerMove?: (event: React.PointerEvent) => void;
6229
+ /**
6230
+ * Pointer up
6231
+ * @param event pointer events
6232
+ */
6233
+ onPointerUp?: (event: React.PointerEvent) => void;
6234
+ /**
6235
+ * Drop
6236
+ * @param event drag events
6237
+ */
6238
+ onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
6239
+ /**
6240
+ * Drag over
6241
+ * @param event drag events
6242
+ */
6243
+ onDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
6244
+ }
6245
+ /**
6246
+ * Creates a split container component
6247
+ * @param props defines the split container properties
6248
+ * @returns the split container component
6249
+ */
6250
+ export var SplitContainer: React.FC<ISplitContainerProps>;
6251
+
6252
+
6253
+
5916
6254
  }
5917
6255
  declare module BABYLON.NodeEditor {
5918
6256
 
@@ -7075,19 +7413,6 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
7075
7413
 
7076
7414
 
7077
7415
 
7078
- }
7079
- declare module BABYLON.NodeEditor {
7080
-
7081
-
7082
- }
7083
- declare module BABYLON.NodeEditor.SharedUIComponents {
7084
- export class Popup {
7085
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
7086
- private static _CopyStyles;
7087
- }
7088
-
7089
-
7090
-
7091
7416
  }
7092
7417
  declare module BABYLON.NodeEditor {
7093
7418
 
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.4",
4
4
  "main": "babylon.nodeEditor.js",
5
5
  "types": "babylon.nodeEditor.module.d.ts",
6
6
  "files": [
@@ -14,7 +14,7 @@
14
14
  "clean": "rimraf dist && rimraf babylon*.* -g"
15
15
  },
16
16
  "dependencies": {
17
- "babylonjs": "^7.34.2"
17
+ "babylonjs": "^7.34.4"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@dev/build-tools": "1.0.0",