dockview-angular 4.11.0 → 4.13.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.
Files changed (37) hide show
  1. package/dist/cjs/lib/dockview/dockview-angular.component.js +2 -1
  2. package/dist/cjs/lib/dockview-angular.module.js +2 -4
  3. package/dist/cjs/lib/gridview/gridview-angular.component.js +2 -1
  4. package/dist/cjs/lib/paneview/paneview-angular.component.js +2 -1
  5. package/dist/cjs/lib/splitview/splitview-angular.component.js +2 -1
  6. package/dist/cjs/lib/utils/angular-renderer.js +11 -3
  7. package/dist/cjs/lib/utils/component-factory.js +1 -0
  8. package/dist/dockview-angular.amd.js +194 -65
  9. package/dist/dockview-angular.amd.js.map +1 -1
  10. package/dist/dockview-angular.amd.min.js +2 -2
  11. package/dist/dockview-angular.amd.min.js.map +1 -1
  12. package/dist/dockview-angular.amd.min.noStyle.js +2 -2
  13. package/dist/dockview-angular.amd.min.noStyle.js.map +1 -1
  14. package/dist/dockview-angular.amd.noStyle.js +194 -65
  15. package/dist/dockview-angular.amd.noStyle.js.map +1 -1
  16. package/dist/dockview-angular.cjs.js +194 -65
  17. package/dist/dockview-angular.cjs.js.map +1 -1
  18. package/dist/dockview-angular.esm.js +194 -66
  19. package/dist/dockview-angular.esm.js.map +1 -1
  20. package/dist/dockview-angular.esm.min.js +2 -2
  21. package/dist/dockview-angular.esm.min.js.map +1 -1
  22. package/dist/dockview-angular.js +194 -65
  23. package/dist/dockview-angular.js.map +1 -1
  24. package/dist/dockview-angular.min.js +2 -2
  25. package/dist/dockview-angular.min.js.map +1 -1
  26. package/dist/dockview-angular.min.noStyle.js +2 -2
  27. package/dist/dockview-angular.min.noStyle.js.map +1 -1
  28. package/dist/dockview-angular.noStyle.js +194 -65
  29. package/dist/dockview-angular.noStyle.js.map +1 -1
  30. package/dist/esm/lib/dockview/dockview-angular.component.js +2 -1
  31. package/dist/esm/lib/dockview-angular.module.js +2 -4
  32. package/dist/esm/lib/gridview/gridview-angular.component.js +2 -1
  33. package/dist/esm/lib/paneview/paneview-angular.component.js +2 -1
  34. package/dist/esm/lib/splitview/splitview-angular.component.js +2 -1
  35. package/dist/esm/lib/utils/angular-renderer.js +11 -3
  36. package/dist/esm/lib/utils/component-factory.js +1 -0
  37. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-angular
3
- * @version 4.11.0
3
+ * @version 4.13.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -1268,11 +1268,13 @@
1268
1268
  document.removeEventListener('pointermove', onPointerMove);
1269
1269
  document.removeEventListener('pointerup', end);
1270
1270
  document.removeEventListener('pointercancel', end);
1271
+ document.removeEventListener('contextmenu', end);
1271
1272
  this._onDidSashEnd.fire(undefined);
1272
1273
  };
1273
1274
  document.addEventListener('pointermove', onPointerMove);
1274
1275
  document.addEventListener('pointerup', end);
1275
1276
  document.addEventListener('pointercancel', end);
1277
+ document.addEventListener('contextmenu', end);
1276
1278
  };
1277
1279
  sash.addEventListener('pointerdown', onPointerStart);
