dockview-angular 0.0.0-experimental-e3d91d1-20251227 → 0.0.0-experimental-4e3871a-20251228

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-angular
3
- * @version 0.0.0-experimental-e3d91d1-20251227
3
+ * @version 0.0.0-experimental-4e3871a-20251228
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -5162,7 +5162,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
5162
5162
  }
5163
5163
  }
5164
5164
 
5165
- class WillShowOverlayLocationEvent {
5165
+ class DockviewWillShowOverlayLocationEvent {
5166
5166
  get kind() {
5167
5167
  return this.options.kind;
5168
5168
  }
@@ -5510,7 +5510,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
5510
5510
  index: this._tabs.findIndex((x) => x.value === tab),
5511
5511
  });
5512
5512
  }), tab.onWillShowOverlay((event) => {
5513
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
5513
+ this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
5514
5514
  kind: 'tab',
5515
5515
  panel: this.group.activePanel,
5516
5516
  api: this.accessor.api,
@@ -5674,7 +5674,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
5674
5674
  index: this.tabs.size,
5675
5675
  });
5676
5676
  }), this.voidContainer.onWillShowOverlay((event) => {
5677
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
5677
+ this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
5678
5678
  kind: 'header_space',
5679
5679
  panel: this.group.activePanel,
5680
5680
  api: this.accessor.api,
@@ -6068,7 +6068,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6068
6068
  }), this.tabsContainer.onWillShowOverlay((event) => {
6069
6069
  this._onWillShowOverlay.fire(event);
6070
6070
  }), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
6071
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
6071
+ this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
6072
6072
  kind: 'content',
6073
6073
  panel: this.activePanel,
6074
6074
  api: this._api,
@@ -6744,7 +6744,19 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6744
6744
  this.onDidLocationChange = this._onDidLocationChange.event;
6745
6745
  this._onDidActivePanelChange = new Emitter();
6746
6746
  this.onDidActivePanelChange = this._onDidActivePanelChange.event;
6747
- this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange);
6747
+ this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange, this._onDidVisibilityChange.event((event) => {
6748
+ // When becoming visible, apply any pending size change
6749
+ if (event.isVisible && this._pendingSize) {
6750
+ super.setSize(this._pendingSize);
6751
+ this._pendingSize = undefined;
6752
+ }
6753
+ }));
6754
+ }
6755
+ setSize(event) {
6756
+ // Always store the requested size
6757
+ this._pendingSize = Object.assign({}, event);
6758
+ // Apply the size change immediately
6759
+ super.setSize(event);
6748
6760
  }
