dockview 1.10.0 → 1.10.2

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.10.0
3
+ * @version 1.10.2
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -1498,6 +1498,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1498
1498
  this._onDidChange.fire();
1499
1499
  }));
1500
1500
  }
1501
+ setViewVisible(index, visible) {
1502
+ this.splitview.setViewVisible(index, visible);
1503
+ }
1501
1504
  addPane(pane, size, index = this.splitview.length, skipLayout = false) {
1502
1505
  const disposable = pane.onDidChangeExpansionState(() => {
1503
1506
  this.setupAnimation();
@@ -3002,19 +3005,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3002
3005
  return this.component.onWillDrop;
3003
3006
  }
3004
3007
  /**
3008
+ * Invoked before an overlay is shown indicating a drop target.
3005
3009
  *
3010
+ * Calling `event.preventDefault()` will prevent the overlay being shown and prevent
3011
+ * the any subsequent drop event.
3006
3012
  */
3007
3013
  get onWillShowOverlay() {
3008
3014
  return this.component.onWillShowOverlay;
3009
3015
  }
3010
3016
  /**
3011
- * Invoked before a group is dragged. Exposed for custom Drag'n'Drop functionality.
3017
+ * Invoked before a group is dragged.
3018
+ *
3019
+ * Calling `event.nativeEvent.preventDefault()` will prevent the group drag starting.
3020
+ *
3012
3021
  */
3013
3022
  get onWillDragGroup() {
3014
3023
  return this.component.onWillDragGroup;
3015
3024
  }
3016
3025
  /**
3017
- * Invoked before a panel is dragged. Exposed for custom Drag'n'Drop functionality.
3026
+ * Invoked before a panel is dragged.
3027
+ *
3028
+ * Calling `event.nativeEvent.preventDefault()` will prevent the panel drag starting.
3018
3029
  */
3019
3030
  get onWillDragPanel() {
3020
3031
  return this.component.onWillDragPanel;
@@ -3558,7 +3569,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3558
3569
  data.groupId === this.group.id;
3559
3570
  return !groupHasOnePanelAndIsActiveDragElement;
3560
3571
  }
3561
- return this.group.canDisplayOverlay(event, position, 'panel');
3572
+ return this.group.canDisplayOverlay(event, position, 'content');
3562
3573
  },
3563
3574
  });
3564
3575
  this.addDisposables(this.dropTarget);
@@ -3881,7 +3892,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3881
3892
  // don't show the overlay if the tab being dragged is the last panel of this group
3882
3893
  return ((_a = last(this.group.panels)) === null || _a === void 0 ? void 0 : _a.id) !== data.panelId;
3883
3894
  }
3884
- return group.model.canDisplayOverlay(event, position, 'panel');
3895
+ return group.model.canDisplayOverlay(event, position, 'header_space');
3885
3896
  },
3886
3897
  });
3887
3898
  this.onWillShowOverlay = this.dropTraget.onWillShowOverlay;
@@ -4274,6 +4285,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4274
4285
  this._width = 0;
4275
4286
  this._height = 0;
4276
4287
  this._panels = [];
4288
+ this._panelDisposables = new Map();
4277
4289
  this._onMove = new Emitter();
4278
4290
  this.onMove = this._onMove.event;
4279
4291
  this._onDidDrop = new Emitter();
@@ -4288,6 +4300,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4288
4300
  this.onGroupDragStart = this._onGroupDragStart.event;
4289
4301
  this._onDidAddPanel = new Emitter();
4290
4302
  this.onDidAddPanel = this._onDidAddPanel.event;
4303
+ this._onDidPanelTitleChange = new Emitter();
4304
+ this.onDidPanelTitleChange = this._onDidPanelTitleChange.event;
4305
+ this._onDidPanelParametersChange = new Emitter();
4306
+ this.onDidPanelParametersChange = this._onDidPanelParametersChange.event;
4291
4307
  this._onDidRemovePanel = new Emitter();
