dockview-react 4.10.0 → 4.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-react
3
- * @version 4.10.0
3
+ * @version 4.12.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -3751,8 +3751,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
3751
3751
  /**
3752
3752
  * Create a component from a serialized object.
3753
3753
  */
3754
- fromJSON(data) {
3755
- this.component.fromJSON(data);
3754
+ fromJSON(data, options) {
3755
+ this.component.fromJSON(data, options);
3756
3756
  }
3757
3757
  /**
3758
3758
  * Create a serialized object of the current component.
@@ -4983,6 +4983,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
4983
4983
  }
4984
4984
  if (doRender) {
4985
4985
  const focusTracker = trackFocus(container);
4986
+ this.focusTracker = focusTracker;
4986
4987
  const disposable = new CompositeDisposable();
4987
4988
  disposable.addDisposables(focusTracker, focusTracker.onDidFocus(() => this._onDidFocus.fire()), focusTracker.onDidBlur(() => this._onDidBlur.fire()));
4988
4989
  this.disposable.value = disposable;
@@ -5010,6 +5011,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
5010
5011
  this.disposable.dispose();
5011
5012
  super.dispose();
5012
5013
  }
5014
+ /**
5015
+ * Refresh the focus tracker state to handle cases where focus state
5016
+ * gets out of sync due to programmatic panel activation
5017
+ */
5018
+ refreshFocusState() {
5019
+ var _a;
5020
+ if ((_a = this.focusTracker) === null || _a === void 0 ? void 0 : _a.refreshState) {
5021
+ this.focusTracker.refreshState();
5022
+ }
5023
+ }
5013
5024
  }
5014
5025
 
5015
5026
  function addGhostImage(dataTransfer, ghostElement, options) {
@@ -6336,8 +6347,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6336
6347
  this._activePanel = panel;
6337
6348
  if (panel) {
6338
6349
  this.tabsContainer.setActivePanel(panel);
6350
+ this.contentContainer.openPanel(panel);
6339
6351
  panel.layout(this._width, this._height);
6340
6352
  this.updateMru(panel);
6353
+ // Refresh focus state to handle programmatic activation without DOM focus change
6354
+ this.contentContainer.refreshFocusState();
6341
6355
  this._onDidActivePanelChange.fire({
6342
6356
  panel,
6343
6357
  });
@@ -6761,11 +6775,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6761
6775
  }
6762
6776
  }
6763
6777
 
6778
+ // GridConstraintChangeEvent2 is not exported, so we'll type it manually
6764
6779
  const MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
6765
6780
  const MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
