dockview-core 8.5.1 → 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.1
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;
@@ -15151,10 +15204,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15151
15204
  }
15152
15205
  /** Without the gap share. */
15153
15206
  get lastExpandedContentSize() {
15154
- return this._lastExpandedSize - this._gapAdd;
15207
+ return this._lastExpandedSize - this._axis.marginShare;
15155
15208
  }
15156
15209
  get collapsedSize() {
15157
- return this._effectiveBaseCollapsed + this._gapAdd;
15210
+ return this._effectiveBaseCollapsed + this._axis.marginShare;
15158
15211
  }
15159
15212
  /** The user-configured (pre-gap) geometry constraints, for serialization.
15160
15213
  * These are the raw values passed to `addEdgeGroup`, unlike the effective
@@ -15169,13 +15222,14 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15169
15222
  get configuredCollapsedSize() {
15170
15223
  return this._baseCollapsedSize;
15171
15224
  }
15172
- constructor(options, group, orientation, gapAdd = 0) {
15225
+ constructor(options, group, orientation, axis = UNBOUNDED_AXIS) {
15173
15226
  var _options$collapsedSiz, _options$maximumSize, _options$initialSize;
15174
15227
  this._onDidChange = new Emitter();
15175
15228
  this.onDidChange = this._onDidChange.event;
15176
15229
  this.snap = false;
15177
15230
  this.priority = "low";
15178
15231
  this._isCollapsed = false;
15232
+ this._isVisible = true;
15179
15233
  this._tabSizeDisposables = new CompositeDisposable();
15180
15234
  this._group = group;
15181
15235
  this._orientation = orientation;
@@ -15183,7 +15237,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15183
15237
  group.element.dataset.testid = `dv-edge-group-${options.id}`;
15184
15238
  this._baseCollapsedSize = (_options$collapsedSiz = options.collapsedSize) !== null && _options$collapsedSiz !== void 0 ? _options$collapsedSiz : 35;
15185
15239
  this._baseMinimumSize = options.minimumSize;
15186
- this._gapAdd = gapAdd;
15240
+ this._axis = axis;
15187
15241
  this._expandedMaximumSize = (_options$maximumSize = options.maximumSize) !== null && _options$maximumSize !== void 0 ? _options$maximumSize : Number.POSITIVE_INFINITY;
15188
15242
  this._lastExpandedSize = (_options$initialSize = options.initialSize) !== null && _options$initialSize !== void 0 ? _options$initialSize : 200;
15189
15243
  if (options.collapsed) {
@@ -15216,7 +15270,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15216
15270
  if (this._isCollapsed) this._onDidChange.fire({ size: this.collapsedSize });
15217
15271
  }
15218
15272
  layout(size, orthogonalSize) {
15219
- if (!this._isCollapsed) this._lastExpandedSize = size + this._gapAdd;
15273
+ if (!this._isCollapsed && this._isVisible && this._axis.size > 0) this._lastExpandedSize = size + this._axis.marginShare;
15220
15274
  if (this._orientation === "horizontal") this._group.layout(size, orthogonalSize);
15221
15275
  else this._group.layout(orthogonalSize, size);
15222
15276
  }
@@ -15225,25 +15279,25 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15225
15279
  this._isCollapsed = collapsed;
15226
15280
  this._group.element.classList.toggle("dv-edge-collapsed", collapsed);
15227
15281
  }
15228
- setVisible(_visible) {}
15282
+ setVisible(visible) {
15283
+ this._isVisible = visible;
15284
+ }
15229
15285
  /**
15230
- * Restore the last-expanded size from serialized state without triggering
15231
- * a layout. Must be called before setCollapsed(true) during fromJSON so
15232
- * 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.
15233
15289
  */
15234
15290
  restoreExpandedSize(size) {
15235
15291
  this._lastExpandedSize = size;
15236
15292
  }