1278
1280
  const sashItem = {
@@ -3755,8 +3757,8 @@
3755
3757
  /**
3756
3758
  * Create a component from a serialized object.
3757
3759
  */
3758
- fromJSON(data) {
3759
- this.component.fromJSON(data);
3760
+ fromJSON(data, options) {
3761
+ this.component.fromJSON(data, options);
3760
3762
  }
3761
3763
  /**
3762
3764
  * Create a serialized object of the current component.
@@ -4987,6 +4989,7 @@
4987
4989
  }
4988
4990
  if (doRender) {
4989
4991
  const focusTracker = trackFocus(container);
4992
+ this.focusTracker = focusTracker;
4990
4993
  const disposable = new CompositeDisposable();
4991
4994
  disposable.addDisposables(focusTracker, focusTracker.onDidFocus(() => this._onDidFocus.fire()), focusTracker.onDidBlur(() => this._onDidBlur.fire()));
4992
4995
  this.disposable.value = disposable;
@@ -5014,6 +5017,16 @@
5014
5017
  this.disposable.dispose();
5015
5018
  super.dispose();
5016
5019
  }
5020
+ /**
5021
+ * Refresh the focus tracker state to handle cases where focus state
5022
+ * gets out of sync due to programmatic panel activation
5023
+ */
5024
+ refreshFocusState() {
5025
+ var _a;
5026
+ if ((_a = this.focusTracker) === null || _a === void 0 ? void 0 : _a.refreshState) {
5027
+ this.focusTracker.refreshState();
5028
+ }
5029
+ }
5017
5030
  }
5018
5031
 
5019
5032
  function addGhostImage(dataTransfer, ghostElement, options) {
@@ -5123,7 +5136,7 @@
5123
5136
  }
5124
5137
  }
5125
5138
 
5126
- class WillShowOverlayLocationEvent {
5139
+ class DockviewWillShowOverlayLocationEvent {
5127
5140
  get kind() {
5128
5141
  return this.options.kind;
5129
5142
  }
@@ -5471,7 +5484,7 @@
5471
5484
  index: this._tabs.findIndex((x) => x.value === tab),
5472
5485
  });
5473
5486
  }), tab.onWillShowOverlay((event) => {
5474
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
5487
+ this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
5475
5488
  kind: 'tab',
5476
5489
  panel: this.group.activePanel,
5477
5490
  api: this.accessor.api,
@@ -5635,7 +5648,7 @@
5635
5648
  index: this.tabs.size,
5636
5649
  });
5637
5650
  }), this.voidContainer.onWillShowOverlay((event) => {
5638
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
5651
+ this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
5639
5652
  kind: 'header_space',
5640
5653
  panel: this.group.activePanel,
5641
5654
  api: this.accessor.api,
@@ -6029,7 +6042,7 @@
6029
6042
  }), this.tabsContainer.onWillShowOverlay((event) => {
6030
6043
  this._onWillShowOverlay.fire(event);
6031
6044
  }), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
6032
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
6045
+ this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
6033
6046
  kind: 'content',
6034
6047
  panel: this.activePanel,
6035
6048
  api: this._api,
@@ -6340,8 +6353,11 @@
6340
6353
  this._activePanel = panel;
6341
6354
  if (panel) {
6342
6355
  this.tabsContainer.setActivePanel(panel);
6356
+ this.contentContainer.openPanel(panel);
6343
6357
  panel.layout(this._width, this._height);
6344
6358
  this.updateMru(panel);
6359
+ // Refresh focus state to handle programmatic activation without DOM focus change
6360
+ this.contentContainer.refreshFocusState();
6345
6361
  this._onDidActivePanelChange.fire({
6346
6362
  panel,
6347
6363
  });
@@ -6702,7 +6718,19 @@
6702
6718
  this.onDidLocationChange = this._onDidLocationChange.event;
6703
6719
  this._onDidActivePanelChange = new Emitter();
6704
6720
  this.onDidActivePanelChange = this._onDidActivePanelChange.event;
6705
- this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange);
6721
+ this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange, this._onDidVisibilityChange.event((event) => {
6722
+ // When becoming visible, apply any pending size change
6723
+ if (event.isVisible && this._pendingSize) {
6724
+ super.setSize(this._pendingSize);
6725
+ this._pendingSize = undefined;
6726
+ }
6727
+ }));
6728
+ }
6729
+ setSize(event) {
6730
+ // Always store the requested size
6731
+ this._pendingSize = Object.assign({}, event);
6732
+ // Apply the size change immediately
6733
+ super.setSize(event);
6706
6734
  }