6766
6781
  class DockviewGroupPanel extends GridviewPanel {
6767
6782
  get minimumWidth() {
6768
6783
  var _a;
6784
+ // Check for explicitly set group constraint first
6785
+ if (typeof this._explicitConstraints.minimumWidth === 'number') {
6786
+ return this._explicitConstraints.minimumWidth;
6787
+ }
6769
6788
  const activePanelMinimumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumWidth;
6770
6789
  if (typeof activePanelMinimumWidth === 'number') {
6771
6790
  return activePanelMinimumWidth;
@@ -6774,6 +6793,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6774
6793
  }
6775
6794
  get minimumHeight() {
6776
6795
  var _a;
6796
+ // Check for explicitly set group constraint first
6797
+ if (typeof this._explicitConstraints.minimumHeight === 'number') {
6798
+ return this._explicitConstraints.minimumHeight;
6799
+ }
6777
6800
  const activePanelMinimumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumHeight;
6778
6801
  if (typeof activePanelMinimumHeight === 'number') {
6779
6802
  return activePanelMinimumHeight;
@@ -6782,6 +6805,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6782
6805
  }
6783
6806
  get maximumWidth() {
6784
6807
  var _a;
6808
+ // Check for explicitly set group constraint first
6809
+ if (typeof this._explicitConstraints.maximumWidth === 'number') {
6810
+ return this._explicitConstraints.maximumWidth;
6811
+ }
6785
6812
  const activePanelMaximumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumWidth;
6786
6813
  if (typeof activePanelMaximumWidth === 'number') {
6787
6814
  return activePanelMaximumWidth;
@@ -6790,6 +6817,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6790
6817
  }
6791
6818
  get maximumHeight() {
6792
6819
  var _a;
6820
+ // Check for explicitly set group constraint first
6821
+ if (typeof this._explicitConstraints.maximumHeight === 'number') {
6822
+ return this._explicitConstraints.maximumHeight;
6823
+ }
6793
6824
  const activePanelMaximumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumHeight;
6794
6825
  if (typeof activePanelMaximumHeight === 'number') {
6795
6826
  return activePanelMaximumHeight;
@@ -6821,14 +6852,39 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
6821
6852
  var _a, _b, _c, _d, _e, _f;
6822
6853
  super(id, 'groupview_default', {
6823
6854
  minimumHeight: (_b = (_a = options.constraints) === null || _a === void 0 ? void 0 : _a.minimumHeight) !== null && _b !== void 0 ? _b : MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
6824
- minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.maximumHeight) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6855
+ minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.minimumWidth) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6825
6856
  maximumHeight: (_e = options.constraints) === null || _e === void 0 ? void 0 : _e.maximumHeight,
6826
6857
  maximumWidth: (_f = options.constraints) === null || _f === void 0 ? void 0 : _f.maximumWidth,
6827
6858
  }, new DockviewGroupPanelApiImpl(id, accessor));
6859
+ // Track explicitly set constraints to override panel constraints
6860
+ this._explicitConstraints = {};
6828
6861
  this.api.initialize(this); // cannot use 'this' after after 'super' call
6829
6862
  this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
6830
6863
  this.addDisposables(this.model.onDidActivePanelChange((event) => {
6831
6864
  this.api._onDidActivePanelChange.fire(event);
6865
+ }), this.api.onDidConstraintsChangeInternal((event) => {
6866
+ // Track explicitly set constraints to override panel constraints
6867
+ // Extract numeric values from functions or values
6868
+ if (event.minimumWidth !== undefined) {
6869
+ this._explicitConstraints.minimumWidth = typeof event.minimumWidth === 'function'
6870
+ ? event.minimumWidth()
6871
+ : event.minimumWidth;
6872
+ }
6873
+ if (event.minimumHeight !== undefined) {
6874
+ this._explicitConstraints.minimumHeight = typeof event.minimumHeight === 'function'
6875
+ ? event.minimumHeight()
6876
+ : event.minimumHeight;
6877
+ }
6878
+ if (event.maximumWidth !== undefined) {
6879
+ this._explicitConstraints.maximumWidth = typeof event.maximumWidth === 'function'
6880
+ ? event.maximumWidth()
6881
+ : event.maximumWidth;
6882
+ }
6883
+ if (event.maximumHeight !== undefined) {
6884
+ this._explicitConstraints.maximumHeight = typeof event.maximumHeight === 'function'
6885
+ ? event.maximumHeight()
6886
+ : event.maximumHeight;
6887
+ }
6832
6888
  }));
6833
6889
  }
6834
6890
  focus() {
@@ -7125,6 +7181,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7125
7181
  params: this._params,
7126
7182
  });
7127
7183
  }
7184
+ updateFromStateModel(state) {
7185
+ var _a, _b, _c;
7186
+ this._maximumHeight = state.maximumHeight;
7187
+ this._minimumHeight = state.minimumHeight;
7188
+ this._maximumWidth = state.maximumWidth;
7189
+ this._minimumWidth = state.minimumWidth;
7190
+ this.update({ params: (_a = state.params) !== null && _a !== void 0 ? _a : {} });
7191
+ this.setTitle((_b = state.title) !== null && _b !== void 0 ? _b : this.id);
7192
+ this.setRenderer((_c = state.renderer) !== null && _c !== void 0 ? _c : this.accessor.renderer);
7193
+ // state.contentComponent;
7194
+ // state.tabComponent;
7195
+ }
7128
7196
  updateParentGroup(group, options) {
7129
7197
  this._group = group;
7130
7198
  this.api.group = this._group;
@@ -8888,7 +8956,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8888
8956
  : (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE }));
8889
8957
  const el = group.element.querySelector('.dv-void-container');
8890
8958
  if (!el) {
8891
- throw new Error('failed to find drag handle');
8959
+ throw new Error('dockview: failed to find drag handle');
8892
8960
  }
