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.
@@ -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
  */
@@ -3574,7 +3574,7 @@ class ContentContainer extends CompositeDisposable {
3574
3574
  this.panel = panel;
3575
3575
  let container;
3576
3576
  switch (panel.api.renderer) {
3577
- case 'onlyWhenVisibile':
3577
+ case 'onlyWhenVisible':
3578
3578
  this.group.renderContainer.detatch(panel);
3579
3579
  if (this.panel) {
3580
3580
  if (doRender) {
@@ -3620,7 +3620,7 @@ class ContentContainer extends CompositeDisposable {
3620
3620
  closePanel() {
3621
3621
  var _a;
3622
3622
  if (this.panel) {
3623
- if (this.panel.api.renderer === 'onlyWhenVisibile') {
3623
+ if (this.panel.api.renderer === 'onlyWhenVisible') {
3624
3624
  (_a = this.panel.view.content.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.panel.view.content.element);
3625
3625
  }
3626
3626
  }
@@ -4009,6 +4009,10 @@ class TabsContainer extends CompositeDisposable {
4009
4009
  }), this.voidContainer.onWillShowOverlay((event) => {
4010
4010
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4011
4011
  kind: 'header_space',
4012
+ panel: this.group.activePanel,
4013
+ api: this.accessor.api,
4014
+ group: this.group,
4015
+ getData: getPanelData,
4012
4016
  }));
4013
4017
  }), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
4014
4018
  const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
@@ -4106,7 +4110,13 @@ class TabsContainer extends CompositeDisposable {
4106
4110
  index: this.tabs.findIndex((x) => x.value === tab),
4107
4111
  });
4108
4112
  }), tab.onWillShowOverlay((event) => {
4109
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, { kind: 'tab' }));
4113
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4114
+ kind: 'tab',
4115
+ panel: this.group.activePanel,
4116
+ api: this.accessor.api,
4117
+ group: this.group,
4118
+ getData: getPanelData,
4119
+ }));
4110
4120
  }));
4111
4121
  const value = { value: tab, disposable };
4112
4122
  this.addTab(value, index);
@@ -4159,7 +4169,7 @@ class DockviewWillDropEvent extends DockviewDidDropEvent {
4159
4169
  }
4160
4170
  class WillShowOverlayLocationEvent {
4161
4171
  get kind() {
4162
- return this._kind;
4172
+ return this.options.kind;
4163
4173
  }
4164
4174
  get nativeEvent() {
4165
4175
  return this.event.nativeEvent;
@@ -4170,12 +4180,24 @@ class WillShowOverlayLocationEvent {
4170
4180
  get defaultPrevented() {
4171
4181
  return this.event.defaultPrevented;
4172
4182
  }
4183
+ get panel() {
4184
+ return this.options.panel;
4185
+ }
4186
+ get api() {
4187
+ return this.options.api;
4188
+ }
4189
+ get group() {
4190
+ return this.options.group;
4191
+ }
4173
4192
  preventDefault() {
4174
4193
  this.event.preventDefault();
4175
4194
  }
4195
+ getData() {
4196
+ return this.options.getData();
4197
+ }
4176
4198
  constructor(event, options) {
4177
4199
  this.event = event;
4178
- this._kind = options.kind;
4200
+ this.options = options;
4179
4201
  }
4180
4202
  }
4181
4203
  class DockviewGroupPanelModel extends CompositeDisposable {
@@ -4314,6 +4336,10 @@ class DockviewGroupPanelModel extends CompositeDisposable {
4314
4336
  }), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
4315
4337
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4316
4338
  kind: 'content',
4339
+ panel: this.activePanel,
4340
+ api: this._api,
4341
+ group: this.groupPanel,
4342
+ getData: getPanelData,
4317
4343
  }));
4318
4344
  }), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
4319
4345
  }
@@ -6959,7 +6985,10 @@ class DockviewComponent extends BaseGrid {
6959
6985
  }
6960
6986
  get renderer() {
6961
6987
  var _a;
6962
- return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisibile';
6988
+ return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisible';
6989
+ }
6990
+ get api() {
6991
+ return this._api;
6963
6992
  }
6964
6993
  constructor(options) {
6965
6994
  var _a, _b;
@@ -7094,6 +7123,10 @@ class DockviewComponent extends BaseGrid {
7094
7123
  }
7095
7124
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
7096
7125
  kind: 'edge',
7126
+ panel: undefined,
7127
+ api: this._api,
7128
+ group: undefined,
7129
+ getData: getPanelData,
7097
7130
  }));
7098
7131
  }), this._rootDropTarget.onDrop((event) => {
7099
7132
  var _a;