@joint/core 4.2.1 → 4.2.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.1 (2025-11-20) - JavaScript diagramming library
1
+ /*! JointJS v4.2.2 (2025-12-16) - 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.1 (2025-11-20) - JavaScript diagramming library
1
+ /*! JointJS v4.2.2 (2025-12-16) - 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.1 (2025-11-20) - JavaScript diagramming library
1
+ /*! JointJS v4.2.2 (2025-12-16) - 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
@@ -926,6 +926,7 @@ export declare namespace dia {
926
926
  constructor(attributes?: Graph.Attributes, opt?: {
927
927
  cellNamespace?: any,
928
928
  layerNamespace?: any,
929
+ ignoreLayers?: boolean,
929
930
  /** @deprecated use cellNamespace instead */
930
931
  cellModel?: typeof Cell
931
932
  });
@@ -1154,7 +1155,7 @@ export declare namespace dia {
1154
1155
  }
1155
1156
 
1156
1157
  export interface ExportOptions {
1157
- ignoreDefault?: boolean | string[];
1158
+ ignoreDefaults?: boolean | string[];
1158
1159
  ignoreEmptyAttributes?: boolean;
1159
1160
  }
1160
1161
 
package/dist/joint.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.1 (2025-11-20) - JavaScript diagramming library
1
+ /*! JointJS v4.2.2 (2025-12-16) - 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
@@ -27568,6 +27568,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
27568
27568
  * @description The ID of the default layer.
27569
27569
  */
27570
27570
  defaultLayerId: DEFAULT_LAYER_ID,
27571
+ /**
27572
+ * @protected
27573
+ * @description If `true`, layer functionality is disabled
27574
+ * and all cells are assigned to the default layer.
27575
+ */
27576
+ ignoreLayers: false,
27571
27577
  initialize: function (attrs, options = {}) {
27572
27578
  const layerCollection = this.layerCollection = new GraphLayerCollection([], {
27573
27579
  layerNamespace: options.layerNamespace,
@@ -27596,6 +27602,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
27596
27602
  graph: this
27597
27603
  });
27598
27604
 
27605
+ // Option to ignore layers altogether.
27606
+ if (options.ignoreLayers) {
27607
+ this.ignoreLayers = true;
27608
+ }
27609
+
27599
27610
  // `Graph` keeps an internal data structure (an adjacency list)
27600
27611
  // for fast graph queries. All changes that affect the structure of the graph
27601
27612
  // must be reflected in the `al` object. This object provides fast answers to
@@ -27691,7 +27702,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
27691
27702
  // Backward compatibility: prior v4.2, z-index was not set during reset.
27692
27703
  if (opt && opt.ensureZIndex) {
27693
27704
  if (cellAttributes.z === undefined) {
27694
- const layerId = cellAttributes[config$3.layerAttribute] || this.defaultLayerId;
27705
+ const layerId = this.getCellLayerId(cellInit);
27695
27706
  const zIndex = this.maxZIndex(layerId) + 1;
27696
27707
  if (cellInit[CELL_MARKER]) {
27697
27708
  // Set with event in case there is a listener
@@ -27796,6 +27807,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
27796
27807
  if (!cellInit) {
27797
27808
  throw new Error('dia.Graph: No cell provided.');
27798
27809
  }
27810
+ if (this.ignoreLayers) {
27811
+ // When layers are ignored, all cells belong to the default layer.
27812
+ return this.defaultLayerId;
27813
+ }
27799
27814
  const cellAttributes = cellInit[CELL_MARKER] ? cellInit.attributes : cellInit;
27800
27815
  return cellAttributes[config$3.layerAttribute] || this.defaultLayerId;
27801
27816
  },
@@ -39645,7 +39660,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
39645
39660
  Remove: Remove
39646
39661
  };
39647
39662
 
39648
- var version = "4.2.1";
39663
+ var version = "4.2.2";
39649
39664
 
39650
39665
  const Vectorizer = V;
39651
39666
  const layout$1 = {