15237
15293
  /**
15238
- * Apply a new base (pre-gap) collapsed size, base minimum size and gap
15239
- * contribution after a theme or gap change. Base values come from the
15240
- * original config; the ShellManager owns the gap arithmetic. A live
15241
- * 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.
15242
15297
  */
15243
- updateSizing(baseCollapsedSize, baseMinimumSize, gapAdd) {
15298
+ updateSizing(baseCollapsedSize, baseMinimumSize) {
15244
15299
  this._baseCollapsedSize = baseCollapsedSize;
15245
15300
  this._baseMinimumSize = baseMinimumSize;
15246
- this._gapAdd = gapAdd;
15247
15301
  }
15248
15302
  dispose() {
15249
15303
  this._tabSizeDisposables.dispose();
@@ -15345,13 +15399,20 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15345
15399
  const index = position === "top" ? this._topIndex : this._bottomIndex;
15346
15400
  if (index !== void 0) this._splitview.resizeView(index, size);
15347
15401
  }
15348
- /** The inner splitview's primary-axis (height) extent; zero until laid out. */
15349
- get axisSize() {
15350
- return this._splitview.size;
15402
+ /** The inner splitview, as the axis its edge views read. */
15403
+ get axis() {
15404
+ return this._splitview;
15351
15405
  }
15352
15406
  updateMargin(gap) {
15353
15407
  this._splitview.margin = gap;
15354
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
+ }
15355
15416
  dispose() {
15356
15417
  this._onDidChange.dispose();
15357
15418
  this._splitview.dispose();
@@ -15401,8 +15462,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15401
15462
  const width = Math.round(entry.contentRect.width);
15402
15463
  const height = Math.round(entry.contentRect.height);
15403
15464
  if (width === this._currentWidth && height === this._currentHeight) return;
15404
- this._currentWidth = width;
15405
- this._currentHeight = height;
15406
15465
  this.layout(width, height);
15407
15466
  }), this._outerSplitview, this._middleColumn, centerView);
15408
15467
  }
@@ -15410,6 +15469,18 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15410
15469
  return this._shellElement;
15411
15470
  }
15412
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
+ /**
15413
15484
  * Add an edge group view at the given position. The view wraps the
15414
15485
  * provided group element inside the shell's splitview layout.
15415
15486
  * Throws if a group at this position is already registered.
@@ -15417,14 +15488,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15417
15488
  addEdgeView(position, options, group) {
15418
15489
  if (this.hasEdgeGroup(position)) throw new Error(`dockview: edge group already registered at position '${position}'`);
15419
15490
  this._viewConfigs.set(position, options);
15420
- const outerN = 1 + (this._viewConfigs.has("left") ? 1 : 0) + (this._viewConfigs.has("right") ? 1 : 0);
15421
- const innerN = 1 + (this._viewConfigs.has("top") ? 1 : 0) + (this._viewConfigs.has("bottom") ? 1 : 0);
15422
- const outerGapAdd = outerN > 1 ? this._gap * (outerN - 1) / outerN : 0;
15423
- const innerGapAdd = innerN > 1 ? this._gap * (innerN - 1) / innerN : 0;
15424
- const isHorizontal = position === "left" || position === "right";
15425
- const gapAdd = isHorizontal ? outerGapAdd : innerGapAdd;
15426
- const orientation = isHorizontal ? "horizontal" : "vertical";
15427
- 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));
15428
15492
  const initialSize = view.isCollapsed ? view.collapsedSize : view.lastExpandedSize;
15429
15493
  switch (position) {
15430
15494
  case "left":
@@ -15453,7 +15517,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15453
15517
  }
15454
15518
  this._disposables.addDisposables(view);
15455
15519
  if (!view.isCollapsed && !this._canResize(position)) this._pendingSizes.set(position, initialSize);
15456
- this.updateTheme(this._gap, this._defaultCollapsedSize);
15520
+ this._relayout();
15457
15521
  return view;
15458
15522
  }
15459
15523
  /**
@@ -15475,6 +15539,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15475
15539
  this.layout(width, height);
15476
15540
  }
15477
15541
  layout(width, height) {
15542
+ this._currentWidth = width;
15543
+ this._currentHeight = height;
15478
15544
  this._outerSplitview.layout(width, height);
15479
15545
  this._flushPendingSizes();
15480
15546
  }
@@ -15484,34 +15550,50 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15484
15550
  * and tab-strip dimensions.
15485
15551
  */
