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
  */
@@ -3543,7 +3543,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3543
3543
  this.panel = panel;
3544
3544
  let container;
3545
3545
  switch (panel.api.renderer) {
3546
- case 'onlyWhenVisibile':
3546
+ case 'onlyWhenVisible':
3547
3547
  this.group.renderContainer.detatch(panel);
3548
3548
  if (this.panel) {
3549
3549
  if (doRender) {
@@ -3589,7 +3589,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3589
3589
  closePanel() {
3590
3590
  var _a;
3591
3591
  if (this.panel) {
3592
- if (this.panel.api.renderer === 'onlyWhenVisibile') {
3592
+ if (this.panel.api.renderer === 'onlyWhenVisible') {
3593
3593
  (_a = this.panel.view.content.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.panel.view.content.element);
3594
3594
  }
3595
3595
  }
@@ -3978,6 +3978,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3978
3978
  }), this.voidContainer.onWillShowOverlay((event) => {
3979
3979
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
3980
3980
  kind: 'header_space',
3981
+ panel: this.group.activePanel,
3982
+ api: this.accessor.api,
3983
+ group: this.group,
3984
+ getData: getPanelData,
3981
3985
  }));
3982
3986
  }), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
3983
3987
  const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
@@ -4075,7 +4079,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4075
4079
  index: this.tabs.findIndex((x) => x.value === tab),
4076
4080
  });
4077
4081
  }), tab.onWillShowOverlay((event) => {
4078
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, { kind: 'tab' }));
4082
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4083
+ kind: 'tab',
4084
+ panel: this.group.activePanel,
4085
+ api: this.accessor.api,
4086
+ group: this.group,
4087
+ getData: getPanelData,
4088
+ }));
4079
4089
  }));
4080
4090
  const value = { value: tab, disposable };
4081
4091
  this.addTab(value, index);
@@ -4128,7 +4138,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4128
4138
  }
4129
4139
  class WillShowOverlayLocationEvent {
4130
4140
  get kind() {
4131
- return this._kind;
4141
+ return this.options.kind;
4132
4142
  }
4133
4143
  get nativeEvent() {
4134
4144
  return this.event.nativeEvent;
@@ -4139,12 +4149,24 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4139
4149
  get defaultPrevented() {
4140
4150
  return this.event.defaultPrevented;
4141
4151
  }
4152
+ get panel() {
4153
+ return this.options.panel;
4154
+ }
4155
+ get api() {
4156
+ return this.options.api;
4157
+ }
4158
+ get group() {
4159
+ return this.options.group;
4160
+ }
4142
4161
  preventDefault() {
4143
4162
  this.event.preventDefault();
4144
4163
  }
4164
+ getData() {
4165
+ return this.options.getData();
4166
+ }
4145
4167
  constructor(event, options) {
4146
4168
  this.event = event;
4147
- this._kind = options.kind;
4169
+ this.options = options;
4148
4170
  }
4149
4171
  }
4150
4172
  class DockviewGroupPanelModel extends CompositeDisposable {
@@ -4283,6 +4305,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4283
4305
  }), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
4284
4306
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
4285
4307
  kind: 'content',
4308
+ panel: this.activePanel,
4309
+ api: this._api,
4310
+ group: this.groupPanel,
4311
+ getData: getPanelData,
4286
4312
  }));
4287
4313
  }), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
4288
4314
  }
@@ -6928,7 +6954,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6928
6954
  }
6929
6955
  get renderer() {
6930
6956
  var _a;
6931
- return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisibile';
6957
+ return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisible';
6958
+ }
6959
+ get api() {
6960
+ return this._api;
6932
6961
  }
6933
6962
  constructor(options) {
6934
6963
  var _a, _b;
@@ -7063,6 +7092,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7063
7092
  }
7064
7093
  this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
7065
7094
  kind: 'edge',
7095
+ panel: undefined,
7096
+ api: this._api,
7097
+ group: undefined,
7098
+ getData: getPanelData,
7066
7099
  }));
7067
7100
  }), this._rootDropTarget.onDrop((event) => {
7068
7101
  var _a;