dockview-core 4.2.0 → 4.2.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 4.2.0
3
+ * @version 4.2.3
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -5457,7 +5457,7 @@
5457
5457
  this._element.appendChild(this.leftActionsContainer);
5458
5458
  this._element.appendChild(this.voidContainer.element);
5459
5459
  this._element.appendChild(this.rightActionsContainer);
5460
- this.addDisposables(accessor.onDidOptionsChange(() => {
5460
+ this.addDisposables(this.tabs.onDrop((e) => this._onDrop.fire(e)), this.tabs.onWillShowOverlay((e) => this._onWillShowOverlay.fire(e)), accessor.onDidOptionsChange(() => {
5461
5461
  this.tabs.showTabsOverflowControl =
5462
5462
  !accessor.options.disableTabsOverflowList;
5463
5463
  }), this.tabs.onOverflowTabsChange((event) => {
@@ -8198,13 +8198,48 @@
8198
8198
  this._onDidActiveGroupChange = new Emitter();
8199
8199
  this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
8200
8200
  this._moving = false;
8201
+ this._options = options;
8201
8202
  this.popupService = new PopupService(this.element);
8202
- this.updateDropTargetModel(options);
8203
8203
  this._themeClassnames = new Classnames(this.element);
8204
+ this._api = new DockviewApi(this);
8204
8205
  this.rootDropTargetContainer = new DropTargetAnchorContainer(this.element, { disabled: true });
8205
8206
  this.overlayRenderContainer = new OverlayRenderContainer(this.gridview.element, this);
8207
+ this._rootDropTarget = new Droptarget(this.element, {
8208
+ className: 'dv-drop-target-edge',
8209
+ canDisplayOverlay: (event, position) => {
8210
+ const data = getPanelData();
8211
+ if (data) {
8212
+ if (data.viewId !== this.id) {
8213
+ return false;
8214
+ }
8215
+ if (position === 'center') {
8216
+ // center drop target is only allowed if there are no panels in the grid
8217
+ // floating panels are allowed
8218
+ return this.gridview.length === 0;
8219
+ }
8220
+ return true;
8221
+ }
8222
+ if (position === 'center' && this.gridview.length !== 0) {
8223
+ /**
8224
+ * for external events only show the four-corner drag overlays, disable
8225
+ * the center position so that external drag events can fall through to the group
8226
+ * and panel drop target handlers
8227
+ */
8228
+ return false;
8229
+ }
8230
+ const firedEvent = new DockviewUnhandledDragOverEvent(event, 'edge', position, getPanelData);
8231
+ this._onUnhandledDragOverEvent.fire(firedEvent);
8232
+ return firedEvent.isAccepted;
8233
+ },
8234
+ acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
8235
+ overlayModel: (_c = options.rootOverlayModel) !== null && _c !== void 0 ? _c : DEFAULT_ROOT_OVERLAY_MODEL,
8236
+ getOverrideTarget: () => { var _a; return (_a = this.rootDropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
8237
+ });
8238
+ this.updateDropTargetModel(options);
8206
8239
  toggleClass(this.gridview.element, 'dv-dockview', true);
8207
8240
  toggleClass(this.element, 'dv-debug', !!options.debug);
8241
+ this.updateTheme();
8242
+ this.updateWatermark();
8208
8243
  if (options.debug) {
8209
8244
  this.addDisposables(new StrictEventsSequencing(this));
8210
8245
  }
@@ -8240,41 +8275,7 @@
8240
8275
  for (const group of [...this._popoutGroups]) {
8241
8276
  group.disposable.dispose();
8242
8277
  }
8243
- }));
8244
- this._options = options;
8245
- this.updateTheme();
8246
- this._rootDropTarget = new Droptarget(this.element, {
8247
- className: 'dv-drop-target-edge',
8248
- canDisplayOverlay: (event, position) => {
8249
- const data = getPanelData();
8250
- if (data) {
8251
- if (data.viewId !== this.id) {
8252
- return false;
8253
- }
8254
- if (position === 'center') {
8255
- // center drop target is only allowed if there are no panels in the grid
8256
- // floating panels are allowed
8257
- return this.gridview.length === 0;
8258
- }
8259
- return true;
8260
- }
8261
- if (position === 'center' && this.gridview.length !== 0) {
8262
- /**
8263
- * for external events only show the four-corner drag overlays, disable
8264
- * the center position so that external drag events can fall through to the group
8265
- * and panel drop target handlers
8266
- */
8267
- return false;
8268
- }
8269
- const firedEvent = new DockviewUnhandledDragOverEvent(event, 'edge', position, getPanelData);
8270
- this._onUnhandledDragOverEvent.fire(firedEvent);
8271
- return firedEvent.isAccepted;
8272
- },
8273
- acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
8274
- overlayModel: (_c = this.options.rootOverlayModel) !== null && _c !== void 0 ? _c : DEFAULT_ROOT_OVERLAY_MODEL,
8275
- getOverrideTarget: () => { var _a; return (_a = this.rootDropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
8276
- });
8277
- this.addDisposables(this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
8278
+ }), this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
8278
8279
  if (this.gridview.length > 0 && event.position === 'center') {
8279
8280
  // option only available when no panels in primary grid
8280
8281
  return;
@@ -8325,8 +8326,6 @@
8325
8326
  }));
8326
8327
  }
8327
8328
  }), this._rootDropTarget);
8328
- this._api = new DockviewApi(this);
8329
- this.updateWatermark();
8330
8329
  }
8331
8330
  setVisible(panel, visible) {
8332
8331
  switch (panel.api.location.type) {