4292
4308
  this.onDidRemovePanel = this._onDidRemovePanel.event;
4293
4309
  this._onDidActivePanelChange = new Emitter();
@@ -4576,6 +4592,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4576
4592
  if (this.mostRecentlyUsed.includes(panel)) {
4577
4593
  this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
4578
4594
  }
4595
+ const disposable = this._panelDisposables.get(panel.id);
4596
+ if (disposable) {
4597
+ disposable.dispose();
4598
+ this._panelDisposables.delete(panel.id);
4599
+ }
4579
4600
  this._onDidRemovePanel.fire({ panel });
4580
4601
  }
4581
4602
  doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
@@ -4593,6 +4614,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4593
4614
  }
4594
4615
  this.updateMru(panel);
4595
4616
  this.panels.splice(index, 0, panel);
4617
+ this._panelDisposables.set(panel.id, new CompositeDisposable(panel.api.onDidTitleChange((event) => this._onDidPanelTitleChange.fire(event)), panel.api.onDidParametersChange((event) => this._onDidPanelParametersChange.fire(event))));
4596
4618
  this._onDidAddPanel.fire({ panel });
4597
4619
  }
4598
4620
  doSetActivePanel(panel) {
@@ -5010,24 +5032,22 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5010
5032
  get isVisible() {
5011
5033
  return this._isVisible;
5012
5034
  }
5013
- get isHidden() {
5014
- return this._isHidden;
5015
- }
5016
5035
  get width() {
5017
5036
  return this._width;
5018
5037
  }
5019
5038
  get height() {
5020
5039
  return this._height;
5021
5040
  }
5022
- constructor(id) {
5041
+ constructor(id, component) {
5023
5042
  super();
5024
5043
  this.id = id;
5044
+ this.component = component;
5025
5045
  this._isFocused = false;
5026
5046
  this._isActive = false;
5027
5047
  this._isVisible = true;
5028
- this._isHidden = false;
5029
5048
  this._width = 0;
5030
5049
  this._height = 0;
5050
+ this._parameters = {};
5031
5051
  this.panelUpdatesDisposable = new MutableDisposable();
5032
5052
  this._onDidDimensionChange = new Emitter();
5033
5053
  this.onDidDimensionsChange = this._onDidDimensionChange.event;
@@ -5039,49 +5059,51 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5039
5059
  //
5040
5060
  this._onDidVisibilityChange = new Emitter();
5041
5061
  this.onDidVisibilityChange = this._onDidVisibilityChange.event;
5042
- this._onDidHiddenChange = new Emitter();
5043
- this.onDidHiddenChange = this._onDidHiddenChange.event;
5062
+ this._onWillVisibilityChange = new Emitter();
5063
+ this.onWillVisibilityChange = this._onWillVisibilityChange.event;
5044
5064
  this._onDidActiveChange = new Emitter();
5045
5065
  this.onDidActiveChange = this._onDidActiveChange.event;
5046
5066
  this._onActiveChange = new Emitter();
5047
5067
  this.onActiveChange = this._onActiveChange.event;
5048
- this._onUpdateParameters = new Emitter();
5049
- this.onUpdateParameters = this._onUpdateParameters.event;
5068
+ this._onDidParametersChange = new Emitter();
5069
+ this.onDidParametersChange = this._onDidParametersChange.event;
5050
5070
  this.addDisposables(this.onDidFocusChange((event) => {
5051
5071
  this._isFocused = event.isFocused;
5052
5072
  }), this.onDidActiveChange((event) => {
5053
5073
  this._isActive = event.isActive;
5054
5074
  }), this.onDidVisibilityChange((event) => {
5055
5075
  this._isVisible = event.isVisible;
5056
- }), this.onDidHiddenChange((event) => {
5057
- this._isHidden = event.isHidden;
5058
5076
  }), this.onDidDimensionsChange((event) => {
5059
5077
  this._width = event.width;
5060
5078
  this._height = event.height;
5061
- }), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onUpdateParameters, this._onWillFocus, this._onDidHiddenChange, this._onUpdateParameters);
5079
+ }), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onWillFocus, this._onWillVisibilityChange, this._onDidParametersChange);
5080
+ }
5081
+ getParameters() {
5082
+ return this._parameters;
5062
5083
  }