15486
15552
  updateTheme(gap, defaultCollapsedSize) {
15487
- var _this$_leftView, _this$_rightView, _this$_topView, _this$_bottomView;
15488
15553
  this._gap = gap;
15489
15554
  this._defaultCollapsedSize = defaultCollapsedSize;
15490
- const outerN = 1 + (this._viewConfigs.has("left") ? 1 : 0) + (this._viewConfigs.has("right") ? 1 : 0);
15491
- const innerN = 1 + (this._viewConfigs.has("top") ? 1 : 0) + (this._viewConfigs.has("bottom") ? 1 : 0);
15492
- const outerGapAdd = outerN > 1 ? gap * (outerN - 1) / outerN : 0;
15493
- const innerGapAdd = innerN > 1 ? gap * (innerN - 1) / innerN : 0;
15494
15555
  this._outerSplitview.margin = gap;
15495
15556
  this._middleColumn.updateMargin(gap);
15496
- const updateView = (view, baseCfg, gapAdd) => {
15497
- var _baseCfg$collapsedSiz;
15498
- const baseCS = (_baseCfg$collapsedSiz = baseCfg.collapsedSize) !== null && _baseCfg$collapsedSiz !== void 0 ? _baseCfg$collapsedSiz : defaultCollapsedSize;
15499
- view.updateSizing(baseCS, baseCfg.minimumSize, gapAdd);
15500
- };
15501
- const topCfg = this._viewConfigs.get("top");
15502
- if (this._topView && topCfg) updateView(this._topView, topCfg, innerGapAdd);
15503
- const bottomCfg = this._viewConfigs.get("bottom");
15504
- if (this._bottomView && bottomCfg) updateView(this._bottomView, bottomCfg, innerGapAdd);
15505
- const leftCfg = this._viewConfigs.get("left");
15506
- if (this._leftView && leftCfg) updateView(this._leftView, leftCfg, outerGapAdd);
15507
- const rightCfg = this._viewConfigs.get("right");
15508
- if (this._rightView && rightCfg) updateView(this._rightView, rightCfg, outerGapAdd);
15509
- 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);
15510
- 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);
15511
- if ((_this$_topView = this._topView) === null || _this$_topView === void 0 ? void 0 : _this$_topView.isCollapsed) this._middleColumn.resizeView("top", this._topView.collapsedSize);
15512
- 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() {
15513
15586
  if (this._currentWidth > 0 && this._currentHeight > 0) this.layout(this._currentWidth, this._currentHeight);
15514
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
+ }
15515
15597
  removeEdgeView(position) {
15516
15598
  const view = this._getView(position);
15517
15599
  if (!view) return;
@@ -15541,7 +15623,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15541
15623
  view.dispose();
15542
15624
  this._viewConfigs.delete(position);
15543
15625
  this._pendingSizes.delete(position);
15544
- this.updateTheme(this._gap, this._defaultCollapsedSize);
15626
+ this._relayout();
15545
15627
  }
15546
15628
  hasEdgeGroup(position) {
15547
15629
  switch (position) {
@@ -15552,6 +15634,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15552
15634
  }
15553
15635
  }
15554
15636
  setEdgeGroupVisible(position, visible) {
15637
+ const changes = this._getView(position) !== void 0 && visible !== this.isEdgeGroupVisible(position);
15555
15638
  switch (position) {
15556
15639
  case "left":
15557
15640
  if (this._leftIndex !== void 0) this._outerSplitview.setViewVisible(this._leftIndex, visible);
@@ -15564,6 +15647,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15564
15647
  this._middleColumn.setViewVisible(position, visible);
15565
15648
  break;
15566
15649
  }
15650
+ if (changes && this._gap > 0 && this._hasSiblingOn(position)) this._relayout();
15567
15651
  if (visible) this._flushPendingSizes();
15568
15652
  }
