@joint/core 4.2.2 → 4.2.3

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/README.md CHANGED
@@ -65,7 +65,7 @@ Make sure you have the following dependencies installed on your system:
65
65
 
66
66
  The installation requires Node version >= 20.19.3, to avoid syntax errors during installation.
67
67
 
68
- Make sure that you are using Yarn version >= 2.0.0, so that you have access to [Yarn workspace ranges](https://yarnpkg.com/features/workspaces#workspace-ranges-workspace) functionality. If you are using [Volta](https://volta.sh/), it will automatically read this restriction from `package.json`.
68
+ Make sure that you are using Yarn version >= 2.0.0, so that you have access to [Yarn workspace ranges](https://yarnpkg.com/features/workspaces#workspace-ranges-workspace) functionality. If you are using [Volta](https://volta.sh/), it will automatically read this restriction from `package.json`.
69
69
 
70
70
  ### Setup
71
71
 
@@ -159,4 +159,4 @@ The output for all unit tests will be saved in the `packages/joint-core/coverage
159
159
 
160
160
  The *JointJS* library is licensed under the [Mozilla Public License 2.0](https://github.com/clientIO/joint/blob/master/LICENSE).
161
161
 
162
- Copyright © 2013-2025 client IO
162
+ Copyright © 2013-2026 client IO
package/dist/geometry.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.2 (2025-12-16) - JavaScript diagramming library
1
+ /*! JointJS v4.2.3 (2026-01-21) - 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.2 (2025-12-16) - JavaScript diagramming library
1
+ /*! JointJS v4.2.3 (2026-01-21) - 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.2 (2025-12-16) - JavaScript diagramming library
1
+ /*! JointJS v4.2.3 (2026-01-21) - 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
@@ -2271,8 +2271,8 @@ export declare namespace dia {
2271
2271
  moveThreshold?: number;
2272
2272
  magnetThreshold?: number | string;
2273
2273
  // views
2274
- elementView?: typeof ElementView | ((element: Element) => typeof ElementView);
2275
- linkView?: typeof LinkView | ((link: Link) => typeof LinkView);
2274
+ elementView?: typeof ElementView<any> | ((element: Element) => typeof ElementView<any> | null | undefined);
2275
+ linkView?: typeof LinkView<any> | ((link: Link) => typeof LinkView<any> | null | undefined);
2276
2276
  measureNode?: MeasureNodeCallback;
2277
2277
  // embedding
2278
2278
  embeddingMode?: boolean;
@@ -5862,6 +5862,7 @@ export declare namespace util {
5862
5862
 
5863
5863
  export function toArray(value: any): any[];
5864
5864
 
5865
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
5865
5866
  export function debounce<T extends Function>(func: T, wait?: number, options?: { leading?: boolean, maxWait?: number, trailing?: boolean }): T & Cancelable;
5866
5867
 
5867
5868
  export function groupBy(collection: Collection, iteratee?: IterateeFunction<any>): object;
package/dist/joint.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.2 (2025-12-16) - JavaScript diagramming library
1
+ /*! JointJS v4.2.3 (2026-01-21) - 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
@@ -7208,7 +7208,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
7208
7208
  };
7209
7209
  const initCloneArray = array => {
7210
7210
  const length = array.length;
7211
- let result = new array.constructor(length);
7211
+ const result = new array.constructor(length);
7212
7212
  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
7213
7213
  result.index = array.index;
7214
7214
  result.input = array.input;
@@ -7386,13 +7386,13 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
7386
7386
  return baseIsEqualDeep(value, other, baseIsEqual, stack);
7387
7387
  };
7388
7388
  const baseIsEqualDeep = (object, other, equalFunc, stack) => {
7389
- let objIsArr = Array.isArray(object);
7389
+ const objIsArr = Array.isArray(object);
7390
7390
  const othIsArr = Array.isArray(other);
7391
7391
  let objTag = objIsArr ? arrayTag : getTag(object);
7392
7392
  let othTag = othIsArr ? arrayTag : getTag(other);
7393
7393
  objTag = objTag == argsTag ? objectTag : objTag;
7394
7394
  othTag = othTag == argsTag ? objectTag : othTag;
7395
- let objIsObj = objTag == objectTag;
7395
+ const objIsObj = objTag == objectTag;
7396
7396
  const othIsObj = othTag == objectTag;
7397
7397
  const isSameTag = objTag == othTag;
7398
7398
  if (isSameTag && !objIsObj) {
@@ -7527,7 +7527,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
7527
7527
  };
7528
7528
  const mapToArray = map => {
7529
7529
  let index = -1;
7530
- let result = Array(map.size);
7530
+ const result = Array(map.size);
7531
7531
  map.forEach((value, key) => {
7532
7532
  result[++index] = [key, value];
7533
7533
  });
@@ -7637,7 +7637,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
7637
7637
  isCommon = false;
7638
7638
  values = new SetCache(values);
7639
7639
  }
7640
- outer: for (let key in array) {
7640
+ outer: for (const key in array) {
7641
7641
  let value = array[key];
7642
7642
  const computed = value;
7643
7643
  value = value !== 0 ? value : 0;
@@ -9051,7 +9051,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
9051
9051
  // User data storage
9052
9052
  $.data = dataUser;
9053
9053
  $.merge = function (first, second) {
9054
- let len = +second.length;
9054
+ const len = +second.length;
9055
9055
  let i = first.length;
9056
9056
  for (let j = 0; j < len; j++) {
9057
9057
  first[i++] = second[j];
@@ -9219,7 +9219,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
9219
9219
  data = data || selector;
9220
9220
  selector = undefined;
9221
9221
  }
9222
- for (let type in types) {
9222
+ for (const type in types) {
9223
9223
  $.event.on(elem, type, selector, data, types[type], one);
9224
9224
  }
9225
9225
  return elem;
@@ -12068,7 +12068,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
12068
12068
  } else {
12069
12069
  styles = name;
12070
12070
  }
12071
- for (let style in styles) {
12071
+ for (const style in styles) {
12072
12072
  if (styles.hasOwnProperty(style)) {
12073
12073
  for (let i = 0; i < this.length; i++) {
12074
12074
  setCSSProperty(this[i], style, styles[style]);
@@ -12174,7 +12174,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
12174
12174
  }
12175
12175
  if (typeof types === 'object') {
12176
12176
  // ( types-object [, selector] )
12177
- for (let type in types) {
12177
+ for (const type in types) {
12178
12178
  this.off(type, selector, types[type]);
12179
12179
  }
12180
12180
  return this;
@@ -12218,7 +12218,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
12218
12218
  function position() {
12219
12219
  const [el] = this;
12220
12220
  if (!el) return;
12221
- let $el = $(el);
12221
+ const $el = $(el);
12222
12222
  let offsetParent;
12223
12223
  let offset;
12224
12224
  let doc;
@@ -12337,8 +12337,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
12337
12337
  function animateNode(el, properties, opt = {}) {
12338
12338
  let {
12339
12339
  duration = 400,
12340
+ delay = 0
12341
+ } = opt;
12342
+ const {
12340
12343
  easing = 'ease-in-out',
12341
- delay = 0,
12342
12344
  complete
12343
12345
  } = opt;
12344
12346
  const delayId = setTimeout(function () {
@@ -12474,7 +12476,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
12474
12476
  } else {
12475
12477
  attributes = name;
12476
12478
  }
12477
- for (let attr in attributes) {
12479
+ for (const attr in attributes) {
12478
12480
  if (attributes.hasOwnProperty(attr)) {
12479
12481
  const value = attributes[attr];
12480
12482
  if (propertiesMap[attr]) {
@@ -12628,11 +12630,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
12628
12630
  // TagName
12629
12631
  if (!nodeDef.hasOwnProperty('tagName')) throw new Error('json-dom-parser: missing tagName');
12630
12632
  const tagName = nodeDef.tagName;
12631
- let node;
12632
12633
 
12633
12634
  // Namespace URI
12634
12635
  const ns = nodeDef.hasOwnProperty('namespaceURI') ? nodeDef.namespaceURI : parentNS;
12635
- node = document.createElementNS(ns, tagName);
12636
+ const node = document.createElementNS(ns, tagName);
12636
12637
  const svg = ns === svgNamespace;
12637
12638
  const wrapperNode = svg ? V(node) : $(node);
12638
12639
  // Attributes
@@ -12813,7 +12814,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
12813
12814
  // If the event is a touch event, normalize it to a mouse event.
12814
12815
  const touch = originalEvent && originalEvent.changedTouches && originalEvent.changedTouches[0];
12815
12816
  if (touch) {
12816
- for (let property in touch) {
12817
+ for (const property in touch) {
12817
12818
  // copy all the properties from the first touch that are not
12818
12819
  // defined on TouchEvent (clientX, clientY, pageX, pageY, screenX, screenY, identifier, ...)
12819
12820
  if (evt[property] === undefined) {
@@ -14980,7 +14981,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
14980
14981
  let value = expression;
14981
14982
  let startSearchIndex = 0;
14982
14983
  do {
14983
- let calcIndex = value.indexOf(calcStart, startSearchIndex);
14984
+ const calcIndex = value.indexOf(calcStart, startSearchIndex);
14984
14985
  if (calcIndex === -1) return value;
14985
14986
  let calcEndIndex = calcIndex + calcStartOffset;
14986
14987
  let brackets = 1;
@@ -15643,7 +15644,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
15643
15644
  return finalAttributes;
15644
15645
  }
15645
15646
  let defaultAttributes = {};
15646
- let attributes = cloneDeep(this.attributes);
15647
+ const attributes = cloneDeep(this.attributes);
15647
15648
  if (ignoreDefaults === true) {
15648
15649
  // Compare all attributes with the defaults
15649
15650
  defaultAttributes = defaults;
@@ -16198,8 +16199,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
16198
16199
  const {
16199
16200
  _scheduledTransitionIds
16200
16201
  } = this;
16201
- let initialId;
16202
- var initiator = callback => {
16202
+ const initiator = callback => {
16203
16203
  if (_scheduledTransitionIds[transitionKey]) {
16204
16204
  _scheduledTransitionIds[transitionKey] = without(_scheduledTransitionIds[transitionKey], initialId);
16205
16205
  if (_scheduledTransitionIds[transitionKey].length === 0) {
@@ -16211,7 +16211,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
16211
16211
  this._transitionIds[transitionKey] = nextFrame(callback);
16212
16212
  this.trigger('transition:start', this, transitionKey);
16213
16213
  };
16214
- initialId = setTimeout(initiator, opt.delay, setter);
16214
+ const initialId = setTimeout(initiator, opt.delay, setter);
16215
16215
  _scheduledTransitionIds[transitionKey] || (_scheduledTransitionIds[transitionKey] = []);
16216
16216
  _scheduledTransitionIds[transitionKey].push(initialId);
16217
16217
  return initialId;
@@ -16386,11 +16386,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
16386
16386
  }, protoProps);
16387
16387
  var Cell = this.extend(protoProps, staticProps);
16388
16388
  // es5 backward compatibility
16389
- /* eslint-disable no-undef */
16389
+ // eslint-disable-next-line no-undef
16390
16390
  if (typeof joint !== 'undefined' && has(joint, 'shapes')) {
16391
+ // eslint-disable-next-line no-undef
16391
16392
  setByPath(joint.shapes, type, Cell, '.');
16392
16393
  }
16393
- /* eslint-enable no-undef */
16394
16394
  return Cell;
16395
16395
  }
16396
16396
  });
@@ -16739,7 +16739,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
16739
16739
  });
16740
16740
  }
16741
16741
  function argTransform(bbox, args) {
16742
- let {
16742
+ const {
16743
16743
  x,
16744
16744
  y,
16745
16745
  angle
@@ -17203,7 +17203,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
17203
17203
  } else {
17204
17204
  groupPortTransformations = this._getGroupPortTransformations(group, portsArgs, elBBox);
17205
17205
  }
17206
- let accumulator = {
17206
+ const accumulator = {
17207
17207
  ports: ports,
17208
17208
  result: {}
17209
17209
  };
@@ -17361,7 +17361,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
17361
17361
  evaluated.position = this._evaluatePortPositionProperty(group, evaluated);
17362
17362
  evaluated.label = this._evaluatePortLabelProperty(group, evaluated);
17363
17363
  evaluated.z = this._evaluatePortZProperty(group, evaluated);
17364
- evaluated.size = assign({}, group.size, evaluated.size);
17364
+ evaluated.size = assign({
17365
+ width: 0,
17366
+ height: 0
17367
+ }, group.size, evaluated.size);
17365
17368
  return evaluated;
17366
17369
  },
17367
17370
  _evaluatePortPositionProperty: function (group, port) {
@@ -20955,17 +20958,15 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
20955
20958
  const v2 = tpNext.difference(points[i]).normalize();
20956
20959
  const vAngle = angleBetweenVectors(v1, v2);
20957
20960
  let rot = (Math.PI - vAngle) / 2;
20958
- let t;
20959
20961
  const vectorDeterminant = determinant(v1, v2);
20960
- let pointsDeterminant;
20961
- pointsDeterminant = determinant(points[i].difference(points[i + 1]), points[i].difference(points[i - 1]));
20962
+ const pointsDeterminant = determinant(points[i].difference(points[i + 1]), points[i].difference(points[i - 1]));
20962
20963
  if (vectorDeterminant < 0) {
20963
20964
  rot = -rot;
20964
20965
  }
20965
20966
  if (vAngle < Math.PI / 2 && (rot < 0 && pointsDeterminant < 0 || rot > 0 && pointsDeterminant > 0)) {
20966
20967
  rot = rot - Math.PI;
20967
20968
  }
20968
- t = v2.clone();
20969
+ const t = v2.clone();
20969
20970
  rotateVector(t, rot);
20970
20971
  const t1 = t.clone();
20971
20972
  const t2 = t.clone();
@@ -21463,6 +21464,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
21463
21464
  }
21464
21465
  // signature 2 - (object, event, callback, context)
21465
21466
  else if (typeof evt === 'string' && typeof args[0] === 'function') {
21467
+ // eslint-disable-next-line prefer-const
21466
21468
  let [cb, context = null] = args;
21467
21469
  // Invoke the callback with callbackArguments passed first
21468
21470
  if (context || callbackArguments.length > 0) cb = cb.bind(context, ...callbackArguments);
@@ -22289,7 +22291,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
22289
22291
  // all highlighters
22290
22292
  const views = [];
22291
22293
  if (!refs) return views;
22292
- for (let hid in refs) {
22294
+ for (const hid in refs) {
22293
22295
  const ref = refs[hid];
22294
22296
  if (ref instanceof this) {
22295
22297
  views.push(ref);
@@ -22319,7 +22321,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
22319
22321
  if (!refs) return false;
22320
22322
  if (id === null) {
22321
22323
  // any highlighter
22322
- for (let hid in refs) {
22324
+ for (const hid in refs) {
22323
22325
  if (refs[hid] instanceof this) return true;
22324
22326
  }
22325
22327
  return false;
@@ -22364,7 +22366,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
22364
22366
  const refs = _views[cid];
22365
22367
  if (!refs) return;
22366
22368
  if (id) delete refs[id];
22367
- for (let _ in refs) return;
22369
+ for (const _ in refs) return;
22368
22370
  delete _views[cid];
22369
22371
  },
22370
22372
  remove(cellView, id = null) {
@@ -22377,8 +22379,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
22377
22379
  const {
22378
22380
  _views
22379
22381
  } = this;
22380
- for (let cid in _views) {
22381
- for (let hid in _views[cid]) {
22382
+ for (const cid in _views) {
22383
+ for (const hid in _views[cid]) {
22382
22384
  const view = _views[cid][hid];
22383
22385
  if (view.cellView.paper === paper && view instanceof this && (id === null || hid === id)) {
22384
22386
  views.push(view);
@@ -22950,7 +22952,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
22950
22952
  // Connection Points
22951
22953
 
22952
22954
  function anchorConnectionPoint(line, _view, _magnet, opt) {
22953
- let {
22955
+ const {
22954
22956
  offset,
22955
22957
  alignOffset,
22956
22958
  align
@@ -25223,8 +25225,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
25223
25225
  }];
25224
25226
  }
25225
25227
  let x;
25226
- let y1 = Math.min((sy1 + ty0) / 2, toy);
25227
- let y2 = Math.min((sy0 + ty1) / 2, soy);
25228
+ const y1 = Math.min((sy1 + ty0) / 2, toy);
25229
+ const y2 = Math.min((sy0 + ty1) / 2, soy);
25228
25230
  if (toy < soy) {
25229
25231
  // Use the shortest path along the connections on horizontal sides
25230
25232
  if (rightD > leftD) {
@@ -25266,8 +25268,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
25266
25268
  }];
25267
25269
  }
25268
25270
  let x;
25269
- let y1 = Math.max((sy0 + ty1) / 2, toy);
25270
- let y2 = Math.max((sy1 + ty0) / 2, soy);
25271
+ const y1 = Math.max((sy0 + ty1) / 2, toy);
25272
+ const y2 = Math.max((sy1 + ty0) / 2, soy);
25271
25273
  if (toy > soy) {
25272
25274
  // Use the shortest path along the connections on horizontal sides
25273
25275
  if (rightD > leftD) {
@@ -25309,8 +25311,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
25309
25311
  }];
25310
25312
  }
25311
25313
  let y;
25312
- let x1 = Math.min((sx1 + tx0) / 2, tox);
25313
- let x2 = Math.min((sx0 + tx1) / 2, sox);
25314
+ const x1 = Math.min((sx1 + tx0) / 2, tox);
25315
+ const x2 = Math.min((sx0 + tx1) / 2, sox);
25314
25316
  if (tox > sox) {
25315
25317
  if (topD <= bottomD) {
25316
25318
  y = Math.min(smy0, toy);
@@ -25351,8 +25353,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
25351
25353
  }];
25352
25354
  }
25353
25355
  let y;
25354
- let x1 = Math.max((sx0 + tx1) / 2, tox);
25355
- let x2 = Math.max((sx1 + tx0) / 2, sox);
25356
+ const x1 = Math.max((sx0 + tx1) / 2, tox);
25357
+ const x2 = Math.max((sx1 + tx0) / 2, sox);
25356
25358
  if (tox <= sox) {
25357
25359
  if (topD <= bottomD) {
25358
25360
  y = Math.min(smy0, toy);
@@ -26169,7 +26171,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
26169
26171
  const sourcePoint = pointDataFromAnchor(linkView.sourceView, linkView.sourceAnchor, linkView.sourceBBox, sourceDirection, isSourcePort, linkView.sourceAnchor, margin);
26170
26172
  const isTargetPort = !!linkView.model.target().port;
26171
26173
  const targetPoint = pointDataFromAnchor(linkView.targetView, linkView.targetAnchor, linkView.targetBBox, targetDirection, isTargetPort, linkView.targetAnchor, margin);
26172
- let resultVertices = [];
26174
+ const resultVertices = [];
26173
26175
  if (!useVertices || vertices.length === 0) {
26174
26176
  return simplifyPoints(routeBetweenPoints(sourcePoint, targetPoint));
26175
26177
  }
@@ -27072,9 +27074,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
27072
27074
  if (cellNamespace) {
27073
27075
  this.cellNamespace = cellNamespace;
27074
27076
  } else {
27075
- /* eslint-disable no-undef */
27077
+ // eslint-disable-next-line no-undef
27076
27078
  this.cellNamespace = typeof joint !== 'undefined' && has(joint, 'shapes') ? joint.shapes : null;
27077
- /* eslint-enable no-undef */
27078
27079
  }
27079
27080
  this.graph = graph;
27080
27081
  },
@@ -28051,9 +28052,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
28051
28052
  */
28052
28053
  _getBeforeLayerIdFromOptions(options, layer = null) {
28053
28054
  let {
28054
- before = null,
28055
28055
  index
28056
28056
  } = options;
28057
+ const {
28058
+ before = null
28059
+ } = options;
28057
28060
  if (before && index !== undefined) {
28058
28061
  throw new Error('dia.Graph: Options "before" and "index" are mutually exclusive.');
28059
28062
  }
@@ -28965,7 +28968,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
28965
28968
  }, {});
28966
28969
  function evalAttributes(attrs, refBBox) {
28967
28970
  const evalAttrs = {};
28968
- for (let attrName in attrs) {
28971
+ for (const attrName in attrs) {
28969
28972
  if (!attrs.hasOwnProperty(attrName)) continue;
28970
28973
  evalAttrs[attrName] = evalAttribute(attrName, attrs[attrName], refBBox);
28971
28974
  }
@@ -31811,7 +31814,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
31811
31814
  } = this;
31812
31815
  const selectors = _labelSelectors[index];
31813
31816
  if (!selectors) return;
31814
- for (let selector in selectors) {
31817
+ for (const selector in selectors) {
31815
31818
  const {
31816
31819
  id
31817
31820
  } = selectors[selector];
@@ -33091,7 +33094,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
33091
33094
  el,
33092
33095
  pivotNodes
33093
33096
  } = this;
33094
- for (let z in pivotNodes) el.removeChild(pivotNodes[z]);
33097
+ for (const z in pivotNodes) el.removeChild(pivotNodes[z]);
33095
33098
  this.pivotNodes = {};
33096
33099
  },
33097
33100
  isEmpty: function () {
@@ -34064,9 +34067,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
34064
34067
  options
34065
34068
  } = this;
34066
34069
  if (!options.cellViewNamespace) {
34067
- /* eslint-disable no-undef */
34070
+ // eslint-disable-next-line no-undef
34068
34071
  options.cellViewNamespace = typeof joint !== 'undefined' && has(joint, 'shapes') ? joint.shapes : null;
34069
- /* eslint-enable no-undef */
34070
34072
  }
34071
34073
  const defaultLayerViewNamespace = {
34072
34074
  LayerView,
@@ -34130,6 +34132,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
34130
34132
  var position = opt.position;
34131
34133
  if (this.isAsync() || !isNumber(position)) {
34132
34134
  this.renderView(cell, opt);
34135
+ // Wake up the paper in case it was idle
34136
+ // When using initializeUnmounted: true the paper won't wake up by itself
34137
+ this.wakeUp();
34133
34138
  } else {
34134
34139
  if (opt.maxPosition === position) this.freeze({
34135
34140
  key: 'addCells'
@@ -34275,11 +34280,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
34275
34280
  } = options;
34276
34281
 
34277
34282
  // Default cellView namespace for ES5
34278
- /* eslint-disable no-undef */
34283
+ // eslint-disable-next-line no-undef
34279
34284
  if (!cellViewNamespace && typeof joint !== 'undefined' && has(joint, 'shapes')) {
34285
+ // eslint-disable-next-line no-undef
34280
34286
  options.cellViewNamespace = joint.shapes;
34281
34287
  }
34282
- /* eslint-enable no-undef */
34283
34288
 
34284
34289
  // Here if a function was provided, we can not clone it, as this would result in loosing the function.
34285
34290
  // If the default is used, the cloning is necessary in order to prevent modifying the options on prototype.
@@ -34507,8 +34512,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
34507
34512
  * Helper method for addLayerView and moveLayerView methods
34508
34513
  */
34509
34514
  _getBeforeLayerViewFromOptions(layerView, options) {
34515
+ const {
34516
+ before = null
34517
+ } = options;
34510
34518
  let {
34511
- before = null,
34512
34519
  index
34513
34520
  } = options;
34514
34521
  if (before && index !== undefined) {
@@ -34954,7 +34961,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
34954
34961
  delete prevPriorityUpdates[cid];
34955
34962
  }
34956
34963
  }
34957
- let currentType = priorityUpdates[cid] || 0;
34964
+ const currentType = priorityUpdates[cid] || 0;
34958
34965
  // Prevent cycling
34959
34966
  if ((currentType & type) === type) return;
34960
34967
  if (!currentType) updates.count++;
@@ -35100,7 +35107,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
35100
35107
  let i = priorityIndexes.length;
35101
35108
  while (i > 0 && i--) {
35102
35109
  // a faster way how to check if an object is empty
35103
- for (let _key in priorities[priorityIndexes[i]]) return true;
35110
+ for (const _key in priorities[priorityIndexes[i]]) return true;
35104
35111
  }
35105
35112
  return false;
35106
35113
  },
@@ -35419,10 +35426,13 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
35419
35426
  var updates = this._updates;
35420
35427
  var unmountedList = updates.unmountedList;
35421
35428
  for (var i = 0, n = Math.min(unmountedList.length, batchSize); i < n; i++) {
35429
+ // stop if there are no more unmounted views
35430
+ // this can happen when another view was mounted in the onViewUpdate() callback
35431
+ if (unmountedList.length === 0) break;
35422
35432
  const {
35423
35433
  key: cid
35424
35434
  } = unmountedList.peekHead();
35425
- let view = views[cid] || this._viewPlaceholders[cid];
35435
+ const view = views[cid] || this._viewPlaceholders[cid];
35426
35436
  if (!view) {
35427
35437
  // This should not occur
35428
35438
  // Prevent looping over this invalid cid
@@ -35657,8 +35667,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
35657
35667
  width: currentWidth,
35658
35668
  height: currentHeight
35659
35669
  } = options;
35660
- let w = width === undefined ? currentWidth : width;
35661
- let h = height === undefined ? currentHeight : height;
35670
+ const w = width === undefined ? currentWidth : width;
35671
+ const h = height === undefined ? currentHeight : height;
35662
35672
  if (currentWidth === w && currentHeight === h) return;
35663
35673
  options.width = w;
35664
35674
  options.height = h;
@@ -36532,7 +36542,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
36532
36542
 
36533
36543
  resolveHighlighter: function (opt = {}) {
36534
36544
  let {
36535
- highlighter: highlighterDef,
36545
+ highlighter: highlighterDef
36546
+ } = opt;
36547
+ const {
36536
36548
  type
36537
36549
  } = opt;
36538
36550
  const {
@@ -38281,7 +38293,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
38281
38293
  const isSingleVertex = data.originalVertices.length === 1;
38282
38294
  const origVIndex = isSingleVertex ? 0 : handleIndex;
38283
38295
  const additionalOffset = data.firstHandleShifted && !isSingleVertex ? 1 : 0;
38284
- let nextVIndex = 1 + indexOffset;
38296
+ const nextVIndex = 1 + indexOffset;
38285
38297
  vertices.splice(handleIndex + nextVIndex, 0, data.originalVertices[origVIndex - additionalOffset]);
38286
38298
  }
38287
38299
  }
@@ -38883,7 +38895,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
38883
38895
  } = this;
38884
38896
  handleNode.setAttribute('transform', this.getHandleTransformString());
38885
38897
  if (handleAttributes) {
38886
- for (let attrName in handleAttributes) {
38898
+ for (const attrName in handleAttributes) {
38887
38899
  handleNode.setAttribute(attrName, handleAttributes[attrName]);
38888
38900
  }
38889
38901
  }
@@ -39081,7 +39093,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
39081
39093
  const labelPosition = this.getLabelPosition(label);
39082
39094
  const coords = view.getLabelCoordinates(labelPosition);
39083
39095
  let {
39084
- angle = 0,
39096
+ angle = 0
39097
+ } = labelPosition;
39098
+ const {
39085
39099
  args = {}
39086
39100
  } = labelPosition;
39087
39101
  const keepGradient = args.keepGradient;
@@ -39163,15 +39177,18 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
39163
39177
  const {
39164
39178
  relatedView: view
39165
39179
  } = this;
39180
+ const toolOptions = getToolOptions(this);
39166
39181
  let {
39167
39182
  x = 0,
39168
- y = 0,
39169
- offset = {},
39183
+ y = 0
39184
+ } = toolOptions;
39185
+ const {
39170
39186
  useModelGeometry,
39187
+ offset = {},
39171
39188
  rotate,
39172
39189
  scale,
39173
39190
  relative
39174
- } = getToolOptions(this);
39191
+ } = toolOptions;
39175
39192
  let bbox = getViewBBox(view, {
39176
39193
  useModelGeometry,
39177
39194
  relative
@@ -39609,11 +39626,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
39609
39626
  const {
39610
39627
  relatedView: view
39611
39628
  } = this;
39612
- let {
39629
+ const {
39613
39630
  useModelGeometry,
39614
39631
  relative,
39615
- trackPath = 'M 0 0 H calc(w) V calc(h) H 0 Z'
39632
+ trackPath: initialTrackPath = 'M 0 0 H calc(w) V calc(h) H 0 Z'
39616
39633
  } = getToolOptions(this);
39634
+ let trackPath = initialTrackPath;
39617
39635
  if (typeof trackPath === 'function') {
39618
39636
  trackPath = trackPath.call(this, view);
39619
39637
  }
@@ -39634,7 +39652,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
39634
39652
  const {
39635
39653
  relatedView: view
39636
39654
  } = this;
39637
- let {
39655
+ const {
39638
39656
  useModelGeometry,
39639
39657
  rotate
39640
39658
  } = getToolOptions(this);
@@ -39660,7 +39678,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
39660
39678
  Remove: Remove
39661
39679
  };
39662
39680
 
39663
- var version = "4.2.2";
39681
+ var version = "4.2.3";
39664
39682
 
39665
39683
  const Vectorizer = V;
39666
39684
  const layout$1 = {