import { Event } from '../../../events'; import { CompositeDisposable } from '../../../lifecycle'; import { DockviewComponent } from '../../dockviewComponent'; import { DockviewGroupPanel } from '../../dockviewGroupPanel'; import { DockviewWillShowOverlayLocationEvent } from '../../events'; import { IDockviewPanel } from '../../dockviewPanel'; import { DockviewHeaderDirection } from '../../options'; import { Tab } from '../tab/tab'; import { TabDragEvent, TabDropIndexEvent } from './tabsContainer'; export declare class Tabs extends CompositeDisposable { private readonly group; private readonly accessor; private readonly _element; private readonly _tabsList; private readonly _observerDisposable; private readonly _scrollbar; private _tabs; private readonly _tabMap; private selectedIndex; private _showTabsOverflowControl; private _direction; private _animState; private readonly _pendingMarginCleanups; private _pendingCollapse; private _flipTransitionCleanup; private _voidContainer; private _voidContainerListeners; private _extendedDropZone; private _chipDragCleanup; private readonly _tabGroupManager; private readonly _onTabDragStart; readonly onTabDragStart: Event; private readonly _onDrop; readonly onDrop: Event; private readonly _onWillShowOverlay; readonly onWillShowOverlay: Event; private readonly _onOverflowTabsChange; readonly onOverflowTabsChange: Event<{ tabs: string[]; tabGroups: string[]; reset: boolean; }>; get showTabsOverflowControl(): boolean; set showTabsOverflowControl(value: boolean); get element(): HTMLElement; set voidContainer(el: HTMLElement | null); /** * Handle a drop that occurred on the void container (empty header * space to the right of the tabs). Returns `true` if the drop was * consumed by an active group drag, `false` otherwise. */ handleVoidDrop(): boolean; get panels(): string[]; get size(): number; get tabs(): Tab[]; get direction(): DockviewHeaderDirection; set direction(value: DockviewHeaderDirection); constructor(group: DockviewGroupPanel, accessor: DockviewComponent, options: { showTabsOverflowControl: boolean; }); indexOf(id: string): number; isActive(tab: Tab): boolean; setActivePanel(panel: IDockviewPanel): void; openPanel(panel: IDockviewPanel, index?: number): void; delete(id: string): void; private addTab; private toggleDropdown; updateDragAndDropState(): void; /** * Synchronize chip elements and CSS classes for all tab groups * in the parent group model. Call after any tab group mutation. */ updateTabGroups(): void; refreshTabGroupAccent(): void; private _handleChipDragStart; /** * Sets the broader container that is part of the same logical drop surface * as this tab list (e.g. the full header element). When a dragleave from * the tabs list lands inside this container, `_animState` is preserved so * that external dragover listeners can continue the animation. */ setExtendedDropZone(el: HTMLElement): void; /** * Allows external elements (e.g. void container, left actions) to push an * insertion index into the animation while the cursor is outside the tabs * list itself. Pass `null` to clear the indicator. */ setExternalInsertionIndex(index: number | null): void; /** * Called when the drag cursor leaves the entire header area (not just the * tabs list). Clears animation state for cross-group drags, which never * receive a `dragend` event on this tab list. */ clearExternalAnimState(): void; private snapshotTabPositions; private getAverageTabWidth; private handleDragOver; /** * Batch-remove a CSS class from multiple elements instantly, * forcing only a single reflow for the entire batch. */ private _removeClassInstantlyBatch; /** * Remove `dv-tab--dragging` from the source tab instantly so it * regains its real width before FLIP snapshots. */ private _uncollapsSourceTab; private applyDragOverTransforms; private resetTabTransforms; /** * Commit a group-drag drop: clear drag classes, move the group * in the model, and run a FLIP animation. */ private _commitGroupMove; private _clearGroupDragClasses; private resetDragAnimation; private runFlipAnimation; }