15569
15653
  isEdgeGroupVisible(position) {
@@ -15613,8 +15697,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15613
15697
  /** A resize lands only on a visible view (a hidden one is pinned to zero)
15614
15698
  * whose splitview has extent to distribute. */
15615
15699
  _canResize(position) {
15616
- if (!this.isEdgeGroupVisible(position)) return false;
15617
- return (position === "left" || position === "right" ? this._outerSplitview.size : this._middleColumn.axisSize) > 0;
15700
+ return this.isEdgeGroupVisible(position) && this._axisFor(position).size > 0;
15618
15701
  }
15619
15702
  _resizeView(position, size) {
15620
15703
  switch (position) {
@@ -15659,59 +15742,45 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15659
15742
  }
15660
15743
  toJSON() {
15661
15744
  const edgeGroups = {};
15662
- const constraints = (view) => ({
15663
- minimumSize: view.configuredMinimumSize,
15664
- maximumSize: Number.isFinite(view.configuredMaximumSize) ? view.configuredMaximumSize : void 0,
15665
- collapsedSize: view.configuredCollapsedSize
15666
- });
15667
- const expandedSize = (view, position, isVisible, liveSize, cachedVisibleSize) => {
15668
- if (view.isCollapsed) return view.lastExpandedSize;
15669
- const pending = this._pendingSizes.get(position);
15670
- if (pending !== void 0) return pending;
15671
- if (!isVisible) return cachedVisibleSize !== null && cachedVisibleSize !== void 0 ? cachedVisibleSize : view.lastExpandedSize;
15672
- return liveSize;
15673
- };
15674
- if (this._leftView && this._leftIndex !== void 0) {
15675
- const visible = this._outerSplitview.isViewVisible(this._leftIndex);
15676
- edgeGroups.left = _objectSpread2({
15677
- size: expandedSize(this._leftView, "left", visible, this._outerSplitview.getViewSize(this._leftIndex), this._outerSplitview.getViewCachedVisibleSize(this._leftIndex)),
15678
- visible,
15679
- collapsed: this._leftView.isCollapsed || void 0
15680
- }, constraints(this._leftView));
15681
- }
15682
- if (this._rightView && this._rightIndex !== void 0) {
15683
- const visible = this._outerSplitview.isViewVisible(this._rightIndex);
15684
- edgeGroups.right = _objectSpread2({
15685
- 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),
15686
15751
  visible,
15687
- collapsed: this._rightView.isCollapsed || void 0
15688
- }, 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
+ };
15689
15757
  }
15690
- if (this._topView) {
15691
- const visible = this._middleColumn.isViewVisible("top");
15692
- edgeGroups.top = _objectSpread2({
15693
- size: expandedSize(this._topView, "top", visible, this._middleColumn.getViewSize("top"), this._middleColumn.getViewCachedVisibleSize("top")),
15694
- visible,
15695
- collapsed: this._topView.isCollapsed || void 0
15696
- }, 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;
15697
15770
  }
15698
- if (this._bottomView) {
15699
- const visible = this._middleColumn.isViewVisible("bottom");
15700
- edgeGroups.bottom = _objectSpread2({
15701
- size: expandedSize(this._bottomView, "bottom", visible, this._middleColumn.getViewSize("bottom"), this._middleColumn.getViewCachedVisibleSize("bottom")),
15702
- visible,
15703
- collapsed: this._bottomView.isCollapsed || void 0
15704
- }, 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);
15705
15780
  }
15706
- return edgeGroups;
15707
15781
  }
15708
15782
  fromJSON(data) {
15709
- for (const position of [
15710
- "left",
15711
- "right",
15712
- "top",
15713
- "bottom"
15714
- ]) {
15783
+ for (const position of EDGE_POSITIONS) {
15715
15784
  var _state$collapsed;
15716
15785
  const state = data[position];
15717
15786
  const view = this._getView(position);
@@ -16422,6 +16491,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16422
16491
  this.disableResizing = true;
16423
16492
  this.element.remove();
16424
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;
16425
16495
  this.popupService.updateRoot(this._shellManager.element);
16426
16496
  this._shellThemeClassnames = new Classnames(this._shellManager.element);
16427
16497
  this.rootDropTargetContainer = new DropTargetAnchorContainer(this._shellManager.element, { disabled: true });
@@ -16530,7 +16600,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16530
16600
  const service = assertModule(this._popoutWindowService, "PopoutWindow", "api.addPopoutGroup");
16531
16601
  if (!service) return Promise.resolve(false);
16532
16602
  if (itemToPopout instanceof DockviewGroupPanel && itemToPopout.model.location.type === "edge") return Promise.resolve(false);
16533
- 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);
16534
16604
  const theme = getDockviewTheme(this.gridview.element);
16535
16605
  const element = this.element;
16536
16606
  function getBox() {
@@ -16619,7 +16689,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16619
16689
  const overlayRenderContainer = new OverlayRenderContainer(gready, this);
16620
16690
  group.model.renderContainer = overlayRenderContainer;
16621
16691
  const popoutGridview = (_options$overridePopo4 = options === null || options === void 0 ? void 0 : options.overridePopoutGridview) !== null && _options$overridePopo4 !== void 0 ? _options$overridePopo4 : this.createNestedGridview();
16622
- 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]);
16623
16694
  popoutGridview.element.style.width = "100%";
16624
16695
  popoutGridview.element.style.height = "100%";
16625
16696
  popoutGridview.layout(_window.window.innerWidth, _window.window.innerHeight);
@@ -17014,8 +17085,35 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17014
17085
  });
17015
17086
  for (const { panel, from } of movedPanels) this.fireDidMovePanel(panel, from);
17016
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
+ }
17017
17097
  removeGroupIfEmpty(group) {
17018
- 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)];
17019
17117
  }
