dockview 1.11.0 → 1.12.0

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/dist/dockview.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview
3
- * @version 1.11.0
3
+ * @version 1.12.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -3577,7 +3577,7 @@
3577
3577
  this.panel = panel;
3578
3578
  let container;
3579
3579
  switch (panel.api.renderer) {
3580
- case 'onlyWhenVisibile':
3580
+ case 'onlyWhenVisible':
3581
3581
  this.group.renderContainer.detatch(panel);
3582
3582
  if (this.panel) {
3583
3583
  if (doRender) {
@@ -3623,7 +3623,7 @@
3623
3623
  closePanel() {
3624
3624
  var _a;
3625
3625
  if (this.panel) {
3626
- if (this.panel.api.renderer === 'onlyWhenVisibile') {
3626
+ if (this.panel.api.renderer === 'onlyWhenVisible') {
3627
3627
  (_a = this.panel.view.content.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.panel.view.content.element);
3628
3628
  }
3629
3629
  }
@@ -4012,6 +4012,10 @@
4012
4012
  }), this.voidContainer.onWillShowOverlay((event) => {
4013
4013
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4014
4014
  kind: 'header_space',
4015
+ panel: this.group.activePanel,
4016
+ api: this.accessor.api,
4017
+ group: this.group,
4018
+ getData: getPanelData,
4015
4019
  }));
4016
4020
  }), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
4017
4021
  const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
@@ -4109,7 +4113,13 @@
4109
4113
  index: this.tabs.findIndex((x) => x.value === tab),
4110
4114
  });
4111
4115
  }), tab.onWillShowOverlay((event) => {
4112
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, { kind: 'tab' }));
4116
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4117
+ kind: 'tab',
4118
+ panel: this.group.activePanel,
4119
+ api: this.accessor.api,
4120
+ group: this.group,
4121
+ getData: getPanelData,
4122
+ }));
4113
4123
  }));
4114
4124
  const value = { value: tab, disposable };
4115
4125
  this.addTab(value, index);
@@ -4162,7 +4172,7 @@
4162
4172
  }
4163
4173
  class WillShowOverlayLocationEvent {
4164
4174
  get kind() {
4165
- return this._kind;
4175
+ return this.options.kind;
4166
4176
  }
4167
4177
  get nativeEvent() {
4168
4178
  return this.event.nativeEvent;
@@ -4173,12 +4183,24 @@
4173
4183
  get defaultPrevented() {
4174
4184
  return this.event.defaultPrevented;
4175
4185
  }
4186
+ get panel() {
4187
+ return this.options.panel;
4188
+ }
4189
+ get api() {
4190
+ return this.options.api;
4191
+ }
4192
+ get group() {
4193
+ return this.options.group;
4194
+ }
4176
4195
  preventDefault() {
4177
4196
  this.event.preventDefault();
4178
4197
  }
4198
+ getData() {
4199
+ return this.options.getData();
4200
+ }
4179
4201
  constructor(event, options) {
4180
4202
  this.event = event;
4181
- this._kind = options.kind;
4203
+ this.options = options;
4182
4204
  }
4183
4205
  }
4184
4206
  class DockviewGroupPanelModel extends CompositeDisposable {
@@ -4317,6 +4339,10 @@
4317
4339
  }), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
4318
4340
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4319
4341
  kind: 'content',
4342
+ panel: this.activePanel,
4343
+ api: this._api,
4344
+ group: this.groupPanel,
4345
+ getData: getPanelData,
4320
4346
  }));
4321
4347
  }), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
4322
4348
  }
@@ -6962,7 +6988,10 @@
6962
6988
  }
6963
6989
  get renderer() {
6964
6990
  var _a;
6965
- return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisibile';
6991
+ return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisible';
6992
+ }
6993
+ get api() {
6994
+ return this._api;
6966
6995
  }
6967
6996
  constructor(options) {
6968
6997
  var _a, _b;
@@ -7097,6 +7126,10 @@
7097
7126
  }
7098
7127
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
7099
7128
  kind: 'edge',
7129
+ panel: undefined,
7130
+ api: this._api,
7131
+ group: undefined,
7132
+ getData: getPanelData,
7100
7133
  }));
7101
7134
  }), this._rootDropTarget.onDrop((event) => {
7102
7135
  var _a;