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
  */
@@ -1158,8 +1158,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1158
1158
  if (visible === this.visible) return;
1159
1159
  if (visible) {
1160
1160
  var _this$_cachedVisibleS;
1161
- this.size = clamp((_this$_cachedVisibleS = this._cachedVisibleSize) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : 0, this.viewMinimumSize, this.viewMaximumSize);
1161
+ const cachedVisibleSize = (_this$_cachedVisibleS = this._cachedVisibleSize) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : 0;
1162
1162
  this._cachedVisibleSize = void 0;
1163
+ this.size = clamp(cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize);
1163
1164
  } else {
1164
1165
  this._cachedVisibleSize = typeof size === "number" ? size : this.size;
1165
1166
  this.size = 0;
@@ -1295,6 +1296,15 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1295
1296
  get margin() {
1296
1297
  return this._margin;
1297
1298
  }
1299
+ /**
1300
+ * The size each visible view gives up to the margins: `n` visible views
1301
+ * are separated by `n - 1` margins, spread evenly over the `n`.
1302
+ */
1303
+ get marginShare() {
1304
+ let visibleViewCount = 0;
1305
+ for (const item of this.viewItems) if (item.visible) visibleViewCount++;
1306
+ return this.marginShareFor(visibleViewCount);
1307
+ }
1298
1308
  set margin(value) {
1299
1309
  this._margin = value;
1300
1310
  toggleClass(this.element, "dv-splitview-has-margin", value !== 0);
@@ -1591,6 +1601,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1591
1601
  const previousSize = Math.max(this.size, this._contentSize);
1592
1602
  this.size = size;
1593
1603
  this.orthogonalSize = orthogonalSize;
1604
+ if (!this._proportions) this.saveProportions();
1594
1605
  if (this.proportions) {
1595
1606
  let total = 0;
1596
1607
  for (let i = 0; i < this.viewItems.length; i++) {
@@ -1647,7 +1658,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1647
1658
  }
1648
1659
  }
1649
1660
  saveProportions() {
1650
- if (this.proportionalLayout && this._contentSize > 0) this._proportions = this.viewItems.map((i) => i.visible ? i.size / this._contentSize : void 0);
1661
+ if (!this.proportionalLayout) return;
1662
+ let contentSize = 0;
1663
+ for (const item of this.viewItems) contentSize += item.size;
1664
+ if (contentSize > 0) this._proportions = this.viewItems.map((i) => i.visible ? i.size / contentSize : void 0);
1651
1665
  }
1652
1666
  /**
1653
1667
  * Margin explain:
@@ -1669,7 +1683,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1669
1683
  this.updateSashEnablement();
1670
1684
  if (this.viewItems.length === 0) return;
1671
1685
  const sashCount = Math.max(0, visibleViewCount - 1);
1672
- const marginReducedSize = this.margin * sashCount / Math.max(1, visibleViewCount);
1686
+ const marginReducedSize = this.marginShareFor(visibleViewCount);
1673
1687
  let totalLeftOffset = 0;
1674
1688
  const viewLeftOffsets = [];
1675
1689
  const sashWidth = 4;
@@ -1699,9 +1713,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
1699
1713
  view.setContainerGeometry("width", "");
1700
1714
  view.setContainerGeometry("left", "");
1701
1715
  }
1702
- view.view.layout(view.size - marginReducedSize, this._orthogonalSize);
1716
+ view.view.layout(size, this._orthogonalSize);
1703
1717
  });
1704
1718
  }
1719
+ marginShareFor(visibleViewCount) {
1720
+ const sashCount = Math.max(0, visibleViewCount - 1);
1721
+ return this._margin * sashCount / Math.max(1, visibleViewCount);
1722
+ }
1705
1723
  findFirstSnapIndex(indexes) {
1706
1724
  for (const index of indexes) {
1707
1725
  const viewItem = this.viewItems[index];
@@ -3947,9 +3965,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3947
3965
  }
3948
3966
  /**
3949
3967
  * Remove a panel given the panel object.
3968
+ *
3969
+ * `removeEmptyGroup` overrides the `closeEmptyGroups` option for this
3970
+ * call: `false` keeps the group if the panel was its last one, `true`
3971
+ * removes it.
3950
3972
  */
3951
- removePanel(panel) {
3952
- this.component.withOrigin("api", () => this.component.removePanel(panel));
3973
+ removePanel(panel, options) {
3974
+ this.component.withOrigin("api", () => this.component.removePanel(panel, options));
3953
3975
  }
3954
3976
  /**
3955
3977
  * Add a group and return the created object.
@@ -7003,6 +7025,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
7003
7025
  dndStrategy: void 0,
7004
7026
  className: void 0,
7005
7027
  noPanelsOverlay: void 0,
7028
+ closeEmptyGroups: void 0,
7006
7029
  dndEdges: void 0,
7007
7030
  dropPositionResolver: void 0,
7008
7031
  dndCompass: void 0,
@@ -11522,7 +11545,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
11522
11545
  });
11523
11546
  return;
11524
11547
  }
11525
- if (this.tabsContainer.indexOf(data.panelId) !== -1 && this.tabsContainer.size === 1) return;
11548
+ if (this.tabsContainer.indexOf(data.panelId) !== -1 && this.tabsContainer.size === 1 && this.accessor.options.closeEmptyGroups !== false) return;
11526
11549
  const { groupId, panelId } = data;
11527
11550
  if (this.id === groupId && !position) {
11528
11551
  if (this.tabsContainer.indexOf(panelId) === index) return;
@@ -11772,6 +11795,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
11772
11795
  constructor(id, accessor) {
11773
11796
  super(id, "__dockviewgroup__");
11774
11797
  this.accessor = accessor;
11798
+ this._isApplyingSize = false;
11775
11799
  this._onDidLocationChange = new Emitter();
11776
11800
  this.onDidLocationChange = this._onDidLocationChange.event;
11777
11801
  this._onDidActivePanelChange = new Emitter();
@@ -11784,14 +11808,29 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
11784
11808
  this.onDidHeaderDirectionChange = this._onDidHeaderDirectionChange.event;
11785
11809
  this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange, this._onDidCollapsedChange, this._onDidPeekChange, this._onDidHeaderDirectionChange, this._onDidVisibilityChange.event((event) => {
11786
11810
  if (event.isVisible && this._pendingSize) {
11787
- super.setSize(this._pendingSize);
11811
+ const pendingSize = this._pendingSize;
11788
11812
  this._pendingSize = void 0;
11813
+ super.setSize(pendingSize);
11789
11814
  }
11815
+ }), this.onDidDimensionsChange((event) => {
11816
+ var _this$_reportedSize, _this$_reportedSize2;
11817
+ 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);
11818
+ this._reportedSize = {
11819
+ width: event.width,
11820
+ height: event.height
11821
+ };
11822
+ if (moved && this.isVisible && !this._isApplyingSize) this._pendingSize = void 0;
11790
11823
  }));
11791
11824
  }
11792
11825
  setSize(event) {
11793
- this._pendingSize = _objectSpread2({}, event);
11794
- super.setSize(event);
11826
+ if (typeof event.width === "number" || typeof event.height === "number") this._pendingSize = _objectSpread2({}, event);
11827
+ const wasApplyingSize = this._isApplyingSize;
11828
+ this._isApplyingSize = true;
11829
+ try {
11830
+ super.setSize(event);
11831
+ } finally {
11832
+ this._isApplyingSize = wasApplyingSize;
11833
+ }
11795
11834
  }
11796
11835
  close() {
11797
11836
  if (!this._group) return;
@@ -15131,6 +15170,20 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15131
15170
 
15132
15171
  //#endregion
15133
15172
  //#region src/dockview/dockviewShell.ts
15173
+ const EDGE_POSITIONS = [
15174
+ "left",
15175
+ "right",
15176
+ "top",
15177
+ "bottom"
15178
+ ];
15179
+ function isHorizontal(position) {
15180
+ return position === "left" || position === "right";
15181
+ }
15182
+ /** A view outside a shell: no gap, and every layout is real. */
15183
+ const UNBOUNDED_AXIS = {
15184
+ marginShare: 0,
15185
+ size: Number.POSITIVE_INFINITY
15186
+ };
15134
15187
  var EdgeGroupView = class {
15135
15188
  /**
15136
15189
  * The effective (pre-gap) collapsed size: the measured tab-strip size when
@@ -15142,7 +15195,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15142
15195
  }
15143
15196
  get minimumSize() {
15144
15197
  if (this._isCollapsed) return this.collapsedSize;
15145
- return this._baseMinimumSize !== void 0 ? this._baseMinimumSize + this._gapAdd : this._effectiveBaseCollapsed + 50 + this._gapAdd;
15198
+ return this._baseMinimumSize !== void 0 ? this._baseMinimumSize + this._axis.marginShare : this._effectiveBaseCollapsed + 50 + this._axis.marginShare;
15146
15199
  }
15147
15200
  get maximumSize() {
15148
15201
  return this._isCollapsed ? this.collapsedSize : this._expandedMaximumSize;
@@ -15159,10 +15212,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15159
15212
  }
15160
15213
  /** Without the gap share. */
15161
15214
  get lastExpandedContentSize() {
15162
- return this._lastExpandedSize - this._gapAdd;
15215
+ return this._lastExpandedSize - this._axis.marginShare;
15163
15216
  }
15164
15217
  get collapsedSize() {
15165
- return this._effectiveBaseCollapsed + this._gapAdd;
15218
+ return this._effectiveBaseCollapsed + this._axis.marginShare;
15166
15219
  }
15167
15220
  /** The user-configured (pre-gap) geometry constraints, for serialization.
15168
15221
  * These are the raw values passed to `addEdgeGroup`, unlike the effective
@@ -15177,13 +15230,14 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15177
15230
  get configuredCollapsedSize() {
15178
15231
  return this._baseCollapsedSize;
15179
15232
  }
15180
- constructor(options, group, orientation, gapAdd = 0) {
15233
+ constructor(options, group, orientation, axis = UNBOUNDED_AXIS) {
15181
15234
  var _options$collapsedSiz, _options$maximumSize, _options$initialSize;
15182
15235
  this._onDidChange = new Emitter();
15183
15236
  this.onDidChange = this._onDidChange.event;
15184
15237
  this.snap = false;
15185
15238
  this.priority = "low";
15186
15239
  this._isCollapsed = false;
15240
+ this._isVisible = true;
15187
15241
  this._tabSizeDisposables = new CompositeDisposable();
15188
15242
  this._group = group;
15189
15243
  this._orientation = orientation;
@@ -15191,7 +15245,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15191
15245
  group.element.dataset.testid = `dv-edge-group-${options.id}`;
15192
15246
  this._baseCollapsedSize = (_options$collapsedSiz = options.collapsedSize) !== null && _options$collapsedSiz !== void 0 ? _options$collapsedSiz : 35;
15193
15247
  this._baseMinimumSize = options.minimumSize;
15194
- this._gapAdd = gapAdd;
15248
+ this._axis = axis;
15195
15249
  this._expandedMaximumSize = (_options$maximumSize = options.maximumSize) !== null && _options$maximumSize !== void 0 ? _options$maximumSize : Number.POSITIVE_INFINITY;
15196
15250
  this._lastExpandedSize = (_options$initialSize = options.initialSize) !== null && _options$initialSize !== void 0 ? _options$initialSize : 200;
15197
15251
  if (options.collapsed) {
@@ -15224,7 +15278,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15224
15278
  if (this._isCollapsed) this._onDidChange.fire({ size: this.collapsedSize });
15225
15279
  }
15226
15280
  layout(size, orthogonalSize) {
15227
- if (!this._isCollapsed) this._lastExpandedSize = size + this._gapAdd;
15281
+ if (!this._isCollapsed && this._isVisible && this._axis.size > 0) this._lastExpandedSize = size + this._axis.marginShare;
15228
15282
  if (this._orientation === "horizontal") this._group.layout(size, orthogonalSize);
15229
15283
  else this._group.layout(orthogonalSize, size);
15230
15284
  }
@@ -15233,25 +15287,25 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15233
15287
  this._isCollapsed = collapsed;
15234
15288
  this._group.element.classList.toggle("dv-edge-collapsed", collapsed);
15235
15289
  }
15236
- setVisible(_visible) {}
15290
+ setVisible(visible) {
15291
+ this._isVisible = visible;
15292
+ }
15237
15293
  /**
15238
- * Restore the last-expanded size from serialized state without triggering
15239
- * a layout. Must be called before setCollapsed(true) during fromJSON so
15240
- * that expanding after deserialization restores the correct size.
15294
+ * Set the expanded size without triggering a layout: from serialized
15295
+ * state (before setCollapsed(true) during fromJSON, so that expanding
15296
+ * restores the right size) or from an explicit resize.
15241
15297
  */
15242
15298
  restoreExpandedSize(size) {
15243
15299
  this._lastExpandedSize = size;
15244
15300
  }
15245
15301
  /**
15246
- * Apply a new base (pre-gap) collapsed size, base minimum size and gap
15247
- * contribution after a theme or gap change. Base values come from the
15248
- * original config; the ShellManager owns the gap arithmetic. A live
15249
- * measured tab size (if any) continues to win over the base collapsed size.
15302
+ * Apply a new base (pre-gap) collapsed size and base minimum size after a
15303
+ * theme change. Base values come from the original config. A live measured
15304
+ * tab size (if any) continues to win over the base collapsed size.
15250
15305
  */
15251
- updateSizing(baseCollapsedSize, baseMinimumSize, gapAdd) {
15306
+ updateSizing(baseCollapsedSize, baseMinimumSize) {
15252
15307
  this._baseCollapsedSize = baseCollapsedSize;
15253
15308
  this._baseMinimumSize = baseMinimumSize;
15254
- this._gapAdd = gapAdd;
15255
15309
  }
15256
15310
  dispose() {
15257
15311
  this._tabSizeDisposables.dispose();
@@ -15353,13 +15407,20 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15353
15407
  const index = position === "top" ? this._topIndex : this._bottomIndex;
15354
15408
  if (index !== void 0) this._splitview.resizeView(index, size);
15355
15409
  }
15356
- /** The inner splitview's primary-axis (height) extent; zero until laid out. */
15357
- get axisSize() {
15358
- return this._splitview.size;
15410
+ /** The inner splitview, as the axis its edge views read. */
15411
+ get axis() {
15412
+ return this._splitview;
15359
15413
  }
15360
15414
  updateMargin(gap) {
15361
15415
  this._splitview.margin = gap;
15362
15416
  }
15417
+ /** Disables the sashes of the top/bottom edge groups. */
15418
+ get disabled() {
15419
+ return this._splitview.disabled;
15420
+ }
15421
+ set disabled(value) {
15422
+ this._splitview.disabled = value;
15423
+ }
15363
15424
  dispose() {
15364
15425
  this._onDidChange.dispose();
15365
15426
  this._splitview.dispose();
@@ -15409,8 +15470,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15409
15470
  const width = Math.round(entry.contentRect.width);
15410
15471
  const height = Math.round(entry.contentRect.height);
15411
15472
  if (width === this._currentWidth && height === this._currentHeight) return;
15412
- this._currentWidth = width;
15413
- this._currentHeight = height;
15414
15473
  this.layout(width, height);
15415
15474
  }), this._outerSplitview, this._middleColumn, centerView);
15416
15475
  }
@@ -15418,6 +15477,18 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15418
15477
  return this._shellElement;
15419
15478
  }
15420
15479
  /**
15480
+ * The dock's `locked` option. The edge groups are resized with the sashes
15481
+ * of the shell's own splitviews (left/right in the outer one, top/bottom
15482
+ * in the middle column), so locking disables both.
15483
+ */
15484
+ get locked() {
15485
+ return this._outerSplitview.disabled;
15486
+ }
15487
+ set locked(value) {
15488
+ this._outerSplitview.disabled = value;
15489
+ this._middleColumn.disabled = value;
15490
+ }
15491
+ /**
15421
15492
  * Add an edge group view at the given position. The view wraps the
15422
15493
  * provided group element inside the shell's splitview layout.
15423
15494
  * Throws if a group at this position is already registered.
@@ -15425,14 +15496,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15425
15496
  addEdgeView(position, options, group) {
15426
15497
  if (this.hasEdgeGroup(position)) throw new Error(`dockview: edge group already registered at position '${position}'`);
15427
15498
  this._viewConfigs.set(position, options);
15428
- const outerN = 1 + (this._viewConfigs.has("left") ? 1 : 0) + (this._viewConfigs.has("right") ? 1 : 0);
15429
- const innerN = 1 + (this._viewConfigs.has("top") ? 1 : 0) + (this._viewConfigs.has("bottom") ? 1 : 0);
15430
- const outerGapAdd = outerN > 1 ? this._gap * (outerN - 1) / outerN : 0;
15431
- const innerGapAdd = innerN > 1 ? this._gap * (innerN - 1) / innerN : 0;
15432
- const isHorizontal = position === "left" || position === "right";
15433
- const gapAdd = isHorizontal ? outerGapAdd : innerGapAdd;
15434
- const orientation = isHorizontal ? "horizontal" : "vertical";
15435
- const view = new EdgeGroupView(_objectSpread2({ collapsedSize: this._defaultCollapsedSize }, options), group, orientation, gapAdd);
15499
+ const view = new EdgeGroupView(_objectSpread2({ collapsedSize: this._defaultCollapsedSize }, options), group, isHorizontal(position) ? "horizontal" : "vertical", this._axisFor(position));
15436
15500
  const initialSize = view.isCollapsed ? view.collapsedSize : view.lastExpandedSize;
15437
15501
  switch (position) {
15438
15502
  case "left":
@@ -15461,7 +15525,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15461
15525
  }
15462
15526
  this._disposables.addDisposables(view);
15463
15527
  if (!view.isCollapsed && !this._canResize(position)) this._pendingSizes.set(position, initialSize);
15464
- this.updateTheme(this._gap, this._defaultCollapsedSize);
15528
+ this._relayout();
15465
15529
  return view;
15466
15530
  }
15467
15531
  /**
@@ -15483,6 +15547,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15483
15547
  this.layout(width, height);
15484
15548
  }
15485
15549
  layout(width, height) {
15550
+ this._currentWidth = width;
15551
+ this._currentHeight = height;
15486
15552
  this._outerSplitview.layout(width, height);
15487
15553
  this._flushPendingSizes();
15488
15554
  }
@@ -15492,34 +15558,50 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15492
15558
  * and tab-strip dimensions.
15493
15559
  */
15494
15560
  updateTheme(gap, defaultCollapsedSize) {
15495
- var _this$_leftView, _this$_rightView, _this$_topView, _this$_bottomView;
15496
15561
  this._gap = gap;
15497
15562
  this._defaultCollapsedSize = defaultCollapsedSize;
15498
- const outerN = 1 + (this._viewConfigs.has("left") ? 1 : 0) + (this._viewConfigs.has("right") ? 1 : 0);
15499
- const innerN = 1 + (this._viewConfigs.has("top") ? 1 : 0) + (this._viewConfigs.has("bottom") ? 1 : 0);
15500
- const outerGapAdd = outerN > 1 ? gap * (outerN - 1) / outerN : 0;
15501
- const innerGapAdd = innerN > 1 ? gap * (innerN - 1) / innerN : 0;
15502
15563
  this._outerSplitview.margin = gap;
15503
15564
  this._middleColumn.updateMargin(gap);
15504
- const updateView = (view, baseCfg, gapAdd) => {
15505
- var _baseCfg$collapsedSiz;
15506
- const baseCS = (_baseCfg$collapsedSiz = baseCfg.collapsedSize) !== null && _baseCfg$collapsedSiz !== void 0 ? _baseCfg$collapsedSiz : defaultCollapsedSize;
15507
- view.updateSizing(baseCS, baseCfg.minimumSize, gapAdd);
15508
- };
15509
- const topCfg = this._viewConfigs.get("top");
15510
- if (this._topView && topCfg) updateView(this._topView, topCfg, innerGapAdd);
15511
- const bottomCfg = this._viewConfigs.get("bottom");
15512
- if (this._bottomView && bottomCfg) updateView(this._bottomView, bottomCfg, innerGapAdd);
15513
- const leftCfg = this._viewConfigs.get("left");
15514
- if (this._leftView && leftCfg) updateView(this._leftView, leftCfg, outerGapAdd);
15515
- const rightCfg = this._viewConfigs.get("right");
15516
- if (this._rightView && rightCfg) updateView(this._rightView, rightCfg, outerGapAdd);
15517
- 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);
15518
- 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);
15519
- if ((_this$_topView = this._topView) === null || _this$_topView === void 0 ? void 0 : _this$_topView.isCollapsed) this._middleColumn.resizeView("top", this._topView.collapsedSize);
15520
- if ((_this$_bottomView = this._bottomView) === null || _this$_bottomView === void 0 ? void 0 : _this$_bottomView.isCollapsed) this._middleColumn.resizeView("bottom", this._bottomView.collapsedSize);
15565
+ this._applyThemeSizing();
15566
+ this._relayout();
15567
+ }
15568
+ /** Whether the other edge of `position`'s axis holds a view. */
15569
+ _hasSiblingOn(position) {
15570
+ return isHorizontal(position) ? this._leftView !== void 0 && this._rightView !== void 0 : this._topView !== void 0 && this._bottomView !== void 0;
15571
+ }
15572
+ /** The splitview `position`'s view sits in, as its edge axis. */
15573
+ _axisFor(position) {
15574
+ return isHorizontal(position) ? this._outerSplitview : this._middleColumn.axis;
15575
+ }
15576
+ /** Re-derive every edge view's base sizing from its original config and
15577
+ * the current defaults. */
15578
+ _applyThemeSizing() {
15579
+ for (const position of EDGE_POSITIONS) {
15580
+ const view = this._getView(position);
15581
+ const baseCfg = this._viewConfigs.get(position);
15582
+ if (view && baseCfg) {
15583
+ var _baseCfg$collapsedSiz;
15584
+ view.updateSizing((_baseCfg$collapsedSiz = baseCfg.collapsedSize) !== null && _baseCfg$collapsedSiz !== void 0 ? _baseCfg$collapsedSiz : this._defaultCollapsedSize, baseCfg.minimumSize);
15585
+ }
15586
+ }
15587
+ }
15588
+ /**
15589
+ * Lay the shell out again at its current size, once it has one. The
15590
+ * splitviews clamp every view to its current constraints, which is how a
15591
+ * collapsed strip or a group at its minimum follows a moved gap share.
15592
+ */
15593
+ _relayout() {
15521
15594
  if (this._currentWidth > 0 && this._currentHeight > 0) this.layout(this._currentWidth, this._currentHeight);
15522
15595
  }