6707
6735
  close() {
6708
6736
  if (!this._group) {
@@ -7171,6 +7199,18 @@
7171
7199
  params: this._params,
7172
7200
  });
7173
7201
  }
7202
+ updateFromStateModel(state) {
7203
+ var _a, _b, _c;
7204
+ this._maximumHeight = state.maximumHeight;
7205
+ this._minimumHeight = state.minimumHeight;
7206
+ this._maximumWidth = state.maximumWidth;
7207
+ this._minimumWidth = state.minimumWidth;
7208
+ this.update({ params: (_a = state.params) !== null && _a !== void 0 ? _a : {} });
7209
+ this.setTitle((_b = state.title) !== null && _b !== void 0 ? _b : this.id);
7210
+ this.setRenderer((_c = state.renderer) !== null && _c !== void 0 ? _c : this.accessor.renderer);
7211
+ // state.contentComponent;
7212
+ // state.tabComponent;
7213
+ }
7174
7214
  updateParentGroup(group, options) {
7175
7215
  this._group = group;
7176
7216
  this.api.group = this._group;
@@ -7642,13 +7682,16 @@
7642
7682
  let right = undefined;
7643
7683
  let width = undefined;
7644
7684
  const moveTop = () => {
7645
- top = clamp(y, -Number.MAX_VALUE, startPosition.originalY +
7685
+ // When dragging top handle, constrain top position to prevent oversizing
7686
+ const maxTop = startPosition.originalY +
7646
7687
  startPosition.originalHeight >
7647
7688
  containerRect.height
7648
- ? this.getMinimumHeight(containerRect.height)
7689
+ ? Math.max(0, containerRect.height -
7690
+ Overlay.MINIMUM_HEIGHT)
7649
7691
  : Math.max(0, startPosition.originalY +
7650
7692
  startPosition.originalHeight -
7651
- Overlay.MINIMUM_HEIGHT));
7693
+ Overlay.MINIMUM_HEIGHT);
7694
+ top = clamp(y, 0, maxTop);
7652
7695
  height =
7653
7696
  startPosition.originalY +
7654
7697
  startPosition.originalHeight -
@@ -7659,22 +7702,27 @@
7659
7702
  top =
7660
7703
  startPosition.originalY -
7661
7704
  startPosition.originalHeight;
7662
- height = clamp(y - top, top < 0 &&
7663
- typeof this.options
7664
- .minimumInViewportHeight === 'number'
7705
+ // When dragging bottom handle, constrain height to container height
7706
+ const minHeight = top < 0 &&
7707
+ typeof this.options.minimumInViewportHeight ===
7708
+ 'number'
7665
7709
  ? -top +
7666
7710
  this.options.minimumInViewportHeight
7667
- : Overlay.MINIMUM_HEIGHT, Number.MAX_VALUE);
7711
+ : Overlay.MINIMUM_HEIGHT;
7712
+ const maxHeight = containerRect.height - Math.max(0, top);
7713
+ height = clamp(y - top, minHeight, maxHeight);
7668
7714
  bottom = containerRect.height - top - height;
7669
7715
  };
7670
7716
  const moveLeft = () => {
7671
- left = clamp(x, -Number.MAX_VALUE, startPosition.originalX +
7717
+ const maxLeft = startPosition.originalX +
7672
7718
  startPosition.originalWidth >
7673
7719
  containerRect.width
7674
- ? this.getMinimumWidth(containerRect.width)
7720
+ ? Math.max(0, containerRect.width -
7721
+ Overlay.MINIMUM_WIDTH) // Prevent extending beyong right edge
7675
7722
  : Math.max(0, startPosition.originalX +
7676
7723
  startPosition.originalWidth -
7677
- Overlay.MINIMUM_WIDTH));
7724
+ Overlay.MINIMUM_WIDTH);
7725
+ left = clamp(x, 0, maxLeft); // min is 0 (Not -Infinity) to prevent dragging beyond left edge
7678
7726
  width =
7679
7727
  startPosition.originalX +
7680
7728
  startPosition.originalWidth -
@@ -7685,12 +7733,15 @@
7685
7733
  left =
