babylonjs-gui-editor 7.35.2 → 7.37.0

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.
@@ -2085,6 +2085,7 @@ import { NodeLink } from "babylonjs-gui-editor/nodeGraphSystem/nodeLink";
2085
2085
  import { FramePortData } from "babylonjs-gui-editor/nodeGraphSystem/types/framePortData";
2086
2086
  export const IsFramePortData: (variableToCheck: any) => variableToCheck is FramePortData;
2087
2087
  export const RefreshNode: (node: GraphNode, visitedNodes?: Set<GraphNode>, visitedLinks?: Set<NodeLink>, canvas?: GraphCanvasComponent) => void;
2088
+ export const BuildFloatUI: (container: HTMLDivElement, document: Document, displayName: string, isInteger: boolean, source: any, propertyName: string, onChange: () => void, min?: number, max?: number, visualPropertiesRefresh?: Array<() => void>) => void;
2088
2089
 
2089
2090
  }
2090
2091
  declare module "babylonjs-gui-editor/nodeGraphSystem/stateManager" {
@@ -2200,7 +2201,7 @@ import { StateManager } from "babylonjs-gui-editor/nodeGraphSystem/stateManager"
2200
2201
  import { ISelectionChangedOptions } from "babylonjs-gui-editor/nodeGraphSystem/interfaces/selectionChangedOptions";
2201
2202
  import { FrameNodePort } from "babylonjs-gui-editor/nodeGraphSystem/frameNodePort";
2202
2203
  import { IDisplayManager } from "babylonjs-gui-editor/nodeGraphSystem/interfaces/displayManager";
2203
- import { IPortData } from "babylonjs-gui-editor/nodeGraphSystem/interfaces/portData";
2204
+ import { type IPortData } from "babylonjs-gui-editor/nodeGraphSystem/interfaces/portData";
2204
2205
  export class NodePort {
2205
2206
  portData: IPortData;
2206
2207
  node: GraphNode;
@@ -2213,6 +2214,7 @@ export class NodePort {
2213
2214
  protected _onCandidateLinkMovedObserver: Nullable<Observer<Nullable<Vector2>>>;
2214
2215
  protected _onSelectionChangedObserver: Nullable<Observer<Nullable<ISelectionChangedOptions>>>;
2215
2216
  protected _exposedOnFrame: boolean;
2217
+ protected _portUIcontainer?: HTMLDivElement;
2216
2218
  delegatedPort: Nullable<FrameNodePort>;
2217
2219
  get element(): HTMLDivElement;
2218
2220
  get container(): HTMLElement;
@@ -2226,7 +2228,7 @@ export class NodePort {
2226
2228
  set exposedPortPosition(value: number);
2227
2229
  private _isConnectedToNodeOutsideOfFrame;
2228
2230
  refresh(): void;
2229
- constructor(portContainer: HTMLElement, portData: IPortData, node: GraphNode, stateManager: StateManager);
2231
+ constructor(portContainer: HTMLElement, portData: IPortData, node: GraphNode, stateManager: StateManager, portUIcontainer?: HTMLDivElement);
2230
2232
  dispose(): void;
2231
2233
  static CreatePortElement(portData: IPortData, node: GraphNode, root: HTMLElement, displayManager: Nullable<IDisplayManager>, stateManager: StateManager): NodePort;
2232
2234
  }
@@ -2285,6 +2287,7 @@ import { NodeLink } from "babylonjs-gui-editor/nodeGraphSystem/nodeLink";
2285
2287
  import { StateManager } from "babylonjs-gui-editor/nodeGraphSystem/stateManager";
2286
2288
  import { INodeData } from "babylonjs-gui-editor/nodeGraphSystem/interfaces/nodeData";
2287
2289
  import { IPortData } from "babylonjs-gui-editor/nodeGraphSystem/interfaces/portData";
2290
+ import { IEditablePropertyOption } from "babylonjs/Decorators/nodeDecorator";
2288
2291
  export class GraphNode {
2289
2292
  content: INodeData;
2290
2293
  private _visual;
@@ -2362,7 +2365,7 @@ export class GraphNode {
2362
2365
  private _onUp;
2363
2366
  private _onMove;
2364
2367
  renderProperties(): Nullable<JSX.Element>;
2365
- private _forceRebuild;
2368
+ _forceRebuild(source: any, propertyName: string, notifiers?: IEditablePropertyOption["notifiers"]): void;
2366
2369
  private _isCollapsed;
2367
2370
  /**
2368
2371
  * Collapse the node
@@ -2753,6 +2756,32 @@ export enum PortDataDirection {
2753
2756
  /** Output */
2754
2757
  Output = 1
2755
2758
  }
2759
+ export enum PortDirectValueTypes {
2760
+ Float = 0,
2761
+ Int = 1
2762
+ }
2763
+ export interface IPortDirectValueDefinition {
2764
+ /**
2765
+ * Gets the source object
2766
+ */
2767
+ source: any;
2768
+ /**
2769
+ * Gets the property name used to store the value
2770
+ */
2771
+ propertyName: string;
2772
+ /**
2773
+ * Gets or sets the min value accepted for this point if nothing is connected
2774
+ */
2775
+ valueMin: Nullable<any>;
2776
+ /**
2777
+ * Gets or sets the max value accepted for this point if nothing is connected
2778
+ */
2779
+ valueMax: Nullable<any>;
2780
+ /**
2781
+ * Gets or sets the type of the value
2782
+ */
2783
+ valueType: PortDirectValueTypes;
2784
+ }
2756
2785
  export interface IPortData {
2757
2786
  data: any;
2758
2787
  name: string;
@@ -2766,6 +2795,7 @@ export interface IPortData {
2766
2795
  needDualDirectionValidation: boolean;
2767
2796
  hasEndpoints: boolean;
2768
2797
  endpoints: Nullable<IPortData[]>;
2798
+ directValueDefinition?: IPortDirectValueDefinition;
2769
2799
  updateDisplayName: (newName: string) => void;
2770
2800
  canConnectTo: (port: IPortData) => boolean;
2771
2801
  connectTo: (port: IPortData) => void;
@@ -6705,6 +6735,7 @@ declare module BABYLON {
6705
6735
  declare module BABYLON.GuiEditor.SharedUIComponents {
6706
6736
  export const IsFramePortData: (variableToCheck: any) => variableToCheck is BABYLON.GuiEditor.SharedUIComponents.FramePortData;
6707
6737
  export const RefreshNode: (node: BABYLON.GuiEditor.SharedUIComponents.GraphNode, visitedNodes?: Set<BABYLON.GuiEditor.SharedUIComponents.GraphNode>, visitedLinks?: Set<BABYLON.GuiEditor.SharedUIComponents.NodeLink>, canvas?: BABYLON.GuiEditor.SharedUIComponents.GraphCanvasComponent) => void;
6738
+ export const BuildFloatUI: (container: HTMLDivElement, document: Document, displayName: string, isInteger: boolean, source: any, propertyName: string, onChange: () => void, min?: number, max?: number, visualPropertiesRefresh?: Array<() => void>) => void;
6708
6739
 
6709
6740
 
6710
6741
 
@@ -6819,7 +6850,7 @@ declare module BABYLON {
6819
6850
  }
6820
6851
  declare module BABYLON.GuiEditor.SharedUIComponents {
6821
6852
  export class NodePort {
6822
- portData: BABYLON.GuiEditor.SharedUIComponents.IPortData;
6853
+ portData: IPortData;
6823
6854
  node: BABYLON.GuiEditor.SharedUIComponents.GraphNode;
6824
6855
  protected _element: HTMLDivElement;
6825
6856
  protected _portContainer: HTMLElement;
@@ -6830,6 +6861,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
6830
6861
  protected _onCandidateLinkMovedObserver: Nullable<Observer<Nullable<Vector2>>>;
6831
6862
  protected _onSelectionChangedObserver: Nullable<Observer<Nullable<BABYLON.GuiEditor.SharedUIComponents.ISelectionChangedOptions>>>;
6832
6863
  protected _exposedOnFrame: boolean;
6864
+ protected _portUIcontainer?: HTMLDivElement;
6833
6865
  delegatedPort: Nullable<BABYLON.GuiEditor.SharedUIComponents.FrameNodePort>;
6834
6866
  get element(): HTMLDivElement;
6835
6867
  get container(): HTMLElement;
@@ -6843,9 +6875,9 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
6843
6875
  set exposedPortPosition(value: number);
6844
6876
  private _isConnectedToNodeOutsideOfFrame;
6845
6877
  refresh(): void;
6846
- constructor(portContainer: HTMLElement, portData: BABYLON.GuiEditor.SharedUIComponents.IPortData, node: BABYLON.GuiEditor.SharedUIComponents.GraphNode, stateManager: BABYLON.GuiEditor.SharedUIComponents.StateManager);
6878
+ constructor(portContainer: HTMLElement, portData: IPortData, node: BABYLON.GuiEditor.SharedUIComponents.GraphNode, stateManager: BABYLON.GuiEditor.SharedUIComponents.StateManager, portUIcontainer?: HTMLDivElement);
6847
6879
  dispose(): void;
6848
- static CreatePortElement(portData: BABYLON.GuiEditor.SharedUIComponents.IPortData, node: BABYLON.GuiEditor.SharedUIComponents.GraphNode, root: HTMLElement, displayManager: Nullable<BABYLON.GuiEditor.SharedUIComponents.IDisplayManager>, stateManager: BABYLON.GuiEditor.SharedUIComponents.StateManager): NodePort;
6880
+ static CreatePortElement(portData: IPortData, node: BABYLON.GuiEditor.SharedUIComponents.GraphNode, root: HTMLElement, displayManager: Nullable<BABYLON.GuiEditor.SharedUIComponents.IDisplayManager>, stateManager: BABYLON.GuiEditor.SharedUIComponents.StateManager): NodePort;
6849
6881
  }
6850
6882
 
6851
6883
 
@@ -6984,7 +7016,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
6984
7016
  private _onUp;
6985
7017
  private _onMove;
6986
7018
  renderProperties(): Nullable<JSX.Element>;
6987
- private _forceRebuild;
7019
+ _forceRebuild(source: any, propertyName: string, notifiers?: IEditablePropertyOption["notifiers"]): void;
6988
7020
  private _isCollapsed;
6989
7021
  /**
6990
7022
  * Collapse the node
@@ -7389,6 +7421,32 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
7389
7421
  /** Output */
7390
7422
  Output = 1
7391
7423
  }
7424
+ export enum PortDirectValueTypes {
7425
+ Float = 0,
7426
+ Int = 1
7427
+ }
7428
+ export interface IPortDirectValueDefinition {
7429
+ /**
7430
+ * Gets the source object
7431
+ */
7432
+ source: any;
7433
+ /**
7434
+ * Gets the property name used to store the value
7435
+ */
7436
+ propertyName: string;
7437
+ /**
7438
+ * Gets or sets the min value accepted for this point if nothing is connected
7439
+ */
7440
+ valueMin: Nullable<any>;
7441
+ /**
7442
+ * Gets or sets the max value accepted for this point if nothing is connected
7443
+ */
7444
+ valueMax: Nullable<any>;
7445
+ /**
7446
+ * Gets or sets the type of the value
7447
+ */
7448
+ valueType: PortDirectValueTypes;
7449
+ }
7392
7450
  export interface IPortData {
7393
7451
  data: any;
7394
7452
  name: string;
@@ -7402,6 +7460,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
7402
7460
  needDualDirectionValidation: boolean;
7403
7461
  hasEndpoints: boolean;
7404
7462
  endpoints: Nullable<IPortData[]>;
7463
+ directValueDefinition?: IPortDirectValueDefinition;
7405
7464
  updateDisplayName: (newName: string) => void;
7406
7465
  canConnectTo: (port: IPortData) => boolean;
7407
7466
  connectTo: (port: IPortData) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui-editor",
3
- "version": "7.35.2",
3
+ "version": "7.37.0",
4
4
  "main": "babylon.guiEditor.max.js",
5
5
  "types": "babylon.guiEditor.module.d.ts",
6
6
  "files": [
@@ -14,8 +14,8 @@
14
14
  "clean": "rimraf dist && rimraf babylon*.* -g"
15
15
  },
16
16
  "dependencies": {
17
- "babylonjs": "^7.35.2",
18
- "babylonjs-gui": "^7.35.2"
17
+ "babylonjs": "^7.37.0",
18
+ "babylonjs-gui": "^7.37.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@dev/build-tools": "1.0.0",
@@ -23,7 +23,7 @@
23
23
  "@tools/gui-editor": "1.0.0",
24
24
  "@types/react": "^17.0.30",
25
25
  "@types/react-dom": "^17.0.10",
26
- "css-loader": "^6.4.0",
26
+ "css-loader": "^7.1.0",
27
27
  "react": "^17.0.2",
28
28
  "react-contextmenu": "RaananW/react-contextmenu",
29
29
  "react-dom": "^17.0.2",