@babylonjs/gui-editor 7.25.2 → 7.26.1

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.
@@ -1530,8 +1530,9 @@ import { IDisposable } from "@babylonjs/core/scene";
1530
1530
  * Class handling undo / redo operations
1531
1531
  */
1532
1532
  export class HistoryStack implements IDisposable {
1533
- private _history;
1533
+ private _historyStack;
1534
1534
  private _redoStack;
1535
+ private _activeData;
1535
1536
  private readonly _maxHistoryLength;
1536
1537
  private _locked;
1537
1538
  private _dataProvider;
@@ -1542,13 +1543,19 @@ export class HistoryStack implements IDisposable {
1542
1543
  * @param applyUpdate defines the code to execute when undo/redo operation is required
1543
1544
  */
1544
1545
  constructor(dataProvider: () => any, applyUpdate: (data: any) => void);
1546
+ /**
1547
+ * Process key event to handle undo / redo
1548
+ * @param evt defines the keyboard event to process
1549
+ * @returns true if the event was processed
1550
+ */
1551
+ processKeyEvent(evt: KeyboardEvent): boolean;
1545
1552
  /**
1546
1553
  * Resets the stack
1547
1554
  */
1548
1555
  reset(): void;
1549
1556
  private _generateJSONDiff;
1550
1557
  private _applyJSONDiff;
1551
- private _rebuildState;
1558
+ private _copy;
1552
1559
  /**
1553
1560
  * Stores the current state
1554
1561
  */
@@ -2067,6 +2074,8 @@ export class NodeLink {
2067
2074
  get nodeB(): GraphNode | undefined;
2068
2075
  intersectsWith(rect: DOMRect): boolean;
2069
2076
  update(endX?: number, endY?: number, straight?: boolean): void;
2077
+ get path(): SVGPathElement;
2078
+ get selectionPath(): SVGPathElement;
2070
2079
  constructor(graphCanvas: GraphCanvasComponent, portA: NodePort, nodeA: GraphNode, portB?: NodePort, nodeB?: GraphNode);
2071
2080
  onClick(evt: MouseEvent): void;
2072
2081
  dispose(notify?: boolean): void;
@@ -2147,6 +2156,7 @@ export class GraphNode {
2147
2156
  set enclosingFrameId(value: number);
2148
2157
  set isSelected(value: boolean);
2149
2158
  setIsSelected(value: boolean, marqueeSelection: boolean): void;
2159
+ get rootElement(): HTMLDivElement;
2150
2160
  constructor(content: INodeData, stateManager: StateManager);
2151
2161
  isOverlappingFrame(frame: GraphFrame): boolean;
2152
2162
  getPortForPortData(portData: IPortData): NodePort | null;
@@ -2197,6 +2207,7 @@ export class GraphFrame {
2197
2207
  private _headerTextElement;
2198
2208
  private _headerCollapseElement;
2199
2209
  private _headerCloseElement;
2210
+ private _headerFocusElement;
2200
2211
  private _commentsElement;
2201
2212
  private _portContainer;
2202
2213
  private _outputPortContainer;
@@ -2226,6 +2237,7 @@ export class GraphFrame {
2226
2237
  private readonly _closeSVG;
2227
2238
  private readonly _expandSVG;
2228
2239
  private readonly _collapseSVG;
2240
+ private readonly _focusSVG;
2229
2241
  get id(): number;
2230
2242
  get isCollapsed(): boolean;
2231
2243
  private _createInputPort;
@@ -2254,6 +2266,11 @@ export class GraphFrame {
2254
2266
  get comments(): string;
2255
2267
  set comments(comments: string);
2256
2268
  constructor(candidate: Nullable<HTMLDivElement>, canvas: GraphCanvasComponent, doNotCaptureNodes?: boolean);
2269
+ private _isFocused;
2270
+ /**
2271
+ * Enter/leave focus mode
2272
+ */
2273
+ switchFocusMode(): void;
2257
2274
  refresh(): void;
2258
2275
  addNode(node: GraphNode): void;
2259
2276
  removeNode(node: GraphNode): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/gui-editor",
3
- "version": "7.25.2",
3
+ "version": "7.26.1",
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.25.2",
28
- "@babylonjs/gui": "^7.25.2",
27
+ "@babylonjs/core": "^7.26.1",
28
+ "@babylonjs/gui": "^7.26.1",
29
29
  "react": "^17.0.2",
30
30
  "react-dom": "^17.0.2"
31
31
  },