dockview-core 6.6.1 → 7.0.3
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.
- package/README.md +8 -1
- package/dist/cjs/api/component.api.d.ts +42 -21
- package/dist/cjs/api/component.api.js +111 -20
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +23 -8
- package/dist/cjs/api/dockviewGroupPanelApi.js +24 -1
- package/dist/cjs/api/dockviewPanelApi.d.ts +4 -3
- package/dist/cjs/api/dockviewPanelApi.js +8 -0
- package/dist/cjs/dnd/dropTargetAnchorContainer.js +1 -2
- package/dist/cjs/dnd/droptarget.d.ts +8 -0
- package/dist/cjs/dnd/droptarget.js +28 -0
- package/dist/cjs/dnd/pointer/longPress.js +1 -1
- package/dist/cjs/dnd/pointer/pointerDragController.js +9 -7
- package/dist/cjs/dnd/pointer/pointerDragSource.js +4 -2
- package/dist/cjs/dockview/accessibilityMessages.d.ts +32 -0
- package/dist/cjs/dockview/accessibilityMessages.js +51 -0
- package/dist/cjs/dockview/allModules.d.ts +8 -0
- package/dist/cjs/dockview/allModules.js +25 -0
- package/dist/cjs/dockview/components/panel/content.d.ts +2 -0
- package/dist/cjs/dockview/components/panel/content.js +41 -10
- package/dist/cjs/dockview/components/popupService.js +1 -1
- package/dist/cjs/dockview/components/tab/tab.js +35 -7
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +34 -0
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.js +95 -0
- package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +51 -0
- package/dist/cjs/dockview/components/titlebar/groupDragSource.js +218 -0
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.d.ts +2 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +36 -30
- package/dist/cjs/dockview/components/titlebar/tabGroups.d.ts +27 -5
- package/dist/cjs/dockview/components/titlebar/tabGroups.js +104 -53
- package/dist/cjs/dockview/components/titlebar/tabs.d.ts +12 -0
- package/dist/cjs/dockview/components/titlebar/tabs.js +121 -25
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +13 -3
- package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +1 -4
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +32 -156
- package/dist/cjs/dockview/dndCapabilities.js +3 -3
- package/dist/cjs/dockview/dockviewComponent.d.ts +304 -49
- package/dist/cjs/dockview/dockviewComponent.js +1839 -1075
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +33 -2
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +39 -3
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +1 -2
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +36 -14
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +151 -125
- package/dist/cjs/dockview/dockviewPanel.d.ts +2 -2
- package/dist/cjs/dockview/dockviewPanel.js +4 -5
- package/dist/cjs/dockview/dockviewShell.d.ts +29 -7
- package/dist/cjs/dockview/dockviewShell.js +94 -36
- package/dist/cjs/dockview/edgeGroupService.d.ts +38 -0
- package/dist/cjs/dockview/edgeGroupService.js +128 -0
- package/dist/cjs/dockview/floatingGroupService.d.ts +37 -0
- package/dist/cjs/dockview/floatingGroupService.js +231 -0
- package/dist/cjs/dockview/headerActionsService.d.ts +32 -0
- package/dist/cjs/dockview/headerActionsService.js +149 -0
- package/dist/cjs/dockview/liveRegionService.d.ts +53 -0
- package/dist/cjs/dockview/liveRegionService.js +185 -0
- package/dist/cjs/dockview/moduleContracts.d.ts +119 -0
- package/dist/cjs/dockview/moduleContracts.js +2 -0
- package/dist/cjs/dockview/modules.d.ts +110 -0
- package/dist/cjs/dockview/modules.js +304 -0
- package/dist/cjs/dockview/options.d.ts +159 -6
- package/dist/cjs/dockview/options.js +8 -1
- package/dist/cjs/dockview/popoutWindowService.d.ts +95 -0
- package/dist/cjs/dockview/popoutWindowService.js +261 -0
- package/dist/cjs/dockview/rootDropTargetService.d.ts +35 -0
- package/dist/cjs/dockview/rootDropTargetService.js +87 -0
- package/dist/cjs/dockview/strictEventsSequencing.js +6 -6
- package/dist/cjs/dockview/tabGroup.js +3 -3
- package/dist/cjs/dockview/tabGroupAccent.js +1 -3
- package/dist/cjs/dockview/watermarkService.d.ts +30 -0
- package/dist/cjs/dockview/watermarkService.js +61 -0
- package/dist/cjs/dom.js +1 -1
- package/dist/cjs/events.js +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js +6 -10
- package/dist/cjs/gridview/branchNode.js +13 -17
- package/dist/cjs/gridview/gridview.js +8 -8
- package/dist/cjs/gridview/gridviewComponent.d.ts +3 -3
- package/dist/cjs/gridview/gridviewComponent.js +1 -6
- package/dist/cjs/gridview/gridviewPanel.d.ts +1 -1
- package/dist/cjs/index.d.ts +11 -4
- package/dist/cjs/index.js +14 -1
- package/dist/cjs/overlay/overlay.d.ts +43 -1
- package/dist/cjs/overlay/overlay.js +82 -36
- package/dist/cjs/overlay/overlayRenderContainer.js +3 -4
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.js +5 -5
- package/dist/cjs/paneview/paneviewComponent.d.ts +3 -3
- package/dist/cjs/paneview/paneviewComponent.js +7 -11
- package/dist/cjs/popoutWindow.js +4 -4
- package/dist/cjs/scrollbar.d.ts +1 -1
- package/dist/cjs/scrollbar.js +7 -6
- package/dist/cjs/splitview/splitview.d.ts +1 -1
- package/dist/cjs/splitview/splitview.js +21 -20
- package/dist/cjs/splitview/viewItem.js +1 -1
- package/dist/dockview-core.js +3548 -1544
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +3547 -1543
- package/dist/esm/api/component.api.d.ts +42 -21
- package/dist/esm/api/component.api.js +63 -18
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +23 -8
- package/dist/esm/api/dockviewGroupPanelApi.js +20 -1
- package/dist/esm/api/dockviewPanelApi.d.ts +4 -3
- package/dist/esm/api/dockviewPanelApi.js +7 -0
- package/dist/esm/dnd/dropTargetAnchorContainer.js +1 -2
- package/dist/esm/dnd/droptarget.d.ts +8 -0
- package/dist/esm/dnd/droptarget.js +28 -0
- package/dist/esm/dnd/pointer/longPress.js +1 -1
- package/dist/esm/dnd/pointer/pointerDragController.js +9 -7
- package/dist/esm/dnd/pointer/pointerDragSource.js +4 -2
- package/dist/esm/dockview/accessibilityMessages.d.ts +32 -0
- package/dist/esm/dockview/accessibilityMessages.js +30 -0
- package/dist/esm/dockview/allModules.d.ts +8 -0
- package/dist/esm/dockview/allModules.js +22 -0
- package/dist/esm/dockview/components/panel/content.d.ts +2 -0
- package/dist/esm/dockview/components/panel/content.js +42 -11
- package/dist/esm/dockview/components/popupService.js +1 -1
- package/dist/esm/dockview/components/tab/tab.js +35 -7
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +34 -0
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.js +65 -0
- package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +51 -0
- package/dist/esm/dockview/components/titlebar/groupDragSource.js +178 -0
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.d.ts +2 -1
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +36 -30
- package/dist/esm/dockview/components/titlebar/tabGroups.d.ts +27 -5
- package/dist/esm/dockview/components/titlebar/tabGroups.js +91 -41
- package/dist/esm/dockview/components/titlebar/tabs.d.ts +12 -0
- package/dist/esm/dockview/components/titlebar/tabs.js +119 -26
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +8 -2
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +1 -4
- package/dist/esm/dockview/components/titlebar/voidContainer.js +34 -146
- package/dist/esm/dockview/dndCapabilities.js +3 -3
- package/dist/esm/dockview/dockviewComponent.d.ts +304 -49
- package/dist/esm/dockview/dockviewComponent.js +1459 -772
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +33 -2
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +35 -3
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +1 -2
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +36 -14
- package/dist/esm/dockview/dockviewGroupPanelModel.js +127 -117
- package/dist/esm/dockview/dockviewPanel.d.ts +2 -2
- package/dist/esm/dockview/dockviewPanel.js +1 -2
- package/dist/esm/dockview/dockviewShell.d.ts +29 -7
- package/dist/esm/dockview/dockviewShell.js +89 -37
- package/dist/esm/dockview/edgeGroupService.d.ts +38 -0
- package/dist/esm/dockview/edgeGroupService.js +63 -0
- package/dist/esm/dockview/floatingGroupService.d.ts +37 -0
- package/dist/esm/dockview/floatingGroupService.js +150 -0
- package/dist/esm/dockview/headerActionsService.d.ts +32 -0
- package/dist/esm/dockview/headerActionsService.js +86 -0
- package/dist/esm/dockview/liveRegionService.d.ts +53 -0
- package/dist/esm/dockview/liveRegionService.js +159 -0
- package/dist/esm/dockview/moduleContracts.d.ts +119 -0
- package/dist/esm/dockview/moduleContracts.js +1 -0
- package/dist/esm/dockview/modules.d.ts +110 -0
- package/dist/esm/dockview/modules.js +170 -0
- package/dist/esm/dockview/options.d.ts +159 -6
- package/dist/esm/dockview/options.js +8 -1
- package/dist/esm/dockview/popoutWindowService.d.ts +95 -0
- package/dist/esm/dockview/popoutWindowService.js +175 -0
- package/dist/esm/dockview/rootDropTargetService.d.ts +35 -0
- package/dist/esm/dockview/rootDropTargetService.js +82 -0
- package/dist/esm/dockview/strictEventsSequencing.js +6 -6
- package/dist/esm/dockview/tabGroup.js +3 -3
- package/dist/esm/dockview/tabGroupAccent.js +1 -3
- package/dist/esm/dockview/watermarkService.d.ts +30 -0
- package/dist/esm/dockview/watermarkService.js +56 -0
- package/dist/esm/dom.js +1 -1
- package/dist/esm/events.js +1 -1
- package/dist/esm/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/esm/gridview/baseComponentGridview.js +5 -10
- package/dist/esm/gridview/branchNode.js +13 -15
- package/dist/esm/gridview/gridview.js +8 -8
- package/dist/esm/gridview/gridviewComponent.d.ts +3 -3
- package/dist/esm/gridview/gridviewComponent.js +1 -6
- package/dist/esm/gridview/gridviewPanel.d.ts +1 -1
- package/dist/esm/index.d.ts +11 -4
- package/dist/esm/index.js +4 -0
- package/dist/esm/overlay/overlay.d.ts +43 -1
- package/dist/esm/overlay/overlay.js +78 -36
- package/dist/esm/overlay/overlayRenderContainer.js +3 -4
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +5 -5
- package/dist/esm/paneview/paneviewComponent.d.ts +3 -3
- package/dist/esm/paneview/paneviewComponent.js +7 -11
- package/dist/esm/popoutWindow.js +4 -4
- package/dist/esm/scrollbar.d.ts +1 -1
- package/dist/esm/scrollbar.js +7 -6
- package/dist/esm/splitview/splitview.d.ts +1 -1
- package/dist/esm/splitview/splitview.js +21 -20
- package/dist/esm/splitview/viewItem.js +1 -1
- package/dist/package/main.cjs.js +3550 -1546
- package/dist/package/main.cjs.min.js +2 -2
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +3538 -1545
- package/dist/styles/dockview.css +283 -21
- package/package.json +10 -1
- package/dist/cjs/dockview/contextMenu.d.ts +0 -10
- package/dist/cjs/dockview/contextMenu.js +0 -313
- package/dist/esm/dockview/contextMenu.d.ts +0 -10
- package/dist/esm/dockview/contextMenu.js +0 -228
|
@@ -143,9 +143,6 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
143
143
|
_this.groupPanel = groupPanel;
|
|
144
144
|
_this._isGroupActive = false;
|
|
145
145
|
_this._locked = false;
|
|
146
|
-
_this._rightHeaderActionsDisposable = new lifecycle_1.MutableDisposable();
|
|
147
|
-
_this._leftHeaderActionsDisposable = new lifecycle_1.MutableDisposable();
|
|
148
|
-
_this._prefixHeaderActionsDisposable = new lifecycle_1.MutableDisposable();
|
|
149
146
|
_this._location = { type: 'grid' };
|
|
150
147
|
_this.mostRecentlyUsed = [];
|
|
151
148
|
_this._overwriteRenderContainer = null;
|
|
@@ -180,8 +177,8 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
180
177
|
_this.onDidRemovePanel = _this._onDidRemovePanel.event;
|
|
181
178
|
_this._onDidActivePanelChange = new events_1.Emitter();
|
|
182
179
|
_this.onDidActivePanelChange = _this._onDidActivePanelChange.event;
|
|
183
|
-
_this.
|
|
184
|
-
_this.
|
|
180
|
+
_this._onUnhandledDragOver = new events_1.Emitter();
|
|
181
|
+
_this.onUnhandledDragOver = _this._onUnhandledDragOver.event;
|
|
185
182
|
_this._tabGroups = [];
|
|
186
183
|
_this._tabGroupMap = new Map();
|
|
187
184
|
_this._panelToTabGroup = new Map();
|
|
@@ -200,6 +197,9 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
200
197
|
_this._onDidTabGroupCollapsedChange = new events_1.Emitter();
|
|
201
198
|
_this.onDidTabGroupCollapsedChange = _this._onDidTabGroupCollapsedChange.event;
|
|
202
199
|
(0, dom_1.toggleClass)(_this.container, 'dv-groupview', true);
|
|
200
|
+
// Each group is a navigable region, labelled by its active panel
|
|
201
|
+
// (see `updateAccessibleLabel`, driven on activation / title change).
|
|
202
|
+
_this.container.setAttribute('role', 'region');
|
|
203
203
|
_this._api = new component_api_1.DockviewApi(_this.accessor);
|
|
204
204
|
_this.tabsContainer = new tabsContainer_1.TabsContainer(_this.accessor, _this.groupPanel);
|
|
205
205
|
_this.contentContainer = new content_1.ContentContainer(_this.accessor, _this);
|
|
@@ -208,7 +208,12 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
208
208
|
_this.locked = (_a = options.locked) !== null && _a !== void 0 ? _a : false;
|
|
209
209
|
_this.headerPosition =
|
|
210
210
|
(_b = options.headerPosition) !== null && _b !== void 0 ? _b : accessor.defaultHeaderPosition;
|
|
211
|
-
_this.addDisposables(
|
|
211
|
+
_this.addDisposables(
|
|
212
|
+
// Keep the region's accessible name in sync when the active
|
|
213
|
+
// panel's title changes (no-op when a non-active title changes).
|
|
214
|
+
_this._onDidPanelTitleChange.event(function () {
|
|
215
|
+
return _this.updateAccessibleLabel();
|
|
216
|
+
}), _this._onTabDragStart, _this._onGroupDragStart, _this._onWillShowOverlay, _this.tabsContainer.onTabDragStart(function (event) {
|
|
212
217
|
_this._onTabDragStart.fire(event);
|
|
213
218
|
}), _this.tabsContainer.onGroupDragStart(function (event) {
|
|
214
219
|
_this._onGroupDragStart.fire(event);
|
|
@@ -285,7 +290,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
285
290
|
group: _this.groupPanel,
|
|
286
291
|
getData: dataTransfer_1.getPanelData,
|
|
287
292
|
}));
|
|
288
|
-
}), _this._onMove, _this._onDidChange, _this._onDidDrop, _this._onWillDrop, _this._onDidAddPanel, _this._onDidRemovePanel, _this._onDidActivePanelChange, _this.
|
|
293
|
+
}), _this._onMove, _this._onDidChange, _this._onDidDrop, _this._onWillDrop, _this._onDidAddPanel, _this._onDidRemovePanel, _this._onDidActivePanelChange, _this._onUnhandledDragOver, _this._onDidPanelTitleChange, _this._onDidPanelParametersChange, _this._onDidCreateTabGroup, _this._onDidDestroyTabGroup, _this._onDidAddPanelToTabGroup, _this._onDidRemovePanelFromTabGroup, _this._onDidTabGroupChange, _this._onDidTabGroupCollapsedChange, _this._onDidCreateTabGroup.event(function () {
|
|
289
294
|
_this._scheduleTabGroupUpdate();
|
|
290
295
|
}), _this._onDidDestroyTabGroup.event(function () {
|
|
291
296
|
_this._scheduleTabGroupUpdate();
|
|
@@ -321,6 +326,22 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
321
326
|
enumerable: false,
|
|
322
327
|
configurable: true
|
|
323
328
|
});
|
|
329
|
+
Object.defineProperty(DockviewGroupPanelModel.prototype, "contentContainerId", {
|
|
330
|
+
/** DOM id of the content container (the group's tabpanel), referenced by each tab's `aria-controls`. */
|
|
331
|
+
get: function () {
|
|
332
|
+
return this.contentContainer.element.id;
|
|
333
|
+
},
|
|
334
|
+
enumerable: false,
|
|
335
|
+
configurable: true
|
|
336
|
+
});
|
|
337
|
+
Object.defineProperty(DockviewGroupPanelModel.prototype, "contentDropTarget", {
|
|
338
|
+
/** The group's content drop target — lets keyboard docking preview a drop here. */
|
|
339
|
+
get: function () {
|
|
340
|
+
return this.contentContainer.dropTarget;
|
|
341
|
+
},
|
|
342
|
+
enumerable: false,
|
|
343
|
+
configurable: true
|
|
344
|
+
});
|
|
324
345
|
Object.defineProperty(DockviewGroupPanelModel.prototype, "locked", {
|
|
325
346
|
get: function () {
|
|
326
347
|
return this._locked;
|
|
@@ -402,11 +423,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
402
423
|
if ((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.layout) {
|
|
403
424
|
this._activePanel.layout(this._width, this._height);
|
|
404
425
|
}
|
|
405
|
-
|
|
406
|
-
this._rightHeaderActions ||
|
|
407
|
-
this._prefixHeaderActions) {
|
|
408
|
-
this.updateHeaderActions();
|
|
409
|
-
}
|
|
426
|
+
this.updateHeaderActions();
|
|
410
427
|
},
|
|
411
428
|
enumerable: false,
|
|
412
429
|
configurable: true
|
|
@@ -431,14 +448,15 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
431
448
|
applyZones(['top', 'bottom', 'left', 'right', 'center']);
|
|
432
449
|
break;
|
|
433
450
|
case 'floating':
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
: ['top', 'bottom', 'left', 'right', 'center']);
|
|
451
|
+
// Floating windows host their own nested gridview, so an edge
|
|
452
|
+
// drop splits the window's layout just like the main grid.
|
|
453
|
+
applyZones(['top', 'bottom', 'left', 'right', 'center']);
|
|
438
454
|
(0, dom_1.toggleClass)(this.container, 'dv-groupview-floating', true);
|
|
439
455
|
break;
|
|
440
456
|
case 'popout':
|
|
441
|
-
|
|
457
|
+
// Popout windows host their own nested gridview, so an edge
|
|
458
|
+
// drop splits the window's layout just like the main grid.
|
|
459
|
+
applyZones(['top', 'bottom', 'left', 'right', 'center']);
|
|
442
460
|
(0, dom_1.toggleClass)(this.container, 'dv-groupview-popout', true);
|
|
443
461
|
break;
|
|
444
462
|
case 'edge':
|
|
@@ -466,7 +484,25 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
466
484
|
}
|
|
467
485
|
});
|
|
468
486
|
};
|
|
487
|
+
/**
|
|
488
|
+
* Bracket a tab-group mutation as a layout transaction. `accessor` is
|
|
489
|
+
* always a full {@link DockviewComponent} in production; the optional-call
|
|
490
|
+
* fallback keeps partial test doubles (which omit `mutation`) working.
|
|
491
|
+
* When nested inside a larger operation (a drag-driven move, fromJSON
|
|
492
|
+
* restore) the component's depth counter folds it into the outer one.
|
|
493
|
+
*/
|
|
494
|
+
DockviewGroupPanelModel.prototype._bracketTabGroupMutation = function (func) {
|
|
495
|
+
return this.accessor.mutation
|
|
496
|
+
? this.accessor.mutation('tab-group', func)
|
|
497
|
+
: func();
|
|
498
|
+
};
|
|
469
499
|
DockviewGroupPanelModel.prototype.createTabGroup = function (options) {
|
|
500
|
+
var _this = this;
|
|
501
|
+
return this._bracketTabGroupMutation(function () {
|
|
502
|
+
return _this._doCreateTabGroup(options);
|
|
503
|
+
});
|
|
504
|
+
};
|
|
505
|
+
DockviewGroupPanelModel.prototype._doCreateTabGroup = function (options) {
|
|
470
506
|
var _this = this;
|
|
471
507
|
var _a;
|
|
472
508
|
var id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : "tg-".concat(this.id, "-").concat(this._tabGroupIdCounter++);
|
|
@@ -497,31 +533,35 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
497
533
|
return tabGroup;
|
|
498
534
|
};
|
|
499
535
|
DockviewGroupPanelModel.prototype.dissolveTabGroup = function (tabGroupId) {
|
|
500
|
-
var
|
|
536
|
+
var _this = this;
|
|
501
537
|
var tabGroup = this._tabGroupMap.get(tabGroupId);
|
|
502
538
|
if (!tabGroup) {
|
|
503
539
|
return;
|
|
504
540
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
var panelId = panelIds_1_1.value;
|
|
510
|
-
tabGroup.removePanel(panelId);
|
|
511
|
-
this._panelToTabGroup.delete(panelId);
|
|
512
|
-
this._onDidRemovePanelFromTabGroup.fire({ tabGroup: tabGroup, panelId: panelId });
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
516
|
-
finally {
|
|
541
|
+
this._bracketTabGroupMutation(function () {
|
|
542
|
+
var e_2, _a;
|
|
543
|
+
// Remove all panels from the group (they stay in the flat panel list)
|
|
544
|
+
var panelIds = __spreadArray([], __read(tabGroup.panelIds), false);
|
|
517
545
|
try {
|
|
518
|
-
|
|
546
|
+
for (var panelIds_1 = __values(panelIds), panelIds_1_1 = panelIds_1.next(); !panelIds_1_1.done; panelIds_1_1 = panelIds_1.next()) {
|
|
547
|
+
var panelId = panelIds_1_1.value;
|
|
548
|
+
tabGroup.removePanel(panelId);
|
|
549
|
+
_this._panelToTabGroup.delete(panelId);
|
|
550
|
+
_this._onDidRemovePanelFromTabGroup.fire({ tabGroup: tabGroup, panelId: panelId });
|
|
551
|
+
}
|
|
519
552
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
553
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
554
|
+
finally {
|
|
555
|
+
try {
|
|
556
|
+
if (panelIds_1_1 && !panelIds_1_1.done && (_a = panelIds_1.return)) _a.call(panelIds_1);
|
|
557
|
+
}
|
|
558
|
+
finally { if (e_2) throw e_2.error; }
|
|
559
|
+
}
|
|
560
|
+
tabGroup.dispose();
|
|
561
|
+
});
|
|
523
562
|
};
|
|
524
563
|
DockviewGroupPanelModel.prototype.addPanelToTabGroup = function (tabGroupId, panelId, index) {
|
|
564
|
+
var _this = this;
|
|
525
565
|
var tabGroup = this._tabGroupMap.get(tabGroupId);
|
|
526
566
|
if (!tabGroup) {
|
|
527
567
|
return;
|
|
@@ -532,18 +572,20 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
532
572
|
}
|
|
533
573
|
// Remove from any existing group first
|
|
534
574
|
var existingGroup = this.getTabGroupForPanel(panelId);
|
|
535
|
-
if (existingGroup) {
|
|
536
|
-
|
|
537
|
-
return; // already in this group
|
|
538
|
-
}
|
|
539
|
-
this.removePanelFromTabGroup(panelId);
|
|
575
|
+
if ((existingGroup === null || existingGroup === void 0 ? void 0 : existingGroup.id) === tabGroupId) {
|
|
576
|
+
return; // already in this group — no mutation
|
|
540
577
|
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
578
|
+
this._bracketTabGroupMutation(function () {
|
|
579
|
+
if (existingGroup) {
|
|
580
|
+
_this.removePanelFromTabGroup(panelId);
|
|
581
|
+
}
|
|
582
|
+
tabGroup.addPanel(panelId, index);
|
|
583
|
+
_this._panelToTabGroup.set(panelId, tabGroup);
|
|
584
|
+
// Enforce contiguity: move the panel in the flat _panels array
|
|
585
|
+
// to the correct global position matching its group-local index
|
|
586
|
+
_this._enforceContiguity(tabGroup, panelId);
|
|
587
|
+
_this._onDidAddPanelToTabGroup.fire({ tabGroup: tabGroup, panelId: panelId });
|
|
588
|
+
});
|
|
547
589
|
};
|
|
548
590
|
/**
|
|
549
591
|
* Move a panel to a new index within its tab group.
|
|
@@ -551,7 +593,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
551
593
|
*/
|
|
552
594
|
DockviewGroupPanelModel.prototype.movePanelWithinGroup = function (tabGroupId, panelId, newIndex) {
|
|
553
595
|
var tabGroup = this._tabGroupMap.get(tabGroupId);
|
|
554
|
-
if (!tabGroup ||
|
|
596
|
+
if (!(tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.containsPanel(panelId))) {
|
|
555
597
|
return;
|
|
556
598
|
}
|
|
557
599
|
// Remove and re-add at new index within the group
|
|
@@ -714,17 +756,20 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
714
756
|
return this._panels.length;
|
|
715
757
|
};
|
|
716
758
|
DockviewGroupPanelModel.prototype.removePanelFromTabGroup = function (panelId) {
|
|
759
|
+
var _this = this;
|
|
717
760
|
var tabGroup = this._findTabGroupForPanel(panelId);
|
|
718
761
|
if (!tabGroup) {
|
|
719
762
|
return;
|
|
720
763
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
tabGroup.
|
|
727
|
-
|
|
764
|
+
this._bracketTabGroupMutation(function () {
|
|
765
|
+
tabGroup.removePanel(panelId);
|
|
766
|
+
_this._panelToTabGroup.delete(panelId);
|
|
767
|
+
_this._onDidRemovePanelFromTabGroup.fire({ tabGroup: tabGroup, panelId: panelId });
|
|
768
|
+
// Auto-destroy empty groups
|
|
769
|
+
if (tabGroup.isEmpty) {
|
|
770
|
+
tabGroup.dispose();
|
|
771
|
+
}
|
|
772
|
+
});
|
|
728
773
|
};
|
|
729
774
|
DockviewGroupPanelModel.prototype.getTabGroups = function () {
|
|
730
775
|
return this._tabGroups;
|
|
@@ -801,7 +846,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
801
846
|
for (var i = activePanelIndex + 1; i < this._panels.length; i++) {
|
|
802
847
|
var candidate = this._panels[i];
|
|
803
848
|
var candidateGroup = this._findTabGroupForPanel(candidate.id);
|
|
804
|
-
if (!candidateGroup ||
|
|
849
|
+
if (!(candidateGroup === null || candidateGroup === void 0 ? void 0 : candidateGroup.collapsed)) {
|
|
805
850
|
this.doSetActivePanel(candidate);
|
|
806
851
|
this.updateContainer();
|
|
807
852
|
return;
|
|
@@ -810,7 +855,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
810
855
|
for (var i = activePanelIndex - 1; i >= 0; i--) {
|
|
811
856
|
var candidate = this._panels[i];
|
|
812
857
|
var candidateGroup = this._findTabGroupForPanel(candidate.id);
|
|
813
|
-
if (!candidateGroup ||
|
|
858
|
+
if (!(candidateGroup === null || candidateGroup === void 0 ? void 0 : candidateGroup.collapsed)) {
|
|
814
859
|
this.doSetActivePanel(candidate);
|
|
815
860
|
this.updateContainer();
|
|
816
861
|
return;
|
|
@@ -843,9 +888,9 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
843
888
|
// Bump counter past any restored numeric suffixes to avoid ID collisions
|
|
844
889
|
for (var serializedGroups_1 = __values(serializedGroups), serializedGroups_1_1 = serializedGroups_1.next(); !serializedGroups_1_1.done; serializedGroups_1_1 = serializedGroups_1.next()) {
|
|
845
890
|
var data = serializedGroups_1_1.value;
|
|
846
|
-
var match =
|
|
891
|
+
var match = /-(\d+)$/.exec(data.id);
|
|
847
892
|
if (match) {
|
|
848
|
-
var num = parseInt(match[1], 10) + 1;
|
|
893
|
+
var num = Number.parseInt(match[1], 10) + 1;
|
|
849
894
|
if (num > this._tabGroupIdCounter) {
|
|
850
895
|
this._tabGroupIdCounter = num;
|
|
851
896
|
}
|
|
@@ -911,6 +956,9 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
911
956
|
DockviewGroupPanelModel.prototype.focusContent = function () {
|
|
912
957
|
this.contentContainer.element.focus();
|
|
913
958
|
};
|
|
959
|
+
DockviewGroupPanelModel.prototype.focusActiveTab = function () {
|
|
960
|
+
this.tabsContainer.focusActiveTab();
|
|
961
|
+
};
|
|
914
962
|
Object.defineProperty(DockviewGroupPanelModel.prototype, "renderContainer", {
|
|
915
963
|
get: function () {
|
|
916
964
|
var _a;
|
|
@@ -957,54 +1005,20 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
957
1005
|
this.updateHeaderActions();
|
|
958
1006
|
};
|
|
959
1007
|
DockviewGroupPanelModel.prototype.updateHeaderActions = function () {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
this.tabsContainer.setRightActionsElement(undefined);
|
|
975
|
-
}
|
|
976
|
-
if (this.accessor.options.createLeftHeaderActionComponent) {
|
|
977
|
-
this._leftHeaderActions =
|
|
978
|
-
this.accessor.options.createLeftHeaderActionComponent(this.groupPanel);
|
|
979
|
-
this._leftHeaderActionsDisposable.value = this._leftHeaderActions;
|
|
980
|
-
this._leftHeaderActions.init({
|
|
981
|
-
containerApi: this._api,
|
|
982
|
-
api: this.groupPanel.api,
|
|
983
|
-
group: this.groupPanel,
|
|
984
|
-
});
|
|
985
|
-
this.tabsContainer.setLeftActionsElement(this._leftHeaderActions.element);
|
|
986
|
-
}
|
|
987
|
-
else {
|
|
988
|
-
this._leftHeaderActions = undefined;
|
|
989
|
-
this._leftHeaderActionsDisposable.dispose();
|
|
990
|
-
this.tabsContainer.setLeftActionsElement(undefined);
|
|
991
|
-
}
|
|
992
|
-
if (this.accessor.options.createPrefixHeaderActionComponent) {
|
|
993
|
-
this._prefixHeaderActions =
|
|
994
|
-
this.accessor.options.createPrefixHeaderActionComponent(this.groupPanel);
|
|
995
|
-
this._prefixHeaderActionsDisposable.value =
|
|
996
|
-
this._prefixHeaderActions;
|
|
997
|
-
this._prefixHeaderActions.init({
|
|
998
|
-
containerApi: this._api,
|
|
999
|
-
api: this.groupPanel.api,
|
|
1000
|
-
group: this.groupPanel,
|
|
1001
|
-
});
|
|
1002
|
-
this.tabsContainer.setPrefixActionsElement(this._prefixHeaderActions.element);
|
|
1003
|
-
}
|
|
1004
|
-
else {
|
|
1005
|
-
this._prefixHeaderActions = undefined;
|
|
1006
|
-
this._prefixHeaderActionsDisposable.dispose();
|
|
1007
|
-
this.tabsContainer.setPrefixActionsElement(undefined);
|
|
1008
|
+
var _a;
|
|
1009
|
+
(_a = this.accessor.headerActionsService) === null || _a === void 0 ? void 0 : _a.refresh(this.groupPanel);
|
|
1010
|
+
};
|
|
1011
|
+
DockviewGroupPanelModel.prototype.attachHeaderAction = function (slot, element) {
|
|
1012
|
+
switch (slot) {
|
|
1013
|
+
case 'left':
|
|
1014
|
+
this.tabsContainer.setLeftActionsElement(element);
|
|
1015
|
+
break;
|
|
1016
|
+
case 'right':
|
|
1017
|
+
this.tabsContainer.setRightActionsElement(element);
|
|
1018
|
+
break;
|
|
1019
|
+
case 'prefix':
|
|
1020
|
+
this.tabsContainer.setPrefixActionsElement(element);
|
|
1021
|
+
break;
|
|
1008
1022
|
}
|
|
1009
1023
|
};
|
|
1010
1024
|
DockviewGroupPanelModel.prototype.rerender = function (panel) {
|
|
@@ -1035,32 +1049,26 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
1035
1049
|
return result;
|
|
1036
1050
|
};
|
|
1037
1051
|
DockviewGroupPanelModel.prototype.moveToNext = function (options) {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
if (!options.panel) {
|
|
1042
|
-
options.panel = this.activePanel;
|
|
1043
|
-
}
|
|
1052
|
+
var _a;
|
|
1053
|
+
options !== null && options !== void 0 ? options : (options = {});
|
|
1054
|
+
(_a = options.panel) !== null && _a !== void 0 ? _a : (options.panel = this.activePanel);
|
|
1044
1055
|
var index = options.panel ? this.panels.indexOf(options.panel) : -1;
|
|
1045
1056
|
var normalizedIndex;
|
|
1046
1057
|
if (index < this.panels.length - 1) {
|
|
1047
1058
|
normalizedIndex = index + 1;
|
|
1048
1059
|
}
|
|
1049
|
-
else if (
|
|
1050
|
-
|
|
1060
|
+
else if (options.suppressRoll) {
|
|
1061
|
+
return;
|
|
1051
1062
|
}
|
|
1052
1063
|
else {
|
|
1053
|
-
|
|
1064
|
+
normalizedIndex = 0;
|
|
1054
1065
|
}
|
|
1055
1066
|
this.openPanel(this.panels[normalizedIndex]);
|
|
1056
1067
|
};
|
|
1057
1068
|
DockviewGroupPanelModel.prototype.moveToPrevious = function (options) {
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
if (!options.panel) {
|
|
1062
|
-
options.panel = this.activePanel;
|
|
1063
|
-
}
|
|
1069
|
+
var _a;
|
|
1070
|
+
options !== null && options !== void 0 ? options : (options = {});
|
|
1071
|
+
(_a = options.panel) !== null && _a !== void 0 ? _a : (options.panel = this.activePanel);
|
|
1064
1072
|
if (!options.panel) {
|
|
1065
1073
|
return;
|
|
1066
1074
|
}
|
|
@@ -1069,11 +1077,11 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
1069
1077
|
if (index > 0) {
|
|
1070
1078
|
normalizedIndex = index - 1;
|
|
1071
1079
|
}
|
|
1072
|
-
else if (
|
|
1073
|
-
|
|
1080
|
+
else if (options.suppressRoll) {
|
|
1081
|
+
return;
|
|
1074
1082
|
}
|
|
1075
1083
|
else {
|
|
1076
|
-
|
|
1084
|
+
normalizedIndex = this.panels.length - 1;
|
|
1077
1085
|
}
|
|
1078
1086
|
this.openPanel(this.panels[normalizedIndex]);
|
|
1079
1087
|
};
|
|
@@ -1188,7 +1196,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
1188
1196
|
if (!this._activePanel && this.panels.length > 0) {
|
|
1189
1197
|
var candidate = this._panels.find(function (p) {
|
|
1190
1198
|
var tg = _this._findTabGroupForPanel(p.id);
|
|
1191
|
-
return !tg ||
|
|
1199
|
+
return !(tg === null || tg === void 0 ? void 0 : tg.collapsed);
|
|
1192
1200
|
});
|
|
1193
1201
|
if (candidate) {
|
|
1194
1202
|
this.doSetActivePanel(candidate);
|
|
@@ -1272,12 +1280,15 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
1272
1280
|
this._onDidAddPanel.fire({ panel: panel });
|
|
1273
1281
|
};
|
|
1274
1282
|
DockviewGroupPanelModel.prototype.doSetActivePanel = function (panel) {
|
|
1283
|
+
var _a, _b, _c;
|
|
1275
1284
|
if (this._activePanel === panel) {
|
|
1276
1285
|
return;
|
|
1277
1286
|
}
|
|
1278
1287
|
this._activePanel = panel;
|
|
1279
1288
|
if (panel) {
|
|
1280
1289
|
this.tabsContainer.setActivePanel(panel);
|
|
1290
|
+
// Point the tabpanel's `aria-labelledby` at the now-active tab.
|
|
1291
|
+
this.contentContainer.setLabelledBy(this.tabsContainer.getTabId(panel.id));
|
|
1281
1292
|
this.contentContainer.openPanel(panel);
|
|
1282
1293
|
panel.layout(this._width, this._height);
|
|
1283
1294
|
this.updateMru(panel);
|
|
@@ -1285,8 +1296,23 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
1285
1296
|
this.contentContainer.refreshFocusState();
|
|
1286
1297
|
this._onDidActivePanelChange.fire({
|
|
1287
1298
|
panel: panel,
|
|
1299
|
+
// `currentOrigin` is always present on the real component;
|
|
1300
|
+
// default to 'user' for minimal test accessors.
|
|
1301
|
+
origin: (_c = (_b = (_a = this.accessor).currentOrigin) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : 'user',
|
|
1288
1302
|
});
|
|
1289
1303
|
}
|
|
1304
|
+
this.updateAccessibleLabel();
|
|
1305
|
+
};
|
|
1306
|
+
/** Label the group region with its active panel's title (the WAI-ARIA region name). */
|
|
1307
|
+
DockviewGroupPanelModel.prototype.updateAccessibleLabel = function () {
|
|
1308
|
+
var _a;
|
|
1309
|
+
var title = (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.title;
|
|
1310
|
+
if (title) {
|
|
1311
|
+
this.container.setAttribute('aria-label', title);
|
|
1312
|
+
}
|
|
1313
|
+
else {
|
|
1314
|
+
this.container.removeAttribute('aria-label');
|
|
1315
|
+
}
|
|
1290
1316
|
};
|
|
1291
1317
|
DockviewGroupPanelModel.prototype.updateMru = function (panel) {
|
|
1292
1318
|
if (this.mostRecentlyUsed.includes(panel)) {
|
|
@@ -1321,7 +1347,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
1321
1347
|
};
|
|
1322
1348
|
DockviewGroupPanelModel.prototype.canDisplayOverlay = function (event, position, target) {
|
|
1323
1349
|
var firedEvent = new options_1.DockviewUnhandledDragOverEvent(event, target, position, dataTransfer_1.getPanelData, this.accessor.getPanel(this.id));
|
|
1324
|
-
this.
|
|
1350
|
+
this._onUnhandledDragOver.fire(firedEvent);
|
|
1325
1351
|
return firedEvent.isAccepted;
|
|
1326
1352
|
};
|
|
1327
1353
|
DockviewGroupPanelModel.prototype.handleDropEvent = function (type, event, position, index) {
|
|
@@ -7,7 +7,7 @@ import { IPanel, PanelUpdateEvent, Parameters } from '../panel/types';
|
|
|
7
7
|
import { IDockviewPanelModel } from './dockviewPanelModel';
|
|
8
8
|
import { DockviewComponent } from './dockviewComponent';
|
|
9
9
|
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
|
10
|
-
import {
|
|
10
|
+
import { Constraints } from '../gridview/gridviewPanel';
|
|
11
11
|
export interface IDockviewPanel extends IDisposable, IPanel {
|
|
12
12
|
readonly view: IDockviewPanelModel;
|
|
13
13
|
readonly group: DockviewGroupPanel;
|
|
@@ -52,7 +52,7 @@ export declare class DockviewPanel extends CompositeDisposable implements IDockv
|
|
|
52
52
|
get maximumHeight(): number | undefined;
|
|
53
53
|
constructor(id: string, component: string, tabComponent: string | undefined, accessor: DockviewComponent, containerApi: DockviewApi, group: DockviewGroupPanel, view: IDockviewPanelModel, options: {
|
|
54
54
|
renderer?: DockviewPanelRenderer;
|
|
55
|
-
} & Partial<
|
|
55
|
+
} & Partial<Constraints>);
|
|
56
56
|
init(params: IGroupPanelInitParameters): void;
|
|
57
57
|
focus(): void;
|
|
58
58
|
toJSON(): GroupviewPanelState;
|
|
@@ -178,16 +178,15 @@ var DockviewPanel = /** @class */ (function (_super) {
|
|
|
178
178
|
};
|
|
179
179
|
DockviewPanel.prototype.update = function (event) {
|
|
180
180
|
var e_1, _a;
|
|
181
|
-
var _b;
|
|
182
181
|
// merge the new parameters with the existing parameters
|
|
183
|
-
this._params = __assign(__assign({},
|
|
182
|
+
this._params = __assign(__assign({}, this._params), event.params);
|
|
184
183
|
try {
|
|
185
184
|
/**
|
|
186
185
|
* delete new keys that have a value of undefined,
|
|
187
186
|
* allow values of null
|
|
188
187
|
*/
|
|
189
|
-
for (var
|
|
190
|
-
var key =
|
|
188
|
+
for (var _b = __values(Object.keys(event.params)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
189
|
+
var key = _c.value;
|
|
191
190
|
if (event.params[key] === undefined) {
|
|
192
191
|
delete this._params[key];
|
|
193
192
|
}
|
|
@@ -196,7 +195,7 @@ var DockviewPanel = /** @class */ (function (_super) {
|
|
|
196
195
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
197
196
|
finally {
|
|
198
197
|
try {
|
|
199
|
-
if (
|
|
198
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
200
199
|
}
|
|
201
200
|
finally { if (e_1) throw e_1.error; }
|
|
202
201
|
}
|
|
@@ -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
|
|
60
|
-
private
|
|
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
|
|
80
|
-
* or gap change.
|
|
81
|
-
*
|
|
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
|
-
|
|
105
|
+
updateSizing(baseCollapsedSize: number, baseMinimumSize: number | undefined, gapAdd: number): void;
|
|
84
106
|
dispose(): void;
|
|
85
107
|
}
|
|
86
108
|
export declare class ShellManager implements IDisposable {
|