dockview-core 7.0.2 → 7.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/cjs/api/dockviewGroupPanelApi.js +1 -1
  2. package/dist/cjs/dnd/dropTargetAnchorContainer.js +1 -2
  3. package/dist/cjs/dnd/pointer/longPress.js +1 -1
  4. package/dist/cjs/dnd/pointer/pointerDragController.js +9 -7
  5. package/dist/cjs/dnd/pointer/pointerDragSource.js +4 -2
  6. package/dist/cjs/dockview/components/panel/content.js +6 -6
  7. package/dist/cjs/dockview/components/popupService.js +1 -1
  8. package/dist/cjs/dockview/components/tab/tab.js +2 -2
  9. package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +1 -2
  10. package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +1 -2
  11. package/dist/cjs/dockview/components/titlebar/groupDragSource.js +1 -1
  12. package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +5 -6
  13. package/dist/cjs/dockview/components/titlebar/tabGroups.d.ts +27 -5
  14. package/dist/cjs/dockview/components/titlebar/tabGroups.js +104 -54
  15. package/dist/cjs/dockview/components/titlebar/tabs.js +16 -23
  16. package/dist/cjs/dockview/components/titlebar/voidContainer.js +1 -1
  17. package/dist/cjs/dockview/dndCapabilities.js +3 -3
  18. package/dist/cjs/dockview/dockviewComponent.d.ts +5 -5
  19. package/dist/cjs/dockview/dockviewComponent.js +140 -122
  20. package/dist/cjs/dockview/dockviewGroupPanel.d.ts +1 -1
  21. package/dist/cjs/dockview/dockviewGroupPanelModel.js +19 -25
  22. package/dist/cjs/dockview/dockviewPanel.js +4 -5
  23. package/dist/cjs/dockview/dockviewShell.d.ts +29 -7
  24. package/dist/cjs/dockview/dockviewShell.js +94 -36
  25. package/dist/cjs/dockview/strictEventsSequencing.js +6 -6
  26. package/dist/cjs/dockview/tabGroup.js +3 -3
  27. package/dist/cjs/dockview/tabGroupAccent.js +1 -3
  28. package/dist/cjs/dom.js +1 -1
  29. package/dist/cjs/events.js +1 -1
  30. package/dist/cjs/gridview/baseComponentGridview.js +3 -8
  31. package/dist/cjs/gridview/branchNode.js +13 -17
  32. package/dist/cjs/gridview/gridview.js +8 -8
  33. package/dist/cjs/gridview/gridviewComponent.js +1 -6
  34. package/dist/cjs/overlay/overlay.js +25 -28
  35. package/dist/cjs/overlay/overlayRenderContainer.js +3 -4
  36. package/dist/cjs/paneview/draggablePaneviewPanel.js +1 -1
  37. package/dist/cjs/paneview/paneviewComponent.js +2 -6
  38. package/dist/cjs/popoutWindow.js +4 -4
  39. package/dist/cjs/scrollbar.d.ts +1 -1
  40. package/dist/cjs/scrollbar.js +7 -6
  41. package/dist/cjs/splitview/splitview.d.ts +1 -1
  42. package/dist/cjs/splitview/splitview.js +21 -20
  43. package/dist/cjs/splitview/viewItem.js +1 -1
  44. package/dist/dockview-core.js +413 -330
  45. package/dist/dockview-core.min.js +2 -2
  46. package/dist/dockview-core.min.js.map +1 -1
  47. package/dist/dockview-core.min.noStyle.js +2 -2
  48. package/dist/dockview-core.min.noStyle.js.map +1 -1
  49. package/dist/dockview-core.noStyle.js +412 -329
  50. package/dist/esm/api/dockviewGroupPanelApi.js +1 -1
  51. package/dist/esm/dnd/dropTargetAnchorContainer.js +1 -2
  52. package/dist/esm/dnd/pointer/longPress.js +1 -1
  53. package/dist/esm/dnd/pointer/pointerDragController.js +9 -7
  54. package/dist/esm/dnd/pointer/pointerDragSource.js +4 -2
  55. package/dist/esm/dockview/components/panel/content.js +6 -6
  56. package/dist/esm/dockview/components/popupService.js +1 -1
  57. package/dist/esm/dockview/components/tab/tab.js +2 -2
  58. package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +1 -2
  59. package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +1 -2
  60. package/dist/esm/dockview/components/titlebar/groupDragSource.js +1 -1
  61. package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +5 -6
  62. package/dist/esm/dockview/components/titlebar/tabGroups.d.ts +27 -5
  63. package/dist/esm/dockview/components/titlebar/tabGroups.js +91 -42
  64. package/dist/esm/dockview/components/titlebar/tabs.js +17 -24
  65. package/dist/esm/dockview/components/titlebar/voidContainer.js +1 -1
  66. package/dist/esm/dockview/dndCapabilities.js +3 -3
  67. package/dist/esm/dockview/dockviewComponent.d.ts +5 -5
  68. package/dist/esm/dockview/dockviewComponent.js +61 -51
  69. package/dist/esm/dockview/dockviewGroupPanel.d.ts +1 -1
  70. package/dist/esm/dockview/dockviewGroupPanelModel.js +19 -25
  71. package/dist/esm/dockview/dockviewPanel.js +1 -2
  72. package/dist/esm/dockview/dockviewShell.d.ts +29 -7
  73. package/dist/esm/dockview/dockviewShell.js +89 -37
  74. package/dist/esm/dockview/strictEventsSequencing.js +6 -6
  75. package/dist/esm/dockview/tabGroup.js +3 -3
  76. package/dist/esm/dockview/tabGroupAccent.js +1 -3
  77. package/dist/esm/dom.js +1 -1
  78. package/dist/esm/events.js +1 -1
  79. package/dist/esm/gridview/baseComponentGridview.js +3 -8
  80. package/dist/esm/gridview/branchNode.js +13 -15
  81. package/dist/esm/gridview/gridview.js +8 -8
  82. package/dist/esm/gridview/gridviewComponent.js +1 -6
  83. package/dist/esm/overlay/overlay.js +25 -28
  84. package/dist/esm/overlay/overlayRenderContainer.js +3 -4
  85. package/dist/esm/paneview/draggablePaneviewPanel.js +1 -1
  86. package/dist/esm/paneview/paneviewComponent.js +2 -6
  87. package/dist/esm/popoutWindow.js +4 -4
  88. package/dist/esm/scrollbar.d.ts +1 -1
  89. package/dist/esm/scrollbar.js +7 -6
  90. package/dist/esm/splitview/splitview.d.ts +1 -1
  91. package/dist/esm/splitview/splitview.js +21 -20
  92. package/dist/esm/splitview/viewItem.js +1 -1
  93. package/dist/package/main.cjs.js +412 -329
  94. package/dist/package/main.cjs.min.js +2 -2
  95. package/dist/package/main.esm.min.mjs +2 -2
  96. package/dist/package/main.esm.mjs +412 -329
  97. package/dist/styles/dockview.css +8 -8
  98. package/package.json +1 -1
