@joint/core 4.2.0-beta.1 → 4.2.0-beta.2

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.
package/dist/geometry.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.0-beta.1 (2025-11-03) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0-beta.2 (2025-11-04) - JavaScript diagramming library
2
2
 
3
3
  This Source Code Form is subject to the terms of the Mozilla Public
4
4
  License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.0-beta.1 (2025-11-03) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0-beta.2 (2025-11-04) - JavaScript diagramming library
2
2
 
3
3
  This Source Code Form is subject to the terms of the Mozilla Public
4
4
  License, v. 2.0. If a copy of the MPL was not distributed with this
package/dist/joint.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.0-beta.1 (2025-11-03) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0-beta.2 (2025-11-04) - JavaScript diagramming library
2
2
 
3
3
  This Source Code Form is subject to the terms of the Mozilla Public
4
4
  License, v. 2.0. If a copy of the MPL was not distributed with this
package/dist/joint.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.0-beta.1 (2025-11-03) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0-beta.2 (2025-11-04) - JavaScript diagramming library
2
2
 
3
3
  This Source Code Form is subject to the terms of the Mozilla Public
4
4
  License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21763,7 +21763,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
21763
21763
  },
21764
21764
  // Define how to uniquely identify models in the collection.
21765
21765
  modelId: function (attrs, idAttribute) {
21766
- return attrs[idAttribute || this.model.prototype?.idAttribute || 'id'];
21766
+ var _this$model$prototype;
21767
+ return attrs[idAttribute || ((_this$model$prototype = this.model.prototype) === null || _this$model$prototype === void 0 ? void 0 : _this$model$prototype.idAttribute) || 'id'];
21767
21768
  },
21768
21769
  // Get an iterator of all models in this collection.
21769
21770
  values: function () {
@@ -26846,10 +26847,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
26846
26847
  this.graph.trigger.apply(this.graph, arguments);
26847
26848
  }
26848
26849
  forwardCellEvent(eventName, cell) {
26850
+ var _arguments$;
26849
26851
  // Moving a cell from one layer to another is an internal operation
26850
26852
  // that should not be exposed at the graph level.
26851
26853
  // The single `move` event is triggered instead.
26852
- if ((eventName === 'remove' || eventName === 'add') && arguments[3]?.fromLayer) return;
26854
+ if ((eventName === 'remove' || eventName === 'add') && (_arguments$ = arguments[3]) !== null && _arguments$ !== void 0 && _arguments$.fromLayer) return;
26853
26855
  this.graph.trigger.apply(this.graph, arguments);
26854
26856
  }
26855
26857
  forwardCellCollectionEvent(eventName) {
@@ -26990,10 +26992,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
26990
26992
  return this.models;
26991
26993
  }
26992
26994
  minZIndex() {
26993
- return this.first()?.get('z') || 0;
26995
+ var _this$first;
26996
+ return ((_this$first = this.first()) === null || _this$first === void 0 ? void 0 : _this$first.get('z')) || 0;
26994
26997
  }
26995
26998
  maxZIndex() {
26996
- return this.last()?.get('z') || 0;
26999
+ var _this$last;
27000
+ return ((_this$last = this.last()) === null || _this$last === void 0 ? void 0 : _this$last.get('z')) || 0;
26997
27001
  }
26998
27002
  }
26999
27003
 
@@ -27271,7 +27275,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
27271
27275
  * @description Removes a cell from its current layer.
27272
27276
  */
27273
27277
  removeCell(cell, options = {}) {
27274
- const cellCollection = cell.collection?.layer?.cellCollection;
27278
+ var _cell$collection;
27279
+ const cellCollection = (_cell$collection = cell.collection) === null || _cell$collection === void 0 || (_cell$collection = _cell$collection.layer) === null || _cell$collection === void 0 ? void 0 : _cell$collection.cellCollection;
27275
27280
  if (!cellCollection) return;
27276
27281
  cellCollection.remove(cell, options);
27277
27282
  },
@@ -27280,7 +27285,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
27280
27285
  * @description Move a cell from its current layer to a target layer.
27281
27286
  */
27282
27287
  moveCellBetweenLayers(cell, targetLayerId, options = {}) {
27283
- const sourceLayer = cell.collection?.layer;
27288
+ var _cell$collection2;
27289
+ const sourceLayer = (_cell$collection2 = cell.collection) === null || _cell$collection2 === void 0 ? void 0 : _cell$collection2.layer;
27284
27290
  if (!sourceLayer) {
27285
27291
  throw new Error('dia.GraphLayerCollection: cannot move a cell that is not part of any layer.');
27286
27292
  }
@@ -28047,6 +28053,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
28047
28053
  // If index is negative, move to the beginning.
28048
28054
  computedBefore = layersArray[0].id;
28049
28055
  } else {
28056
+ var _layersArray$index;
28050
28057
  const originalIndex = layersArray.indexOf(layer);
28051
28058
  if (originalIndex !== -1 && index > originalIndex) {
28052
28059
  // If moving a layer upwards in the stack, we need to adjust the index
@@ -28054,7 +28061,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
28054
28061
  index += 1;
28055
28062
  }
28056
28063
  // Otherwise, get the layer ID at the specified index.
28057
- computedBefore = layersArray[index]?.id || null;
28064
+ computedBefore = ((_layersArray$index = layersArray[index]) === null || _layersArray$index === void 0 ? void 0 : _layersArray$index.id) || null;
28058
28065
  }
28059
28066
  } else {
28060
28067
  computedBefore = before;
@@ -39628,7 +39635,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
39628
39635
  Remove: Remove
39629
39636
  };
39630
39637
 
39631
- var version = "4.2.0-beta.1";
39638
+ var version = "4.2.0-beta.2";
39632
39639
 
39633
39640
  const Vectorizer = V;
39634
39641
  const layout$1 = {