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
  */
@@ -1468,6 +1468,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
1468
1468
  this._onDidChange.fire();
1469
1469
  }));
1470
1470
  }
1471
+ setViewVisible(index, visible) {
1472
+ this.splitview.setViewVisible(index, visible);
1473
+ }
1471
1474
  addPane(pane, size, index = this.splitview.length, skipLayout = false) {
1472
1475
  const disposable = pane.onDidChangeExpansionState(() => {
1473
1476
  this.setupAnimation();
@@ -2972,19 +2975,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2972
2975
  return this.component.onWillDrop;
2973
2976
  }
2974
2977
  /**
2978
+ * Invoked before an overlay is shown indicating a drop target.
2975
2979
  *
2980
+ * Calling `event.preventDefault()` will prevent the overlay being shown and prevent
2981
+ * the any subsequent drop event.
2976
2982
  */
2977
2983
  get onWillShowOverlay() {
2978
2984
  return this.component.onWillShowOverlay;
2979
2985
  }
2980
2986
  /**
2981
- * Invoked before a group is dragged. Exposed for custom Drag'n'Drop functionality.
2987
+ * Invoked before a group is dragged.
2988
+ *
2989
+ * Calling `event.nativeEvent.preventDefault()` will prevent the group drag starting.
2990
+ *
2982
2991
  */
2983
2992
  get onWillDragGroup() {
2984
2993
  return this.component.onWillDragGroup;
2985
2994
  }
2986
2995
  /**
2987
- * Invoked before a panel is dragged. Exposed for custom Drag'n'Drop functionality.
2996
+ * Invoked before a panel is dragged.
2997
+ *
2998
+ * Calling `event.nativeEvent.preventDefault()` will prevent the panel drag starting.
2988
2999
  */
2989
3000
  get onWillDragPanel() {
2990
3001
  return this.component.onWillDragPanel;
@@ -3528,7 +3539,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3528
3539
  data.groupId === this.group.id;
3529
3540
  return !groupHasOnePanelAndIsActiveDragElement;
3530
3541
  }
3531
- return this.group.canDisplayOverlay(event, position, 'panel');
3542
+ return this.group.canDisplayOverlay(event, position, 'content');
3532
3543
  },
3533
3544
  });
3534
3545
  this.addDisposables(this.dropTarget);
@@ -3851,7 +3862,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3851
3862
  // don't show the overlay if the tab being dragged is the last panel of this group
3852
3863
  return ((_a = last(this.group.panels)) === null || _a === void 0 ? void 0 : _a.id) !== data.panelId;
3853
3864
  }
3854
- return group.model.canDisplayOverlay(event, position, 'panel');
3865
+ return group.model.canDisplayOverlay(event, position, 'header_space');
3855
3866
  },
3856
3867
  });
3857
3868
  this.onWillShowOverlay = this.dropTraget.onWillShowOverlay;
@@ -4244,6 +4255,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4244
4255
  this._width = 0;
4245
4256
  this._height = 0;
4246
4257
  this._panels = [];
4258
+ this._panelDisposables = new Map();
4247
4259
  this._onMove = new Emitter();
4248
4260
  this.onMove = this._onMove.event;
4249
4261
  this._onDidDrop = new Emitter();
@@ -4258,6 +4270,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4258
4270
  this.onGroupDragStart = this._onGroupDragStart.event;
4259
4271
  this._onDidAddPanel = new Emitter();
4260
4272
  this.onDidAddPanel = this._onDidAddPanel.event;
4273
+ this._onDidPanelTitleChange = new Emitter();
4274
+ this.onDidPanelTitleChange = this._onDidPanelTitleChange.event;
4275
+ this._onDidPanelParametersChange = new Emitter();
4276
+ this.onDidPanelParametersChange = this._onDidPanelParametersChange.event;
4261
4277
  this._onDidRemovePanel = new Emitter();
4262
4278
  this.onDidRemovePanel = this._onDidRemovePanel.event;
4263
4279
  this._onDidActivePanelChange = new Emitter();
@@ -4546,6 +4562,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4546
4562
  if (this.mostRecentlyUsed.includes(panel)) {
4547
4563
  this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
4548
4564
  }
4565
+ const disposable = this._panelDisposables.get(panel.id);
4566
+ if (disposable) {
4567
+ disposable.dispose();
4568
+ this._panelDisposables.delete(panel.id);
4569
+ }
4549
4570
  this._onDidRemovePanel.fire({ panel });
4550
4571
  }