@@ -276,8 +276,8 @@ export declare class DockviewComponent extends BaseGrid<DockviewGroupPanel> impl
276
276
  private readonly _api;
277
277
  private readonly _moduleRegistry;
278
278
  private _options;
279
- private _tabGroupColorPalette;
280
- private _shellThemeClassnames;
279
+ private readonly _tabGroupColorPalette;
280
+ private readonly _shellThemeClassnames;
281
281
  readonly overlayRenderContainer: OverlayRenderContainer;
282
282
  readonly popupService: PopupService;
283
283
  readonly rootDropTargetContainer: DropTargetAnchorContainer;
@@ -340,8 +340,8 @@ export declare class DockviewComponent extends BaseGrid<DockviewGroupPanel> impl
340
340
  fireDidTabGroupCollapsedChange(event: DockviewTabGroupCollapsedChangeEvent): void;
341
341
  private readonly _onDidMaximizedGroupChange;
342
342
  readonly onDidMaximizedGroupChange: Event<DockviewMaximizedGroupChangeEvent>;
343
- private _shellManager;
344
- private _floatingOverlayHost;
343
+ private readonly _shellManager;
344
+ private readonly _floatingOverlayHost;
345
345
  private _inShellLayout;
346
346
  private readonly _onDidRemoveGroup;
347
347
  readonly onDidRemoveGroup: Event<DockviewGroupPanel>;
@@ -514,7 +514,7 @@ export declare class DockviewComponent extends BaseGrid<DockviewGroupPanel> impl
514
514
  addPanel<T extends object = Parameters>(options: AddPanelOptions<T>): DockviewPanel;
515
515
  private _doAddPanel;