5063
5084
  initialize(panel) {
5064
- this.panelUpdatesDisposable.value = this._onUpdateParameters.event((parameters) => {
5085
+ this.panelUpdatesDisposable.value = this._onDidParametersChange.event((parameters) => {
5086
+ this._parameters = parameters;
5065
5087
  panel.update({
5066
5088
  params: parameters,
5067
5089
  });
5068
5090
  });
5069
5091
  }
5070
- setHidden(isHidden) {
5071
- this._onDidHiddenChange.fire({ isHidden });
5092
+ setVisible(isVisible) {
5093
+ this._onWillVisibilityChange.fire({ isVisible });
5072
5094
  }
5073
5095
  setActive() {
5074
5096
  this._onActiveChange.fire();
5075
5097
  }
5076
5098
  updateParameters(parameters) {
5077
- this._onUpdateParameters.fire(parameters);
5099
+ this._onDidParametersChange.fire(parameters);
5078
5100
  }
5079
5101
  }
5080
5102
 
5081
5103
  class SplitviewPanelApiImpl extends PanelApiImpl {
5082
5104
  //
5083
- constructor(id) {
5084
- super(id);
5105
+ constructor(id, component) {
5106
+ super(id, component);
5085
5107
  this._onDidConstraintsChangeInternal = new Emitter();
5086
5108
  this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
5087
5109
  //
@@ -5106,8 +5128,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5106
5128
  set pane(pane) {
5107
5129
  this._pane = pane;
5108
5130
  }
5109
- constructor(id) {
5110
- super(id);
5131
+ constructor(id, component) {
5132
+ super(id, component);
5111
5133
  this._onDidExpansionChange = new Emitter({
5112
5134
  replay: true,
5113
5135
  });
@@ -5266,7 +5288,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5266
5288
  this.header.style.display = value ? '' : 'none';
5267
5289
  }
5268
5290
  constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
5269
- super(id, component, new PaneviewPanelApiImpl(id));
5291
+ super(id, component, new PaneviewPanelApiImpl(id, component));
5270
5292
  this.headerComponent = headerComponent;
5271
5293
  this._onDidChangeExpansionState = new Emitter({ replay: true });
5272
5294
  this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
@@ -5286,7 +5308,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5286
5308
  this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
5287
5309
  this._orientation = orientation;
5288
5310
  this.element.classList.add('pane');
5289
- this.addDisposables(this.api.onDidSizeChange((event) => {
5311
+ this.addDisposables(this.api.onWillVisibilityChange((event) => {
5312
+ const { isVisible } = event;
5313
+ const { accessor } = this._params;
5314
+ accessor.setVisible(this, isVisible);
5315
+ }), this.api.onDidSizeChange((event) => {
5290
5316
  this._onDidChange.fire({ size: event.size });
5291
5317
  }), addDisposableListener(this.element, 'mouseenter', (ev) => {
5292
5318
  this.api._onMouseEnter.fire(ev);
@@ -5493,8 +5519,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5493
5519
  }
5494
5520
 
5495
5521
  class GridviewPanelApiImpl extends PanelApiImpl {
5496
- constructor(id, panel) {
5497
- super(id);
5522
+ constructor(id, component, panel) {
5523
+ super(id, component);
5498
5524
  this._onDidConstraintsChangeInternal = new Emitter();
5499
5525
  this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
5500
5526
  this._onDidConstraintsChange = new Emitter();
@@ -5565,7 +5591,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5565
5591
  return this.api.isActive;
5566
5592
  }
5567
5593
  constructor(id, component, options, api) {
5568
- super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
5594
+ super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component));
5569
5595
  this._evaluatedMinimumWidth = 0;
5570
5596
  this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
5571
5597
  this._evaluatedMinimumHeight = 0;
@@ -5590,10 +5616,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5590
5616
  this._maximumHeight = options.maximumHeight;
5591
5617
  }
5592
5618
  this.api.initialize(this); // TODO: required to by-pass 'super before this' requirement
5593
- this.addDisposables(this.api.onDidHiddenChange((event) => {
5594
- const { isHidden } = event;
5619
+ this.addDisposables(this.api.onWillVisibilityChange((event) => {
5620
+ const { isVisible } = event;
5595
5621
  const { accessor } = this._params;
5596
- accessor.setVisible(this, !isHidden);
5622
+ accessor.setVisible(this, isVisible);
5597
5623
  }), this.api.onActiveChange(() => {
5598
5624
  const { accessor } = this._params;
5599
5625
  accessor.doSetGroupActive(this);
@@ -5673,7 +5699,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5673
5699
  return this._group.model.location;
5674
5700
  }
5675
5701
  constructor(id, accessor) {
5676
- super(id);
5702
+ super(id, '__dockviewgroup__');
5677
5703
  this.accessor = accessor;
5678
5704
  this._onDidLocationChange = new Emitter();
5679
5705
  this.onDidLocationChange = this._onDidLocationChange.event;
@@ -5834,32 +5860,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5834
5860
  return this.panel.renderer;
5835
5861
  }
5836
5862
  set group(value) {
5837
- const isOldGroupActive = this.isGroupActive;
5863
+ const oldGroup = this._group;
5838
5864
  if (this._group !== value) {
5839
5865
  this._group = value;
5840
5866
  this._onDidGroupChange.fire({});
5841
- let _trackGroupActive = isOldGroupActive; // prevent duplicate events with same state
5842
- this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidLocationChange((event) => {
5843
- if (this.group !== this.panel.group) {
5844
- return;
5845
- }
5846
- this._onDidLocationChange.fire(event);
5847
- }), this.group.api.onDidActiveChange(() => {
5848
- if (this.group !== this.panel.group) {
5849
- return;
5850
- }
5851
- if (_trackGroupActive !== this.isGroupActive) {
5852
- _trackGroupActive = this.isGroupActive;
5853
- this._onDidActiveGroupChange.fire({
5854
- isActive: this.isGroupActive,
5855
- });
5856
- }
5857
- }));
5858
- // if (this.isGroupActive !== isOldGroupActive) {
5859
- // this._onDidActiveGroupChange.fire({
5860
- // isActive: this.isGroupActive,
5861
- // });
5862
- // }
5867
+ this.setupGroupEventListeners(oldGroup);
5863
5868
  this._onDidLocationChange.fire({
5864
5869
  location: this.group.api.location,
5865
5870
  });
@@ -5868,8 +5873,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5868
5873
  get group() {
5869
5874
  return this._group;
5870
5875
  }
5871
- constructor(panel, group, accessor) {
5872
- super(panel.id);
5876
+ get tabComponent() {
5877
+ return this._tabComponent;
5878
+ }
5879
+ constructor(panel, group, accessor, component, tabComponent) {
5880
+ super(panel.id, component);
5873
5881
  this.panel = panel;
5874
5882
  this.accessor = accessor;
5875
5883
  this._onDidTitleChange = new Emitter();
@@ -5883,8 +5891,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5883
5891
  this._onDidLocationChange = new Emitter();
5884
5892
  this.onDidLocationChange = this._onDidLocationChange.event;
5885
5893
  this.groupEventsDisposable = new MutableDisposable();
5894
+ this._tabComponent = tabComponent;
5886
5895
  this.initialize(panel);
5887
5896
  this._group = group;
5897
+ this.setupGroupEventListeners();
5888
5898
  this.addDisposables(this.groupEventsDisposable, this._onDidRendererChange, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange, this._onDidLocationChange);
5889
5899
  }
5890
5900
  getWindow() {
@@ -5919,6 +5929,35 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5919
5929
  exitMaximized() {
5920
5930
  this.group.api.exitMaximized();
5921
5931
  }
5932
+ setupGroupEventListeners(previousGroup) {
5933
+ var _a;
5934
+ let _trackGroupActive = (_a = previousGroup === null || previousGroup === void 0 ? void 0 : previousGroup.isActive) !== null && _a !== void 0 ? _a : false; // prevent duplicate events with same state
5935
+ this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidVisibilityChange((event) => {
5936
+ if (!event.isVisible && this.isVisible) {
5937
+ this._onDidVisibilityChange.fire(event);
5938
+ }
5939
+ else if (event.isVisible &&
5940
+ !this.isVisible &&
5941
+ this.group.model.isPanelActive(this.panel)) {
5942
+ this._onDidVisibilityChange.fire(event);
5943
+ }
5944
+ }), this.group.api.onDidLocationChange((event) => {
5945
+ if (this.group !== this.panel.group) {
5946
+ return;
5947
+ }
5948
+ this._onDidLocationChange.fire(event);
5949
+ }), this.group.api.onDidActiveChange(() => {
5950
+ if (this.group !== this.panel.group) {
5951
+ return;
5952
+ }
5953
+ if (_trackGroupActive !== this.isGroupActive) {
5954
+ _trackGroupActive = this.isGroupActive;
5955
+ this._onDidActiveGroupChange.fire({
5956
+ isActive: this.isGroupActive,
5957
+ });
5958
+ }
5959
+ }));
5960
+ }
5922
5961
  }
5923
5962
 
5924
5963
  class DockviewPanel extends CompositeDisposable {
@@ -5935,7 +5974,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5935
5974
  var _a;
5936
5975
  return (_a = this._renderer) !== null && _a !== void 0 ? _a : this.accessor.renderer;
5937
5976
  }
5938
- constructor(id, accessor, containerApi, group, view, options) {
5977
+ constructor(id, component, tabComponent, accessor, containerApi, group, view, options) {
5939
5978
  super();
5940
5979
  this.id = id;
5941
5980
  this.accessor = accessor;
@@ -5943,7 +5982,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5943
5982
  this.view = view;
5944
5983
  this._renderer = options.renderer;
5945
5984
  this._group = group;
5946
- this.api = new DockviewPanelApiImpl(this, this._group, accessor);
5985
+ this.api = new DockviewPanelApiImpl(this, this._group, accessor, component, tabComponent);
5947
5986
  this.addDisposables(this.api.onActiveChange(() => {
5948
5987
  accessor.setActivePanel(this);
5949
5988
  }), this.api.onDidSizeChange((event) => {
@@ -6238,7 +6277,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6238
6277
  ? (_b = viewData.tab) === null || _b === void 0 ? void 0 : _b.id
6239
6278
  : panelData.tabComponent;
6240
6279
  const view = new DockviewPanelModel(this.accessor, panelId, contentComponent, tabComponent);
6241
- const panel = new DockviewPanel(panelId, this.accessor, new DockviewApi(this.accessor), group, view, {
6280
+ const panel = new DockviewPanel(panelId, contentComponent, tabComponent, this.accessor, new DockviewApi(this.accessor), group, view, {
6242
6281
  renderer: panelData.renderer,
6243
6282
  });
6244
6283
  panel.init({
@@ -7076,7 +7115,15 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7076
7115
  acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
7077
7116
  overlayModel: (_b = this.options.rootOverlayModel) !== null && _b !== void 0 ? _b : DEFAULT_ROOT_OVERLAY_MODEL,
7078
7117
  });
7079
- this.addDisposables(this._rootDropTarget.onDrop((event) => {
7118
+ this.addDisposables(this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
7119
+ if (this.gridview.length > 0 && event.position === 'center') {
7120
+ // option only available when no panels in primary grid
7121
+ return;
7122
+ }
7123
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
7124
+ kind: 'edge',
7125
+ }));
7126
+ }), this._rootDropTarget.onDrop((event) => {
7080
7127
  var _a;
7081
7128
  const willDropEvent = new DockviewWillDropEvent({
7082
7129
  nativeEvent: event.nativeEvent,
@@ -7085,7 +7132,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7085
7132
  api: this._api,
7086
7133
  group: undefined,
7087
7134
  getData: getPanelData,
7088
- kind: 'content',
7135
+ kind: 'edge',
7089
7136
  });
7090
7137
  this._onWillDrop.fire(willDropEvent);
7091
7138
  if (willDropEvent.defaultPrevented) {
@@ -7141,7 +7188,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7141
7188
  const box = getBox();
7142
7189
  const groupId = (_b = (_a = options === null || options === void 0 ? void 0 : options.overridePopoutGroup) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this.getNextGroupId(); //item.id;
7143
7190
  if (itemToPopout.api.location.type === 'grid') {
7144
- itemToPopout.api.setHidden(true);
7191
+ itemToPopout.api.setVisible(false);
7145
7192
  }
7146
7193
  const _window = new PopoutWindow(`${this.id}-${groupId}`, // unique id
7147
7194
  theme !== null && theme !== void 0 ? theme : '', {
@@ -7192,7 +7239,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7192
7239
  }));
7193
7240
  switch (referenceLocation) {
7194
7241
  case 'grid':
7195
- referenceGroup.api.setHidden(true);
7242
+ referenceGroup.api.setVisible(false);
7196
7243
  break;
7197
7244
  case 'floating':
7198
7245
  case 'popout':
@@ -7246,8 +7293,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7246
7293
  from: group,
7247
7294
  to: referenceGroup,
7248
7295
  }));
7249
- if (referenceGroup.api.isHidden) {
7250
- referenceGroup.api.setHidden(false);
7296
+ if (!referenceGroup.api.isVisible) {
7297
+ referenceGroup.api.setVisible(true);
7251
7298
  }
7252
7299
  if (this.getPanel(group.id)) {
7253
7300
  this.doRemoveGroup(group, {
@@ -7820,7 +7867,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7820
7867
  }
7821
7868
  updateWatermark() {
7822
7869
  var _a, _b;
7823
- if (this.groups.filter((x) => x.api.location.type === 'grid' && !x.api.isHidden).length === 0) {
7870
+ if (this.groups.filter((x) => x.api.location.type === 'grid' && x.api.isVisible).length === 0) {
7824
7871
  if (!this.watermark) {
7825
7872
  this.watermark = this.createWatermarkComponent();
7826
7873
  this.watermark.init({
@@ -8217,6 +8264,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8217
8264
  if (this._onDidActivePanelChange.value !== event.panel) {
8218
8265
  this._onDidActivePanelChange.fire(event.panel);
8219
8266
  }
8267
+ }), exports.DockviewEvent.any(view.model.onDidPanelTitleChange, view.model.onDidPanelParametersChange)(() => {
8268
+ this._bufferOnDidLayoutChange.fire();
8220
8269
  }));
8221
8270
  this._groups.set(view.id, { value: view, disposable });
8222
8271
  }
@@ -8229,7 +8278,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8229
8278
  const contentComponent = options.component;
8230
8279
  const tabComponent = (_a = options.tabComponent) !== null && _a !== void 0 ? _a : this.options.defaultTabComponent;
8231
8280
  const view = new DockviewPanelModel(this, options.id, contentComponent, tabComponent);
8232
- const panel = new DockviewPanel(options.id, this, this._api, group, view, { renderer: options.renderer });
8281
+ const panel = new DockviewPanel(options.id, contentComponent, tabComponent, this, this._api, group, view, { renderer: options.renderer });
8233
8282
  panel.init({
8234
8283
  title: (_b = options.title) !== null && _b !== void 0 ? _b : options.id,
8235
8284
  params: (_c = options === null || options === void 0 ? void 0 : options.params) !== null && _c !== void 0 ? _c : {},
@@ -8603,19 +8652,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8603
8652
  const index = this.panels.indexOf(panel);
8604
8653
  this.splitview.setViewVisible(index, visible);
8605
8654
  }
8606
- setActive(view, skipFocus) {
8607
- this._activePanel = view;
8655
+ setActive(panel, skipFocus) {
8656
+ this._activePanel = panel;
8608
8657
  this.panels
8609
- .filter((v) => v !== view)
8658
+ .filter((v) => v !== panel)
8610
8659
  .forEach((v) => {
8611
8660
  v.api._onDidActiveChange.fire({ isActive: false });
8612
8661
  if (!skipFocus) {
8613
8662
  v.focus();
8614
8663
  }
8615
8664
  });
8616
- view.api._onDidActiveChange.fire({ isActive: true });
8665
+ panel.api._onDidActiveChange.fire({ isActive: true });
8617
8666
  if (!skipFocus) {
8618
- view.focus();
8667
+ panel.focus();
8619
8668
  }
8620
8669
  }
8621
8670
  removePanel(panel, sizing) {
@@ -8914,6 +8963,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8914
8963
  });
8915
8964
  this.addDisposables(this._disposable);
8916
8965
  }
8966
+ setVisible(panel, visible) {
8967
+ const index = this.panels.indexOf(panel);
8968
+ this.paneview.setViewVisible(index, visible);
8969
+ }
8917
8970
  focus() {
8918
8971
  //noop
8919
8972
  }
@@ -8960,6 +9013,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8960
9013
  isExpanded: options.isExpanded,
8961
9014
  title: options.title,
8962
9015
  containerApi: new PaneviewApi(this),
9016
+ accessor: this,
8963
9017
  });
8964
9018
  this.paneview.addPane(view, size, index);
8965
9019
  view.orientation = this.paneview.orientation;
@@ -9059,6 +9113,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9059
9113
  title: data.title,
9060
9114
  isExpanded: !!view.expanded,
9061
9115
  containerApi: new PaneviewApi(this),
9116
+ accessor: this,
9062
9117
  });
9063
9118
  panel.orientation = this.paneview.orientation;
9064
9119
  });
@@ -9138,7 +9193,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9138
9193
  return this._snap;
9139
9194
  }
9140
9195
  constructor(id, componentName) {
9141
- super(id, componentName, new SplitviewPanelApiImpl(id));
9196
+ super(id, componentName, new SplitviewPanelApiImpl(id, componentName));
9142
9197
  this._evaluatedMinimumSize = 0;
9143
9198
  this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
9144
9199
  this._minimumSize = 0;
@@ -9147,10 +9202,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9147
9202
  this._onDidChange = new Emitter();
9148
9203
  this.onDidChange = this._onDidChange.event;
9149
9204
  this.api.initialize(this);
9150
- this.addDisposables(this._onDidChange, this.api.onDidHiddenChange((event) => {
9151
- const { isHidden } = event;
9205
+ this.addDisposables(this._onDidChange, this.api.onWillVisibilityChange((event) => {
9206
+ const { isVisible } = event;
9152
9207
  const { accessor } = this._params;
9153
- accessor.setVisible(this, !isHidden);
9208
+ accessor.setVisible(this, isVisible);
9154
9209
  }), this.api.onActiveChange(() => {
9155
9210
  const { accessor } = this._params;
9156
9211
  accessor.setActive(this);