dockview-core 8.3.0 → 8.3.1

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.
@@ -123,6 +123,13 @@ export interface DroptargetOptions {
123
123
  * `undefined` (the default) uses the built-in cursor-quadrant logic.
124
124
  */
125
125
  getPositionResolver?: () => PositionResolver | undefined;
126
+ /**
127
+ * Pointer backend only: skip this target during hit-testing so the ancestor
128
+ * walk continues past it, making an element a hit-test stop for some
129
+ * payloads and transparent for the rest. The HTML5 backend ignores it —
130
+ * propagation there is the DOM event flow's job.
131
+ */
132
+ isHitTestTransparent?: () => boolean;
126
133
  }
127
134
  /**
128
135
  * Backend-agnostic drop target. Both the HTML5 `Droptarget` and the pointer
@@ -136,6 +143,10 @@ export interface IDropTarget extends IDisposable {
136
143
  disabled: boolean;
137
144
  setTargetZones(zones: Position[]): void;
138
145
  setOverlayModel(model: DroptargetOverlayModel): void;
146
+ /** Drop whatever this target is showing, for a consumer that commits a
147
+ * drop this target never sees (a capturing listener that stops the
148
+ * event, say) and so has to tear the overlay down itself. */
149
+ clearOverlay(): void;
139
150
  }
140
151
  export declare class Droptarget extends CompositeDisposable implements IDropTarget {
141
152
  private readonly element;
@@ -16,6 +16,8 @@ export interface PointerDropTargetOptions {
16
16
  * change at runtime; `undefined` (default) uses the cursor-quadrant logic.
17
17
  */
18
18
  getPositionResolver?: () => PositionResolver | undefined;
19
+ /** See `DroptargetOptions.isHitTestTransparent`. */
20
+ isHitTestTransparent?: () => boolean;
19
21
  }
20
22
  /** Pointer-driven counterpart to `Droptarget` with identical visual output. */
21
23
  export declare class PointerDropTarget extends CompositeDisposable implements IDropTarget {
@@ -35,6 +37,7 @@ export declare class PointerDropTarget extends CompositeDisposable implements ID
35
37
  set disabled(value: boolean);
36
38
  get state(): Position | undefined;
37
39
  constructor(element: HTMLElement, options: PointerDropTargetOptions);
40
+ clearOverlay(): void;
38
41
  setTargetZones(zones: Position[]): void;
39
42
  setOverlayModel(model: DroptargetOverlayModel): void;
40
43
  dispose(): void;
@@ -13,4 +13,9 @@ export interface IPointerDropTargetHandle {
13
13
  handleDragOver(event: PointerDragEvent): void;
14
14
  handleDragLeave(): void;
15
15
  handleDrop(event: PointerDragEvent): void;
16
+ /**
17
+ * Skip this target during hit-testing so the ancestor walk continues past
18
+ * it. A target that merely declines on drop still shadows its ancestors.
19
+ */
20
+ isHitTestTransparent?(): boolean;
16
21
  }
@@ -6,7 +6,7 @@ import { DockviewHeaderDirection } from '../../options';
6
6
  import { Tab } from '../tab/tab';
7
7
  import { ITabGroup } from '../../tabGroup';
8
8
  import { ITabGroupChipRenderer } from '../../framework';
9
- import { Droptarget, DroptargetEvent } from '../../../dnd/droptarget';
9
+ import { DroptargetEvent, IDropTarget } from '../../../dnd/droptarget';
10
10
  export interface TabGroupManagerContext {
11
11
  readonly group: DockviewGroupPanel;
12
12
  readonly accessor: DockviewComponent;
@@ -39,7 +39,8 @@ interface ChipRendererEntry {
39
39
  /** Disposes the two drag sources + their shared dragend listener. */
40
40
  dragSourcesDisposable: IDisposable | undefined;
41
41
  disposable: IDisposable;
42
- dropTarget: Droptarget;
42
+ dropTarget: IDropTarget;
43
+ pointerDropTarget: IDropTarget;
43
44
  }
44
45
  export declare class TabGroupManager {
45
46
  private readonly _ctx;
@@ -66,6 +67,12 @@ export declare class TabGroupManager {
66
67
  refreshAccents(): void;
67
68
  positionAllChips(): void;
68
69
  updateDirection(): void;
70
+ /**
71
+ * Drop any overlay the chips are showing. A group move is committed by a
72
+ * capturing listener on the tabs list that stops the event, so the chip
73
+ * target under the cursor never sees the drop that would clear its own.
74
+ */
75
+ clearChipDropOverlays(): void;
69
76
  snapshotChipWidths(): Map<string, number>;
70
77
  positionUnderlines(): void;
71
78
  trackUnderlines(): void;
@@ -207,6 +207,10 @@ export declare class Tabs extends CompositeDisposable implements ITabReorderHost
207
207
  * (when the source tab is currently to the left of the target slot, its
208
208
  * removal shifts the insertion index down by one). Always clears
209
209
  * `targetTabGroupId` so the dropped tab lands outside the group.
210
+ *
211
+ * A chip dropped on a chip is a group move: the panel path would route it
212
+ * through the cross-group machinery, which rebuilds the tab group under a
213
+ * new id.
210
214
  */
211
215
  private _handleChipDrop;
212
216
  /**
@@ -671,6 +671,7 @@ export declare class DockviewComponent extends BaseGrid<DockviewGroupPanel> impl
671
671
  private disposePopoutWindow;
672
672
  addFloatingGroup(item: DockviewPanel | DockviewGroupPanel, options?: FloatingGroupOptionsInternal): void;
673
673
  private _doAddFloatingGroup;
674
+ private removeGroupIfEmpty;
674
675
  /**
675
676
  * Build an empty gridview configured to match the main grid's styling, for
676
677
  * hosting a nested layout inside a floating or popout window.