516
516
  removePanel(panel: IDockviewPanel, options?: {
517
- removeEmptyGroup: boolean;
517
+ removeEmptyGroup?: boolean;
518
518
  skipDispose?: boolean;
519
519
  skipSetActiveGroup?: boolean;
520
520
  }): void;
@@ -63,9 +63,9 @@ let _hasWarnedUsingCoreDirectly = false;
63
63
  * `process` is undefined.
64
64
  */
65
65
  function warnIfUsingCoreDirectly() {
66
+ var _a;
66
67
  if (typeof process !== 'undefined' &&
67
- process.env &&
68
- process.env.NODE_ENV === 'production') {
68
+ ((_a = process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'production') {
69
69
  return;
70
70
  }
71
71
  if (_hasWarnedUsingCoreDirectly || isDockviewPackageLoaded()) {
@@ -456,7 +456,7 @@ export class DockviewComponent extends BaseGrid {
456
456
  // The shell always wraps the dockview element so edge groups can be
457
457
  // added at any time via addEdgeGroup() without re-parenting the DOM.
458
458
  this.disableResizing = true;
459
- container.removeChild(this.element);
459
+ this.element.remove();
460
460
  this._shellManager = new ShellManager(container, this.element, (w, h) => this._layoutFromShell(w, h), (_d = (_c = options.theme) === null || _c === void 0 ? void 0 : _c.gap) !== null && _d !== void 0 ? _d : 0, (_e = options.theme) === null || _e === void 0 ? void 0 : _e.edgeGroupCollapsedSize);
461
461
  // The shell wraps the dockview element, so move the popup anchor
462
462
  // into the shell so overflow dropdowns in edge groups position correctly
@@ -681,15 +681,13 @@ export class DockviewComponent extends BaseGrid {
681
681
  return _window
682
682
  .open()
683
683
  .then((popoutContainer) => {
684
- var _a, _b, _c;
684
+ var _a, _b, _c, _d;
685
685
  if (_window.isDisposed) {
686
686
  return false;
687
687
  }
688
- const referenceGroup = (options === null || options === void 0 ? void 0 : options.referenceGroup)
689
- ? options.referenceGroup
690
- : itemToPopout instanceof DockviewPanel
691
- ? itemToPopout.group
692
- : itemToPopout;
688
+ const referenceGroup = (_a = options === null || options === void 0 ? void 0 : options.referenceGroup) !== null && _a !== void 0 ? _a : (itemToPopout instanceof DockviewPanel
689
+ ? itemToPopout.group
690
+ : itemToPopout);
693
691
  const referenceLocation = itemToPopout.api.location.type;
694
692
  /**
695
693
  * The group that is being added doesn't already exist within the DOM, the most likely occurrence
@@ -700,7 +698,7 @@ export class DockviewComponent extends BaseGrid {
700
698
  if (options === null || options === void 0 ? void 0 : options.overridePopoutGridview) {
701
699
  // Restoring a multi-group window: the anchor group is
702
700
  // already built inside the supplied gridview.
703
- group = (_a = options.overridePopoutGroup) !== null && _a !== void 0 ? _a : referenceGroup;
701
+ group = (_b = options.overridePopoutGroup) !== null && _b !== void 0 ? _b : referenceGroup;
704
702
  }
705
703
  else if (!isGroupAddedToDom) {
706
704
  group = referenceGroup;
@@ -731,7 +729,7 @@ export class DockviewComponent extends BaseGrid {
731
729
  // a nested splitview layout. The window starts with the single
732
730
  // anchor group; further groups arrive via drag-and-drop. On
733
731
  // restore a pre-populated gridview is supplied instead.
734
- const popoutGridview = (_b = options === null || options === void 0 ? void 0 : options.overridePopoutGridview) !== null && _b !== void 0 ? _b : this.createNestedGridview();
732
+ const popoutGridview = (_c = options === null || options === void 0 ? void 0 : options.overridePopoutGridview) !== null && _c !== void 0 ? _c : this.createNestedGridview();
735
733
  if (!(options === null || options === void 0 ? void 0 : options.overridePopoutGridview)) {
736
734
  popoutGridview.addView(group, Sizing.Distribute, [0]);
737
735
  }
@@ -772,9 +770,9 @@ export class DockviewComponent extends BaseGrid {
772
770
  break;
773
771
  case 'floating':
774
772
  case 'popout':
775
- floatingBox = (_c = this.floatingGroups
773
+ floatingBox = (_d = this.floatingGroups
776
774
  .find((value) => value.group.api.id ===
777
- itemToPopout.api.id)) === null || _c === void 0 ? void 0 : _c.overlay.toJSON();
775
+ itemToPopout.api.id)) === null || _d === void 0 ? void 0 : _d.overlay.toJSON();
778
776
  this.removeGroup(referenceGroup);
779
777
  break;
780
778
  }
@@ -1617,7 +1615,7 @@ export class DockviewComponent extends BaseGrid {
1617
1615
  const createGroupFromSerializedState = (data) => {
1618
1616
  const { id, locked, hideHeader, headerPosition, views, activeView, } = data;
1619
1617
  if (typeof id !== 'string') {
1620
- throw new Error('dockview: group id must be of type string');
1618
+ throw new TypeError('dockview: group id must be of type string');
1621
1619
  }
1622
1620
  const group = this.createGroup({
1623
1621
  id,
@@ -1791,8 +1789,7 @@ export class DockviewComponent extends BaseGrid {
1791
1789
  createdPanels.push(panel);
1792
1790
  }
1793
1791
  }
1794
- for (let i = 0; i < createdPanels.length; i++) {
1795
- const panel = createdPanels[i];
1792
+ for (const panel of createdPanels) {
1796
1793
  const isActive = activeView === panel.id;
1797
1794
  edgeGroup.model.openPanel(panel, {
1798
1795
  skipSetActive: !isActive,
@@ -1937,8 +1934,8 @@ export class DockviewComponent extends BaseGrid {
1937
1934
  return this.mutation('add', () => this._doAddPanel(options));
1938
1935
  }
1939
1936
  _doAddPanel(options) {
1940
- var _a, _b;
1941
- if (this.panels.find((_) => _.id === options.id)) {
1937
+ var _a, _b, _c, _d;
1938
+ if (this.panels.some((_) => _.id === options.id)) {
1942
1939
  throw new Error(`dockview: panel with id ${options.id} already exists`);
1943
1940
  }
1944
1941
  let referenceGroup;
@@ -1957,18 +1954,24 @@ export class DockviewComponent extends BaseGrid {
1957
1954
  : options.position.referencePanel;
1958
1955
  index = options.position.index;
1959
1956
  if (!referencePanel) {
1960
- throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
1957
+ const referenceId = typeof options.position.referencePanel === 'string'
1958
+ ? options.position.referencePanel
1959
+ : (_a = options.position.referencePanel) === null || _a === void 0 ? void 0 : _a.id;
1960
+ throw new Error(`dockview: referencePanel '${referenceId}' does not exist`);
1961
1961
  }
1962
1962
  referenceGroup = this.findGroup(referencePanel);
1963
1963
  }
1964
1964
  else if (isPanelOptionsWithGroup(options.position)) {
1965
1965
  referenceGroup =
1966
1966
  typeof options.position.referenceGroup === 'string'
1967
- ? (_a = this._groups.get(options.position.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
1967
+ ? (_b = this._groups.get(options.position.referenceGroup)) === null || _b === void 0 ? void 0 : _b.value
1968
1968
  : options.position.referenceGroup;
1969
1969
  index = options.position.index;
1970
1970
  if (!referenceGroup) {
1971
- throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
1971
+ const referenceId = typeof options.position.referenceGroup === 'string'
1972
+ ? options.position.referenceGroup
1973
+ : (_c = options.position.referenceGroup) === null || _c === void 0 ? void 0 : _c.id;
1974
+ throw new Error(`dockview: referenceGroup '${referenceId}' does not exist`);
1972
1975
  }
1973
1976
  }
1974
1977
  else {
@@ -1994,7 +1997,7 @@ export class DockviewComponent extends BaseGrid {
1994
1997
  }
1995
1998
  let panel;
1996
1999
  if (referenceGroup) {
1997
- const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
2000
+ const target = toTarget(((_d = options.position) === null || _d === void 0 ? void 0 : _d.direction) || 'within');
1998
2001
  if (options.floating) {
1999
2002
  const group = this.createGroup();
2000
2003
  this._onDidAddGroup.fire(group);
@@ -2076,14 +2079,17 @@ export class DockviewComponent extends BaseGrid {
2076
2079
  }
2077
2080
  return panel;
2078
2081
  }
2079
- removePanel(panel, options = {
2080
- removeEmptyGroup: true,
2081
- }) {
2082
- this.mutation('remove', () => this._doRemovePanel(panel, options));
2082
+ removePanel(panel, options) {
2083
+ this.mutation('remove', () => {
2084
+ var _a;
2085
+ return this._doRemovePanel(panel, {
2086
+ removeEmptyGroup: (_a = options === null || options === void 0 ? void 0 : options.removeEmptyGroup) !== null && _a !== void 0 ? _a : true,
2087
+ skipDispose: options === null || options === void 0 ? void 0 : options.skipDispose,
2088
+ skipSetActiveGroup: options === null || options === void 0 ? void 0 : options.skipSetActiveGroup,
2089
+ });
2090
+ });
2083
2091
  }
2084
- _doRemovePanel(panel, options = {
2085
- removeEmptyGroup: true,
2086
- }) {
2092
+ _doRemovePanel(panel, options) {
2087
2093
  const group = panel.group;
2088
2094
  if (!group) {
2089
2095
  throw new Error(`dockview: cannot remove panel ${panel.id}. it's missing a group.`);
@@ -2109,28 +2115,34 @@ export class DockviewComponent extends BaseGrid {
2109
2115
  return this.mutation('add', () => this._doAddGroup(options));
2110
2116
  }
2111
2117
  _doAddGroup(options) {
2112
- var _a;
2118
+ var _a, _b, _c;
2113
2119
  if (options) {
2114
2120
  let referenceGroup;
2115
2121
  if (isGroupOptionsWithPanel(options)) {
2116
2122
  const referencePanel = typeof options.referencePanel === 'string'
2117
2123
  ? this.panels.find((panel) => panel.id === options.referencePanel)
2118
2124
  : options.referencePanel;
2125
+ const referencePanelId = typeof options.referencePanel === 'string'
2126
+ ? options.referencePanel
2127
+ : (_a = options.referencePanel) === null || _a === void 0 ? void 0 : _a.id;
2119
2128
  if (!referencePanel) {
2120
- throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
2129
+ throw new Error(`dockview: reference panel ${referencePanelId} does not exist`);
2121
2130
  }
2122
2131
  referenceGroup = this.findGroup(referencePanel);
2123
2132
  if (!referenceGroup) {
2124
- throw new Error(`dockview: reference group for reference panel ${options.referencePanel} does not exist`);
2133
+ throw new Error(`dockview: reference group for reference panel ${referencePanelId} does not exist`);
2125
2134
  }
2126
2135
  }
2127
2136
  else if (isGroupOptionsWithGroup(options)) {
2128
2137
  referenceGroup =
2129
2138
  typeof options.referenceGroup === 'string'
2130
- ? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
2139
+ ? (_b = this._groups.get(options.referenceGroup)) === null || _b === void 0 ? void 0 : _b.value
2131
2140
  : options.referenceGroup;
2132
2141
  if (!referenceGroup) {
2133
- throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
2142
+ const referenceId = typeof options.referenceGroup === 'string'
2143
+ ? options.referenceGroup
2144
+ : (_c = options.referenceGroup) === null || _c === void 0 ? void 0 : _c.id;
2145
+ throw new Error(`dockview: reference group ${referenceId} does not exist`);
2134
2146
  }
2135
2147
  }
2136
2148
  else {
@@ -2253,14 +2265,14 @@ export class DockviewComponent extends BaseGrid {
2253
2265
  if (this.detachFromNestedWindow(group)) {
2254
2266
  // The floating window hosts other groups and stays alive —
2255
2267
  // finalize just this group.
2256
- if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
2257
- this.disposeGroupRecord(group);
2258
- }
2259
- else {
2268
+ if (options === null || options === void 0 ? void 0 : options.skipDispose) {
2260
2269
  // Relocation: reset location so the destination root can
2261
2270
  // re-tag it.
2262
2271
  group.model.location = { type: 'grid' };
2263
2272
  }
2273
+ else {
2274
+ this.disposeGroupRecord(group);
2275
+ }
2264
2276
  this.activateFallbackGroupIfRemoved(group, options === null || options === void 0 ? void 0 : options.skipActive);
2265
2277
  return group;
2266
2278
  }
@@ -2281,14 +2293,14 @@ export class DockviewComponent extends BaseGrid {
2281
2293
  if (this.detachFromNestedWindow(group)) {
2282
2294
  // The popout window hosts other groups and stays alive —
2283
2295
  // finalize just this group.
2284
- if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
2285
- this.disposeGroupRecord(group);
2286
- }
2287
- else {
2296
+ if (options === null || options === void 0 ? void 0 : options.skipDispose) {
2288
2297
  // Relocation: reset location so the destination root can
2289
2298
  // re-tag it.
2290
2299
  group.model.location = { type: 'grid' };
2291
2300
  }
2301
+ else {
2302
+ this.disposeGroupRecord(group);
2303
+ }
2292
2304
  this.activateFallbackGroupIfRemoved(group, options === null || options === void 0 ? void 0 : options.skipActive);
2293
2305
  return group;
2294
2306
  }
@@ -2298,7 +2310,7 @@ export class DockviewComponent extends BaseGrid {
2298
2310
  const refGroup = selectedGroup.referenceGroup
2299
2311
  ? this.getPanel(selectedGroup.referenceGroup)
2300
2312
  : undefined;
2301
- if (refGroup && refGroup.panels.length === 0) {
2313
+ if ((refGroup === null || refGroup === void 0 ? void 0 : refGroup.panels.length) === 0) {
2302
2314
  this.removeGroup(refGroup);
2303
2315
  }
2304
2316
  }
@@ -2974,9 +2986,7 @@ export class DockviewComponent extends BaseGrid {
2974
2986
  return id;
2975
2987
  }
2976
2988
  createGroup(options) {
2977
- if (!options) {
2978
- options = {};
2979
- }
2989
+ options !== null && options !== void 0 ? options : (options = {});
2980
2990
  let id = options === null || options === void 0 ? void 0 : options.id;
2981
2991
  if (id && this._groups.has(options.id)) {
2982
2992
  console.warn(`dockview: Duplicate group id ${options === null || options === void 0 ? void 0 : options.id}. reassigning group id to avoid errors`);
@@ -3172,13 +3182,13 @@ export class DockviewComponent extends BaseGrid {
3172
3182
  entry.gridview.margin = gap;
3173
3183
  }
3174
3184
  (_f = this._shellManager) === null || _f === void 0 ? void 0 : _f.updateTheme(gap, (_g = theme.edgeGroupCollapsedSize) !== null && _g !== void 0 ? _g : 35);
3175
- if (theme.dndOverlayBorder !== undefined) {
3176
- this.element.style.setProperty('--dv-drag-over-border', theme.dndOverlayBorder);
3177
- (_h = this._shellManager) === null || _h === void 0 ? void 0 : _h.element.style.setProperty('--dv-drag-over-border', theme.dndOverlayBorder);
3185
+ if (theme.dndOverlayBorder === undefined) {
3186
+ this.element.style.removeProperty('--dv-drag-over-border');
3187
+ (_h = this._shellManager) === null || _h === void 0 ? void 0 : _h.element.style.removeProperty('--dv-drag-over-border');
3178
3188
  }
3179
3189
  else {
3180
- this.element.style.removeProperty('--dv-drag-over-border');
3181
- (_j = this._shellManager) === null || _j === void 0 ? void 0 : _j.element.style.removeProperty('--dv-drag-over-border');
3190
+ this.element.style.setProperty('--dv-drag-over-border', theme.dndOverlayBorder);
3191
+ (_j = this._shellManager) === null || _j === void 0 ? void 0 : _j.element.style.setProperty('--dv-drag-over-border', theme.dndOverlayBorder);
3182
3192
  }
3183
3193
  switch (theme.dndOverlayMounting) {
3184
3194
  case 'absolute':
@@ -13,7 +13,7 @@ export interface IDockviewGroupPanel extends IGridviewPanel<DockviewGroupPanelAp
13
13
  }
14
14
  export declare class DockviewGroupPanel extends GridviewPanel<DockviewGroupPanelApiImpl> implements IDockviewGroupPanel {
15
15
  private readonly _model;
16
- private _explicitConstraints;
16
+ private readonly _explicitConstraints;
17
17
  get minimumWidth(): number;
18
18
  get minimumHeight(): number;
19
19
  get maximumWidth(): number;
@@ -389,7 +389,7 @@ export class DockviewGroupPanelModel extends CompositeDisposable {
389
389
  }
390
390
  // Remove from any existing group first
391
391
  const existingGroup = this.getTabGroupForPanel(panelId);
392
- if (existingGroup && existingGroup.id === tabGroupId) {
392
+ if ((existingGroup === null || existingGroup === void 0 ? void 0 : existingGroup.id) === tabGroupId) {
393
393
  return; // already in this group — no mutation
394
394
  }
395
395
  this._bracketTabGroupMutation(() => {
@@ -410,7 +410,7 @@ export class DockviewGroupPanelModel extends CompositeDisposable {
410
410
  */
411
411
  movePanelWithinGroup(tabGroupId, panelId, newIndex) {
412
412
  const tabGroup = this._tabGroupMap.get(tabGroupId);
413
- if (!tabGroup || !tabGroup.containsPanel(panelId)) {
413
+ if (!(tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.containsPanel(panelId))) {
414
414
  return;
415
415
  }
416
416
  // Remove and re-add at new index within the group
@@ -623,7 +623,7 @@ export class DockviewGroupPanelModel extends CompositeDisposable {
623
623
  for (let i = activePanelIndex + 1; i < this._panels.length; i++) {
624
624
  const candidate = this._panels[i];
625
625
  const candidateGroup = this._findTabGroupForPanel(candidate.id);
626
- if (!candidateGroup || !candidateGroup.collapsed) {
626
+ if (!(candidateGroup === null || candidateGroup === void 0 ? void 0 : candidateGroup.collapsed)) {
627
627
  this.doSetActivePanel(candidate);
628
628
  this.updateContainer();
629
629
  return;
@@ -632,7 +632,7 @@ export class DockviewGroupPanelModel extends CompositeDisposable {
632
632
  for (let i = activePanelIndex - 1; i >= 0; i--) {
633
633
  const candidate = this._panels[i];
634
634
  const candidateGroup = this._findTabGroupForPanel(candidate.id);
635
- if (!candidateGroup || !candidateGroup.collapsed) {
635
+ if (!(candidateGroup === null || candidateGroup === void 0 ? void 0 : candidateGroup.collapsed)) {
636
636
  this.doSetActivePanel(candidate);
637
637
  this.updateContainer();
638
638
  return;
@@ -662,9 +662,9 @@ export class DockviewGroupPanelModel extends CompositeDisposable {
662
662
  restoreTabGroups(serializedGroups) {
663
663
  // Bump counter past any restored numeric suffixes to avoid ID collisions
664
664
  for (const data of serializedGroups) {
665
- const match = data.id.match(/-(\d+)$/);
665
+ const match = /-(\d+)$/.exec(data.id);
666
666
  if (match) {
667
- const num = parseInt(match[1], 10) + 1;
667
+ const num = Number.parseInt(match[1], 10) + 1;
668
668
  if (num > this._tabGroupIdCounter) {
669
669
  this._tabGroupIdCounter = num;
670
670
  }
@@ -781,32 +781,26 @@ export class DockviewGroupPanelModel extends CompositeDisposable {
781
781
  return result;
782
782
  }
783
783
  moveToNext(options) {
784
- if (!options) {
785
- options = {};
786
- }
787
- if (!options.panel) {
788
- options.panel = this.activePanel;
789
- }
784
+ var _a;
785
+ options !== null && options !== void 0 ? options : (options = {});
786
+ (_a = options.panel) !== null && _a !== void 0 ? _a : (options.panel = this.activePanel);
790
787
  const index = options.panel ? this.panels.indexOf(options.panel) : -1;
791
788
  let normalizedIndex;
792
789
  if (index < this.panels.length - 1) {
793
790
  normalizedIndex = index + 1;
794
791
  }
795
- else if (!options.suppressRoll) {
796
- normalizedIndex = 0;
792
+ else if (options.suppressRoll) {
793
+ return;
797
794
  }
798
795
  else {
799
- return;
796
+ normalizedIndex = 0;
800
797
  }
801
798
  this.openPanel(this.panels[normalizedIndex]);
802
799
  }
803
800
  moveToPrevious(options) {
804
- if (!options) {
805
- options = {};
806
- }
807
- if (!options.panel) {
808
- options.panel = this.activePanel;
809
- }
801
+ var _a;
802
+ options !== null && options !== void 0 ? options : (options = {});
803
+ (_a = options.panel) !== null && _a !== void 0 ? _a : (options.panel = this.activePanel);
810
804
  if (!options.panel) {
811
805
  return;
812
806
  }
@@ -815,11 +809,11 @@ export class DockviewGroupPanelModel extends CompositeDisposable {
815
809
  if (index > 0) {
816
810
  normalizedIndex = index - 1;
817
811
  }
818
- else if (!options.suppressRoll) {
819
- normalizedIndex = this.panels.length - 1;
812
+ else if (options.suppressRoll) {
813
+ return;
820
814
  }
821
815
  else {
822
- return;
816
+ normalizedIndex = this.panels.length - 1;
823
817
  }
824
818
  this.openPanel(this.panels[normalizedIndex]);
825
819
  }
@@ -919,7 +913,7 @@ export class DockviewGroupPanelModel extends CompositeDisposable {
919
913
  if (!this._activePanel && this.panels.length > 0) {
920
914
  const candidate = this._panels.find((p) => {
921
915
  const tg = this._findTabGroupForPanel(p.id);
922
- return !tg || !tg.collapsed;
916
+ return !(tg === null || tg === void 0 ? void 0 : tg.collapsed);
923
917
  });
924
918
  if (candidate) {
925
919
  this.doSetActivePanel(candidate);
@@ -103,9 +103,8 @@ export class DockviewPanel extends CompositeDisposable {
103
103
  }
104
104
  }
105
105
  update(event) {
106
- var _a;
107
106
  // merge the new parameters with the existing parameters
108
- this._params = Object.assign(Object.assign({}, ((_a = this._params) !== null && _a !== void 0 ? _a : {})), event.params);
107
+ this._params = Object.assign(Object.assign({}, this._params), event.params);
109
108
  /**
110
109
  * delete new keys that have a value of undefined,
111
110
  * allow values of null
@@ -56,16 +56,37 @@ export declare class EdgeGroupView implements IView {
56
56
  readonly priority = LayoutPriority.Low;
57
57
  private _isCollapsed;
58
58
  private _lastExpandedSize;
59
- private _collapsedSize;
60
- private _expandedMinimumSize;
59
+ private _baseCollapsedSize;
60
+ private _baseMinimumSize;
61
+ private _gapAdd;
61
62
  private readonly _expandedMaximumSize;
63
+ private _measuredTabSize;
64
+ private readonly _tabSizeDisposables;
65
+ /**
66
+ * The effective (pre-gap) collapsed size: the measured tab-strip size when
67
+ * available, otherwise the configured/theme base.
68
+ */
69
+ private get _effectiveBaseCollapsed();
62
70
  get minimumSize(): number;
63
71
  get maximumSize(): number;
64
72
  get element(): HTMLElement;
65
73
  get isCollapsed(): boolean;
66
74
  get lastExpandedSize(): number;
67
75
  get collapsedSize(): number;
68
- constructor(options: EdgeGroupOptions, group: IEdgeGroupHost, orientation: 'horizontal' | 'vertical');
76
+ constructor(options: EdgeGroupOptions, group: IEdgeGroupHost, orientation: 'horizontal' | 'vertical', gapAdd?: number);
77
+ /**
78
+ * Watch the group's tab strip so the collapsed size follows the live tab
79
+ * height. The strip's cross-axis size (height for top/bottom, width for
80
+ * left/right) is exactly what a collapsed edge group should occupy; a
81
+ * ResizeObserver keeps them in sync when the tab height changes at runtime.
82
+ */
83
+ private _observeTabStrip;
84
+ /**
85
+ * Apply a freshly-measured tab-strip cross size. When the group is
86
+ * collapsed this resizes it in the parent splitview so the collapsed strip
87
+ * always shows the full tab height.
88
+ */
89
+ private _applyMeasuredTabSize;
69
90
  layout(size: number, orthogonalSize: number): void;
70
91
  setCollapsed(collapsed: boolean): void;
71
92
  setVisible(_visible: boolean): void;
@@ -76,11 +97,12 @@ export declare class EdgeGroupView implements IView {
76
97
  */
77
98
  restoreExpandedSize(size: number): void;
78
99
  /**
79
- * Apply new effective collapsed and expanded-minimum sizes after a theme
80
- * or gap change. The caller (ShellManager) is responsible for computing
81
- * the correct values from the original config and the new gap.
100
+ * Apply a new base (pre-gap) collapsed size, base minimum size and gap
101
+ * contribution after a theme or gap change. Base values come from the
102
+ * original config; the ShellManager owns the gap arithmetic. A live
103
+ * measured tab size (if any) continues to win over the base collapsed size.
82
104
  */
83
- updateCollapsedSize(newCollapsedSize: number, newExpandedMinimumSize: number): void;
105
+ updateSizing(baseCollapsedSize: number, baseMinimumSize: number | undefined, gapAdd: number): void;
84
106
  dispose(): void;
85
107
  }
86
108
  export declare class ShellManager implements IDisposable {