7686
7734
  startPosition.originalX -
7687
7735
  startPosition.originalWidth;
7688
- width = clamp(x - left, left < 0 &&
7689
- typeof this.options
7690
- .minimumInViewportWidth === 'number'
7736
+ // When dragging right handle, constrain width to container width
7737
+ const minWidth = left < 0 &&
7738
+ typeof this.options.minimumInViewportWidth ===
7739
+ 'number'
7691
7740
  ? -left +
7692
7741
  this.options.minimumInViewportWidth
7693
- : Overlay.MINIMUM_WIDTH, Number.MAX_VALUE);
7742
+ : Overlay.MINIMUM_WIDTH;
7743
+ const maxWidth = containerRect.width - Math.max(0, left);
7744
+ width = clamp(x - left, minWidth, maxWidth);
7694
7745
  right = containerRect.width - left - width;
7695
7746
  };
7696
7747
  switch (direction) {
@@ -8520,7 +8571,7 @@
8520
8571
  // option only available when no panels in primary grid
8521
8572
  return;
8522
8573
  }
8523
- this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
8574
+ this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
8524
8575
  kind: 'edge',
8525
8576
  panel: undefined,
8526
8577
  api: this._api,
@@ -8934,7 +8985,7 @@
8934
8985
  : (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE }));
8935
8986
  const el = group.element.querySelector('.dv-void-container');
8936
8987
  if (!el) {
8937
- throw new Error('failed to find drag handle');
8988
+ throw new Error('dockview: failed to find drag handle');
8938
8989
  }
8939
8990
  overlay.setupDrag(el, {
8940
8991
  inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
@@ -9006,7 +9057,7 @@
9006
9057
  case 'right':
9007
9058
  return this.createGroupAtLocation([this.gridview.length], undefined, options); // insert into last position
9008
9059
  default:
9009
- throw new Error(`unsupported position ${position}`);
9060
+ throw new Error(`dockview: unsupported position ${position}`);
9010
9061
  }
9011
9062
  }
9012
9063
  updateOptions(options) {
@@ -9152,15 +9203,48 @@
9152
9203
  }
9153
9204
  return result;
9154
9205
  }