17020
17118
  /**
17021
17119
  * Build an empty gridview configured to match the main grid's styling and
@@ -17024,7 +17122,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17024
17122
  */
17025
17123
  createNestedGridview(orientation = "HORIZONTAL") {
17026
17124
  var _this$options$theme$g, _this$options$theme2;
17027
- 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);
17028
17126
  }
17029
17127
  /**
17030
17128
  * Wrap a (populated) floating gridview in an overlay window: title bar /
@@ -17098,10 +17196,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17098
17196
  const newDndStrategy = this.options.dndStrategy;
17099
17197
  if (oldDisableDnd !== newDisableDnd || oldDndStrategy !== newDndStrategy) this.updateDragAndDropState();
17100
17198
  if ("proportionalLayout" in options) {
17101
- var _this$_popoutWindowSe9, _this$_popoutWindowSe10;
17102
17199
  const proportionalLayout = this.gridview.proportionalLayout;
17103
- for (const floating of this.floatingGroups) floating.gridview.proportionalLayout = proportionalLayout;
17104
- 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;
17105
17201
  }
17106
17202
  if ("theme" in options) this.updateTheme();
17107
17203
  if ("createRightHeaderActionComponent" in options || "createLeftHeaderActionComponent" in options || "createPrefixHeaderActionComponent" in options) {
@@ -17170,7 +17266,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17170
17266
  const resizeDisposable = group.onDidChange((event) => {
17171
17267
  var _this$_shellManager3;
17172
17268
  if (!event) return;
17173
- const size = position === "left" || position === "right" ? event.width : event.height;
17269
+ const size = isHorizontal(position) ? event.width : event.height;
17174
17270
  if (typeof size !== "number") return;
17175
17271
  (_this$_shellManager3 = this._shellManager) === null || _this$_shellManager3 === void 0 || _this$_shellManager3.resizeEdgeGroup(position, size);
17176
17272
  });
@@ -17848,9 +17944,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17848
17944
  }
17849
17945
  closeAllGroups() {
17850
17946
  this.mutation("remove", () => {
17851
- for (const entry of this._groups.entries()) {
17852
- const [_, group] = entry;
17853
- 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 });
17854
17953
  }
17855
17954
  });
17856
17955
  }
@@ -17975,7 +18074,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17975
18074
  this.mutation("remove", () => {
17976
18075
  var _options$removeEmptyG;
17977
18076
  return this._doRemovePanel(panel, {
17978
- 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,
17979
18078
  skipDispose: options === null || options === void 0 ? void 0 : options.skipDispose,
17980
18079
  skipSetActiveGroup: options === null || options === void 0 ? void 0 : options.skipSetActiveGroup
17981
18080
  });
@@ -18131,7 +18230,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18131
18230
  if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
18132
18231
  if (!(options === null || options === void 0 ? void 0 : options.skipPopoutAssociated)) {
18133
18232
  const refGroup = selectedGroup.referenceGroup ? this.getPanel(selectedGroup.referenceGroup) : void 0;
18134
- 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);
18135
18234
  }
18136
18235
  selectedGroup.popoutGroup.dispose();
18137
18236
  this._groups.delete(group.id);
@@ -18391,7 +18490,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18391
18490
  skipSetActiveGroup: true
18392
18491
  }));
18393
18492
  if (!removedPanel) throw new Error(`dockview: No panel with id ${sourceItemId}`);
18394
- 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 });
18395
18494
  const isDestinationGroupEmpty = destinationGroup.model.size === 0;
18396
18495
  this.movingLock(() => {
18397
18496
  var _options$skipSetActiv;
@@ -18411,10 +18510,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18411
18510
  const destinationGridview = this.getGridviewForGroup(destinationGroup);
18412
18511
  const referenceLocation = getGridLocation(destinationGroup.element);
18413
18512
  const targetLocation = getRelativeLocation(destinationGridview.orientation, referenceLocation, destinationTarget);
18414
- if (sourceGroup.size < 2) {
18513
+ if (sourceGroup.size < 2 && !this.keepEmptyGroups(options)) {
18415
18514
  /**
18416
18515
  * If we are moving from a group which only has one panel left we will consider
18417
- * 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.
18418
18519
  */