4551
4572
  doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
@@ -4563,6 +4584,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4563
4584
  }
4564
4585
  this.updateMru(panel);
4565
4586
  this.panels.splice(index, 0, panel);
4587
+ this._panelDisposables.set(panel.id, new CompositeDisposable(panel.api.onDidTitleChange((event) => this._onDidPanelTitleChange.fire(event)), panel.api.onDidParametersChange((event) => this._onDidPanelParametersChange.fire(event))));
4566
4588
  this._onDidAddPanel.fire({ panel });
4567
4589
  }
4568
4590
  doSetActivePanel(panel) {
@@ -4980,24 +5002,22 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4980
5002
  get isVisible() {
4981
5003
  return this._isVisible;
4982
5004
  }
4983
- get isHidden() {
4984
- return this._isHidden;
4985
- }
4986
5005
  get width() {
4987
5006
  return this._width;
4988
5007
  }
4989
5008
  get height() {
4990
5009
  return this._height;
4991
5010
  }
4992
- constructor(id) {
5011
+ constructor(id, component) {
4993
5012
  super();
4994
5013
  this.id = id;
5014
+ this.component = component;
4995
5015
  this._isFocused = false;
4996
5016
  this._isActive = false;
4997
5017
  this._isVisible = true;
4998
- this._isHidden = false;
4999
5018
  this._width = 0;
5000
5019
  this._height = 0;
5020
+ this._parameters = {};
5001
5021
  this.panelUpdatesDisposable = new MutableDisposable();
5002
5022
  this._onDidDimensionChange = new Emitter();
5003
5023
  this.onDidDimensionsChange = this._onDidDimensionChange.event;
@@ -5009,49 +5029,51 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5009
5029
  //
5010
5030
  this._onDidVisibilityChange = new Emitter();
5011
5031
  this.onDidVisibilityChange = this._onDidVisibilityChange.event;
5012
- this._onDidHiddenChange = new Emitter();
5013
- this.onDidHiddenChange = this._onDidHiddenChange.event;
5032
+ this._onWillVisibilityChange = new Emitter();
5033
+ this.onWillVisibilityChange = this._onWillVisibilityChange.event;
5014
5034
  this._onDidActiveChange = new Emitter();
5015
5035
  this.onDidActiveChange = this._onDidActiveChange.event;
5016
5036
  this._onActiveChange = new Emitter();
5017
5037
  this.onActiveChange = this._onActiveChange.event;
5018
- this._onUpdateParameters = new Emitter();
5019
- this.onUpdateParameters = this._onUpdateParameters.event;
5038
+ this._onDidParametersChange = new Emitter();
5039
+ this.onDidParametersChange = this._onDidParametersChange.event;
5020
5040
  this.addDisposables(this.onDidFocusChange((event) => {
5021
5041
  this._isFocused = event.isFocused;
5022
5042
  }), this.onDidActiveChange((event) => {
5023
5043
  this._isActive = event.isActive;
5024
5044
  }), this.onDidVisibilityChange((event) => {
5025
5045
  this._isVisible = event.isVisible;
5026
- }), this.onDidHiddenChange((event) => {
5027
- this._isHidden = event.isHidden;
5028
5046
  }), this.onDidDimensionsChange((event) => {
5029
5047
  this._width = event.width;
5030
5048
  this._height = event.height;
5031
- }), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onUpdateParameters, this._onWillFocus, this._onDidHiddenChange, this._onUpdateParameters);
5049
+ }), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onWillFocus, this._onWillVisibilityChange, this._onDidParametersChange);
5050
+ }
5051
+ getParameters() {
5052
+ return this._parameters;
5032
5053
  }
