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