6749
6761
  close() {
6750
6762
  if (!this._group) {
@@ -7696,13 +7708,16 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
7696
7708
  let right = undefined;
7697
7709
  let width = undefined;
7698
7710
  const moveTop = () => {
7699
- top = clamp(y, -Number.MAX_VALUE, startPosition.originalY +
7711
+ // When dragging top handle, constrain top position to prevent oversizing
7712
+ const maxTop = startPosition.originalY +
7700
7713
  startPosition.originalHeight >
7701
7714
  containerRect.height
7702
- ? this.getMinimumHeight(containerRect.height)
7715
+ ? Math.max(0, containerRect.height -
7716
+ Overlay.MINIMUM_HEIGHT)
7703
7717
  : Math.max(0, startPosition.originalY +
7704
7718
  startPosition.originalHeight -
7705
- Overlay.MINIMUM_HEIGHT));
7719
+ Overlay.MINIMUM_HEIGHT);
7720
+ top = clamp(y, 0, maxTop);
7706
7721
  height =
7707
7722
  startPosition.originalY +
7708
7723
  startPosition.originalHeight -
@@ -7713,22 +7728,27 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
7713
7728
  top =
7714
7729
  startPosition.originalY -
7715
7730
  startPosition.originalHeight;
7716
- height = clamp(y - top, top < 0 &&
7717
- typeof this.options
7718
- .minimumInViewportHeight === 'number'
7731
+ // When dragging bottom handle, constrain height to container height
7732
+ const minHeight = top < 0 &&
7733
+ typeof this.options.minimumInViewportHeight ===
7734
+ 'number'
7719
7735
  ? -top +
7720
7736
  this.options.minimumInViewportHeight
7721
- : Overlay.MINIMUM_HEIGHT, Number.MAX_VALUE);
7737
+ : Overlay.MINIMUM_HEIGHT;
7738
+ const maxHeight = containerRect.height - Math.max(0, top);
7739
+ height = clamp(y - top, minHeight, maxHeight);
7722
7740
  bottom = containerRect.height - top - height;
7723
7741
  };
7724
7742
  const moveLeft = () => {
7725
- left = clamp(x, -Number.MAX_VALUE, startPosition.originalX +
7743
+ const maxLeft = startPosition.originalX +
7726
7744
  startPosition.originalWidth >
7727
7745
  containerRect.width
7728
- ? this.getMinimumWidth(containerRect.width)
7746
+ ? Math.max(0, containerRect.width -
7747
+ Overlay.MINIMUM_WIDTH) // Prevent extending beyong right edge
7729
7748
  : Math.max(0, startPosition.originalX +
7730
7749
  startPosition.originalWidth -
7731
- Overlay.MINIMUM_WIDTH));
7750
+ Overlay.MINIMUM_WIDTH);
7751
+ left = clamp(x, 0, maxLeft); // min is 0 (Not -Infinity) to prevent dragging beyond left edge
7732
7752
  width =
7733
7753
  startPosition.originalX +
7734
7754
  startPosition.originalWidth -
@@ -7739,12 +7759,15 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
7739
7759
  left =
7740
7760
  startPosition.originalX -
7741
7761
  startPosition.originalWidth;
7742
- width = clamp(x - left, left < 0 &&
7743
- typeof this.options
7744
- .minimumInViewportWidth === 'number'
7762
+ // When dragging right handle, constrain width to container width
7763
+ const minWidth = left < 0 &&
7764
+ typeof this.options.minimumInViewportWidth ===
7765
+ 'number'
7745
7766
  ? -left +
7746
7767
  this.options.minimumInViewportWidth
7747
- : Overlay.MINIMUM_WIDTH, Number.MAX_VALUE);
7768
+ : Overlay.MINIMUM_WIDTH;
7769
+ const maxWidth = containerRect.width - Math.max(0, left);
7770
+ width = clamp(x - left, minWidth, maxWidth);
7748
7771
  right = containerRect.width - left - width;
7749
7772
  };
7750
7773
  switch (direction) {
@@ -8574,7 +8597,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
8574
8597
  // option only available when no panels in primary grid
8575
8598
  return;
8576
8599
  }
8577
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
8600
+ this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
8578
8601
  kind: 'edge',
8579
8602
  panel: undefined,
8580
8603
  api: this._api,
@@ -9811,6 +9834,13 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
9811
9834
  panel: removedPanel,
9812
9835
  from: sourceGroup,
9813
9836
  });
9837
+ /**
9838
+ * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
9839
+ * With defaultRenderer="always" this results in panel content not showing after move operations.
9840
+ */
9841
+ requestAnimationFrame(() => {
9842
+ this.overlayRenderContainer.updateAllPositions();
9843
+ });
9814
9844
  }
9815
9845
  else {
9816
9846
  /**
@@ -13114,6 +13144,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
13114
13144
  exports.DockviewPanel = DockviewPanel;
13115
13145
  exports.DockviewUnhandledDragOverEvent = DockviewUnhandledDragOverEvent;
13116
13146
  exports.DockviewWillDropEvent = DockviewWillDropEvent;
13147
+ exports.DockviewWillShowOverlayLocationEvent = DockviewWillShowOverlayLocationEvent;
13117
13148
  exports.DraggablePaneviewPanel = DraggablePaneviewPanel;
13118
13149
  exports.Gridview = Gridview;
13119
13150
  exports.GridviewApi = GridviewApi;