18419
18520
  const [targetParentLocation, to] = tail(targetLocation);
18420
18521
  if (sourceGroup.api.location.type === "grid" && destinationGridview === this.gridview) {
@@ -18539,7 +18640,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18539
18640
  const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
18540
18641
  targetGroup = this.createGroupAtLocation(dropLocation, this.dropSizing(referenceLocation));
18541
18642
  }
18542
- 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 });
18543
18644
  addPanelsToGroup(targetGroup);
18544
18645
  }
18545
18646
  moveGroup(options) {
@@ -18866,13 +18967,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18866
18967
  return location.length % 2 == 1 ? rootOrientation : orthogonal(rootOrientation);
18867
18968
  }
18868
18969
  updateTheme() {
18869
- 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;
18870
18971
  const theme = (_this$_options$theme = this._options.theme) !== null && _this$_options$theme !== void 0 ? _this$_options$theme : themeAbyss;
18871
18972
  (_this$_shellThemeClas = this._shellThemeClassnames) === null || _this$_shellThemeClas === void 0 || _this$_shellThemeClas.setClassNames(theme.className);
18872
18973
  const gap = (_theme$gap = theme.gap) !== null && _theme$gap !== void 0 ? _theme$gap : 0;
18873
18974
  this.gridview.margin = gap;
18874
- for (const floating of this.floatingGroups) floating.gridview.margin = gap;
18875
- 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;
18876
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);
18877
18977
  if (theme.dndOverlayBorder === void 0) {
18878
18978
  var _this$_shellManager6;