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

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.2 (2025-11-04) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0-beta.4 (2025-11-07) - 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.2 (2025-11-04) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0-beta.4 (2025-11-07) - 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.2 (2025-11-04) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0-beta.4 (2025-11-07) - 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
@@ -2433,6 +2433,7 @@ export declare namespace dia {
2433
2433
  'link:snap:disconnect': (linkView: dia.LinkView, evt: dia.Event, prevCellView: dia.CellView, prevCellViewMagnet: SVGElement, arrowhead: dia.LinkEnd) => void;
2434
2434
  // render
2435
2435
  'render:done': (stats: UpdateStats, opt: any) => void;
2436
+ 'render:idle': (opt: Paper.UpdateViewsAsyncOptions) => void;
2436
2437
  // transformations
2437
2438
  'translate': (tx: number, ty: number, data: unknown) => void;
2438
2439
  'scale': (sx: number, sy: number, data: unknown) => void;
package/dist/joint.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.0-beta.2 (2025-11-04) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0-beta.4 (2025-11-07) - 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
@@ -33005,7 +33005,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
33005
33005
  this.afterPaperReferenceSet(paper);
33006
33006
  },
33007
33007
  unsetPaperReference: function () {
33008
- this.beforePaperReferenceUnset();
33008
+ if (!this.paper) return;
33009
+ this.beforePaperReferenceUnset(this.paper);
33009
33010
  this.paper = null;
33010
33011
  },
33011
33012
  assertPaperReference() {
@@ -34128,6 +34129,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
34128
34129
  const viewLike = this._getCellViewLike(cell);
34129
34130
  if (!viewLike) return;
34130
34131
  if (viewLike[CELL_VIEW_PLACEHOLDER_MARKER]) {
34132
+ // It's a cell placeholder, it must be in the unmounted list.
34133
+ // Remove it from there and unregister.
34134
+ this._updates.unmountedList.delete(viewLike.cid);
34131
34135
  this._unregisterCellViewPlaceholder(viewLike);
34132
34136
  } else {
34133
34137
  this.requestViewUpdate(viewLike, this.FLAG_REMOVE, viewLike.UPDATE_PRIORITY, opt);
@@ -34678,7 +34682,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
34678
34682
  const type = modelType + 'View';
34679
34683
 
34680
34684
  // For backward compatibility we use the LegacyGraphLayerView for the default `cells` layer.
34681
- if (this.model.layersController.legacyMode) {
34685
+ if (this.model.legacyMode) {
34682
34686
  viewConstructor = LegacyGraphLayerView;
34683
34687
  } else {
34684
34688
  viewConstructor = this.layerViewNamespace[type] || LayerView;
@@ -34848,17 +34852,21 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
34848
34852
  },
34849
34853
  requestConnectedLinksUpdate: function (view, priority, opt) {
34850
34854
  if (!view || !view[CELL_VIEW_MARKER]) return;
34851
- var model = view.model;
34852
- var links = this.model.getConnectedLinks(model);
34853
- for (var j = 0, n = links.length; j < n; j++) {
34854
- var link = links[j];
34855
- var linkView = this._getCellViewLike(link);
34855
+ const model = view.model;
34856
+ const links = this.model.getConnectedLinks(model);
34857
+ for (let j = 0, n = links.length; j < n; j++) {
34858
+ const link = links[j];
34859
+ const linkView = this._getCellViewLike(link);
34856
34860
  if (!linkView) continue;
34857
34861
  // We do not have to update placeholder views.
34858
34862
  // They will be updated on initial render.
34859
34863
  if (linkView[CELL_VIEW_PLACEHOLDER_MARKER]) continue;
34860
- var nextPriority = Math.max(priority + 1, linkView.UPDATE_PRIORITY);
34861
- this.scheduleViewUpdate(linkView, linkView.getFlag(LinkView.Flags.UPDATE), nextPriority, opt);
34864
+ const flagLabels = [LinkView.Flags.UPDATE];
34865
+ // We need to tell the link view which end requested this update.
34866
+ if (link.getTargetCell() === model) flagLabels.push(LinkView.Flags.TARGET);
34867
+ if (link.getSourceCell() === model) flagLabels.push(LinkView.Flags.SOURCE);
34868
+ const nextPriority = Math.max(priority + 1, linkView.UPDATE_PRIORITY);
34869
+ this.scheduleViewUpdate(linkView, linkView.getFlag(flagLabels), nextPriority, opt);
34862
34870
  }
34863
34871
  },
34864
34872
  forcePostponedViewUpdate: function (view, flag) {
@@ -35402,6 +35410,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
35402
35410
  let view = views[cid] || this._viewPlaceholders[cid];
35403
35411
  if (!view) {
35404
35412
  // This should not occur
35413
+ // Prevent looping over this invalid cid
35414
+ unmountedList.popHead();
35405
35415
  continue;
35406
35416
  }
35407
35417
  if (!this._evalCellVisibility(view, false, visibilityCb)) {
@@ -39635,7 +39645,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
39635
39645
  Remove: Remove
39636
39646
  };
39637
39647
 
39638
- var version = "4.2.0-beta.2";
39648
+ var version = "4.2.0-beta.4";
39639
39649
 
39640
39650
  const Vectorizer = V;
39641
39651
  const layout$1 = {