@babylonjs/node-render-graph-editor 7.23.2 → 7.23.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 NodeRenderGraphEditor {
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 _previewManager;
96
92
  private _mouseLocationX;
97
93
  private _mouseLocationY;
@@ -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;
@@ -259,13 +250,6 @@ export class TextureLineComponent extends React.Component<ITextureLineComponentP
259
250
  }
260
251
  export {};
261
252
 
262
- }
263
- declare module "@babylonjs/node-render-graph-editor/sharedComponents/popup" {
264
- export class Popup {
265
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
266
- static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
267
- }
268
-
269
253
  }
270
254
  declare module "@babylonjs/node-render-graph-editor/sharedComponents/lineWithFileButtonComponent" {
271
255
  import * as React from "react";
@@ -842,7 +826,6 @@ import * as React from "react";
842
826
  import { GlobalState } from "@babylonjs/node-render-graph-editor/globalState";
843
827
  interface IPreviewAreaComponentProps {
844
828
  globalState: GlobalState;
845
- width: number;
846
829
  }
847
830
  export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentProps, {
848
831
  isLoading: boolean;
@@ -905,6 +888,15 @@ export class LogComponent extends React.Component<ILogComponentProps, {
905
888
  }
906
889
  export {};
907
890
 
891
+ }
892
+ declare module "@babylonjs/node-render-graph-editor/styleHelper" {
893
+ /**
894
+ * Copy all styles from a document to another document or shadow root
895
+ * @param source document to copy styles from
896
+ * @param target document or shadow root to copy styles to
897
+ */
898
+ export function CopyStyles(source: Document, target: Document): void;
899
+
908
900
  }
909
901
  declare module "@babylonjs/node-render-graph-editor/stringTools" {
910
902
  export class StringTools {
@@ -929,6 +921,21 @@ export class PropertyChangedEvent {
929
921
  allowNullValue?: boolean;
930
922
  }
931
923
 
924
+ }
925
+ declare module "@babylonjs/node-render-graph-editor/popupHelper" {
926
+ /**
927
+ * Create a popup window
928
+ * @param title default title for the popup
929
+ * @param options options for the popup
930
+ * @returns the parent control of the popup
931
+ */
932
+ export function CreatePopup(title: string, options: Partial<{
933
+ onParentControlCreateCallback?: (parentControl: HTMLDivElement) => void;
934
+ onWindowCreateCallback?: (newWindow: Window) => void;
935
+ width?: number;
936
+ height?: number;
937
+ }>): HTMLDivElement | null;
938
+
932
939
  }
933
940
  declare module "@babylonjs/node-render-graph-editor/historyStack" {
934
941
  import { IDisposable } from "@babylonjs/core/scene";
@@ -1301,6 +1308,157 @@ export class CheckboxPropertyGridComponent extends React.Component<ICheckboxProp
1301
1308
  }
1302
1309
  export {};
1303
1310
 
1311
+ }
1312
+ declare module "@babylonjs/node-render-graph-editor/split/splitter" {
1313
+ /// <reference types="react" />
1314
+ import { ControlledSize } from "@babylonjs/node-render-graph-editor/split/splitContext";
1315
+ /**
1316
+ * Splitter component properties
1317
+ */
1318
+ export interface ISplitterProps {
1319
+ /**
1320
+ * Unique identifier
1321
+ */
1322
+ id?: string;
1323
+ /**
1324
+ * Splitter size
1325
+ */
1326
+ size: number;
1327
+ /**
1328
+ * Minimum size for the controlled element
1329
+ */
1330
+ minSize?: number;
1331
+ /**
1332
+ * Maximum size for the controlled element
1333
+ */
1334
+ maxSize?: number;
1335
+ /**
1336
+ * Initial size for the controlled element
1337
+ */
1338
+ initialSize?: number;
1339
+ /**
1340
+ * Defines the controlled side
1341
+ */
1342
+ controlledSide: ControlledSize;
1343
+ /**
1344
+ * refObject to the splitter element
1345
+ */
1346
+ refObject?: React.RefObject<HTMLDivElement>;
1347
+ }
1348
+ /**
1349
+ * Creates a splitter component
1350
+ * @param props defines the splitter properties
1351
+ * @returns the splitter component
1352
+ */
1353
+ export const Splitter: React.FC<ISplitterProps>;
1354
+
1355
+ }
1356
+ declare module "@babylonjs/node-render-graph-editor/split/splitContext" {
1357
+ /// <reference types="react" />
1358
+ export enum ControlledSize {
1359
+ First = 0,
1360
+ Second = 1
1361
+ }
1362
+ export enum SplitDirection {
1363
+ Horizontal = 0,
1364
+ Vertical = 1
1365
+ }
1366
+ /**
1367
+ * Context used to share data with splitters
1368
+ */
1369
+ export interface ISplitContext {
1370
+ /**
1371
+ * Split direction
1372
+ */
1373
+ direction: SplitDirection;
1374
+ /**
1375
+ * Function called by splitters to update the offset
1376
+ * @param offset new offet
1377
+ * @param source source element
1378
+ * @param controlledSide defined controlled element
1379
+ */
1380
+ drag: (offset: number, source: HTMLElement, controlledSide: ControlledSize) => void;
1381
+ /**
1382
+ * Function called by splitters to begin dragging
1383
+ */
1384
+ beginDrag: () => void;
1385
+ /**
1386
+ * Function called by splitters to end dragging
1387
+ */
1388
+ endDrag: () => void;
1389
+ /**
1390
+ * Sync sizes for the elements
1391
+ * @param source source element
1392
+ * @param controlledSide defined controlled element
1393
+ * @param size size of the controlled element
1394
+ * @param minSize minimum size for the controlled element
1395
+ * @param maxSize maximum size for the controlled element
1396
+ */
1397
+ sync: (source: HTMLElement, controlledSide: ControlledSize, size?: number, minSize?: number, maxSize?: number) => void;
1398
+ }
1399
+ export const SplitContext: import("react").Context<ISplitContext>;
1400
+
1401
+ }
1402
+ declare module "@babylonjs/node-render-graph-editor/split/splitContainer" {
1403
+ /// <reference types="react" />
1404
+ import { SplitDirection } from "@babylonjs/node-render-graph-editor/split/splitContext";
1405
+ /**
1406
+ * Split container properties
1407
+ */
1408
+ export interface ISplitContainerProps {
1409
+ /**
1410
+ * Unique identifier
1411
+ */
1412
+ id?: string;
1413
+ /**
1414
+ * Split direction
1415
+ */
1416
+ direction: SplitDirection;
1417
+ /**
1418
+ * Minimum size for the floating elements
1419
+ */
1420
+ floatingMinSize?: number;
1421
+ /**
1422
+ * RefObject to the root div element
1423
+ */
1424
+ containerRef?: React.RefObject<HTMLDivElement>;
1425
+ /**
1426
+ * Optional class name
1427
+ */
1428
+ className?: string;
1429
+ /**
1430
+ * Pointer down
1431
+ * @param event pointer events
1432
+ */
1433
+ onPointerDown?: (event: React.PointerEvent) => void;
1434
+ /**
1435
+ * Pointer move
1436
+ * @param event pointer events
1437
+ */
1438
+ onPointerMove?: (event: React.PointerEvent) => void;
1439
+ /**
1440
+ * Pointer up
1441
+ * @param event pointer events
1442
+ */
1443
+ onPointerUp?: (event: React.PointerEvent) => void;
1444
+ /**
1445
+ * Drop
1446
+ * @param event drag events
1447
+ */
1448
+ onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
1449
+ /**
1450
+ * Drag over
1451
+ * @param event drag events
1452
+ */
1453
+ onDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
1454
+ }
1455
+ /**
1456
+ * Creates a split container component
1457
+ * @param props defines the split container properties
1458
+ * @returns the split container component
1459
+ */
1460
+ export const SplitContainer: React.FC<ISplitContainerProps>;
1461
+
1304
1462
  }
1305
1463
  declare module "@babylonjs/node-render-graph-editor/nodeGraphSystem/typeLedger" {
1306
1464
  import { INodeContainer } from "@babylonjs/node-render-graph-editor/nodeGraphSystem/interfaces/nodeContainer";
@@ -2404,13 +2562,6 @@ export class RadioButtonLineComponent extends React.Component<IRadioButtonLineCo
2404
2562
  }
2405
2563
  export {};
2406
2564
 
2407
- }
2408
- declare module "@babylonjs/node-render-graph-editor/lines/popup" {
2409
- export class Popup {
2410
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
2411
- private static _CopyStyles;
2412
- }
2413
-
2414
2565
  }
2415
2566
  declare module "@babylonjs/node-render-graph-editor/lines/optionsLineComponent" {
2416
2567
  import * as React from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/node-render-graph-editor",
3
- "version": "7.23.2",
3
+ "version": "7.23.3",
4
4
  "main": "dist/babylon.nodeRenderGraphEditor.max.js",
5
5
  "module": "dist/babylon.nodeRenderGraphEditor.max.js",
6
6
  "esnext": "dist/babylon.nodeRenderGraphEditor.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
  },