@babylonjs/node-geometry-editor 7.34.1 → 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.
@@ -50,6 +50,7 @@ export interface INodeEditorOptions {
50
50
  */
51
51
  export class NodeGeometryEditor {
52
52
  private static _CurrentState;
53
+ private static _PopupWindow;
53
54
  /**
54
55
  * Show the node editor
55
56
  * @param options defines the options to use to configure the node editor
@@ -91,12 +92,7 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
91
92
  private _graphCanvasRef;
92
93
  private _diagramContainerRef;
93
94
  private _graphCanvas;
94
- private _diagramContainer;
95
95
  private _historyStack;
96
- private _startX;
97
- private _moveInProgress;
98
- private _leftWidth;
99
- private _rightWidth;
100
96
  private _previewManager;
101
97
  private _mouseLocationX;
102
98
  private _mouseLocationY;
@@ -116,18 +112,13 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
116
112
  showWaitScreen(): void;
117
113
  hideWaitScreen(): void;
118
114
  reOrganize(editorData?: Nullable<IEditorData>, isImportingAFrame?: boolean): void;
119
- onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
120
- onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
121
115
  onWheel: (evt: WheelEvent) => void;
122
- resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
123
- buildColumnLayout(): string;
124
116
  emitNewBlock(blockType: string, targetX: number, targetY: number): GraphNode | undefined;
125
117
  dropNewBlock(event: React.DragEvent<HTMLDivElement>): void;
126
118
  handlePopUp: () => void;
127
119
  handleClosingPopUp: () => void;
128
120
  initiatePreviewArea: (canvas?: HTMLCanvasElement) => void;
129
121
  createPopUp: () => void;
130
- createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
131
122
  createPreviewMeshControlHost: (options: IInternalPreviewAreaOptions, parentControl: Nullable<HTMLElement>) => void;
132
123
  createPreviewHost: (options: IInternalPreviewAreaOptions, parentControl: Nullable<HTMLElement>) => void;
133
124
  fixPopUpStyles: (document: Document) => void;
@@ -307,13 +298,6 @@ export class TextureLineComponent extends React.Component<ITextureLineComponentP
307
298
  }
308
299
  export {};
309
300
 
310
- }
311
- declare module "@babylonjs/node-geometry-editor/sharedComponents/popup" {
312
- export class Popup {
313
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
314
- static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
315
- }
316
-
317
301
  }
318
302
  declare module "@babylonjs/node-geometry-editor/sharedComponents/checkBoxLineComponent" {
319
303
  import * as React from "react";
@@ -922,7 +906,6 @@ import * as React from "react";
922
906
  import { GlobalState } from "@babylonjs/node-geometry-editor/globalState";
923
907
  interface IPreviewAreaComponentProps {
924
908
  globalState: GlobalState;
925
- width: number;
926
909
  }
927
910
  export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentProps, {
928
911
  isLoading: boolean;
@@ -990,6 +973,15 @@ export class LogComponent extends React.Component<ILogComponentProps, {
990
973
  }
991
974
  export {};
992
975
 
976
+ }
977
+ declare module "@babylonjs/node-geometry-editor/styleHelper" {
978
+ /**
979
+ * Copy all styles from a document to another document or shadow root
980
+ * @param source document to copy styles from
981
+ * @param target document or shadow root to copy styles to
982
+ */
983
+ export function CopyStyles(source: Document, target: Document): void;
984
+
993
985
  }
994
986
  declare module "@babylonjs/node-geometry-editor/stringTools" {
995
987
  export class StringTools {
@@ -1014,6 +1006,21 @@ export class PropertyChangedEvent {
1014
1006
  allowNullValue?: boolean;
1015
1007
  }
1016
1008
 
1009
+ }
1010
+ declare module "@babylonjs/node-geometry-editor/popupHelper" {
1011
+ /**
1012
+ * Create a popup window
1013
+ * @param title default title for the popup
1014
+ * @param options options for the popup
1015
+ * @returns the parent control of the popup
1016
+ */
1017
+ export function CreatePopup(title: string, options: Partial<{
1018
+ onParentControlCreateCallback?: (parentControl: HTMLDivElement) => void;
1019
+ onWindowCreateCallback?: (newWindow: Window) => void;
1020
+ width?: number;
1021
+ height?: number;
1022
+ }>): HTMLDivElement | null;
1023
+
1017
1024
  }
1018
1025
  declare module "@babylonjs/node-geometry-editor/historyStack" {
1019
1026
  import { IDisposable } from "@babylonjs/core/scene";
@@ -1386,6 +1393,157 @@ export class CheckboxPropertyGridComponent extends React.Component<ICheckboxProp
1386
1393
  }
1387
1394
  export {};
1388
1395
 
1396
+ }
1397
+ declare module "@babylonjs/node-geometry-editor/split/splitter" {
1398
+ /// <reference types="react" />
1399
+ import { ControlledSize } from "@babylonjs/node-geometry-editor/split/splitContext";
1400
+ /**
1401
+ * Splitter component properties
1402
+ */
1403
+ export interface ISplitterProps {
1404
+ /**
1405
+ * Unique identifier
1406
+ */
1407
+ id?: string;
1408
+ /**
1409
+ * Splitter size
1410
+ */
1411
+ size: number;
1412
+ /**
1413
+ * Minimum size for the controlled element
1414
+ */
1415
+ minSize?: number;
1416
+ /**
1417
+ * Maximum size for the controlled element
1418
+ */
1419
+ maxSize?: number;
1420
+ /**
1421
+ * Initial size for the controlled element
1422
+ */
1423
+ initialSize?: number;
1424
+ /**
1425
+ * Defines the controlled side
1426
+ */
1427
+ controlledSide: ControlledSize;
1428
+ /**
1429
+ * refObject to the splitter element
1430
+ */
1431
+ refObject?: React.RefObject<HTMLDivElement>;
1432
+ }
1433
+ /**
1434
+ * Creates a splitter component
1435
+ * @param props defines the splitter properties
1436
+ * @returns the splitter component
1437
+ */
1438
+ export const Splitter: React.FC<ISplitterProps>;
1439
+
1440
+ }
1441
+ declare module "@babylonjs/node-geometry-editor/split/splitContext" {
1442
+ /// <reference types="react" />
1443
+ export enum ControlledSize {
1444
+ First = 0,
1445
+ Second = 1
1446
+ }
1447
+ export enum SplitDirection {
1448
+ Horizontal = 0,
1449
+ Vertical = 1
1450
+ }
1451
+ /**
1452
+ * Context used to share data with splitters
1453
+ */
1454
+ export interface ISplitContext {
1455
+ /**
1456
+ * Split direction
1457
+ */
1458
+ direction: SplitDirection;
1459
+ /**
1460
+ * Function called by splitters to update the offset
1461
+ * @param offset new offet
1462
+ * @param source source element
1463
+ * @param controlledSide defined controlled element
1464
+ */
1465
+ drag: (offset: number, source: HTMLElement, controlledSide: ControlledSize) => void;
1466
+ /**
1467
+ * Function called by splitters to begin dragging
1468
+ */
1469
+ beginDrag: () => void;
1470
+ /**
1471
+ * Function called by splitters to end dragging
1472
+ */
1473
+ endDrag: () => void;
1474
+ /**
1475
+ * Sync sizes for the elements
1476
+ * @param source source element
1477
+ * @param controlledSide defined controlled element
1478
+ * @param size size of the controlled element
1479
+ * @param minSize minimum size for the controlled element
1480
+ * @param maxSize maximum size for the controlled element
1481
+ */
1482
+ sync: (source: HTMLElement, controlledSide: ControlledSize, size?: number, minSize?: number, maxSize?: number) => void;
1483
+ }
1484
+ export const SplitContext: import("react").Context<ISplitContext>;
1485
+
1486
+ }
1487
+ declare module "@babylonjs/node-geometry-editor/split/splitContainer" {
1488
+ /// <reference types="react" />
1489
+ import { SplitDirection } from "@babylonjs/node-geometry-editor/split/splitContext";
1490
+ /**
1491
+ * Split container properties
1492
+ */
1493
+ export interface ISplitContainerProps {
1494
+ /**
1495
+ * Unique identifier
1496
+ */
1497
+ id?: string;
1498
+ /**
1499
+ * Split direction
1500
+ */
1501
+ direction: SplitDirection;
1502
+ /**
1503
+ * Minimum size for the floating elements
1504
+ */
1505
+ floatingMinSize?: number;
1506
+ /**
1507
+ * RefObject to the root div element
1508
+ */
1509
+ containerRef?: React.RefObject<HTMLDivElement>;
1510
+ /**
1511
+ * Optional class name
1512
+ */
1513
+ className?: string;
1514
+ /**
1515
+ * Pointer down
1516
+ * @param event pointer events
1517
+ */
1518
+ onPointerDown?: (event: React.PointerEvent) => void;
1519
+ /**
1520
+ * Pointer move
1521
+ * @param event pointer events
1522
+ */
1523
+ onPointerMove?: (event: React.PointerEvent) => void;
1524
+ /**
1525
+ * Pointer up
1526
+ * @param event pointer events
1527
+ */
1528
+ onPointerUp?: (event: React.PointerEvent) => void;
1529
+ /**
1530
+ * Drop
1531
+ * @param event drag events
1532
+ */
1533
+ onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
1534
+ /**
1535
+ * Drag over
1536
+ * @param event drag events
1537
+ */
1538
+ onDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
1539
+ }
1540
+ /**
1541
+ * Creates a split container component
1542
+ * @param props defines the split container properties
1543
+ * @returns the split container component
1544
+ */
1545
+ export const SplitContainer: React.FC<ISplitContainerProps>;
1546
+
1389
1547
  }
1390
1548
  declare module "@babylonjs/node-geometry-editor/nodeGraphSystem/typeLedger" {
1391
1549
  import { INodeContainer } from "@babylonjs/node-geometry-editor/nodeGraphSystem/interfaces/nodeContainer";
@@ -2489,13 +2647,6 @@ export class RadioButtonLineComponent extends React.Component<IRadioButtonLineCo
2489
2647
  }
2490
2648
  export {};
2491
2649
 
2492
- }
2493
- declare module "@babylonjs/node-geometry-editor/lines/popup" {
2494
- export class Popup {
2495
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
2496
- private static _CopyStyles;
2497
- }
2498
-
2499
2650
  }
2500
2651
  declare module "@babylonjs/node-geometry-editor/lines/optionsLineComponent" {
2501
2652
  import * as React from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/node-geometry-editor",
3
- "version": "7.34.1",
3
+ "version": "7.34.3",
4
4
  "main": "dist/babylon.nodeGeometryEditor.max.js",
5
5
  "module": "dist/babylon.nodeGeometryEditor.max.js",
6
6
  "esnext": "dist/babylon.nodeGeometryEditor.max.js",
@@ -23,7 +23,7 @@
23
23
  "@types/react-dom": ">=16.0.9"
24
24
  },
25
25
  "devDependencies": {
26
- "@babylonjs/core": "^7.34.1",
26
+ "@babylonjs/core": "^7.34.3",
27
27
  "react": "^17.0.2",
28
28
  "react-dom": "^17.0.2"
29
29
  },