5033
5054
  initialize(panel) {
5034
- this.panelUpdatesDisposable.value = this._onUpdateParameters.event((parameters) => {
5055
+ this.panelUpdatesDisposable.value = this._onDidParametersChange.event((parameters) => {
5056
+ this._parameters = parameters;
5035
5057
  panel.update({
5036
5058
  params: parameters,
5037
5059
  });
5038
5060
  });
5039
5061
  }
5040
- setHidden(isHidden) {
5041
- this._onDidHiddenChange.fire({ isHidden });
5062
+ setVisible(isVisible) {
5063
+ this._onWillVisibilityChange.fire({ isVisible });
5042
5064
  }
5043
5065
  setActive() {
5044
5066
  this._onActiveChange.fire();
5045
5067
  }
5046
5068
  updateParameters(parameters) {
5047
- this._onUpdateParameters.fire(parameters);
5069
+ this._onDidParametersChange.fire(parameters);
5048
5070
  }
5049
5071
  }
5050
5072
 
5051
5073
  class SplitviewPanelApiImpl extends PanelApiImpl {
5052
5074
  //
5053
- constructor(id) {
5054
- super(id);
5075
+ constructor(id, component) {
5076
+ super(id, component);
5055
5077
  this._onDidConstraintsChangeInternal = new Emitter();
5056
5078
  this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
5057
5079
  //
@@ -5076,8 +5098,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5076
5098
  set pane(pane) {
5077
5099
  this._pane = pane;
5078
5100
  }
5079
- constructor(id) {
5080
- super(id);
5101
+ constructor(id, component) {
5102
+ super(id, component);
5081
5103
  this._onDidExpansionChange = new Emitter({
5082
5104
  replay: true,
5083
5105
  });
@@ -5236,7 +5258,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5236
5258
  this.header.style.display = value ? '' : 'none';
5237
5259
  }
5238
5260
  constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
5239
- super(id, component, new PaneviewPanelApiImpl(id));
5261
+ super(id, component, new PaneviewPanelApiImpl(id, component));
5240
5262
  this.headerComponent = headerComponent;
5241
5263
  this._onDidChangeExpansionState = new Emitter({ replay: true });
5242
5264
  this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
@@ -5256,7 +5278,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5256
5278
  this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
5257
5279
  this._orientation = orientation;
5258
5280
  this.element.classList.add('pane');
5259
- this.addDisposables(this.api.onDidSizeChange((event) => {
5281
+ this.addDisposables(this.api.onWillVisibilityChange((event) => {
5282
+ const { isVisible } = event;
5283
+ const { accessor } = this._params;
5284
+ accessor.setVisible(this, isVisible);
5285
+ }), this.api.onDidSizeChange((event) => {
5260
5286
  this._onDidChange.fire({ size: event.size });
5261
5287
  }), addDisposableListener(this.element, 'mouseenter', (ev) => {
5262
5288
  this.api._onMouseEnter.fire(ev);
@@ -5463,8 +5489,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5463
5489
  }
5464
5490
 
5465
5491
  class GridviewPanelApiImpl extends PanelApiImpl {
5466
- constructor(id, panel) {
5467
- super(id);
5492
+ constructor(id, component, panel) {
5493
+ super(id, component);
5468
5494
  this._onDidConstraintsChangeInternal = new Emitter();
5469
5495
  this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
5470
5496
  this._onDidConstraintsChange = new Emitter();
@@ -5535,7 +5561,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5535
5561
  return this.api.isActive;
5536
5562
  }
5537
5563
  constructor(id, component, options, api) {
5538
- super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
5564
+ super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component));
5539
5565
  this._evaluatedMinimumWidth = 0;
5540
5566
  this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
5541
5567
  this._evaluatedMinimumHeight = 0;
@@ -5560,10 +5586,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5560
5586
  this._maximumHeight = options.maximumHeight;
5561
5587
  }
5562
5588
  this.api.initialize(this); // TODO: required to by-pass 'super before this' requirement
5563
- this.addDisposables(this.api.onDidHiddenChange((event) => {
5564
- const { isHidden } = event;
5589
+ this.addDisposables(this.api.onWillVisibilityChange((event) => {
5590
+ const { isVisible } = event;
5565
5591
  const { accessor } = this._params;
5566
- accessor.setVisible(this, !isHidden);
5592
+ accessor.setVisible(this, isVisible);
5567
5593
  }), this.api.onActiveChange(() => {
5568
5594
  const { accessor } = this._params;
5569
5595
  accessor.doSetGroupActive(this);
@@ -5643,7 +5669,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5643
5669
  return this._group.model.location;
5644
5670
  }
5645
5671
  constructor(id, accessor) {
5646
- super(id);
5672
+ super(id, '__dockviewgroup__');
5647
5673
  this.accessor = accessor;
5648
5674
  this._onDidLocationChange = new Emitter();
5649
5675
  this.onDidLocationChange = this._onDidLocationChange.event;
@@ -5804,32 +5830,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5804
5830
  return this.panel.renderer;
5805
5831
  }
5806
5832
  set group(value) {
5807
- const isOldGroupActive = this.isGroupActive;
5833
+ const oldGroup = this._group;
5808
5834
  if (this._group !== value) {
5809
5835
  this._group = value;
5810
5836
  this._onDidGroupChange.fire({});
5811
- let _trackGroupActive = isOldGroupActive; // prevent duplicate events with same state
5812
- this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidLocationChange((event) => {
5813
- if (this.group !== this.panel.group) {
5814
- return;
5815
- }
5816
- this._onDidLocationChange.fire(event);
5817
- }), this.group.api.onDidActiveChange(() => {
5818
- if (this.group !== this.panel.group) {
5819
- return;
5820
- }
5821
- if (_trackGroupActive !== this.isGroupActive) {
5822
- _trackGroupActive = this.isGroupActive;
5823
- this._onDidActiveGroupChange.fire({
5824
- isActive: this.isGroupActive,
5825
- });
5826
- }
5827
- }));
5828
- // if (this.isGroupActive !== isOldGroupActive) {
5829
- // this._onDidActiveGroupChange.fire({
5830
- // isActive: this.isGroupActive,
5831
- // });
5832
- // }
5837
+ this.setupGroupEventListeners(oldGroup);
5833
5838
  this._onDidLocationChange.fire({
5834
5839
  location: this.group.api.location,
5835
5840
  });
@@ -5838,8 +5843,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5838
5843
  get group() {
5839
5844
  return this._group;
5840
5845
  }
5841
- constructor(panel, group, accessor) {
5842
- super(panel.id);
5846
+ get tabComponent() {
5847
+ return this._tabComponent;
5848
+ }
5849
+ constructor(panel, group, accessor, component, tabComponent) {
5850
+ super(panel.id, component);
5843
5851
  this.panel = panel;
5844
5852
  this.accessor = accessor;
5845
5853
  this._onDidTitleChange = new Emitter();
@@ -5853,8 +5861,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5853
5861
  this._onDidLocationChange = new Emitter();
5854
5862
  this.onDidLocationChange = this._onDidLocationChange.event;
5855
5863
  this.groupEventsDisposable = new MutableDisposable();
5864
+ this._tabComponent = tabComponent;
5856
5865
  this.initialize(panel);
5857
5866
  this._group = group;
5867
+ this.setupGroupEventListeners();
5858
5868
  this.addDisposables(this.groupEventsDisposable, this._onDidRendererChange, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange, this._onDidLocationChange);
5859
5869
  }
5860
5870
  getWindow() {
@@ -5889,6 +5899,35 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5889
5899
  exitMaximized() {
5890
5900
  this.group.api.exitMaximized();
5891
5901
  }
5902
+ setupGroupEventListeners(previousGroup) {
5903
+ var _a;
5904
+ let _trackGroupActive = (_a = previousGroup === null || previousGroup === void 0 ? void 0 : previousGroup.isActive) !== null && _a !== void 0 ? _a : false; // prevent duplicate events with same state
5905
+ this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidVisibilityChange((event) => {
5906
+ if (!event.isVisible && this.isVisible) {
5907
+ this._onDidVisibilityChange.fire(event);
5908
+ }
5909
+ else if (event.isVisible &&
5910
+ !this.isVisible &&
5911
+ this.group.model.isPanelActive(this.panel)) {
5912
+ this._onDidVisibilityChange.fire(event);
5913
+ }
5914
+ }), this.group.api.onDidLocationChange((event) => {
5915
+ if (this.group !== this.panel.group) {
5916
+ return;
5917
+ }
5918
+ this._onDidLocationChange.fire(event);
5919
+ }), this.group.api.onDidActiveChange(() => {
5920
+ if (this.group !== this.panel.group) {
5921
+ return;
5922
+ }
5923
+ if (_trackGroupActive !== this.isGroupActive) {
5924
+ _trackGroupActive = this.isGroupActive;
5925
+ this._onDidActiveGroupChange.fire({
5926
+ isActive: this.isGroupActive,
5927
+ });
5928
+ }
5929
+ }));
5930
+ }
5892
5931
  }
5893
5932
 
5894
5933
  class DockviewPanel extends CompositeDisposable {
@@ -5905,7 +5944,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5905
5944
  var _a;
5906
5945
  return (_a = this._renderer) !== null && _a !== void 0 ? _a : this.accessor.renderer;
5907
5946
  }
5908
- constructor(id, accessor, containerApi, group, view, options) {
5947
+ constructor(id, component, tabComponent, accessor, containerApi, group, view, options) {
5909
5948
  super();
5910
5949
  this.id = id;
5911
5950
  this.accessor = accessor;
@@ -5913,7 +5952,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5913
5952
  this.view = view;
5914
5953
  this._renderer = options.renderer;
5915
5954
  this._group = group;
5916
- this.api = new DockviewPanelApiImpl(this, this._group, accessor);
5955
+ this.api = new DockviewPanelApiImpl(this, this._group, accessor, component, tabComponent);
5917
5956
  this.addDisposables(this.api.onActiveChange(() => {
5918
5957
  accessor.setActivePanel(this);
5919
5958
  }), this.api.onDidSizeChange((event) => {
@@ -6208,7 +6247,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6208
6247
  ? (_b = viewData.tab) === null || _b === void 0 ? void 0 : _b.id
6209
6248
  : panelData.tabComponent;
6210
6249
  const view = new DockviewPanelModel(this.accessor, panelId, contentComponent, tabComponent);
6211
- const panel = new DockviewPanel(panelId, this.accessor, new DockviewApi(this.accessor), group, view, {
6250
+ const panel = new DockviewPanel(panelId, contentComponent, tabComponent, this.accessor, new DockviewApi(this.accessor), group, view, {
6212
6251
  renderer: panelData.renderer,
6213
6252
  });
6214
6253
  panel.init({
@@ -7046,7 +7085,15 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7046
7085
  acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
7047
7086
  overlayModel: (_b = this.options.rootOverlayModel) !== null && _b !== void 0 ? _b : DEFAULT_ROOT_OVERLAY_MODEL,
7048
7087
  });
7049
- this.addDisposables(this._rootDropTarget.onDrop((event) => {
7088
+ this.addDisposables(this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
7089
+ if (this.gridview.length > 0 && event.position === 'center') {
7090
+ // option only available when no panels in primary grid
7091
+ return;
7092
+ }
7093
+ this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
7094
+ kind: 'edge',
7095
+ }));
7096
+ }), this._rootDropTarget.onDrop((event) => {
7050
7097
  var _a;
7051
7098
  const willDropEvent = new DockviewWillDropEvent({
7052
7099
  nativeEvent: event.nativeEvent,
@@ -7055,7 +7102,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7055
7102
  api: this._api,
7056
7103
  group: undefined,
7057
7104
  getData: getPanelData,
7058
- kind: 'content',
7105
+ kind: 'edge',
7059
7106
  });
7060
7107
  this._onWillDrop.fire(willDropEvent);
7061
7108
  if (willDropEvent.defaultPrevented) {
@@ -7111,7 +7158,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7111
7158
  const box = getBox();
7112
7159
  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;
7113
7160
  if (itemToPopout.api.location.type === 'grid') {
7114
- itemToPopout.api.setHidden(true);
7161
+ itemToPopout.api.setVisible(false);
7115
7162
  }
7116
7163
  const _window = new PopoutWindow(`${this.id}-${groupId}`, // unique id
7117
7164
  theme !== null && theme !== void 0 ? theme : '', {
@@ -7162,7 +7209,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7162
7209
  }));
7163
7210
  switch (referenceLocation) {
7164
7211
  case 'grid':
7165
- referenceGroup.api.setHidden(true);
7212
+ referenceGroup.api.setVisible(false);
7166
7213
  break;
7167
7214
  case 'floating':
7168
7215
  case 'popout':
@@ -7216,8 +7263,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7216
7263
  from: group,
7217
7264
  to: referenceGroup,
7218
7265
  }));
7219
- if (referenceGroup.api.isHidden) {
7220
- referenceGroup.api.setHidden(false);
7266
+ if (!referenceGroup.api.isVisible) {
7267
+ referenceGroup.api.setVisible(true);
7221
7268
  }
7222
7269
  if (this.getPanel(group.id)) {
7223
7270
  this.doRemoveGroup(group, {
@@ -7790,7 +7837,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7790
7837
  }
7791
7838
  updateWatermark() {
7792
7839
  var _a, _b;
7793
- if (this.groups.filter((x) => x.api.location.type === 'grid' && !x.api.isHidden).length === 0) {
7840
+ if (this.groups.filter((x) => x.api.location.type === 'grid' && x.api.isVisible).length === 0) {
7794
7841
  if (!this.watermark) {
7795
7842
  this.watermark = this.createWatermarkComponent();
7796
7843
  this.watermark.init({
@@ -8187,6 +8234,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8187
8234
  if (this._onDidActivePanelChange.value !== event.panel) {
8188
8235
  this._onDidActivePanelChange.fire(event.panel);
8189
8236
  }
8237
+ }), exports.DockviewEvent.any(view.model.onDidPanelTitleChange, view.model.onDidPanelParametersChange)(() => {
8238
+ this._bufferOnDidLayoutChange.fire();
8190
8239
  }));
8191
8240
  this._groups.set(view.id, { value: view, disposable });
8192
8241
  }
@@ -8199,7 +8248,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8199
8248
  const contentComponent = options.component;
8200
8249
  const tabComponent = (_a = options.tabComponent) !== null && _a !== void 0 ? _a : this.options.defaultTabComponent;
8201
8250
  const view = new DockviewPanelModel(this, options.id, contentComponent, tabComponent);
8202
- const panel = new DockviewPanel(options.id, this, this._api, group, view, { renderer: options.renderer });
8251
+ const panel = new DockviewPanel(options.id, contentComponent, tabComponent, this, this._api, group, view, { renderer: options.renderer });
8203
8252
  panel.init({
8204
8253
  title: (_b = options.title) !== null && _b !== void 0 ? _b : options.id,
8205
8254
  params: (_c = options === null || options === void 0 ? void 0 : options.params) !== null && _c !== void 0 ? _c : {},
@@ -8573,19 +8622,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8573
8622
  const index = this.panels.indexOf(panel);
8574
8623
  this.splitview.setViewVisible(index, visible);
8575
8624
  }
8576
- setActive(view, skipFocus) {
8577
- this._activePanel = view;
8625
+ setActive(panel, skipFocus) {
8626
+ this._activePanel = panel;
8578
8627
  this.panels
8579
- .filter((v) => v !== view)
8628
+ .filter((v) => v !== panel)
8580
8629
  .forEach((v) => {
8581
8630
  v.api._onDidActiveChange.fire({ isActive: false });
8582
8631
  if (!skipFocus) {
8583
8632
  v.focus();
8584
8633
  }
8585
8634
  });
8586
- view.api._onDidActiveChange.fire({ isActive: true });
8635
+ panel.api._onDidActiveChange.fire({ isActive: true });
8587
8636
  if (!skipFocus) {
8588
- view.focus();
8637
+ panel.focus();
8589
8638
  }
8590
8639
  }
8591
8640
  removePanel(panel, sizing) {
@@ -8884,6 +8933,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8884
8933
  });
8885
8934
  this.addDisposables(this._disposable);
8886
8935
  }
8936
+ setVisible(panel, visible) {
8937
+ const index = this.panels.indexOf(panel);
8938
+ this.paneview.setViewVisible(index, visible);
8939
+ }
8887
8940
  focus() {
8888
8941
  //noop
8889
8942
  }
@@ -8930,6 +8983,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8930
8983
  isExpanded: options.isExpanded,
8931
8984
  title: options.title,
8932
8985
  containerApi: new PaneviewApi(this),
8986
+ accessor: this,
8933
8987
  });
8934
8988
  this.paneview.addPane(view, size, index);
8935
8989
  view.orientation = this.paneview.orientation;
@@ -9029,6 +9083,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9029
9083
  title: data.title,
9030
9084
  isExpanded: !!view.expanded,
9031
9085
  containerApi: new PaneviewApi(this),
9086
+ accessor: this,
9032
9087
  });
9033
9088
  panel.orientation = this.paneview.orientation;
9034
9089
  });
@@ -9108,7 +9163,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9108
9163
  return this._snap;
9109
9164
  }
9110
9165
  constructor(id, componentName) {
9111
- super(id, componentName, new SplitviewPanelApiImpl(id));
9166
+ super(id, componentName, new SplitviewPanelApiImpl(id, componentName));
9112
9167
  this._evaluatedMinimumSize = 0;
9113
9168
  this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
9114
9169
  this._minimumSize = 0;
@@ -9117,10 +9172,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9117
9172
  this._onDidChange = new Emitter();
9118
9173
  this.onDidChange = this._onDidChange.event;
9119
9174
  this.api.initialize(this);
9120
- this.addDisposables(this._onDidChange, this.api.onDidHiddenChange((event) => {
9121
- const { isHidden } = event;
9175
+ this.addDisposables(this._onDidChange, this.api.onWillVisibilityChange((event) => {
9176
+ const { isVisible } = event;
9122
9177
  const { accessor } = this._params;
9123
- accessor.setVisible(this, !isHidden);
9178
+ accessor.setVisible(this, isVisible);
9124
9179
  }), this.api.onActiveChange(() => {
9125
9180
  const { accessor } = this._params;
9126
9181
  accessor.setActive(this);