dockview-core 8.5.0 → 8.6.0

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-core
3
- * @version 8.5.0
3
+ * @version 8.6.0
4
4
  * @link https://github.com/dockview/dockview
5
5
  * @license MIT
6
6
  */
@@ -1150,8 +1150,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1150
1150
  if (visible === this.visible) return;
1151
1151
  if (visible) {
1152
1152
  var _this$_cachedVisibleS;
1153
- this.size = clamp((_this$_cachedVisibleS = this._cachedVisibleSize) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : 0, this.viewMinimumSize, this.viewMaximumSize);
1153
+ const cachedVisibleSize = (_this$_cachedVisibleS = this._cachedVisibleSize) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : 0;
1154
1154
  this._cachedVisibleSize = void 0;
1155
+ this.size = clamp(cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize);
1155
1156
  } else {
1156
1157
  this._cachedVisibleSize = typeof size === "number" ? size : this.size;
1157
1158
  this.size = 0;
@@ -1287,6 +1288,15 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1287
1288
  get margin() {
1288
1289
  return this._margin;
1289
1290
  }
1291
+ /**
1292
+ * The size each visible view gives up to the margins: `n` visible views
1293
+ * are separated by `n - 1` margins, spread evenly over the `n`.
1294
+ */
1295
+ get marginShare() {
1296
+ let visibleViewCount = 0;
1297
+ for (const item of this.viewItems) if (item.visible) visibleViewCount++;
1298
+ return this.marginShareFor(visibleViewCount);
1299
+ }
1290
1300
  set margin(value) {
1291
1301
  this._margin = value;
1292
1302
  toggleClass(this.element, "dv-splitview-has-margin", value !== 0);
@@ -1583,6 +1593,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1583
1593
  const previousSize = Math.max(this.size, this._contentSize);
1584
1594
  this.size = size;
1585
1595
  this.orthogonalSize = orthogonalSize;
1596
+ if (!this._proportions) this.saveProportions();
1586
1597
  if (this.proportions) {
1587
1598
  let total = 0;
1588
1599
  for (let i = 0; i < this.viewItems.length; i++) {
@@ -1639,7 +1650,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1639
1650
  }
1640
1651
  }
1641
1652
  saveProportions() {
1642
- if (this.proportionalLayout && this._contentSize > 0) this._proportions = this.viewItems.map((i) => i.visible ? i.size / this._contentSize : void 0);
1653
+ if (!this.proportionalLayout) return;
1654
+ let contentSize = 0;
1655
+ for (const item of this.viewItems) contentSize += item.size;
1656
+ if (contentSize > 0) this._proportions = this.viewItems.map((i) => i.visible ? i.size / contentSize : void 0);
1643
1657
  }
1644
1658
  /**
1645
1659
  * Margin explain:
@@ -1661,7 +1675,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1661
1675
  this.updateSashEnablement();
1662
1676
  if (this.viewItems.length === 0) return;
1663
1677
  const sashCount = Math.max(0, visibleViewCount - 1);
1664
- const marginReducedSize = this.margin * sashCount / Math.max(1, visibleViewCount);
1678
+ const marginReducedSize = this.marginShareFor(visibleViewCount);
1665
1679
  let totalLeftOffset = 0;
1666
1680
  const viewLeftOffsets = [];
1667
1681
  const sashWidth = 4;
@@ -1691,9 +1705,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1691
1705
  view.setContainerGeometry("width", "");
1692
1706
  view.setContainerGeometry("left", "");
1693
1707
  }
1694
- view.view.layout(view.size - marginReducedSize, this._orthogonalSize);
1708
+ view.view.layout(size, this._orthogonalSize);
1695
1709
  });
1696
1710
  }
1711
+ marginShareFor(visibleViewCount) {
1712
+ const sashCount = Math.max(0, visibleViewCount - 1);
1713
+ return this._margin * sashCount / Math.max(1, visibleViewCount);
1714
+ }
1697
1715
  findFirstSnapIndex(indexes) {
1698
1716
  for (const index of indexes) {
1699
1717
  const viewItem = this.viewItems[index];
@@ -3939,9 +3957,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3939
3957
  }
3940
3958
  /**
3941
3959
  * Remove a panel given the panel object.
3960
+ *
3961
+ * `removeEmptyGroup` overrides the `closeEmptyGroups` option for this
3962
+ * call: `false` keeps the group if the panel was its last one, `true`
3963
+ * removes it.
3942
3964
  */
3943
- removePanel(panel) {
3944
- this.component.withOrigin("api", () => this.component.removePanel(panel));
3965
+ removePanel(panel, options) {
3966
+ this.component.withOrigin("api", () => this.component.removePanel(panel, options));
3945
3967
  }
3946
3968
  /**
3947
3969
  * Add a group and return the created object.
@@ -6995,6 +7017,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
6995
7017
  dndStrategy: void 0,
6996
7018
  className: void 0,
6997
7019
  noPanelsOverlay: void 0,
7020
+ closeEmptyGroups: void 0,
6998
7021
  dndEdges: void 0,
6999
7022
  dropPositionResolver: void 0,
7000
7023
  dndCompass: void 0,
@@ -11514,7 +11537,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
11514
11537
  });
11515
11538
  return;
11516
11539
  }
11517
- if (this.tabsContainer.indexOf(data.panelId) !== -1 && this.tabsContainer.size === 1) return;
11540
+ if (this.tabsContainer.indexOf(data.panelId) !== -1 && this.tabsContainer.size === 1 && this.accessor.options.closeEmptyGroups !== false) return;
11518
11541
  const { groupId, panelId } = data;
11519
11542
  if (this.id === groupId && !position) {
11520
11543
  if (this.tabsContainer.indexOf(panelId) === index) return;
@@ -11764,6 +11787,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
11764
11787
  constructor(id, accessor) {
11765
11788
  super(id, "__dockviewgroup__");
11766
11789
  this.accessor = accessor;
11790
+ this._isApplyingSize = false;
11767
11791
  this._onDidLocationChange = new Emitter();
11768
11792
  this.onDidLocationChange = this._onDidLocationChange.event;
11769
11793
  this._onDidActivePanelChange = new Emitter();
@@ -11776,14 +11800,29 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
11776
11800
  this.onDidHeaderDirectionChange = this._onDidHeaderDirectionChange.event;
11777
11801
  this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange, this._onDidCollapsedChange, this._onDidPeekChange, this._onDidHeaderDirectionChange, this._onDidVisibilityChange.event((event) => {
11778
11802
  if (event.isVisible && this._pendingSize) {
11779
- super.setSize(this._pendingSize);
11803
+ const pendingSize = this._pendingSize;
11780
11804
  this._pendingSize = void 0;
11805
+ super.setSize(pendingSize);
11781
11806
  }
11807
+ }), this.onDidDimensionsChange((event) => {
11808
+ var _this$_reportedSize, _this$_reportedSize2;
11809
+ const moved = event.width !== ((_this$_reportedSize = this._reportedSize) === null || _this$_reportedSize === void 0 ? void 0 : _this$_reportedSize.width) || event.height !== ((_this$_reportedSize2 = this._reportedSize) === null || _this$_reportedSize2 === void 0 ? void 0 : _this$_reportedSize2.height);
11810
+ this._reportedSize = {
11811
+ width: event.width,
11812
+ height: event.height
11813
+ };
11814
+ if (moved && this.isVisible && !this._isApplyingSize) this._pendingSize = void 0;
11782
11815
  }));
11783
11816
  }
11784
11817
  setSize(event) {
11785
- this._pendingSize = _objectSpread2({}, event);
11786
- super.setSize(event);
11818
+ if (typeof event.width === "number" || typeof event.height === "number") this._pendingSize = _objectSpread2({}, event);
11819
+ const wasApplyingSize = this._isApplyingSize;
11820
+ this._isApplyingSize = true;
11821
+ try {
11822
+ super.setSize(event);
11823
+ } finally {
11824
+ this._isApplyingSize = wasApplyingSize;
11825
+ }
11787
11826
  }
11788
11827
  close() {
11789
11828
  if (!this._group) return;
@@ -15123,6 +15162,20 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15123
15162
 
15124
15163
  //#endregion
15125
15164
  //#region src/dockview/dockviewShell.ts
15165
+ const EDGE_POSITIONS = [
15166
+ "left",
15167
+ "right",
15168
+ "top",
15169
+ "bottom"
15170
+ ];
15171
+ function isHorizontal(position) {
15172
+ return position === "left" || position === "right";
15173
+ }
15174
+ /** A view outside a shell: no gap, and every layout is real. */
15175
+ const UNBOUNDED_AXIS = {
15176
+ marginShare: 0,
15177
+ size: Number.POSITIVE_INFINITY
15178
+ };
15126
15179
  var EdgeGroupView = class {
15127
15180
  /**
15128
15181
  * The effective (pre-gap) collapsed size: the measured tab-strip size when
@@ -15134,7 +15187,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15134
15187
  }
15135
15188
  get minimumSize() {
15136
15189
  if (this._isCollapsed) return this.collapsedSize;
15137
- return this._baseMinimumSize !== void 0 ? this._baseMinimumSize + this._gapAdd : this._effectiveBaseCollapsed + 50 + this._gapAdd;
15190
+ return this._baseMinimumSize !== void 0 ? this._baseMinimumSize + this._axis.marginShare : this._effectiveBaseCollapsed + 50 + this._axis.marginShare;
15138
15191
  }
15139
15192
  get maximumSize() {
15140
15193
  return this._isCollapsed ? this.collapsedSize : this._expandedMaximumSize;
@@ -15145,11 +15198,16 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15145
15198
  get isCollapsed() {
15146
15199
  return this._isCollapsed;
15147
15200
  }
15201
+ /** Includes the gap share, as expanding restores a slot size. */
15148
15202
  get lastExpandedSize() {
15149
15203
  return this._lastExpandedSize;
15150
15204
  }
15205
+ /** Without the gap share. */
15206
+ get lastExpandedContentSize() {
15207
+ return this._lastExpandedSize - this._axis.marginShare;
15208
+ }
15151
15209
  get collapsedSize() {
15152
- return this._effectiveBaseCollapsed + this._gapAdd;
15210
+ return this._effectiveBaseCollapsed + this._axis.marginShare;
15153
15211
  }
15154
15212
  /** The user-configured (pre-gap) geometry constraints, for serialization.
15155
15213
  * These are the raw values passed to `addEdgeGroup`, unlike the effective
@@ -15164,13 +15222,14 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15164
15222
  get configuredCollapsedSize() {
15165
15223
  return this._baseCollapsedSize;
15166
15224
  }
15167
- constructor(options, group, orientation, gapAdd = 0) {
15225
+ constructor(options, group, orientation, axis = UNBOUNDED_AXIS) {
15168
15226
  var _options$collapsedSiz, _options$maximumSize, _options$initialSize;
15169
15227
  this._onDidChange = new Emitter();
15170
15228
  this.onDidChange = this._onDidChange.event;
15171
15229
  this.snap = false;
15172
15230
  this.priority = "low";
15173
15231
  this._isCollapsed = false;
15232
+ this._isVisible = true;
15174
15233
  this._tabSizeDisposables = new CompositeDisposable();
15175
15234
  this._group = group;
15176
15235
  this._orientation = orientation;
@@ -15178,7 +15237,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15178
15237
  group.element.dataset.testid = `dv-edge-group-${options.id}`;
15179
15238
  this._baseCollapsedSize = (_options$collapsedSiz = options.collapsedSize) !== null && _options$collapsedSiz !== void 0 ? _options$collapsedSiz : 35;
15180
15239
  this._baseMinimumSize = options.minimumSize;
15181
- this._gapAdd = gapAdd;
15240
+ this._axis = axis;
15182
15241
  this._expandedMaximumSize = (_options$maximumSize = options.maximumSize) !== null && _options$maximumSize !== void 0 ? _options$maximumSize : Number.POSITIVE_INFINITY;
15183
15242
  this._lastExpandedSize = (_options$initialSize = options.initialSize) !== null && _options$initialSize !== void 0 ? _options$initialSize : 200;
15184
15243
  if (options.collapsed) {
@@ -15211,7 +15270,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15211
15270
  if (this._isCollapsed) this._onDidChange.fire({ size: this.collapsedSize });
15212
15271
  }
15213
15272
  layout(size, orthogonalSize) {
15214
- if (!this._isCollapsed) this._lastExpandedSize = size;
15273
+ if (!this._isCollapsed && this._isVisible && this._axis.size > 0) this._lastExpandedSize = size + this._axis.marginShare;
15215
15274
  if (this._orientation === "horizontal") this._group.layout(size, orthogonalSize);
15216
15275
  else this._group.layout(orthogonalSize, size);
15217
15276
  }
@@ -15220,25 +15279,25 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15220
15279
  this._isCollapsed = collapsed;
15221
15280
  this._group.element.classList.toggle("dv-edge-collapsed", collapsed);
15222
15281
  }
15223
- setVisible(_visible) {}
15282
+ setVisible(visible) {
15283
+ this._isVisible = visible;
15284
+ }
15224
15285
  /**
15225
- * Restore the last-expanded size from serialized state without triggering
15226
- * a layout. Must be called before setCollapsed(true) during fromJSON so
15227
- * that expanding after deserialization restores the correct size.
15286
+ * Set the expanded size without triggering a layout: from serialized
15287
+ * state (before setCollapsed(true) during fromJSON, so that expanding
15288
+ * restores the right size) or from an explicit resize.
15228
15289
  */
15229
15290
  restoreExpandedSize(size) {
15230
15291
  this._lastExpandedSize = size;
15231
15292
  }
15232
15293
  /**
15233
- * Apply a new base (pre-gap) collapsed size, base minimum size and gap
15234
- * contribution after a theme or gap change. Base values come from the
15235
- * original config; the ShellManager owns the gap arithmetic. A live
15236
- * measured tab size (if any) continues to win over the base collapsed size.
15294
+ * Apply a new base (pre-gap) collapsed size and base minimum size after a
15295
+ * theme change. Base values come from the original config. A live measured
15296
+ * tab size (if any) continues to win over the base collapsed size.
15237
15297
  */
15238
- updateSizing(baseCollapsedSize, baseMinimumSize, gapAdd) {
15298
+ updateSizing(baseCollapsedSize, baseMinimumSize) {
15239
15299
  this._baseCollapsedSize = baseCollapsedSize;
15240
15300
  this._baseMinimumSize = baseMinimumSize;
15241
- this._gapAdd = gapAdd;
15242
15301
  }
15243
15302
  dispose() {
15244
15303
  this._tabSizeDisposables.dispose();
@@ -15340,13 +15399,20 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15340
15399
  const index = position === "top" ? this._topIndex : this._bottomIndex;
15341
15400
  if (index !== void 0) this._splitview.resizeView(index, size);
15342
15401
  }
15343
- /** The inner splitview's primary-axis (height) extent; zero until laid out. */
15344
- get axisSize() {
15345
- return this._splitview.size;
15402
+ /** The inner splitview, as the axis its edge views read. */
15403
+ get axis() {
15404
+ return this._splitview;
15346
15405
  }
15347
15406
  updateMargin(gap) {
15348
15407
  this._splitview.margin = gap;
15349
15408
  }
15409
+ /** Disables the sashes of the top/bottom edge groups. */
15410
+ get disabled() {
15411
+ return this._splitview.disabled;
15412
+ }
15413
+ set disabled(value) {
15414
+ this._splitview.disabled = value;
15415
+ }
15350
15416
  dispose() {
15351
15417
  this._onDidChange.dispose();
15352
15418
  this._splitview.dispose();
@@ -15396,8 +15462,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15396
15462
  const width = Math.round(entry.contentRect.width);
15397
15463
  const height = Math.round(entry.contentRect.height);
15398
15464
  if (width === this._currentWidth && height === this._currentHeight) return;
15399
- this._currentWidth = width;
15400
- this._currentHeight = height;
15401
15465
  this.layout(width, height);
15402
15466
  }), this._outerSplitview, this._middleColumn, centerView);
15403
15467
  }
@@ -15405,6 +15469,18 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15405
15469
  return this._shellElement;
15406
15470
  }
15407
15471
  /**
15472
+ * The dock's `locked` option. The edge groups are resized with the sashes
15473
+ * of the shell's own splitviews (left/right in the outer one, top/bottom
15474
+ * in the middle column), so locking disables both.
15475
+ */
15476
+ get locked() {
15477
+ return this._outerSplitview.disabled;
15478
+ }
15479
+ set locked(value) {
15480
+ this._outerSplitview.disabled = value;
15481
+ this._middleColumn.disabled = value;
15482
+ }
15483
+ /**
15408
15484
  * Add an edge group view at the given position. The view wraps the
15409
15485
  * provided group element inside the shell's splitview layout.
15410
15486
  * Throws if a group at this position is already registered.
@@ -15412,14 +15488,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15412
15488
  addEdgeView(position, options, group) {
15413
15489
  if (this.hasEdgeGroup(position)) throw new Error(`dockview: edge group already registered at position '${position}'`);
15414
15490
  this._viewConfigs.set(position, options);
15415
- const outerN = 1 + (this._viewConfigs.has("left") ? 1 : 0) + (this._viewConfigs.has("right") ? 1 : 0);
15416
- const innerN = 1 + (this._viewConfigs.has("top") ? 1 : 0) + (this._viewConfigs.has("bottom") ? 1 : 0);
15417
- const outerGapAdd = outerN > 1 ? this._gap * (outerN - 1) / outerN : 0;
15418
- const innerGapAdd = innerN > 1 ? this._gap * (innerN - 1) / innerN : 0;
15419
- const isHorizontal = position === "left" || position === "right";
15420
- const gapAdd = isHorizontal ? outerGapAdd : innerGapAdd;
15421
- const orientation = isHorizontal ? "horizontal" : "vertical";
15422
- const view = new EdgeGroupView(_objectSpread2({ collapsedSize: this._defaultCollapsedSize }, options), group, orientation, gapAdd);
15491
+ const view = new EdgeGroupView(_objectSpread2({ collapsedSize: this._defaultCollapsedSize }, options), group, isHorizontal(position) ? "horizontal" : "vertical", this._axisFor(position));
15423
15492
  const initialSize = view.isCollapsed ? view.collapsedSize : view.lastExpandedSize;
15424
15493
  switch (position) {
15425
15494
  case "left":
@@ -15448,7 +15517,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15448
15517
  }
15449
15518
  this._disposables.addDisposables(view);
15450
15519
  if (!view.isCollapsed && !this._canResize(position)) this._pendingSizes.set(position, initialSize);
15451
- this.updateTheme(this._gap, this._defaultCollapsedSize);
15520
+ this._relayout();
15452
15521
  return view;
15453
15522
  }
15454
15523
  /**
@@ -15470,6 +15539,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15470
15539
  this.layout(width, height);
15471
15540
  }
15472
15541
  layout(width, height) {
15542
+ this._currentWidth = width;
15543
+ this._currentHeight = height;
15473
15544
  this._outerSplitview.layout(width, height);
15474
15545
  this._flushPendingSizes();
15475
15546
  }
@@ -15479,34 +15550,50 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15479
15550
  * and tab-strip dimensions.
15480
15551
  */
15481
15552
  updateTheme(gap, defaultCollapsedSize) {
15482
- var _this$_leftView, _this$_rightView, _this$_topView, _this$_bottomView;
15483
15553
  this._gap = gap;
15484
15554
  this._defaultCollapsedSize = defaultCollapsedSize;
15485
- const outerN = 1 + (this._viewConfigs.has("left") ? 1 : 0) + (this._viewConfigs.has("right") ? 1 : 0);
15486
- const innerN = 1 + (this._viewConfigs.has("top") ? 1 : 0) + (this._viewConfigs.has("bottom") ? 1 : 0);
15487
- const outerGapAdd = outerN > 1 ? gap * (outerN - 1) / outerN : 0;
15488
- const innerGapAdd = innerN > 1 ? gap * (innerN - 1) / innerN : 0;
15489
15555
  this._outerSplitview.margin = gap;
15490
15556
  this._middleColumn.updateMargin(gap);
15491
- const updateView = (view, baseCfg, gapAdd) => {
15492
- var _baseCfg$collapsedSiz;
15493
- const baseCS = (_baseCfg$collapsedSiz = baseCfg.collapsedSize) !== null && _baseCfg$collapsedSiz !== void 0 ? _baseCfg$collapsedSiz : defaultCollapsedSize;
15494
- view.updateSizing(baseCS, baseCfg.minimumSize, gapAdd);
15495
- };
15496
- const topCfg = this._viewConfigs.get("top");
15497
- if (this._topView && topCfg) updateView(this._topView, topCfg, innerGapAdd);
15498
- const bottomCfg = this._viewConfigs.get("bottom");
15499
- if (this._bottomView && bottomCfg) updateView(this._bottomView, bottomCfg, innerGapAdd);
15500
- const leftCfg = this._viewConfigs.get("left");
15501
- if (this._leftView && leftCfg) updateView(this._leftView, leftCfg, outerGapAdd);
15502
- const rightCfg = this._viewConfigs.get("right");
15503
- if (this._rightView && rightCfg) updateView(this._rightView, rightCfg, outerGapAdd);
15504
- if (((_this$_leftView = this._leftView) === null || _this$_leftView === void 0 ? void 0 : _this$_leftView.isCollapsed) && this._leftIndex !== void 0) this._outerSplitview.resizeView(this._leftIndex, this._leftView.collapsedSize);
15505
- if (((_this$_rightView = this._rightView) === null || _this$_rightView === void 0 ? void 0 : _this$_rightView.isCollapsed) && this._rightIndex !== void 0) this._outerSplitview.resizeView(this._rightIndex, this._rightView.collapsedSize);
15506
- if ((_this$_topView = this._topView) === null || _this$_topView === void 0 ? void 0 : _this$_topView.isCollapsed) this._middleColumn.resizeView("top", this._topView.collapsedSize);
15507
- if ((_this$_bottomView = this._bottomView) === null || _this$_bottomView === void 0 ? void 0 : _this$_bottomView.isCollapsed) this._middleColumn.resizeView("bottom", this._bottomView.collapsedSize);
15557
+ this._applyThemeSizing();
15558
+ this._relayout();
15559
+ }
15560
+ /** Whether the other edge of `position`'s axis holds a view. */
15561
+ _hasSiblingOn(position) {
15562
+ return isHorizontal(position) ? this._leftView !== void 0 && this._rightView !== void 0 : this._topView !== void 0 && this._bottomView !== void 0;
15563
+ }
15564
+ /** The splitview `position`'s view sits in, as its edge axis. */
15565
+ _axisFor(position) {
15566
+ return isHorizontal(position) ? this._outerSplitview : this._middleColumn.axis;
15567
+ }
15568
+ /** Re-derive every edge view's base sizing from its original config and
15569
+ * the current defaults. */
15570
+ _applyThemeSizing() {
15571
+ for (const position of EDGE_POSITIONS) {
15572
+ const view = this._getView(position);
15573
+ const baseCfg = this._viewConfigs.get(position);
15574
+ if (view && baseCfg) {
15575
+ var _baseCfg$collapsedSiz;
15576
+ view.updateSizing((_baseCfg$collapsedSiz = baseCfg.collapsedSize) !== null && _baseCfg$collapsedSiz !== void 0 ? _baseCfg$collapsedSiz : this._defaultCollapsedSize, baseCfg.minimumSize);
15577
+ }
15578
+ }
15579
+ }
15580
+ /**
15581
+ * Lay the shell out again at its current size, once it has one. The
15582
+ * splitviews clamp every view to its current constraints, which is how a
15583
+ * collapsed strip or a group at its minimum follows a moved gap share.
15584
+ */
15585
+ _relayout() {
15508
15586
  if (this._currentWidth > 0 && this._currentHeight > 0) this.layout(this._currentWidth, this._currentHeight);
15509
15587
  }
15588
+ /** The view's slot in its splitview: its laid-out size plus the gap share. */
15589
+ _slotSize(position) {
15590
+ switch (position) {
15591
+ case "left": return this._leftIndex === void 0 ? 0 : this._outerSplitview.getViewSize(this._leftIndex);
15592
+ case "right": return this._rightIndex === void 0 ? 0 : this._outerSplitview.getViewSize(this._rightIndex);
15593
+ case "top":
15594
+ case "bottom": return this._middleColumn.getViewSize(position);
15595
+ }
15596
+ }
15510
15597
  removeEdgeView(position) {
15511
15598
  const view = this._getView(position);
15512
15599
  if (!view) return;
@@ -15536,7 +15623,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15536
15623
  view.dispose();
15537
15624
  this._viewConfigs.delete(position);
15538
15625
  this._pendingSizes.delete(position);
15539
- this.updateTheme(this._gap, this._defaultCollapsedSize);
15626
+ this._relayout();
15540
15627
  }
15541
15628
  hasEdgeGroup(position) {
15542
15629
  switch (position) {
@@ -15547,6 +15634,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15547
15634
  }
15548
15635
  }
15549
15636
  setEdgeGroupVisible(position, visible) {
15637
+ const changes = this._getView(position) !== void 0 && visible !== this.isEdgeGroupVisible(position);
15550
15638
  switch (position) {
15551
15639
  case "left":
15552
15640
  if (this._leftIndex !== void 0) this._outerSplitview.setViewVisible(this._leftIndex, visible);
@@ -15559,6 +15647,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15559
15647
  this._middleColumn.setViewVisible(position, visible);
15560
15648
  break;
15561
15649
  }
15650
+ if (changes && this._gap > 0 && this._hasSiblingOn(position)) this._relayout();
15562
15651
  if (visible) this._flushPendingSizes();
15563
15652
  }
15564
15653
  isEdgeGroupVisible(position) {
@@ -15608,8 +15697,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15608
15697
  /** A resize lands only on a visible view (a hidden one is pinned to zero)
15609
15698
  * whose splitview has extent to distribute. */
15610
15699
  _canResize(position) {
15611
- if (!this.isEdgeGroupVisible(position)) return false;
15612
- return (position === "left" || position === "right" ? this._outerSplitview.size : this._middleColumn.axisSize) > 0;
15700
+ return this.isEdgeGroupVisible(position) && this._axisFor(position).size > 0;
15613
15701
  }
15614
15702
  _resizeView(position, size) {
15615
15703
  switch (position) {
@@ -15642,7 +15730,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15642
15730
  * the auto-hide peek overlay. */
15643
15731
  getEdgeGroupExpandedSize(position) {
15644
15732
  var _this$_getView$lastEx, _this$_getView2;
15645
- return (_this$_getView$lastEx = (_this$_getView2 = this._getView(position)) === null || _this$_getView2 === void 0 ? void 0 : _this$_getView2.lastExpandedSize) !== null && _this$_getView$lastEx !== void 0 ? _this$_getView$lastEx : 0;
15733
+ return (_this$_getView$lastEx = (_this$_getView2 = this._getView(position)) === null || _this$_getView2 === void 0 ? void 0 : _this$_getView2.lastExpandedContentSize) !== null && _this$_getView$lastEx !== void 0 ? _this$_getView$lastEx : 0;
15646
15734
  }
15647
15735
  _getView(position) {
15648
15736
  switch (position) {
@@ -15654,59 +15742,45 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15654
15742
  }
15655
15743
  toJSON() {
15656
15744
  const edgeGroups = {};
15657
- const constraints = (view) => ({
15658
- minimumSize: view.configuredMinimumSize,
15659
- maximumSize: Number.isFinite(view.configuredMaximumSize) ? view.configuredMaximumSize : void 0,
15660
- collapsedSize: view.configuredCollapsedSize
15661
- });
15662
- const expandedSize = (view, position, isVisible, liveSize, cachedVisibleSize) => {
15663
- if (view.isCollapsed) return view.lastExpandedSize;
15664
- const pending = this._pendingSizes.get(position);
15665
- if (pending !== void 0) return pending;
15666
- if (!isVisible) return cachedVisibleSize !== null && cachedVisibleSize !== void 0 ? cachedVisibleSize : view.lastExpandedSize;
15667
- return liveSize;
15668
- };
15669
- if (this._leftView && this._leftIndex !== void 0) {
15670
- const visible = this._outerSplitview.isViewVisible(this._leftIndex);
15671
- edgeGroups.left = _objectSpread2({
15672
- size: expandedSize(this._leftView, "left", visible, this._outerSplitview.getViewSize(this._leftIndex), this._outerSplitview.getViewCachedVisibleSize(this._leftIndex)),
15673
- visible,
15674
- collapsed: this._leftView.isCollapsed || void 0
15675
- }, constraints(this._leftView));
15676
- }
15677
- if (this._rightView && this._rightIndex !== void 0) {
15678
- const visible = this._outerSplitview.isViewVisible(this._rightIndex);
15679
- edgeGroups.right = _objectSpread2({
15680
- size: expandedSize(this._rightView, "right", visible, this._outerSplitview.getViewSize(this._rightIndex), this._outerSplitview.getViewCachedVisibleSize(this._rightIndex)),
15745
+ for (const position of EDGE_POSITIONS) {
15746
+ const view = this._getView(position);
15747
+ if (!view) continue;
15748
+ const visible = this.isEdgeGroupVisible(position);
15749
+ edgeGroups[position] = {
15750
+ size: this._expandedSize(view, position, visible),
15681
15751
  visible,
15682
- collapsed: this._rightView.isCollapsed || void 0
15683
- }, constraints(this._rightView));
15752
+ collapsed: view.isCollapsed || void 0,
15753
+ minimumSize: view.configuredMinimumSize,
15754
+ maximumSize: Number.isFinite(view.configuredMaximumSize) ? view.configuredMaximumSize : void 0,
15755
+ collapsedSize: view.configuredCollapsedSize
15756
+ };
15684
15757
  }
15685
- if (this._topView) {
15686
- const visible = this._middleColumn.isViewVisible("top");
15687
- edgeGroups.top = _objectSpread2({
15688
- size: expandedSize(this._topView, "top", visible, this._middleColumn.getViewSize("top"), this._middleColumn.getViewCachedVisibleSize("top")),
15689
- visible,
15690
- collapsed: this._topView.isCollapsed || void 0
15691
- }, constraints(this._topView));
15758
+ return edgeGroups;
15759
+ }
15760
+ /** The size to restore the group to. An expanded-but-hidden group has a
15761
+ * slot of 0, so fall back to its cached visible size (then
15762
+ * lastExpandedSize); otherwise re-showing snaps to minimumSize. */
15763
+ _expandedSize(view, position, visible) {
15764
+ if (view.isCollapsed) return view.lastExpandedSize;
15765
+ const pending = this._pendingSizes.get(position);
15766
+ if (pending !== void 0) return pending;
15767
+ if (!visible) {
15768
+ var _this$_cachedVisibleS;
15769
+ return (_this$_cachedVisibleS = this._cachedVisibleSize(position)) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : view.lastExpandedSize;
15692
15770
  }
15693
- if (this._bottomView) {
15694
- const visible = this._middleColumn.isViewVisible("bottom");
15695
- edgeGroups.bottom = _objectSpread2({
15696
- size: expandedSize(this._bottomView, "bottom", visible, this._middleColumn.getViewSize("bottom"), this._middleColumn.getViewCachedVisibleSize("bottom")),
15697
- visible,
15698
- collapsed: this._bottomView.isCollapsed || void 0
15699
- }, constraints(this._bottomView));
15771
+ return this._slotSize(position);
15772
+ }
15773
+ /** The slot a hidden view had when it was last visible. */
15774
+ _cachedVisibleSize(position) {
15775
+ switch (position) {
15776
+ case "left": return this._leftIndex === void 0 ? void 0 : this._outerSplitview.getViewCachedVisibleSize(this._leftIndex);
15777
+ case "right": return this._rightIndex === void 0 ? void 0 : this._outerSplitview.getViewCachedVisibleSize(this._rightIndex);
15778
+ case "top":
15779
+ case "bottom": return this._middleColumn.getViewCachedVisibleSize(position);
15700
15780
  }
15701
- return edgeGroups;
15702
15781
  }
15703
15782
  fromJSON(data) {
15704
- for (const position of [
15705
- "left",
15706
- "right",
15707
- "top",
15708
- "bottom"
15709
- ]) {
15783
+ for (const position of EDGE_POSITIONS) {
15710
15784
  var _state$collapsed;
15711
15785
  const state = data[position];
15712
15786
  const view = this._getView(position);
@@ -16417,6 +16491,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16417
16491
  this.disableResizing = true;
16418
16492
  this.element.remove();
16419
16493
  this._shellManager = new ShellManager(container, this.element, (w, h) => this._layoutFromShell(w, h), (_options$theme$gap2 = (_options$theme2 = options.theme) === null || _options$theme2 === void 0 ? void 0 : _options$theme2.gap) !== null && _options$theme$gap2 !== void 0 ? _options$theme$gap2 : 0, (_options$theme3 = options.theme) === null || _options$theme3 === void 0 ? void 0 : _options$theme3.edgeGroupCollapsedSize);
16494
+ this._shellManager.locked = !!options.locked;
16420
16495
  this.popupService.updateRoot(this._shellManager.element);
16421
16496
  this._shellThemeClassnames = new Classnames(this._shellManager.element);
16422
16497
  this.rootDropTargetContainer = new DropTargetAnchorContainer(this._shellManager.element, { disabled: true });
@@ -16525,7 +16600,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16525
16600
  const service = assertModule(this._popoutWindowService, "PopoutWindow", "api.addPopoutGroup");
16526
16601
  if (!service) return Promise.resolve(false);
16527
16602
  if (itemToPopout instanceof DockviewGroupPanel && itemToPopout.model.location.type === "edge") return Promise.resolve(false);
16528
- if (itemToPopout instanceof DockviewPanel && itemToPopout.group.size === 1) return this.addPopoutGroup(itemToPopout.group, options);
16603
+ if (itemToPopout instanceof DockviewPanel && itemToPopout.group.size === 1 && this.closeEmptyGroups) return this.addPopoutGroup(itemToPopout.group, options);
16529
16604
  const theme = getDockviewTheme(this.gridview.element);
16530
16605
  const element = this.element;
16531
16606
  function getBox() {
@@ -16614,7 +16689,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16614
16689
  const overlayRenderContainer = new OverlayRenderContainer(gready, this);
16615
16690
  group.model.renderContainer = overlayRenderContainer;
16616
16691
  const popoutGridview = (_options$overridePopo4 = options === null || options === void 0 ? void 0 : options.overridePopoutGridview) !== null && _options$overridePopo4 !== void 0 ? _options$overridePopo4 : this.createNestedGridview();
16617
- if (!(options === null || options === void 0 ? void 0 : options.overridePopoutGridview)) popoutGridview.addView(group, Sizing.Distribute, [0]);
16692
+ if (options === null || options === void 0 ? void 0 : options.overridePopoutGridview) popoutGridview.locked = this.gridview.locked;
16693
+ else popoutGridview.addView(group, Sizing.Distribute, [0]);
16618
16694
  popoutGridview.element.style.width = "100%";
16619
16695
  popoutGridview.element.style.height = "100%";
16620
16696
  popoutGridview.layout(_window.window.innerWidth, _window.window.innerHeight);
@@ -17009,8 +17085,35 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17009
17085
  });
17010
17086
  for (const { panel, from } of movedPanels) this.fireDidMovePanel(panel, from);
17011
17087
  }
17088
+ /** The `closeEmptyGroups` option: remove a group once it empties. */
17089
+ get closeEmptyGroups() {
17090
+ return this.options.closeEmptyGroups !== false;
17091
+ }
17092
+ /** Whether a move leaves its emptied source group in place. */
17093
+ keepEmptyGroups(options) {
17094
+ var _options$keepEmptyGro;
17095
+ return (_options$keepEmptyGro = options.keepEmptyGroups) !== null && _options$keepEmptyGro !== void 0 ? _options$keepEmptyGro : !this.closeEmptyGroups;
17096
+ }
17012
17097
  removeGroupIfEmpty(group) {
17013
- if (group.model.size === 0) this.doRemoveGroup(group, { skipActive: true });
17098
+ if (group.model.size === 0 && this.closeEmptyGroups) this.doRemoveGroup(group, { skipActive: true });
17099
+ }
17100
+ /**
17101
+ * Locks the main grid, the shell whose splitviews host the edge groups,
17102
+ * and the nested gridviews of floating and popout windows. The base
17103
+ * setter stops at the main grid; `updateOptions` reaches this override.
17104
+ */
17105
+ get locked() {
17106
+ return this.gridview.locked;
17107
+ }
17108
+ set locked(value) {
17109
+ this.gridview.locked = value;
17110
+ if (this._shellManager) this._shellManager.locked = value;
17111
+ for (const gridview of this.nestedGridviews()) gridview.locked = value;
17112
+ }
17113
+ /** The gridviews hosted by open floating and popout windows. */
17114
+ nestedGridviews() {
17115
+ var _this$_popoutWindowSe9, _this$_popoutWindowSe10;
17116
+ return [...this.floatingGroups.map((floating) => floating.gridview), ...((_this$_popoutWindowSe9 = (_this$_popoutWindowSe10 = this._popoutWindowService) === null || _this$_popoutWindowSe10 === void 0 ? void 0 : _this$_popoutWindowSe10.entries) !== null && _this$_popoutWindowSe9 !== void 0 ? _this$_popoutWindowSe9 : []).map((entry) => entry.gridview)];
17014
17117
  }
17015
17118
  /**
17016
17119
  * Build an empty gridview configured to match the main grid's styling and
@@ -17019,7 +17122,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17019
17122
  */
17020
17123
  createNestedGridview(orientation = "HORIZONTAL") {
17021
17124
  var _this$options$theme$g, _this$options$theme2;
17022
- return new Gridview(this.gridview.proportionalLayout, this.options.hideBorders ? { separatorBorder: "transparent" } : void 0, orientation, false, (_this$options$theme$g = (_this$options$theme2 = this.options.theme) === null || _this$options$theme2 === void 0 ? void 0 : _this$options$theme2.gap) !== null && _this$options$theme$g !== void 0 ? _this$options$theme$g : 0);
17125
+ return new Gridview(this.gridview.proportionalLayout, this.options.hideBorders ? { separatorBorder: "transparent" } : void 0, orientation, this.gridview.locked, (_this$options$theme$g = (_this$options$theme2 = this.options.theme) === null || _this$options$theme2 === void 0 ? void 0 : _this$options$theme2.gap) !== null && _this$options$theme$g !== void 0 ? _this$options$theme$g : 0);
17023
17126
  }
17024
17127
  /**
17025
17128
  * Wrap a (populated) floating gridview in an overlay window: title bar /
@@ -17093,10 +17196,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17093
17196
  const newDndStrategy = this.options.dndStrategy;
17094
17197
  if (oldDisableDnd !== newDisableDnd || oldDndStrategy !== newDndStrategy) this.updateDragAndDropState();
17095
17198
  if ("proportionalLayout" in options) {
17096
- var _this$_popoutWindowSe9, _this$_popoutWindowSe10;
17097
17199
  const proportionalLayout = this.gridview.proportionalLayout;
17098
- for (const floating of this.floatingGroups) floating.gridview.proportionalLayout = proportionalLayout;
17099
- for (const entry of (_this$_popoutWindowSe9 = (_this$_popoutWindowSe10 = this._popoutWindowService) === null || _this$_popoutWindowSe10 === void 0 ? void 0 : _this$_popoutWindowSe10.entries) !== null && _this$_popoutWindowSe9 !== void 0 ? _this$_popoutWindowSe9 : []) entry.gridview.proportionalLayout = proportionalLayout;
17200
+ for (const gridview of this.nestedGridviews()) gridview.proportionalLayout = proportionalLayout;
17100
17201
  }
17101
17202
  if ("theme" in options) this.updateTheme();
17102
17203
  if ("createRightHeaderActionComponent" in options || "createLeftHeaderActionComponent" in options || "createPrefixHeaderActionComponent" in options) {
@@ -17165,7 +17266,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17165
17266
  const resizeDisposable = group.onDidChange((event) => {
17166
17267
  var _this$_shellManager3;
17167
17268
  if (!event) return;
17168
- const size = position === "left" || position === "right" ? event.width : event.height;
17269
+ const size = isHorizontal(position) ? event.width : event.height;
17169
17270
  if (typeof size !== "number") return;
17170
17271
  (_this$_shellManager3 = this._shellManager) === null || _this$_shellManager3 === void 0 || _this$_shellManager3.resizeEdgeGroup(position, size);
17171
17272
  });
@@ -17843,9 +17944,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17843
17944
  }
17844
17945
  closeAllGroups() {
17845
17946
  this.mutation("remove", () => {
17846
- for (const entry of this._groups.entries()) {
17847
- const [_, group] = entry;
17848
- group.value.model.closeAllPanels();
17947
+ const groups = Array.from(this._groups.values()).map((_) => _.value);
17948
+ for (const group of groups) {
17949
+ if (!this._groups.has(group.id)) continue;
17950
+ group.model.closeAllPanels();
17951
+ const keepLast = this.options.noPanelsOverlay === "emptyGroup" && this._groups.size === 1;
17952
+ if (!this.closeEmptyGroups && !keepLast && this._groups.has(group.id) && group.model.size === 0) this.removeGroup(group, { skipActive: true });
17849
17953
  }
17850
17954
  });
17851
17955
  }
@@ -17970,7 +18074,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17970
18074
  this.mutation("remove", () => {
17971
18075
  var _options$removeEmptyG;
17972
18076
  return this._doRemovePanel(panel, {
17973
- removeEmptyGroup: (_options$removeEmptyG = options === null || options === void 0 ? void 0 : options.removeEmptyGroup) !== null && _options$removeEmptyG !== void 0 ? _options$removeEmptyG : true,
18077
+ removeEmptyGroup: (_options$removeEmptyG = options === null || options === void 0 ? void 0 : options.removeEmptyGroup) !== null && _options$removeEmptyG !== void 0 ? _options$removeEmptyG : this.closeEmptyGroups,
17974
18078
  skipDispose: options === null || options === void 0 ? void 0 : options.skipDispose,
17975
18079
  skipSetActiveGroup: options === null || options === void 0 ? void 0 : options.skipSetActiveGroup
17976
18080
  });
@@ -18126,7 +18230,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18126
18230
  if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
18127
18231
  if (!(options === null || options === void 0 ? void 0 : options.skipPopoutAssociated)) {
18128
18232
  const refGroup = selectedGroup.referenceGroup ? this.getPanel(selectedGroup.referenceGroup) : void 0;
18129
- if ((refGroup === null || refGroup === void 0 ? void 0 : refGroup.panels.length) === 0) this.removeGroup(refGroup);
18233
+ if ((refGroup === null || refGroup === void 0 ? void 0 : refGroup.panels.length) === 0 && (this.closeEmptyGroups || !refGroup.api.isVisible)) this.removeGroup(refGroup);
18130
18234
  }
18131
18235
  selectedGroup.popoutGroup.dispose();
18132
18236
  this._groups.delete(group.id);
@@ -18386,7 +18490,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18386
18490
  skipSetActiveGroup: true
18387
18491
  }));
18388
18492
  if (!removedPanel) throw new Error(`dockview: No panel with id ${sourceItemId}`);
18389
- if (!options.keepEmptyGroups && sourceGroup.model.size === 0 && sourceGroup !== destinationGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
18493
+ if (!this.keepEmptyGroups(options) && sourceGroup.model.size === 0 && sourceGroup !== destinationGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
18390
18494
  const isDestinationGroupEmpty = destinationGroup.model.size === 0;
18391
18495
  this.movingLock(() => {
18392
18496
  var _options$skipSetActiv;
@@ -18406,10 +18510,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18406
18510
  const destinationGridview = this.getGridviewForGroup(destinationGroup);
18407
18511
  const referenceLocation = getGridLocation(destinationGroup.element);
18408
18512
  const targetLocation = getRelativeLocation(destinationGridview.orientation, referenceLocation, destinationTarget);
18409
- if (sourceGroup.size < 2) {
18513
+ if (sourceGroup.size < 2 && !this.keepEmptyGroups(options)) {
18410
18514
  /**
18411
18515
  * If we are moving from a group which only has one panel left we will consider
18412
- * moving the group itself rather than moving the panel into a newly created group
18516
+ * moving the group itself rather than moving the panel into a newly created group.
18517
+ * When empty groups are kept the group must stay where it is, so the panel is
18518
+ * moved into a newly created group like any other panel.
18413
18519
  */
18414
18520
  const [targetParentLocation, to] = tail(targetLocation);
18415
18521
  if (sourceGroup.api.location.type === "grid" && destinationGridview === this.gridview) {
@@ -18534,7 +18640,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18534
18640
  const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
18535
18641
  targetGroup = this.createGroupAtLocation(dropLocation, this.dropSizing(referenceLocation));
18536
18642
  }
18537
- if (!options.keepEmptyGroups && sourceGroup.model.size === 0 && sourceGroup !== targetGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
18643
+ if (!this.keepEmptyGroups(options) && sourceGroup.model.size === 0 && sourceGroup !== targetGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
18538
18644
  addPanelsToGroup(targetGroup);
18539
18645
  }
18540
18646
  moveGroup(options) {
@@ -18861,13 +18967,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18861
18967
  return location.length % 2 == 1 ? rootOrientation : orthogonal(rootOrientation);
18862
18968
  }
18863
18969
  updateTheme() {
18864
- var _this$_options$theme, _this$_shellThemeClas, _theme$gap, _this$_popoutWindowSe25, _this$_popoutWindowSe26, _this$_shellManager5, _theme$edgeGroupColla, _theme$tabGroupIndica;
18970
+ var _this$_options$theme, _this$_shellThemeClas, _theme$gap, _this$_shellManager5, _theme$edgeGroupColla, _theme$tabGroupIndica;
18865
18971
  const theme = (_this$_options$theme = this._options.theme) !== null && _this$_options$theme !== void 0 ? _this$_options$theme : themeAbyss;
18866
18972
  (_this$_shellThemeClas = this._shellThemeClassnames) === null || _this$_shellThemeClas === void 0 || _this$_shellThemeClas.setClassNames(theme.className);
18867
18973
  const gap = (_theme$gap = theme.gap) !== null && _theme$gap !== void 0 ? _theme$gap : 0;
18868
18974
  this.gridview.margin = gap;
18869
- for (const floating of this.floatingGroups) floating.gridview.margin = gap;
18870
- for (const entry of (_this$_popoutWindowSe25 = (_this$_popoutWindowSe26 = this._popoutWindowService) === null || _this$_popoutWindowSe26 === void 0 ? void 0 : _this$_popoutWindowSe26.entries) !== null && _this$_popoutWindowSe25 !== void 0 ? _this$_popoutWindowSe25 : []) entry.gridview.margin = gap;
18975
+ for (const gridview of this.nestedGridviews()) gridview.margin = gap;
18871
18976
  (_this$_shellManager5 = this._shellManager) === null || _this$_shellManager5 === void 0 || _this$_shellManager5.updateTheme(gap, (_theme$edgeGroupColla = theme.edgeGroupCollapsedSize) !== null && _theme$edgeGroupColla !== void 0 ? _theme$edgeGroupColla : 35);
18872
18977
  if (theme.dndOverlayBorder === void 0) {
18873
18978
  var _this$_shellManager6;