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
  */
@@ -3547,7 +3547,7 @@
3547
3547
  this.panel = panel;
3548
3548
  let container;
3549
3549
  switch (panel.api.renderer) {
3550
- case 'onlyWhenVisibile':
3550
+ case 'onlyWhenVisible':
3551
3551
  this.group.renderContainer.detatch(panel);
3552
3552
  if (this.panel) {
3553
3553
  if (doRender) {
@@ -3593,7 +3593,7 @@
3593
3593
  closePanel() {
3594
3594
  var _a;
3595
3595
  if (this.panel) {
3596
- if (this.panel.api.renderer === 'onlyWhenVisibile') {
3596
+ if (this.panel.api.renderer === 'onlyWhenVisible') {
3597
3597
  (_a = this.panel.view.content.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.panel.view.content.element);
3598
3598
  }
3599
3599
  }
@@ -3982,6 +3982,10 @@
3982
3982
  }), this.voidContainer.onWillShowOverlay((event) => {
3983
3983
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
3984
3984
  kind: 'header_space',
3985
+ panel: this.group.activePanel,
3986
+ api: this.accessor.api,
3987
+ group: this.group,
3988
+ getData: getPanelData,
3985
3989
  }));
3986
3990
  }), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
3987
3991
  const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
@@ -4079,7 +4083,13 @@
4079
4083
  index: this.tabs.findIndex((x) => x.value === tab),
4080
4084
  });
4081
4085
  }), tab.onWillShowOverlay((event) => {
4082
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, { kind: 'tab' }));
4086
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4087
+ kind: 'tab',
4088
+ panel: this.group.activePanel,
4089
+ api: this.accessor.api,
4090
+ group: this.group,
4091
+ getData: getPanelData,
4092
+ }));
4083
4093
  }));
4084
4094
  const value = { value: tab, disposable };
4085
4095
  this.addTab(value, index);
@@ -4132,7 +4142,7 @@
4132
4142
  }
4133
4143
  class WillShowOverlayLocationEvent {
4134
4144
  get kind() {
4135
- return this._kind;
4145
+ return this.options.kind;
4136
4146
  }
4137
4147
  get nativeEvent() {
4138
4148
  return this.event.nativeEvent;
@@ -4143,12 +4153,24 @@
4143
4153
  get defaultPrevented() {
4144
4154
  return this.event.defaultPrevented;
4145
4155
  }
4156
+ get panel() {
4157
+ return this.options.panel;
4158
+ }
4159
+ get api() {
4160
+ return this.options.api;
4161
+ }
4162
+ get group() {
4163
+ return this.options.group;
4164
+ }
4146
4165
  preventDefault() {
4147
4166
  this.event.preventDefault();
4148
4167
  }
4168
+ getData() {
4169
+ return this.options.getData();
4170
+ }
4149
4171
  constructor(event, options) {
4150
4172
  this.event = event;
4151
- this._kind = options.kind;
4173
+ this.options = options;
4152
4174
  }
4153
4175
  }
4154
4176
  class DockviewGroupPanelModel extends CompositeDisposable {
@@ -4287,6 +4309,10 @@
4287
4309
  }), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
4288
4310
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4289
4311
  kind: 'content',
4312
+ panel: this.activePanel,
4313
+ api: this._api,
4314
+ group: this.groupPanel,
4315
+ getData: getPanelData,
4290
4316
  }));
4291
4317
  }), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
4292
4318
  }
@@ -6932,7 +6958,10 @@
6932
6958
  }
6933
6959
  get renderer() {
6934
6960
  var _a;
6935
- return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisibile';
6961
+ return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisible';
6962
+ }
6963
+ get api() {
6964
+ return this._api;
6936
6965
  }
6937
6966
  constructor(options) {
6938
6967
  var _a, _b;
@@ -7067,6 +7096,10 @@
7067
7096
  }
7068
7097
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
7069
7098
  kind: 'edge',
7099
+ panel: undefined,
7100
+ api: this._api,
7101
+ group: undefined,
7102
+ getData: getPanelData,
7070
7103
  }));
7071
7104
  }), this._rootDropTarget.onDrop((event) => {
7072
7105
  var _a;