9155
- fromJSON(data) {
9206
+ fromJSON(data, options) {
9156
9207
  var _a, _b;
9208
+ const existingPanels = new Map();
9209
+ let tempGroup;
9210
+ if (options === null || options === void 0 ? void 0 : options.reuseExistingPanels) {
9211
+ /**
9212
+ * What are we doing here?
9213
+ *
9214
+ * 1. Create a temporary group to hold any panels that currently exist and that also exist in the new layout
9215
+ * 2. Remove that temporary group from the group mapping so that it doesn't get cleared when we clear the layout
9216
+ */
9217
+ tempGroup = this.createGroup();
9218
+ this._groups.delete(tempGroup.api.id);
9219
+ const newPanels = Object.keys(data.panels);
9220
+ for (const panel of this.panels) {
9221
+ if (newPanels.includes(panel.api.id)) {
9222
+ existingPanels.set(panel.api.id, panel);
9223
+ }
9224
+ }
9225
+ this.movingLock(() => {
9226
+ Array.from(existingPanels.values()).forEach((panel) => {
9227
+ this.moveGroupOrPanel({
9228
+ from: {
9229
+ groupId: panel.api.group.api.id,
9230
+ panelId: panel.api.id,
9231
+ },
9232
+ to: {
9233
+ group: tempGroup,
9234
+ position: 'center',
9235
+ },
9236
+ keepEmptyGroups: true,
9237
+ });
9238
+ });
9239
+ });
9240
+ }
9157
9241
  this.clear();
9158
9242
  if (typeof data !== 'object' || data === null) {
9159
- throw new Error('serialized layout must be a non-null object');
9243
+ throw new Error('dockview: serialized layout must be a non-null object');
9160
9244
  }
9161
9245
  const { grid, panels, activeGroup } = data;
9162
9246
  if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
9163
- throw new Error('root must be of type branch');
9247
+ throw new Error('dockview: root must be of type branch');
9164
9248
  }
9165
9249
  try {
9166
9250
  // take note of the existing dimensions
@@ -9169,7 +9253,7 @@
9169
9253
  const createGroupFromSerializedState = (data) => {
9170
9254
  const { id, locked, hideHeader, views, activeView } = data;
9171
9255
  if (typeof id !== 'string') {
9172
- throw new Error('group id must be of type string');
9256
+ throw new Error('dockview: group id must be of type string');
9173
9257
  }
9174
9258
  const group = this.createGroup({
9175
9259
  id,
@@ -9184,17 +9268,38 @@
9184
9268
  * In running this section first we avoid firing lots of 'add' events in the event of a failure
9185
9269
  * due to a corruption of input data.
9186
9270
  */
9187
- const panel = this._deserializer.fromJSON(panels[child], group);
9188
- createdPanels.push(panel);
9271
+ const existingPanel = existingPanels.get(child);
9272
+ if (tempGroup && existingPanel) {
9273
+ this.movingLock(() => {
9274
+ tempGroup.model.removePanel(existingPanel);
9275
+ });
9276
+ createdPanels.push(existingPanel);
9277
+ existingPanel.updateFromStateModel(panels[child]);
9278
+ }
9279
+ else {
9280
+ const panel = this._deserializer.fromJSON(panels[child], group);
9281
+ createdPanels.push(panel);
9282
+ }
9189
9283
  }
9190
9284
  for (let i = 0; i < views.length; i++) {
9191
9285
  const panel = createdPanels[i];
9192
9286
  const isActive = typeof activeView === 'string' &&
9193
9287
  activeView === panel.id;
9194
- group.model.openPanel(panel, {
9195
- skipSetActive: !isActive,
9196
- skipSetGroupActive: true,
9197
- });
9288
+ const hasExisting = existingPanels.has(panel.api.id);
9289
+ if (hasExisting) {
9290
+ this.movingLock(() => {
9291
+ group.model.openPanel(panel, {
9292
+ skipSetActive: !isActive,
9293
+ skipSetGroupActive: true,
9294
+ });
9295
+ });
9296
+ }
9297
+ else {
9298
+ group.model.openPanel(panel, {
9299
+ skipSetActive: !isActive,
9300
+ skipSetGroupActive: true,
9301
+ });
9302
+ }
9198
9303
  }
9199
9304
  if (!group.activePanel && group.panels.length > 0) {
9200
9305
  group.model.openPanel(group.panels[group.panels.length - 1], {
@@ -9233,7 +9338,9 @@
9233
9338
  setTimeout(() => {
9234
9339
  this.addPopoutGroup(group, {
9235
9340
  position: position !== null && position !== void 0 ? position : undefined,
9236
- overridePopoutGroup: gridReferenceGroup ? group : undefined,
9341
+ overridePopoutGroup: gridReferenceGroup
9342
+ ? group
9343
+ : undefined,
9237
9344
  referenceGroup: gridReferenceGroup
9238
9345
  ? this.getPanel(gridReferenceGroup)
9239
9346
  : undefined,
@@ -9319,11 +9426,11 @@
9319
9426
  addPanel(options) {
9320
9427
  var _a, _b;
9321
9428
  if (this.panels.find((_) => _.id === options.id)) {
9322
- throw new Error(`panel with id ${options.id} already exists`);
9429
+ throw new Error(`dockview: panel with id ${options.id} already exists`);
9323
9430
  }
9324
9431
  let referenceGroup;
9325
9432
  if (options.position && options.floating) {
9326
- throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
9433
+ throw new Error('dockview: you can only provide one of: position, floating as arguments to .addPanel(...)');
9327
9434
  }
9328
9435
  const initial = {
9329
9436
  width: options.initialWidth,
@@ -9337,7 +9444,7 @@
9337
9444
  : options.position.referencePanel;
9338
9445
  index = options.position.index;
9339
9446
  if (!referencePanel) {
9340
- throw new Error(`referencePanel '${options.position.referencePanel}' does not exist`);
9447
+ throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
9341
9448
  }
9342
9449
  referenceGroup = this.findGroup(referencePanel);
9343
9450
  }
@@ -9348,7 +9455,7 @@
9348
9455
  : options.position.referenceGroup;
9349
9456
  index = options.position.index;
9350
9457
  if (!referenceGroup) {
9351
- throw new Error(`referenceGroup '${options.position.referenceGroup}' does not exist`);
9458
+ throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
9352
9459
  }
9353
9460
  }
9354
9461
  else {
@@ -9460,7 +9567,7 @@
9460
9567
  }) {
9461
9568
  const group = panel.group;
9462
9569
  if (!group) {
9463
- throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
9570
+ throw new Error(`dockview: cannot remove panel ${panel.id}. it's missing a group.`);
9464
9571
  }
9465
9572
  group.model.removePanel(panel, {
9466
9573
  skipSetActiveGroup: options.skipSetActiveGroup,
@@ -9509,11 +9616,11 @@
9509
9616
  ? this.panels.find((panel) => panel.id === options.referencePanel)
9510
9617
  : options.referencePanel;
9511
9618
  if (!referencePanel) {
9512
- throw new Error(`reference panel ${options.referencePanel} does not exist`);
9619
+ throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
9513
9620
  }
9514
9621
  referenceGroup = this.findGroup(referencePanel);
9515
9622
  if (!referenceGroup) {
9516
- throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
9623
+ throw new Error(`dockview: reference group for reference panel ${options.referencePanel} does not exist`);
9517
9624
  }
9518
9625
  }
9519
9626
  else if (isGroupOptionsWithGroup(options)) {
@@ -9522,7 +9629,7 @@
9522
9629
  ? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
9523
9630
  : options.referenceGroup;
9524
9631
  if (!referenceGroup) {
9525
- throw new Error(`reference group ${options.referenceGroup} does not exist`);
9632
+ throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
9526
9633
  }
9527
9634
  }
9528
9635
  else {
@@ -9590,7 +9697,7 @@
9590
9697
  }
9591
9698
  return floatingGroup.group;
9592
9699
  }
9593
- throw new Error('failed to find floating group');
9700
+ throw new Error('dockview: failed to find floating group');
9594
9701
  }
9595
9702
  if (group.api.location.type === 'popout') {
9596
9703
  const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
@@ -9621,7 +9728,7 @@
9621
9728
  this.updateWatermark();
9622
9729
  return selectedGroup.popoutGroup;
9623
9730
  }
9624
- throw new Error('failed to find popout group');
9731
+ throw new Error('dockview: failed to find popout group');
9625
9732
  }
9626
9733
  const re = super.doRemoveGroup(group, options);
9627
9734
  if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
@@ -9652,7 +9759,7 @@
9652
9759
  ? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
9653
9760
  : undefined;
9654
9761
  if (!sourceGroup) {
9655
- throw new Error(`Failed to find group id ${sourceGroupId}`);
9762
+ throw new Error(`dockview: Failed to find group id ${sourceGroupId}`);
9656
9763
  }
9657
9764
  if (sourceItemId === undefined) {
9658
9765
  /**
@@ -9677,9 +9784,9 @@
9677
9784
  skipSetActiveGroup: true,
9678
9785
  }));
9679
9786
  if (!removedPanel) {
9680
- throw new Error(`No panel with id ${sourceItemId}`);
9787
+ throw new Error(`dockview: No panel with id ${sourceItemId}`);
9681
9788
  }
9682
- if (sourceGroup.model.size === 0) {
9789
+ if (!options.keepEmptyGroups && sourceGroup.model.size === 0) {
9683
9790
  // remove the group and do not set a new group as active
9684
9791
  this.doRemoveGroup(sourceGroup, { skipActive: true });
9685
9792
  }
@@ -9689,7 +9796,8 @@
9689
9796
  var _a;
9690
9797
  return destinationGroup.model.openPanel(removedPanel, {
9691
9798
  index: destinationIndex,
9692
- skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) && !isDestinationGroupEmpty,
9799
+ skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
9800
+ !isDestinationGroupEmpty,
9693
9801
  skipSetGroupActive: true,
9694
9802
  });
9695
9803
  });
@@ -9700,6 +9808,13 @@
9700
9808
  panel: removedPanel,
9701
9809
  from: sourceGroup,
9702
9810
  });
9811
+ /**
9812
+ * Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
9813
+ * With defaultRenderer="always" this results in panel content not showing after move operations.
9814
+ */
9815
+ requestAnimationFrame(() => {
9816
+ this.overlayRenderContainer.updateAllPositions();
9817
+ });
9703
9818
  }
9704
9819
  else {
9705
9820
  /**
@@ -9744,7 +9859,9 @@
9744
9859
  }));
9745
9860
  this.doRemoveGroup(sourceGroup, { skipActive: true });
9746
9861
  const newGroup = this.createGroupAtLocation(targetLocation);
9747
- this.movingLock(() => newGroup.model.openPanel(removedPanel));
9862
+ this.movingLock(() => newGroup.model.openPanel(removedPanel, {
9863
+ skipSetActive: true,
9864
+ }));
9748
9865
  this.doSetGroupAndPanelActive(newGroup);
9749
9866
  this._onDidMovePanel.fire({
9750
9867
  panel: this.getGroupPanel(sourceItemId),
@@ -9777,7 +9894,7 @@
9777
9894
  skipSetActiveGroup: true,
9778
9895
  }));
9779
9896
  if (!removedPanel) {
9780
- throw new Error(`No panel with id ${sourceItemId}`);
9897
+ throw new Error(`dockview: No panel with id ${sourceItemId}`);
9781
9898
  }
9782
9899
  const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
9783
9900
  const group = this.createGroupAtLocation(dropLocation);
@@ -9832,7 +9949,7 @@
9832
9949
  case 'floating': {
9833
9950
  const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
9834
9951
  if (!selectedFloatingGroup) {
9835
- throw new Error('failed to find floating group');
9952
+ throw new Error('dockview: failed to find floating group');
9836
9953
  }
9837
9954
  selectedFloatingGroup.dispose();
9838
9955
  break;
@@ -9840,7 +9957,7 @@
9840
9957
  case 'popout': {
9841
9958
  const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
9842
9959
  if (!selectedPopoutGroup) {
9843
- throw new Error('failed to find popout group');
9960
+ throw new Error('dockview: failed to find popout group');
9844
9961
  }
9845
9962
  // Remove from popout groups list to prevent automatic restoration
9846
9963
  const index = this._popoutGroups.indexOf(selectedPopoutGroup);
@@ -11289,12 +11406,19 @@
11289
11406
  return this._element;
11290
11407
  }
11291
11408
  init(parameters) {
11292
- this.render(parameters);
11409
+ // If already initialized, just update the parameters
11410
+ if (this.componentRef) {
11411
+ this.update(parameters);
11412
+ }
11413
+ else {
11414
+ this.render(parameters);
11415
+ }
11293
11416
  }
11294
11417
  update(params) {
11295
11418
  if (this.componentRef) {
11296
11419
  Object.keys(params).forEach(key => {
11297
- if (this.componentRef.instance.hasOwnProperty(key)) {
11420
+ // Use 'in' operator instead of hasOwnProperty to support getter/setter properties
11421
+ if (key in this.componentRef.instance) {
11298
11422
  this.componentRef.instance[key] = params[key];
11299
11423
  }
11300
11424
  });
@@ -11310,7 +11434,8 @@
11310
11434
  });
11311
11435
  // Set initial parameters
11312
11436
  Object.keys(parameters).forEach(key => {
11313
- if (this.componentRef.instance.hasOwnProperty(key)) {
11437
+ // Use 'in' operator instead of hasOwnProperty to support getter/setter properties
11438
+ if (key in this.componentRef.instance) {
11314
11439
  this.componentRef.instance[key] = parameters[key];
11315
11440
  }
11316
11441
  });
@@ -11481,6 +11606,7 @@
11481
11606
  injector: this.injector,
11482
11607
  environmentInjector: this.environmentInjector
11483
11608
  });
11609
+ // Initialize with empty props - dockview-core will call init() again with actual IGroupHeaderProps
11484
11610
  renderer.init({});
11485
11611
  return renderer;
11486
11612
  }
@@ -12538,6 +12664,7 @@
12538
12664
  exports.DockviewAngularComponent = __decorate([
12539
12665
  core.Component({
12540
12666
  selector: 'dv-dockview',
12667
+ standalone: true,
12541
12668
  template: '<div #dockviewContainer class="dockview-container"></div>',
12542
12669
  styles: [`
12543
12670
  :host {
@@ -12545,7 +12672,7 @@
12545
12672
  width: 100%;
12546
12673
  height: 100%;
12547
12674
  }
12548
-
12675
+
12549
12676
  .dockview-container {
12550
12677
  width: 100%;
12551
12678
  height: 100%;
@@ -12661,6 +12788,7 @@
12661
12788
  exports.GridviewAngularComponent = __decorate([
12662
12789
  core.Component({
12663
12790
  selector: 'dv-gridview',
12791
+ standalone: true,
12664
12792
  template: '<div #gridviewContainer class="gridview-container"></div>',
12665
12793
  styles: [`
12666
12794
  :host {
@@ -12668,7 +12796,7 @@
12668
12796
  width: 100%;
12669
12797
  height: 100%;
12670
12798
  }
12671
-
12799
+
12672
12800
  .gridview-container {
12673
12801
  width: 100%;
12674
12802
  height: 100%;
@@ -12809,6 +12937,7 @@
12809
12937
  exports.PaneviewAngularComponent = __decorate([
12810
12938
  core.Component({
12811
12939
  selector: 'dv-paneview',
12940
+ standalone: true,
12812
12941
  template: '<div #paneviewContainer class="paneview-container"></div>',
12813
12942
  styles: [`
12814
12943
  :host {
@@ -12816,7 +12945,7 @@
12816
12945
  width: 100%;
12817
12946
  height: 100%;
12818
12947
  }
12819
-
12948
+
12820
12949
  .paneview-container {
12821
12950
  width: 100%;
12822
12951
  height: 100%;
@@ -12932,6 +13061,7 @@
12932
13061
  exports.SplitviewAngularComponent = __decorate([
12933
13062
  core.Component({
12934
13063
  selector: 'dv-splitview',
13064
+ standalone: true,
12935
13065
  template: '<div #splitviewContainer class="splitview-container"></div>',
12936
13066
  styles: [`
12937
13067
  :host {
@@ -12939,7 +13069,7 @@
12939
13069
  width: 100%;
12940
13070
  height: 100%;
12941
13071
  }
12942
-
13072
+
12943
13073
  .splitview-container {
12944
13074
  width: 100%;
12945
13075
  height: 100%;
@@ -12953,15 +13083,13 @@
12953
13083
  };
12954
13084
  exports.DockviewAngularModule = __decorate([
12955
13085
  core.NgModule({
12956
- declarations: [
13086
+ imports: [
13087
+ common.CommonModule,
12957
13088
  exports.DockviewAngularComponent,
12958
13089
  exports.GridviewAngularComponent,
12959
13090
  exports.PaneviewAngularComponent,
12960
13091
  exports.SplitviewAngularComponent
12961
13092
  ],
12962
- imports: [
12963
- common.CommonModule
12964
- ],
12965
13093
  exports: [
12966
13094
  exports.DockviewAngularComponent,
12967
13095
  exports.GridviewAngularComponent,
@@ -12990,6 +13118,7 @@
12990
13118
  exports.DockviewPanel = DockviewPanel;
12991
13119
  exports.DockviewUnhandledDragOverEvent = DockviewUnhandledDragOverEvent;
12992
13120
  exports.DockviewWillDropEvent = DockviewWillDropEvent;
13121
+ exports.DockviewWillShowOverlayLocationEvent = DockviewWillShowOverlayLocationEvent;
12993
13122
  exports.DraggablePaneviewPanel = DraggablePaneviewPanel;
12994
13123
  exports.Gridview = Gridview;
12995
13124
  exports.GridviewApi = GridviewApi;