15596
+ /** The view's slot in its splitview: its laid-out size plus the gap share. */
15597
+ _slotSize(position) {
15598
+ switch (position) {
15599
+ case "left": return this._leftIndex === void 0 ? 0 : this._outerSplitview.getViewSize(this._leftIndex);
15600
+ case "right": return this._rightIndex === void 0 ? 0 : this._outerSplitview.getViewSize(this._rightIndex);
15601
+ case "top":
15602
+ case "bottom": return this._middleColumn.getViewSize(position);
15603
+ }
15604
+ }
15523
15605
  removeEdgeView(position) {
15524
15606
  const view = this._getView(position);
15525
15607
  if (!view) return;
@@ -15549,7 +15631,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15549
15631
  view.dispose();
15550
15632
  this._viewConfigs.delete(position);
15551
15633
  this._pendingSizes.delete(position);
15552
- this.updateTheme(this._gap, this._defaultCollapsedSize);
15634
+ this._relayout();
15553
15635
  }
15554
15636
  hasEdgeGroup(position) {
15555
15637
  switch (position) {
@@ -15560,6 +15642,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15560
15642
  }
15561
15643
  }
15562
15644
  setEdgeGroupVisible(position, visible) {
15645
+ const changes = this._getView(position) !== void 0 && visible !== this.isEdgeGroupVisible(position);
15563
15646
  switch (position) {
15564
15647
  case "left":
15565
15648
  if (this._leftIndex !== void 0) this._outerSplitview.setViewVisible(this._leftIndex, visible);
@@ -15572,6 +15655,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15572
15655
  this._middleColumn.setViewVisible(position, visible);
15573
15656
  break;
15574
15657
  }
15658
+ if (changes && this._gap > 0 && this._hasSiblingOn(position)) this._relayout();
15575
15659
  if (visible) this._flushPendingSizes();
15576
15660
  }