8893
8961
  overlay.setupDrag(el, {
8894
8962
  inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
@@ -8960,7 +9028,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
8960
9028
  case 'right':
8961
9029
  return this.createGroupAtLocation([this.gridview.length], undefined, options); // insert into last position
8962
9030
  default:
8963
- throw new Error(`unsupported position ${position}`);
9031
+ throw new Error(`dockview: unsupported position ${position}`);
8964
9032
  }
8965
9033
  }
8966
9034
  updateOptions(options) {
@@ -9106,15 +9174,48 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9106
9174
  }
9107
9175
  return result;
9108
9176
  }
9109
- fromJSON(data) {
9177
+ fromJSON(data, options) {
9110
9178
  var _a, _b;
9179
+ const existingPanels = new Map();
9180
+ let tempGroup;
9181
+ if (options === null || options === void 0 ? void 0 : options.reuseExistingPanels) {
9182
+ /**
9183
+ * What are we doing here?
9184
+ *
9185
+ * 1. Create a temporary group to hold any panels that currently exist and that also exist in the new layout
9186
+ * 2. Remove that temporary group from the group mapping so that it doesn't get cleared when we clear the layout
9187
+ */
9188
+ tempGroup = this.createGroup();
9189
+ this._groups.delete(tempGroup.api.id);
9190
+ const newPanels = Object.keys(data.panels);
9191
+ for (const panel of this.panels) {
9192
+ if (newPanels.includes(panel.api.id)) {
9193
+ existingPanels.set(panel.api.id, panel);
9194
+ }
9195
+ }
9196
+ this.movingLock(() => {
9197
+ Array.from(existingPanels.values()).forEach((panel) => {
9198
+ this.moveGroupOrPanel({
9199
+ from: {
9200
+ groupId: panel.api.group.api.id,
9201
+ panelId: panel.api.id,
9202
+ },
9203
+ to: {
9204
+ group: tempGroup,
9205
+ position: 'center',
9206
+ },
9207
+ keepEmptyGroups: true,
9208
+ });
9209
+ });
9210
+ });
9211
+ }
9111
9212
  this.clear();
9112
9213
  if (typeof data !== 'object' || data === null) {
9113
- throw new Error('serialized layout must be a non-null object');
9214
+ throw new Error('dockview: serialized layout must be a non-null object');
9114
9215
  }
9115
9216
  const { grid, panels, activeGroup } = data;
9116
9217
  if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
9117
- throw new Error('root must be of type branch');
9218
+ throw new Error('dockview: root must be of type branch');
9118
9219
  }
9119
9220
  try {
9120
9221
  // take note of the existing dimensions
@@ -9123,7 +9224,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9123
9224
  const createGroupFromSerializedState = (data) => {
9124
9225
  const { id, locked, hideHeader, views, activeView } = data;
9125
9226
  if (typeof id !== 'string') {
9126
- throw new Error('group id must be of type string');
9227
+ throw new Error('dockview: group id must be of type string');
9127
9228
  }
9128
9229
  const group = this.createGroup({
9129
9230
  id,
@@ -9138,17 +9239,38 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9138
9239
  * In running this section first we avoid firing lots of 'add' events in the event of a failure
9139
9240
  * due to a corruption of input data.
9140
9241
  */
9141
- const panel = this._deserializer.fromJSON(panels[child], group);
9142
- createdPanels.push(panel);
9242
+ const existingPanel = existingPanels.get(child);
9243
+ if (tempGroup && existingPanel) {
9244
+ this.movingLock(() => {
9245
+ tempGroup.model.removePanel(existingPanel);
9246
+ });
9247
+ createdPanels.push(existingPanel);
9248
+ existingPanel.updateFromStateModel(panels[child]);
9249
+ }
9250
+ else {
9251
+ const panel = this._deserializer.fromJSON(panels[child], group);
9252
+ createdPanels.push(panel);
9253
+ }
9143
9254
  }
9144
9255
  for (let i = 0; i < views.length; i++) {
9145
9256
  const panel = createdPanels[i];
9146
9257
  const isActive = typeof activeView === 'string' &&
9147
9258
  activeView === panel.id;
9148
- group.model.openPanel(panel, {
9149
- skipSetActive: !isActive,
9150
- skipSetGroupActive: true,
9151
- });
9259
+ const hasExisting = existingPanels.has(panel.api.id);
9260
+ if (hasExisting) {
9261
+ this.movingLock(() => {
9262
+ group.model.openPanel(panel, {
9263
+ skipSetActive: !isActive,
9264
+ skipSetGroupActive: true,
9265
+ });
9266
+ });
9267
+ }
9268
+ else {
9269
+ group.model.openPanel(panel, {
9270
+ skipSetActive: !isActive,
9271
+ skipSetGroupActive: true,
9272
+ });
9273
+ }
9152
9274
  }
9153
9275
  if (!group.activePanel && group.panels.length > 0) {
9154
9276
  group.model.openPanel(group.panels[group.panels.length - 1], {
@@ -9187,7 +9309,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9187
9309
  setTimeout(() => {
9188
9310
  this.addPopoutGroup(group, {
9189
9311
  position: position !== null && position !== void 0 ? position : undefined,
9190
- overridePopoutGroup: gridReferenceGroup ? group : undefined,
9312
+ overridePopoutGroup: gridReferenceGroup
9313
+ ? group
9314
+ : undefined,
9191
9315
  referenceGroup: gridReferenceGroup
9192
9316
  ? this.getPanel(gridReferenceGroup)
9193
9317
  : undefined,
@@ -9273,11 +9397,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9273
9397
  addPanel(options) {
9274
9398
  var _a, _b;
9275
9399
  if (this.panels.find((_) => _.id === options.id)) {
9276
- throw new Error(`panel with id ${options.id} already exists`);
9400
+ throw new Error(`dockview: panel with id ${options.id} already exists`);
9277
9401
  }
9278
9402
  let referenceGroup;
9279
9403
  if (options.position && options.floating) {
9280
- throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
9404
+ throw new Error('dockview: you can only provide one of: position, floating as arguments to .addPanel(...)');
9281
9405
  }
9282
9406
  const initial = {
9283
9407
  width: options.initialWidth,
@@ -9291,7 +9415,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9291
9415
  : options.position.referencePanel;
9292
9416
  index = options.position.index;
9293
9417
  if (!referencePanel) {
9294
- throw new Error(`referencePanel '${options.position.referencePanel}' does not exist`);
9418
+ throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
9295
9419
  }
9296
9420
  referenceGroup = this.findGroup(referencePanel);
9297
9421
  }
@@ -9302,7 +9426,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9302
9426
  : options.position.referenceGroup;
9303
9427
  index = options.position.index;
9304
9428
  if (!referenceGroup) {
9305
- throw new Error(`referenceGroup '${options.position.referenceGroup}' does not exist`);
9429
+ throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
9306
9430
  }
9307
9431
  }
9308
9432
  else {
@@ -9414,7 +9538,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9414
9538
  }) {
9415
9539
  const group = panel.group;
9416
9540
  if (!group) {
9417
- throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
9541
+ throw new Error(`dockview: cannot remove panel ${panel.id}. it's missing a group.`);
9418
9542
  }
9419
9543
  group.model.removePanel(panel, {
9420
9544
  skipSetActiveGroup: options.skipSetActiveGroup,
@@ -9463,11 +9587,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9463
9587
  ? this.panels.find((panel) => panel.id === options.referencePanel)
9464
9588
  : options.referencePanel;
9465
9589
  if (!referencePanel) {
9466
- throw new Error(`reference panel ${options.referencePanel} does not exist`);
9590
+ throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
9467
9591
  }
9468
9592
  referenceGroup = this.findGroup(referencePanel);
9469
9593
  if (!referenceGroup) {
9470
- throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
9594
+ throw new Error(`dockview: reference group for reference panel ${options.referencePanel} does not exist`);
9471
9595
  }
9472
9596
  }
9473
9597
  else if (isGroupOptionsWithGroup(options)) {
@@ -9476,7 +9600,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9476
9600
  ? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
9477
9601
  : options.referenceGroup;
9478
9602
  if (!referenceGroup) {
9479
- throw new Error(`reference group ${options.referenceGroup} does not exist`);
9603
+ throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
9480
9604
  }
9481
9605
  }
9482
9606
  else {
@@ -9544,7 +9668,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9544
9668
  }
9545
9669
  return floatingGroup.group;
9546
9670
  }
9547
- throw new Error('failed to find floating group');
9671
+ throw new Error('dockview: failed to find floating group');
9548
9672
  }
9549
9673
  if (group.api.location.type === 'popout') {
9550
9674
  const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
@@ -9575,7 +9699,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9575
9699
  this.updateWatermark();
9576
9700
  return selectedGroup.popoutGroup;
9577
9701
  }
9578
- throw new Error('failed to find popout group');
9702
+ throw new Error('dockview: failed to find popout group');
9579
9703
  }
9580
9704
  const re = super.doRemoveGroup(group, options);
9581
9705
  if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
@@ -9606,7 +9730,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9606
9730
  ? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
9607
9731
  : undefined;
9608
9732
  if (!sourceGroup) {
9609
- throw new Error(`Failed to find group id ${sourceGroupId}`);
9733
+ throw new Error(`dockview: Failed to find group id ${sourceGroupId}`);
9610
9734
  }
9611
9735
  if (sourceItemId === undefined) {
9612
9736
  /**
@@ -9631,9 +9755,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9631
9755
  skipSetActiveGroup: true,
9632
9756
  }));
9633
9757
  if (!removedPanel) {
9634
- throw new Error(`No panel with id ${sourceItemId}`);
9758
+ throw new Error(`dockview: No panel with id ${sourceItemId}`);
9635
9759
  }
9636
- if (sourceGroup.model.size === 0) {
9760
+ if (!options.keepEmptyGroups && sourceGroup.model.size === 0) {
9637
9761
  // remove the group and do not set a new group as active
9638
9762
  this.doRemoveGroup(sourceGroup, { skipActive: true });
9639
9763
  }
@@ -9643,7 +9767,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9643
9767
  var _a;
9644
9768
  return destinationGroup.model.openPanel(removedPanel, {
9645
9769
  index: destinationIndex,
9646
- skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) && !isDestinationGroupEmpty,
9770
+ skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
9771
+ !isDestinationGroupEmpty,
9647
9772
  skipSetGroupActive: true,
9648
9773
  });
9649
9774
  });
@@ -9698,7 +9823,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9698
9823
  }));
9699
9824
  this.doRemoveGroup(sourceGroup, { skipActive: true });
9700
9825
  const newGroup = this.createGroupAtLocation(targetLocation);
9701
- this.movingLock(() => newGroup.model.openPanel(removedPanel));
9826
+ this.movingLock(() => newGroup.model.openPanel(removedPanel, {
9827
+ skipSetActive: true,
9828
+ }));
9702
9829
  this.doSetGroupAndPanelActive(newGroup);
9703
9830
  this._onDidMovePanel.fire({
9704
9831
  panel: this.getGroupPanel(sourceItemId),
@@ -9731,7 +9858,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9731
9858
  skipSetActiveGroup: true,
9732
9859
  }));
9733
9860
  if (!removedPanel) {
9734
- throw new Error(`No panel with id ${sourceItemId}`);
9861
+ throw new Error(`dockview: No panel with id ${sourceItemId}`);
9735
9862
  }
9736
9863
  const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
9737
9864
  const group = this.createGroupAtLocation(dropLocation);
@@ -9786,7 +9913,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9786
9913
  case 'floating': {
9787
9914
  const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
9788
9915
  if (!selectedFloatingGroup) {
9789
- throw new Error('failed to find floating group');
9916
+ throw new Error('dockview: failed to find floating group');
9790
9917
  }
9791
9918
  selectedFloatingGroup.dispose();
9792
9919
  break;
@@ -9794,7 +9921,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9794
9921
  case 'popout': {
9795
9922
  const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
9796
9923
  if (!selectedPopoutGroup) {
9797
- throw new Error('failed to find popout group');
9924
+ throw new Error('dockview: failed to find popout group');
9798
9925
  }
9799
9926
  // Remove from popout groups list to prevent automatic restoration
9800
9927
  const index = this._popoutGroups.indexOf(selectedPopoutGroup);