@babylonjs/gui-editor 7.32.4 → 7.33.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1929,6 +1929,7 @@ import { IPortData } from "@babylonjs/gui-editor/nodeGraphSystem/interfaces/port
1929
1929
  import { ISelectionChangedOptions } from "@babylonjs/gui-editor/nodeGraphSystem/interfaces/selectionChangedOptions";
1930
1930
  import { NodePort } from "@babylonjs/gui-editor/nodeGraphSystem/nodePort";
1931
1931
  import { HistoryStack } from "@babylonjs/gui-editor/historyStack";
1932
+ import { Scene } from "@babylonjs/core/scene";
1932
1933
  export class StateManager {
1933
1934
  data: any;
1934
1935
  hostDocument: Document;
@@ -1943,7 +1944,7 @@ export class StateManager {
1943
1944
  onFrameCreatedObservable: Observable<GraphFrame>;
1944
1945
  onUpdateRequiredObservable: Observable<any>;
1945
1946
  onGraphNodeRemovalObservable: Observable<GraphNode>;
1946
- onSelectionBoxMoved: Observable<DOMRect | ClientRect>;
1947
+ onSelectionBoxMoved: Observable<ClientRect | DOMRect>;
1947
1948
  onCandidateLinkMoved: Observable<Nullable<Vector2>>;
1948
1949
  onCandidatePortSelectedObservable: Observable<Nullable<FrameNodePort | NodePort>>;
1949
1950
  onNewNodeCreatedObservable: Observable<GraphNode>;
@@ -1963,6 +1964,7 @@ export class StateManager {
1963
1964
  data: any;
1964
1965
  active: boolean;
1965
1966
  }>;
1967
+ onPreviewCommandActivated: Observable<boolean>;
1966
1968
  exportData: (data: any, frame?: Nullable<GraphFrame>) => string;
1967
1969
  isElbowConnectionAllowed: (nodeA: FrameNodePort | NodePort, nodeB: FrameNodePort | NodePort) => boolean;
1968
1970
  isDebugConnectionAllowed: (nodeA: FrameNodePort | NodePort, nodeB: FrameNodePort | NodePort) => boolean;
@@ -1971,6 +1973,7 @@ export class StateManager {
1971
1973
  getEditorDataMap: () => {
1972
1974
  [key: number]: number;
1973
1975
  };
1976
+ getScene?: () => Scene;
1974
1977
  createDefaultInputData: (rootData: any, portData: IPortData, nodeContainer: INodeContainer) => Nullable<{
1975
1978
  data: INodeData;
1976
1979
  name: string;
@@ -2031,6 +2034,7 @@ export class NodePort {
2031
2034
  portData: IPortData;
2032
2035
  node: GraphNode;
2033
2036
  protected _element: HTMLDivElement;
2037
+ protected _portContainer: HTMLElement;
2034
2038
  protected _img: HTMLImageElement;
2035
2039
  protected _pip: HTMLDivElement;
2036
2040
  protected _stateManager: StateManager;
@@ -2040,6 +2044,7 @@ export class NodePort {
2040
2044
  protected _exposedOnFrame: boolean;
2041
2045
  delegatedPort: Nullable<FrameNodePort>;
2042
2046
  get element(): HTMLDivElement;
2047
+ get container(): HTMLElement;
2043
2048
  get portName(): string;
2044
2049
  set portName(newName: string);
2045
2050
  get disabled(): boolean;
@@ -2115,8 +2120,11 @@ export class GraphNode {
2115
2120
  private _headerContainer;
2116
2121
  private _headerIcon;
2117
2122
  private _headerIconImg;
2123
+ private _headerCollapseImg;
2118
2124
  private _header;
2125
+ private _headerCollapse;
2119
2126
  private _connections;
2127
+ private _optionsContainer;
2120
2128
  private _inputsContainer;
2121
2129
  private _outputsContainer;
2122
2130
  private _content;
@@ -2143,8 +2151,10 @@ export class GraphNode {
2143
2151
  private _displayManager;
2144
2152
  private _isVisible;
2145
2153
  private _enclosingFrameId;
2154
+ private _visualPropertiesRefresh;
2146
2155
  addClassToVisual(className: string): void;
2147
2156
  removeClassFromVisual(className: string): void;
2157
+ get isCollapsed(): boolean;
2148
2158
  get isVisible(): boolean;
2149
2159
  set isVisible(value: boolean);
2150
2160
  private _upateNodePortNames;
@@ -2181,6 +2191,16 @@ export class GraphNode {
2181
2191
  private _onUp;
2182
2192
  private _onMove;
2183
2193
  renderProperties(): Nullable<JSX.Element>;
2194
+ private _forceRebuild;
2195
+ private _isCollapsed;
2196
+ /**
2197
+ * Collapse the node
2198
+ */
2199
+ collapse(): void;
2200
+ /**
2201
+ * Expand the node
2202
+ */
2203
+ expand(): void;
2184
2204
  appendVisual(root: HTMLDivElement, owner: GraphCanvasComponent): void;
2185
2205
  dispose(): void;
2186
2206
  }
@@ -2507,6 +2527,19 @@ export class DisplayLedger {
2507
2527
  };
2508
2528
  }
2509
2529
 
2530
+ }
2531
+ declare module "@babylonjs/gui-editor/nodeGraphSystem/automaticProperties" {
2532
+ import { IEditablePropertyOption } from "@babylonjs/core/Decorators/nodeDecorator";
2533
+ import { StateManager } from "@babylonjs/gui-editor/nodeGraphSystem/stateManager";
2534
+ /**
2535
+ * Function used to force a rebuild of the node system
2536
+ * @param source source object
2537
+ * @param stateManager defines the state manager to use
2538
+ * @param propertyName name of the property that has been changed
2539
+ * @param notifiers list of notifiers to use
2540
+ */
2541
+ export function ForceRebuild(source: any, stateManager: StateManager, propertyName: string, notifiers?: IEditablePropertyOption["notifiers"]): void;
2542
+
2510
2543
  }
2511
2544
  declare module "@babylonjs/gui-editor/nodeGraphSystem/types/framePortData" {
2512
2545
  import { GraphFrame } from "@babylonjs/gui-editor/nodeGraphSystem/graphFrame";
@@ -2576,6 +2609,7 @@ export interface INodeLocationInfo {
2576
2609
  blockId: number;
2577
2610
  x: number;
2578
2611
  y: number;
2612
+ isCollapsed: boolean;
2579
2613
  }
2580
2614
  export interface IFrameData {
2581
2615
  x: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/gui-editor",
3
- "version": "7.32.4",
3
+ "version": "7.33.0",
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.32.4",
28
- "@babylonjs/gui": "^7.32.4",
27
+ "@babylonjs/core": "^7.33.0",
28
+ "@babylonjs/gui": "^7.33.0",
29
29
  "react": "^17.0.2",
30
30
  "react-dom": "^17.0.2"
31
31
  },