15577
15661
  isEdgeGroupVisible(position) {
@@ -15621,8 +15705,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15621
15705
  /** A resize lands only on a visible view (a hidden one is pinned to zero)
15622
15706
  * whose splitview has extent to distribute. */
15623
15707
  _canResize(position) {
15624
- if (!this.isEdgeGroupVisible(position)) return false;
15625
- return (position === "left" || position === "right" ? this._outerSplitview.size : this._middleColumn.axisSize) > 0;
15708
+ return this.isEdgeGroupVisible(position) && this._axisFor(position).size > 0;
15626
15709
  }
15627
15710
  _resizeView(position, size) {
15628
15711
  switch (position) {
@@ -15667,59 +15750,45 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15667
15750
  }
15668
15751
  toJSON() {
15669
15752
  const edgeGroups = {};
15670
- const constraints = (view) => ({
15671
- minimumSize: view.configuredMinimumSize,
15672
- maximumSize: Number.isFinite(view.configuredMaximumSize) ? view.configuredMaximumSize : void 0,
15673
- collapsedSize: view.configuredCollapsedSize
15674
- });
15675
- const expandedSize = (view, position, isVisible, liveSize, cachedVisibleSize) => {
15676
- if (view.isCollapsed) return view.lastExpandedSize;
15677
- const pending = this._pendingSizes.get(position);
15678
- if (pending !== void 0) return pending;
15679
- if (!isVisible) return cachedVisibleSize !== null && cachedVisibleSize !== void 0 ? cachedVisibleSize : view.lastExpandedSize;
15680
- return liveSize;
15681
- };
15682
- if (this._leftView && this._leftIndex !== void 0) {
15683
- const visible = this._outerSplitview.isViewVisible(this._leftIndex);
15684
- edgeGroups.left = _objectSpread2({
15685
- size: expandedSize(this._leftView, "left", visible, this._outerSplitview.getViewSize(this._leftIndex), this._outerSplitview.getViewCachedVisibleSize(this._leftIndex)),
15686
- visible,
15687
- collapsed: this._leftView.isCollapsed || void 0
15688
- }, constraints(this._leftView));
15689
- }
15690
- if (this._rightView && this._rightIndex !== void 0) {
15691
- const visible = this._outerSplitview.isViewVisible(this._rightIndex);
15692
- edgeGroups.right = _objectSpread2({
15693
- size: expandedSize(this._rightView, "right", visible, this._outerSplitview.getViewSize(this._rightIndex), this._outerSplitview.getViewCachedVisibleSize(this._rightIndex)),
15753
+ for (const position of EDGE_POSITIONS) {
15754
+ const view = this._getView(position);
15755
+ if (!view) continue;
15756
+ const visible = this.isEdgeGroupVisible(position);
15757
+ edgeGroups[position] = {
15758
+ size: this._expandedSize(view, position, visible),
15694
15759
  visible,
15695
- collapsed: this._rightView.isCollapsed || void 0
15696
- }, constraints(this._rightView));
15760
+ collapsed: view.isCollapsed || void 0,
15761
+ minimumSize: view.configuredMinimumSize,
15762
+ maximumSize: Number.isFinite(view.configuredMaximumSize) ? view.configuredMaximumSize : void 0,
15763
+ collapsedSize: view.configuredCollapsedSize
15764
+ };
15697
15765
  }
15698
- if (this._topView) {
15699
- const visible = this._middleColumn.isViewVisible("top");
15700
- edgeGroups.top = _objectSpread2({
15701
- size: expandedSize(this._topView, "top", visible, this._middleColumn.getViewSize("top"), this._middleColumn.getViewCachedVisibleSize("top")),
15702
- visible,
15703
- collapsed: this._topView.isCollapsed || void 0
15704
- }, constraints(this._topView));
15766
+ return edgeGroups;
15767
+ }
15768
+ /** The size to restore the group to. An expanded-but-hidden group has a
15769
+ * slot of 0, so fall back to its cached visible size (then
15770
+ * lastExpandedSize); otherwise re-showing snaps to minimumSize. */
15771
+ _expandedSize(view, position, visible) {
15772
+ if (view.isCollapsed) return view.lastExpandedSize;
15773
+ const pending = this._pendingSizes.get(position);
15774
+ if (pending !== void 0) return pending;
15775
+ if (!visible) {
15776
+ var _this$_cachedVisibleS;
15777
+ return (_this$_cachedVisibleS = this._cachedVisibleSize(position)) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : view.lastExpandedSize;
15705
15778
  }
15706
- if (this._bottomView) {
15707
- const visible = this._middleColumn.isViewVisible("bottom");
15708
- edgeGroups.bottom = _objectSpread2({
15709
- size: expandedSize(this._bottomView, "bottom", visible, this._middleColumn.getViewSize("bottom"), this._middleColumn.getViewCachedVisibleSize("bottom")),
15710
- visible,
15711
- collapsed: this._bottomView.isCollapsed || void 0
15712
- }, constraints(this._bottomView));
15779
+ return this._slotSize(position);
15780
+ }
15781
+ /** The slot a hidden view had when it was last visible. */
15782
+ _cachedVisibleSize(position) {
15783
+ switch (position) {
15784
+ case "left": return this._leftIndex === void 0 ? void 0 : this._outerSplitview.getViewCachedVisibleSize(this._leftIndex);
15785
+ case "right": return this._rightIndex === void 0 ? void 0 : this._outerSplitview.getViewCachedVisibleSize(this._rightIndex);
15786
+ case "top":
15787
+ case "bottom": return this._middleColumn.getViewCachedVisibleSize(position);
15713
15788
  }
15714
- return edgeGroups;
15715
15789
  }
15716
15790
  fromJSON(data) {
15717
- for (const position of [
15718
- "left",
15719
- "right",
15720
- "top",
15721
- "bottom"
15722
- ]) {
15791
+ for (const position of EDGE_POSITIONS) {
15723
15792
  var _state$collapsed;
15724
15793
  const state = data[position];
15725
15794
  const view = this._getView(position);
@@ -16430,6 +16499,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16430
16499
  this.disableResizing = true;
16431
16500
  this.element.remove();
16432
16501
  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);
16502
+ this._shellManager.locked = !!options.locked;
16433
16503
  this.popupService.updateRoot(this._shellManager.element);
16434
16504
  this._shellThemeClassnames = new Classnames(this._shellManager.element);
16435
16505
  this.rootDropTargetContainer = new DropTargetAnchorContainer(this._shellManager.element, { disabled: true });
@@ -16538,7 +16608,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16538
16608
  const service = assertModule(this._popoutWindowService, "PopoutWindow", "api.addPopoutGroup");
16539
16609
  if (!service) return Promise.resolve(false);
16540
16610
  if (itemToPopout instanceof DockviewGroupPanel && itemToPopout.model.location.type === "edge") return Promise.resolve(false);
16541
- if (itemToPopout instanceof DockviewPanel && itemToPopout.group.size === 1) return this.addPopoutGroup(itemToPopout.group, options);
16611
+ if (itemToPopout instanceof DockviewPanel && itemToPopout.group.size === 1 && this.closeEmptyGroups) return this.addPopoutGroup(itemToPopout.group, options);
16542
16612
  const theme = getDockviewTheme(this.gridview.element);
16543
16613
  const element = this.element;
16544
16614
  function getBox() {
@@ -16627,7 +16697,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16627
16697
  const overlayRenderContainer = new OverlayRenderContainer(gready, this);
16628
16698
  group.model.renderContainer = overlayRenderContainer;
16629
16699
  const popoutGridview = (_options$overridePopo4 = options === null || options === void 0 ? void 0 : options.overridePopoutGridview) !== null && _options$overridePopo4 !== void 0 ? _options$overridePopo4 : this.createNestedGridview();
16630
- if (!(options === null || options === void 0 ? void 0 : options.overridePopoutGridview)) popoutGridview.addView(group, Sizing.Distribute, [0]);
16700
+ if (options === null || options === void 0 ? void 0 : options.overridePopoutGridview) popoutGridview.locked = this.gridview.locked;
16701
+ else popoutGridview.addView(group, Sizing.Distribute, [0]);
16631
16702
  popoutGridview.element.style.width = "100%";
16632
16703
  popoutGridview.element.style.height = "100%";
16633
16704
  popoutGridview.layout(_window.window.innerWidth, _window.window.innerHeight);
@@ -17022,8 +17093,35 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17022
17093
  });
17023
17094
  for (const { panel, from } of movedPanels) this.fireDidMovePanel(panel, from);
17024
17095
  }
17096
+ /** The `closeEmptyGroups` option: remove a group once it empties. */
17097
+ get closeEmptyGroups() {
17098
+ return this.options.closeEmptyGroups !== false;
17099
+ }
17100
+ /** Whether a move leaves its emptied source group in place. */
17101
+ keepEmptyGroups(options) {
17102
+ var _options$keepEmptyGro;
17103
+ return (_options$keepEmptyGro = options.keepEmptyGroups) !== null && _options$keepEmptyGro !== void 0 ? _options$keepEmptyGro : !this.closeEmptyGroups;
17104
+ }
17025
17105
  removeGroupIfEmpty(group) {
17026
- if (group.model.size === 0) this.doRemoveGroup(group, { skipActive: true });
17106
+ if (group.model.size === 0 && this.closeEmptyGroups) this.doRemoveGroup(group, { skipActive: true });
17107
+ }
17108
+ /**
17109
+ * Locks the main grid, the shell whose splitviews host the edge groups,
17110
+ * and the nested gridviews of floating and popout windows. The base
17111
+ * setter stops at the main grid; `updateOptions` reaches this override.
17112
+ */
17113
+ get locked() {
17114
+ return this.gridview.locked;
17115
+ }
17116
+ set locked(value) {
17117
+ this.gridview.locked = value;
17118
+ if (this._shellManager) this._shellManager.locked = value;
17119
+ for (const gridview of this.nestedGridviews()) gridview.locked = value;
17120
+ }
17121
+ /** The gridviews hosted by open floating and popout windows. */
17122
+ nestedGridviews() {
17123
+ var _this$_popoutWindowSe9, _this$_popoutWindowSe10;
17124
+ 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)];
17027
17125
  }
17028
17126
  /**
17029
17127
  * Build an empty gridview configured to match the main grid's styling and
@@ -17032,7 +17130,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17032
17130
  */
17033
17131
  createNestedGridview(orientation = "HORIZONTAL") {
17034
17132
  var _this$options$theme$g, _this$options$theme2;
17035
- 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);
17133
+ 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);
17036
17134
  }
17037
17135
  /**
17038
17136
  * Wrap a (populated) floating gridview in an overlay window: title bar /
@@ -17106,10 +17204,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17106
17204
  const newDndStrategy = this.options.dndStrategy;
17107
17205
  if (oldDisableDnd !== newDisableDnd || oldDndStrategy !== newDndStrategy) this.updateDragAndDropState();
17108
17206
  if ("proportionalLayout" in options) {
17109
- var _this$_popoutWindowSe9, _this$_popoutWindowSe10;
17110
17207
  const proportionalLayout = this.gridview.proportionalLayout;
17111
- for (const floating of this.floatingGroups) floating.gridview.proportionalLayout = proportionalLayout;
17112
- 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;
17208
+ for (const gridview of this.nestedGridviews()) gridview.proportionalLayout = proportionalLayout;
17113
17209
  }
17114
17210
  if ("theme" in options) this.updateTheme();
17115
17211
  if ("createRightHeaderActionComponent" in options || "createLeftHeaderActionComponent" in options || "createPrefixHeaderActionComponent" in options) {
@@ -17178,7 +17274,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17178
17274
  const resizeDisposable = group.onDidChange((event) => {
17179
17275
  var _this$_shellManager3;
17180
17276
  if (!event) return;
17181
- const size = position === "left" || position === "right" ? event.width : event.height;
17277
+ const size = isHorizontal(position) ? event.width : event.height;
17182
17278
  if (typeof size !== "number") return;
17183
17279
  (_this$_shellManager3 = this._shellManager) === null || _this$_shellManager3 === void 0 || _this$_shellManager3.resizeEdgeGroup(position, size);
17184
17280
  });
@@ -17856,9 +17952,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17856
17952
  }
17857
17953
  closeAllGroups() {
17858
17954
  this.mutation("remove", () => {
17859
- for (const entry of this._groups.entries()) {
17860
- const [_, group] = entry;
17861
- group.value.model.closeAllPanels();
17955
+ const groups = Array.from(this._groups.values()).map((_) => _.value);
17956
+ for (const group of groups) {
17957
+ if (!this._groups.has(group.id)) continue;
17958
+ group.model.closeAllPanels();
17959
+ const keepLast = this.options.noPanelsOverlay === "emptyGroup" && this._groups.size === 1;
17960
+ if (!this.closeEmptyGroups && !keepLast && this._groups.has(group.id) && group.model.size === 0) this.removeGroup(group, { skipActive: true });
17862
17961
  }
17863
17962
  });
17864
17963
  }
@@ -17983,7 +18082,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
17983
18082
  this.mutation("remove", () => {
17984
18083
  var _options$removeEmptyG;
17985
18084
  return this._doRemovePanel(panel, {
17986
- removeEmptyGroup: (_options$removeEmptyG = options === null || options === void 0 ? void 0 : options.removeEmptyGroup) !== null && _options$removeEmptyG !== void 0 ? _options$removeEmptyG : true,
18085
+ removeEmptyGroup: (_options$removeEmptyG = options === null || options === void 0 ? void 0 : options.removeEmptyGroup) !== null && _options$removeEmptyG !== void 0 ? _options$removeEmptyG : this.closeEmptyGroups,
17987
18086
  skipDispose: options === null || options === void 0 ? void 0 : options.skipDispose,
17988
18087
  skipSetActiveGroup: options === null || options === void 0 ? void 0 : options.skipSetActiveGroup
17989
18088
  });
@@ -18139,7 +18238,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18139
18238
  if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
18140
18239
  if (!(options === null || options === void 0 ? void 0 : options.skipPopoutAssociated)) {
18141
18240
  const refGroup = selectedGroup.referenceGroup ? this.getPanel(selectedGroup.referenceGroup) : void 0;
18142
- if ((refGroup === null || refGroup === void 0 ? void 0 : refGroup.panels.length) === 0) this.removeGroup(refGroup);
18241
+ if ((refGroup === null || refGroup === void 0 ? void 0 : refGroup.panels.length) === 0 && (this.closeEmptyGroups || !refGroup.api.isVisible)) this.removeGroup(refGroup);
18143
18242
  }
18144
18243
  selectedGroup.popoutGroup.dispose();
18145
18244
  this._groups.delete(group.id);
@@ -18399,7 +18498,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18399
18498
  skipSetActiveGroup: true
18400
18499
  }));
18401
18500
  if (!removedPanel) throw new Error(`dockview: No panel with id ${sourceItemId}`);
18402
- if (!options.keepEmptyGroups && sourceGroup.model.size === 0 && sourceGroup !== destinationGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
18501
+ if (!this.keepEmptyGroups(options) && sourceGroup.model.size === 0 && sourceGroup !== destinationGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
18403
18502
  const isDestinationGroupEmpty = destinationGroup.model.size === 0;
18404
18503
  this.movingLock(() => {
18405
18504
  var _options$skipSetActiv;
@@ -18419,10 +18518,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18419
18518
  const destinationGridview = this.getGridviewForGroup(destinationGroup);
18420
18519
  const referenceLocation = getGridLocation(destinationGroup.element);
18421
18520
  const targetLocation = getRelativeLocation(destinationGridview.orientation, referenceLocation, destinationTarget);
18422
- if (sourceGroup.size < 2) {
18521
+ if (sourceGroup.size < 2 && !this.keepEmptyGroups(options)) {
18423
18522
  /**
18424
18523
  * If we are moving from a group which only has one panel left we will consider
18425
- * moving the group itself rather than moving the panel into a newly created group
18524
+ * moving the group itself rather than moving the panel into a newly created group.
18525
+ * When empty groups are kept the group must stay where it is, so the panel is
18526
+ * moved into a newly created group like any other panel.
18426
18527
  */
18427
18528
  const [targetParentLocation, to] = tail(targetLocation);
18428
18529
  if (sourceGroup.api.location.type === "grid" && destinationGridview === this.gridview) {
@@ -18547,7 +18648,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18547
18648
  const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
18548
18649
  targetGroup = this.createGroupAtLocation(dropLocation, this.dropSizing(referenceLocation));
18549
18650
  }
18550
- if (!options.keepEmptyGroups && sourceGroup.model.size === 0 && sourceGroup !== targetGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
18651
+ if (!this.keepEmptyGroups(options) && sourceGroup.model.size === 0 && sourceGroup !== targetGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
18551
18652
  addPanelsToGroup(targetGroup);
18552
18653
  }
18553
18654
  moveGroup(options) {
@@ -18874,13 +18975,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
18874
18975
  return location.length % 2 == 1 ? rootOrientation : orthogonal(rootOrientation);
18875
18976
  }
18876
18977
  updateTheme() {
18877
- var _this$_options$theme, _this$_shellThemeClas, _theme$gap, _this$_popoutWindowSe25, _this$_popoutWindowSe26, _this$_shellManager5, _theme$edgeGroupColla, _theme$tabGroupIndica;
18978
+ var _this$_options$theme, _this$_shellThemeClas, _theme$gap, _this$_shellManager5, _theme$edgeGroupColla, _theme$tabGroupIndica;
18878
18979
  const theme = (_this$_options$theme = this._options.theme) !== null && _this$_options$theme !== void 0 ? _this$_options$theme : themeAbyss;
18879
18980
  (_this$_shellThemeClas = this._shellThemeClassnames) === null || _this$_shellThemeClas === void 0 || _this$_shellThemeClas.setClassNames(theme.className);
18880
18981
  const gap = (_theme$gap = theme.gap) !== null && _theme$gap !== void 0 ? _theme$gap : 0;
18881
18982
  this.gridview.margin = gap;
18882
- for (const floating of this.floatingGroups) floating.gridview.margin = gap;
18883
- 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;
18983
+ for (const gridview of this.nestedGridviews()) gridview.margin = gap;
18884
18984
  (_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);
18885
18985
  if (theme.dndOverlayBorder === void 0) {
18886
18986
  var _this$_shellManager6;