dockview-core 6.2.2 → 6.3.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 (53) hide show
  1. package/dist/cjs/api/dockviewGroupPanelApi.d.ts +10 -1
  2. package/dist/cjs/api/dockviewGroupPanelApi.js +16 -0
  3. package/dist/cjs/dnd/groupDragHandler.js +34 -12
  4. package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +2 -2
  5. package/dist/cjs/dockview/components/titlebar/tabs.js +9 -2
  6. package/dist/cjs/dockview/components/titlebar/voidContainer.js +6 -0
  7. package/dist/cjs/dockview/dockviewComponent.d.ts +1 -0
  8. package/dist/cjs/dockview/dockviewComponent.js +187 -125
  9. package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +1 -0
  10. package/dist/cjs/dockview/dockviewGroupPanelModel.js +9 -0
  11. package/dist/cjs/dockview/dockviewPanel.js +5 -0
  12. package/dist/cjs/dockview/dockviewPanelModel.d.ts +2 -0
  13. package/dist/cjs/dockview/dockviewPanelModel.js +8 -0
  14. package/dist/cjs/dockview/framework.d.ts +8 -0
  15. package/dist/cjs/dockview/options.d.ts +13 -2
  16. package/dist/cjs/dockview/options.js +2 -0
  17. package/dist/cjs/dom.d.ts +5 -1
  18. package/dist/cjs/dom.js +14 -2
  19. package/dist/cjs/index.d.ts +1 -1
  20. package/dist/cjs/popoutWindow.d.ts +2 -0
  21. package/dist/cjs/popoutWindow.js +3 -1
  22. package/dist/dockview-core.js +156 -27
  23. package/dist/dockview-core.min.js +2 -2
  24. package/dist/dockview-core.min.js.map +1 -1
  25. package/dist/dockview-core.min.noStyle.js +2 -2
  26. package/dist/dockview-core.min.noStyle.js.map +1 -1
  27. package/dist/dockview-core.noStyle.js +156 -27
  28. package/dist/esm/api/dockviewGroupPanelApi.d.ts +10 -1
  29. package/dist/esm/api/dockviewGroupPanelApi.js +12 -0
  30. package/dist/esm/dnd/groupDragHandler.js +34 -12
  31. package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +2 -2
  32. package/dist/esm/dockview/components/titlebar/tabs.js +12 -2
  33. package/dist/esm/dockview/components/titlebar/voidContainer.js +6 -0
  34. package/dist/esm/dockview/dockviewComponent.d.ts +1 -0
  35. package/dist/esm/dockview/dockviewComponent.js +49 -7
  36. package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +1 -0
  37. package/dist/esm/dockview/dockviewGroupPanelModel.js +9 -0
  38. package/dist/esm/dockview/dockviewPanel.js +5 -0
  39. package/dist/esm/dockview/dockviewPanelModel.d.ts +2 -0
  40. package/dist/esm/dockview/dockviewPanelModel.js +8 -0
  41. package/dist/esm/dockview/framework.d.ts +8 -0
  42. package/dist/esm/dockview/options.d.ts +13 -2
  43. package/dist/esm/dockview/options.js +2 -0
  44. package/dist/esm/dom.d.ts +5 -1
  45. package/dist/esm/dom.js +13 -2
  46. package/dist/esm/index.d.ts +1 -1
  47. package/dist/esm/popoutWindow.d.ts +2 -0
  48. package/dist/esm/popoutWindow.js +3 -1
  49. package/dist/package/main.cjs.js +156 -27
  50. package/dist/package/main.cjs.min.js +2 -2
  51. package/dist/package/main.esm.min.mjs +2 -2
  52. package/dist/package/main.esm.mjs +156 -27
  53. package/package.json +1 -1
@@ -185,6 +185,7 @@ var DockviewComponent = /** @class */ (function (_super) {
185
185
  _this._floatingGroups = [];
186
186
  _this._popoutGroups = [];
187
187
  _this._popoutRestorationPromise = Promise.resolve();
188
+ _this._popoutRestorationCleanups = new Set();
188
189
  _this._onDidRemoveGroup = new events_1.Emitter();
189
190
  _this.onDidRemoveGroup = _this._onDidRemoveGroup.event;
190
191
  _this._onDidAddGroup = new events_1.Emitter();
@@ -289,50 +290,68 @@ var DockviewComponent = /** @class */ (function (_super) {
289
290
  }), events_1.Event.any(_this.onDidAddPanel, _this.onDidRemovePanel, _this.onDidAddGroup, _this.onDidRemove, _this.onDidRemoveGroup, _this.onDidMovePanel, _this.onDidActivePanelChange, _this.onDidPopoutGroupPositionChange, _this.onDidPopoutGroupSizeChange, _this.onDidCreateTabGroup, _this.onDidDestroyTabGroup, _this.onDidAddPanelToTabGroup, _this.onDidRemovePanelFromTabGroup, _this.onDidTabGroupChange, _this.onDidTabGroupCollapsedChange)(function () {
290
291
  _this._bufferOnDidLayoutChange.fire();
291
292
  }), lifecycle_1.Disposable.from(function () {
292
- var e_1, _a, e_2, _b, e_3, _c;
293
- var _d;
293
+ var e_1, _a, e_2, _b, e_3, _c, e_4, _d;
294
+ var _e;
294
295
  try {
295
- // iterate over a copy of the array since .dispose() mutates the original array
296
- for (var _e = __values(__spreadArray([], __read(_this._floatingGroups), false)), _f = _e.next(); !_f.done; _f = _e.next()) {
297
- var group = _f.value;
298
- group.dispose();
296
+ // Cancel any pending popout-restoration timers scheduled by
297
+ // fromJSON so they don't open new browser windows after
298
+ // dispose, and resolve their promises so callers awaiting
299
+ // popoutRestorationPromise don't hang. See issue #851.
300
+ for (var _f = __values(__spreadArray([], __read(_this._popoutRestorationCleanups), false)), _g = _f.next(); !_g.done; _g = _f.next()) {
301
+ var cleanup = _g.value;
302
+ cleanup();
299
303
  }
300
304
  }
301
305
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
302
306
  finally {
303
307
  try {
304
- if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
308
+ if (_g && !_g.done && (_a = _f.return)) _a.call(_f);
305
309
  }
306
310
  finally { if (e_1) throw e_1.error; }
307
311
  }
312
+ _this._popoutRestorationCleanups.clear();
308
313
  try {
309
314
  // iterate over a copy of the array since .dispose() mutates the original array
310
- for (var _g = __values(__spreadArray([], __read(_this._popoutGroups), false)), _h = _g.next(); !_h.done; _h = _g.next()) {
311
- var group = _h.value;
312
- group.disposable.dispose();
315
+ for (var _h = __values(__spreadArray([], __read(_this._floatingGroups), false)), _j = _h.next(); !_j.done; _j = _h.next()) {
316
+ var group = _j.value;
317
+ group.dispose();
313
318
  }
314
319
  }
315
320
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
316
321
  finally {
317
322
  try {
318
- if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
323
+ if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
319
324
  }
320
325
  finally { if (e_2) throw e_2.error; }
321
326
  }
322
- (_d = _this._shellManager) === null || _d === void 0 ? void 0 : _d.dispose();
323
327
  try {
324
- for (var _j = __values(_this._edgeGroupDisposables.values()), _k = _j.next(); !_k.done; _k = _j.next()) {
325
- var d = _k.value;
326
- d.dispose();
328
+ // iterate over a copy of the array since .dispose() mutates the original array
329
+ for (var _k = __values(__spreadArray([], __read(_this._popoutGroups), false)), _l = _k.next(); !_l.done; _l = _k.next()) {
330
+ var group = _l.value;
331
+ group.disposable.dispose();
327
332
  }
328
333
  }
329
334
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
330
335
  finally {
331
336
  try {
332
- if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
337
+ if (_l && !_l.done && (_c = _k.return)) _c.call(_k);
333
338
  }
334
339
  finally { if (e_3) throw e_3.error; }
335
340
  }
341
+ (_e = _this._shellManager) === null || _e === void 0 ? void 0 : _e.dispose();
342
+ try {
343
+ for (var _m = __values(_this._edgeGroupDisposables.values()), _o = _m.next(); !_o.done; _o = _m.next()) {
344
+ var d = _o.value;
345
+ d.dispose();
346
+ }
347
+ }
348
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
349
+ finally {
350
+ try {
351
+ if (_o && !_o.done && (_d = _m.return)) _d.call(_m);
352
+ }
353
+ finally { if (e_4) throw e_4.error; }
354
+ }
336
355
  _this._edgeGroupDisposables.clear();
337
356
  }), _this._rootDropTarget, _this._rootDropTarget.onWillShowOverlay(function (event) {
338
357
  if (_this.gridview.length > 0 && event.position === 'center') {
@@ -509,7 +528,7 @@ var DockviewComponent = /** @class */ (function (_super) {
509
528
  };
510
529
  DockviewComponent.prototype.addPopoutGroup = function (itemToPopout, options) {
511
530
  var _this = this;
512
- var _a, _b, _c, _d, _e;
531
+ var _a, _b, _c, _d, _e, _f;
513
532
  if (itemToPopout instanceof dockviewGroupPanel_1.DockviewGroupPanel &&
514
533
  itemToPopout.model.location.type === 'edge') {
515
534
  // edge groups are permanent structural elements and cannot be popped out
@@ -544,6 +563,7 @@ var DockviewComponent = /** @class */ (function (_super) {
544
563
  height: box.height,
545
564
  onDidOpen: options === null || options === void 0 ? void 0 : options.onDidOpen,
546
565
  onWillClose: options === null || options === void 0 ? void 0 : options.onWillClose,
566
+ nonce: (_f = this.options) === null || _f === void 0 ? void 0 : _f.nonce,
547
567
  });
548
568
  var popoutWindowDisposable = new lifecycle_1.CompositeDisposable(_window, _window.onDidClose(function () {
549
569
  popoutWindowDisposable.dispose();
@@ -978,13 +998,13 @@ var DockviewComponent = /** @class */ (function (_super) {
978
998
  }
979
999
  };
980
1000
  DockviewComponent.prototype.updateOptions = function (options) {
981
- var e_4, _a, e_5, _b, e_6, _c;
982
- var _d, _e, _f;
1001
+ var e_5, _a, e_6, _b, e_7, _c, e_8, _d;
1002
+ var _e, _f, _g, _h, _j;
983
1003
  _super.prototype.updateOptions.call(this, options);
984
1004
  if ('floatingGroupBounds' in options) {
985
1005
  try {
986
- for (var _g = __values(this._floatingGroups), _h = _g.next(); !_h.done; _h = _g.next()) {
987
- var group = _h.value;
1006
+ for (var _k = __values(this._floatingGroups), _l = _k.next(); !_l.done; _l = _k.next()) {
1007
+ var group = _l.value;
988
1008
  switch (options.floatingGroupBounds) {
989
1009
  case 'boundedWithinViewport':
990
1010
  group.overlay.minimumInViewportHeight = undefined;
@@ -998,19 +1018,19 @@ var DockviewComponent = /** @class */ (function (_super) {
998
1018
  break;
999
1019
  default:
1000
1020
  group.overlay.minimumInViewportHeight =
1001
- (_d = options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport;
1021
+ (_e = options.floatingGroupBounds) === null || _e === void 0 ? void 0 : _e.minimumHeightWithinViewport;
1002
1022
  group.overlay.minimumInViewportWidth =
1003
- (_e = options.floatingGroupBounds) === null || _e === void 0 ? void 0 : _e.minimumWidthWithinViewport;
1023
+ (_f = options.floatingGroupBounds) === null || _f === void 0 ? void 0 : _f.minimumWidthWithinViewport;
1004
1024
  }
1005
1025
  group.overlay.setBounds();
1006
1026
  }
1007
1027
  }
1008
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
1028
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
1009
1029
  finally {
1010
1030
  try {
1011
- if (_h && !_h.done && (_a = _g.return)) _a.call(_g);
1031
+ if (_l && !_l.done && (_a = _k.return)) _a.call(_k);
1012
1032
  }
1013
- finally { if (e_4) throw e_4.error; }
1033
+ finally { if (e_5) throw e_5.error; }
1014
1034
  }
1015
1035
  }
1016
1036
  this.updateDropTargetModel(options);
@@ -1027,42 +1047,63 @@ var DockviewComponent = /** @class */ (function (_super) {
1027
1047
  'createLeftHeaderActionComponent' in options ||
1028
1048
  'createPrefixHeaderActionComponent' in options) {
1029
1049
  try {
1030
- for (var _j = __values(this.groups), _k = _j.next(); !_k.done; _k = _j.next()) {
1031
- var group = _k.value;
1050
+ for (var _m = __values(this.groups), _o = _m.next(); !_o.done; _o = _m.next()) {
1051
+ var group = _o.value;
1032
1052
  group.model.updateHeaderActions();
1033
1053
  }
1034
1054
  }
1035
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
1055
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
1036
1056
  finally {
1037
1057
  try {
1038
- if (_k && !_k.done && (_b = _j.return)) _b.call(_j);
1058
+ if (_o && !_o.done && (_b = _m.return)) _b.call(_m);
1039
1059
  }
1040
- finally { if (e_5) throw e_5.error; }
1060
+ finally { if (e_6) throw e_6.error; }
1061
+ }
1062
+ }
1063
+ if ('createWatermarkComponent' in options) {
1064
+ if (this._watermark) {
1065
+ this._watermark.element.parentElement.remove();
1066
+ (_h = (_g = this._watermark).dispose) === null || _h === void 0 ? void 0 : _h.call(_g);
1067
+ this._watermark = null;
1068
+ }
1069
+ this.updateWatermark();
1070
+ try {
1071
+ for (var _p = __values(this.groups), _q = _p.next(); !_q.done; _q = _p.next()) {
1072
+ var group = _q.value;
1073
+ group.model.refreshWatermark();
1074
+ }
1075
+ }
1076
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
1077
+ finally {
1078
+ try {
1079
+ if (_q && !_q.done && (_c = _p.return)) _c.call(_p);
1080
+ }
1081
+ finally { if (e_7) throw e_7.error; }
1041
1082
  }
1042
1083
  }
1043
1084
  if ('tabGroupColors' in options || 'tabGroupAccent' in options) {
1044
- this._tabGroupColorPalette.setEntries((_f = this._options.tabGroupColors) !== null && _f !== void 0 ? _f : tabGroupAccent_1.DEFAULT_TAB_GROUP_COLORS);
1085
+ this._tabGroupColorPalette.setEntries((_j = this._options.tabGroupColors) !== null && _j !== void 0 ? _j : tabGroupAccent_1.DEFAULT_TAB_GROUP_COLORS);
1045
1086
  this._tabGroupColorPalette.enabled =
1046
1087
  this._options.tabGroupAccent !== 'off';
1047
1088
  try {
1048
- for (var _l = __values(this.groups), _m = _l.next(); !_m.done; _m = _l.next()) {
1049
- var group = _m.value;
1089
+ for (var _r = __values(this.groups), _s = _r.next(); !_s.done; _s = _r.next()) {
1090
+ var group = _s.value;
1050
1091
  group.model.refreshTabGroupAccent();
1051
1092
  }
1052
1093
  }
1053
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
1094
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
1054
1095
  finally {
1055
1096
  try {
1056
- if (_m && !_m.done && (_c = _l.return)) _c.call(_l);
1097
+ if (_s && !_s.done && (_d = _r.return)) _d.call(_r);
1057
1098
  }
1058
- finally { if (e_6) throw e_6.error; }
1099
+ finally { if (e_8) throw e_8.error; }
1059
1100
  }
1060
1101
  }
1061
1102
  this._onDidOptionsChange.fire();
1062
1103
  this._layoutFromShell(this.gridview.width, this.gridview.height);
1063
1104
  };
1064
1105
  DockviewComponent.prototype.layout = function (width, height, forceResize) {
1065
- var e_7, _a;
1106
+ var e_9, _a;
1066
1107
  if (this._shellManager && !this._inShellLayout) {
1067
1108
  this._shellManager.layout(width, height);
1068
1109
  }
@@ -1078,12 +1119,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1078
1119
  floating.overlay.setBounds();
1079
1120
  }
1080
1121
  }
1081
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
1122
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
1082
1123
  finally {
1083
1124
  try {
1084
1125
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1085
1126
  }
1086
- finally { if (e_7) throw e_7.error; }
1127
+ finally { if (e_9) throw e_9.error; }
1087
1128
  }
1088
1129
  }
1089
1130
  };
@@ -1143,7 +1184,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1143
1184
  return this._shellManager.isEdgeGroupVisible(position);
1144
1185
  };
1145
1186
  DockviewComponent.prototype.removeEdgeGroup = function (position) {
1146
- var e_8, _a;
1187
+ var e_10, _a;
1147
1188
  var _b;
1148
1189
  var group = this._edgeGroups.get(position);
1149
1190
  if (!group) {
@@ -1159,12 +1200,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1159
1200
  });
1160
1201
  }
1161
1202
  }
1162
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
1203
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
1163
1204
  finally {
1164
1205
  try {
1165
1206
  if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
1166
1207
  }
1167
- finally { if (e_8) throw e_8.error; }
1208
+ finally { if (e_10) throw e_10.error; }
1168
1209
  }
1169
1210
  // Dispose the auto-collapse listener
1170
1211
  (_b = this._edgeGroupDisposables.get(position)) === null || _b === void 0 ? void 0 : _b.dispose();
@@ -1178,7 +1219,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1178
1219
  this._onDidRemoveGroup.fire(group);
1179
1220
  };
1180
1221
  DockviewComponent.prototype.setEdgeGroupCollapsed = function (group, collapsed) {
1181
- var e_9, _a;
1222
+ var e_11, _a;
1182
1223
  try {
1183
1224
  for (var _b = __values(this._edgeGroups), _c = _b.next(); !_c.done; _c = _b.next()) {
1184
1225
  var _d = __read(_c.value, 2), position = _d[0], edgeGroup = _d[1];
@@ -1198,16 +1239,16 @@ var DockviewComponent = /** @class */ (function (_super) {
1198
1239
  }
1199
1240
  }
1200
1241
  }
1201
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
1242
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
1202
1243
  finally {
1203
1244
  try {
1204
1245
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1205
1246
  }
1206
- finally { if (e_9) throw e_9.error; }
1247
+ finally { if (e_11) throw e_11.error; }
1207
1248
  }
1208
1249
  };
1209
1250
  DockviewComponent.prototype.isEdgeGroupCollapsed = function (group) {
1210
- var e_10, _a;
1251
+ var e_12, _a;
1211
1252
  try {
1212
1253
  for (var _b = __values(this._edgeGroups), _c = _b.next(); !_c.done; _c = _b.next()) {
1213
1254
  var _d = __read(_c.value, 2), position = _d[0], edgeGroup = _d[1];
@@ -1216,17 +1257,17 @@ var DockviewComponent = /** @class */ (function (_super) {
1216
1257
  }
1217
1258
  }
1218
1259
  }
1219
- catch (e_10_1) { e_10 = { error: e_10_1 }; }
1260
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
1220
1261
  finally {
1221
1262
  try {
1222
1263
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1223
1264
  }
1224
- finally { if (e_10) throw e_10.error; }
1265
+ finally { if (e_12) throw e_12.error; }
1225
1266
  }
1226
1267
  return false;
1227
1268
  };
1228
1269
  DockviewComponent.prototype.updateDragAndDropState = function () {
1229
- var e_11, _a;
1270
+ var e_13, _a;
1230
1271
  try {
1231
1272
  // Update draggable state for all tabs and void containers
1232
1273
  for (var _b = __values(this.groups), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -1234,12 +1275,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1234
1275
  group.model.updateDragAndDropState();
1235
1276
  }
1236
1277
  }
1237
- catch (e_11_1) { e_11 = { error: e_11_1 }; }
1278
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
1238
1279
  finally {
1239
1280
  try {
1240
1281
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1241
1282
  }
1242
- finally { if (e_11) throw e_11.error; }
1283
+ finally { if (e_13) throw e_13.error; }
1243
1284
  }
1244
1285
  };
1245
1286
  DockviewComponent.prototype.focus = function () {
@@ -1300,7 +1341,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1300
1341
  * @returns A JSON respresentation of the layout
1301
1342
  */
1302
1343
  DockviewComponent.prototype.toJSON = function () {
1303
- var e_12, _a;
1344
+ var e_14, _a;
1304
1345
  var _b;
1305
1346
  var data = this.gridview.serialize();
1306
1347
  var panels = this.panels.reduce(function (collection, panel) {
@@ -1346,19 +1387,19 @@ var DockviewComponent = /** @class */ (function (_super) {
1346
1387
  }
1347
1388
  }
1348
1389
  }
1349
- catch (e_12_1) { e_12 = { error: e_12_1 }; }
1390
+ catch (e_14_1) { e_14 = { error: e_14_1 }; }
1350
1391
  finally {
1351
1392
  try {
1352
1393
  if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
1353
1394
  }
1354
- finally { if (e_12) throw e_12.error; }
1395
+ finally { if (e_14) throw e_14.error; }
1355
1396
  }
1356
1397
  result.edgeGroups = shellSerialized;
1357
1398
  }
1358
1399
  return result;
1359
1400
  };
1360
1401
  DockviewComponent.prototype.fromJSON = function (data, options) {
1361
- var e_13, _a, e_14, _b, e_15, _c, e_16, _d, e_17, _e, e_18, _f, e_19, _g, e_20, _h, e_21, _j, e_22, _k;
1402
+ var e_15, _a, e_16, _b, e_17, _c, e_18, _d, e_19, _e, e_20, _f, e_21, _g, e_22, _h, e_23, _j, e_24, _k;
1362
1403
  var _this = this;
1363
1404
  var _l, _m, _o;
1364
1405
  var existingPanels = new Map();
@@ -1381,12 +1422,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1381
1422
  }
1382
1423
  }
1383
1424
  }
1384
- catch (e_13_1) { e_13 = { error: e_13_1 }; }
1425
+ catch (e_15_1) { e_15 = { error: e_15_1 }; }
1385
1426
  finally {
1386
1427
  try {
1387
1428
  if (_q && !_q.done && (_a = _p.return)) _a.call(_p);
1388
1429
  }
1389
- finally { if (e_13) throw e_13.error; }
1430
+ finally { if (e_15) throw e_15.error; }
1390
1431
  }
1391
1432
  this.movingLock(function () {
1392
1433
  Array.from(existingPanels.values()).forEach(function (panel) {
@@ -1417,7 +1458,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1417
1458
  var width = this.width;
1418
1459
  var height = this.height;
1419
1460
  var createGroupFromSerializedState_1 = function (data) {
1420
- var e_23, _a;
1461
+ var e_25, _a;
1421
1462
  var id = data.id, locked = data.locked, hideHeader = data.hideHeader, headerPosition = data.headerPosition, views = data.views, activeView = data.activeView;
1422
1463
  if (typeof id !== 'string') {
1423
1464
  throw new Error('dockview: group id must be of type string');
@@ -1455,12 +1496,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1455
1496
  _loop_1(child);
1456
1497
  }
1457
1498
  }
1458
- catch (e_23_1) { e_23 = { error: e_23_1 }; }
1499
+ catch (e_25_1) { e_25 = { error: e_25_1 }; }
1459
1500
  finally {
1460
1501
  try {
1461
1502
  if (views_2_1 && !views_2_1.done && (_a = views_2.return)) _a.call(views_2);
1462
1503
  }
1463
- finally { if (e_23) throw e_23.error; }
1504
+ finally { if (e_25) throw e_25.error; }
1464
1505
  }
1465
1506
  var _loop_2 = function (i) {
1466
1507
  var panel = createdPanels[i];
@@ -1523,12 +1564,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1523
1564
  }
1524
1565
  }
1525
1566
  }
1526
- catch (e_14_1) { e_14 = { error: e_14_1 }; }
1567
+ catch (e_16_1) { e_16 = { error: e_16_1 }; }
1527
1568
  finally {
1528
1569
  try {
1529
1570
  if (_s && !_s.done && (_b = _r.return)) _b.call(_r);
1530
1571
  }
1531
- finally { if (e_14) throw e_14.error; }
1572
+ finally { if (e_16) throw e_16.error; }
1532
1573
  }
1533
1574
  try {
1534
1575
  // Restore panel contents of edge groups
@@ -1540,7 +1581,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1540
1581
  var views = groupState.views, activeView = groupState.activeView;
1541
1582
  var createdPanels = [];
1542
1583
  try {
1543
- for (var views_1 = (e_16 = void 0, __values(views)), views_1_1 = views_1.next(); !views_1_1.done; views_1_1 = views_1.next()) {
1584
+ for (var views_1 = (e_18 = void 0, __values(views)), views_1_1 = views_1.next(); !views_1_1.done; views_1_1 = views_1.next()) {
1544
1585
  var panelId = views_1_1.value;
1545
1586
  if (panels[panelId]) {
1546
1587
  var panel = this._deserializer.fromJSON(panels[panelId], edgeGroup);
@@ -1548,12 +1589,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1548
1589
  }
1549
1590
  }
1550
1591
  }
1551
- catch (e_16_1) { e_16 = { error: e_16_1 }; }
1592
+ catch (e_18_1) { e_18 = { error: e_18_1 }; }
1552
1593
  finally {
1553
1594
  try {
1554
1595
  if (views_1_1 && !views_1_1.done && (_d = views_1.return)) _d.call(views_1);
1555
1596
  }
1556
- finally { if (e_16) throw e_16.error; }
1597
+ finally { if (e_18) throw e_18.error; }
1557
1598
  }
1558
1599
  for (var i = 0; i < createdPanels.length; i++) {
1559
1600
  var panel = createdPanels[i];
@@ -1575,12 +1616,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1575
1616
  }
1576
1617
  }
1577
1618
  }
1578
- catch (e_15_1) { e_15 = { error: e_15_1 }; }
1619
+ catch (e_17_1) { e_17 = { error: e_17_1 }; }
1579
1620
  finally {
1580
1621
  try {
1581
1622
  if (_u && !_u.done && (_c = _t.return)) _c.call(_t);
1582
1623
  }
1583
- finally { if (e_15) throw e_15.error; }
1624
+ finally { if (e_17) throw e_17.error; }
1584
1625
  }
1585
1626
  this._shellManager.fromJSON(data.edgeGroups);
1586
1627
  }
@@ -1599,12 +1640,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1599
1640
  });
1600
1641
  }
1601
1642
  }
1602
- catch (e_17_1) { e_17 = { error: e_17_1 }; }
1643
+ catch (e_19_1) { e_19 = { error: e_19_1 }; }
1603
1644
  finally {
1604
1645
  try {
1605
1646
  if (serializedFloatingGroups_1_1 && !serializedFloatingGroups_1_1.done && (_e = serializedFloatingGroups_1.return)) _e.call(serializedFloatingGroups_1);
1606
1647
  }
1607
- finally { if (e_17) throw e_17.error; }
1648
+ finally { if (e_19) throw e_19.error; }
1608
1649
  }
1609
1650
  var serializedPopoutGroups = (_o = data.popoutGroups) !== null && _o !== void 0 ? _o : [];
1610
1651
  // Create a promise that resolves when all popout groups are created
@@ -1615,7 +1656,23 @@ var DockviewComponent = /** @class */ (function (_super) {
1615
1656
  var group = createGroupFromSerializedState_1(data);
1616
1657
  // Add a small delay for each popup after the first to avoid browser popup blocking
1617
1658
  var popoutPromise = new Promise(function (resolve) {
1618
- setTimeout(function () {
1659
+ var cleanup = function () {
1660
+ _this._popoutRestorationCleanups.delete(cleanup);
1661
+ clearTimeout(handle);
1662
+ resolve();
1663
+ };
1664
+ var handle = setTimeout(function () {
1665
+ _this._popoutRestorationCleanups.delete(cleanup);
1666
+ // Guard against the component being disposed before
1667
+ // this timer fires. Under React StrictMode the
1668
+ // component is mounted -> disposed -> remounted, and
1669
+ // without this guard the first instance's queued
1670
+ // restoration would open a second popout window.
1671
+ // See issue #851.
1672
+ if (_this.isDisposed) {
1673
+ resolve();
1674
+ return;
1675
+ }
1619
1676
  _this.addPopoutGroup(group, {
1620
1677
  position: position !== null && position !== void 0 ? position : undefined,
1621
1678
  overridePopoutGroup: gridReferenceGroup
@@ -1628,6 +1685,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1628
1685
  });
1629
1686
  resolve();
1630
1687
  }, index * constants_1.DESERIALIZATION_POPOUT_DELAY_MS); // 100ms delay between each popup
1688
+ _this._popoutRestorationCleanups.add(cleanup);
1631
1689
  });
1632
1690
  popoutPromises_1.push(popoutPromise);
1633
1691
  });
@@ -1639,12 +1697,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1639
1697
  floatingGroup.overlay.setBounds();
1640
1698
  }
1641
1699
  }
1642
- catch (e_18_1) { e_18 = { error: e_18_1 }; }
1700
+ catch (e_20_1) { e_20 = { error: e_20_1 }; }
1643
1701
  finally {
1644
1702
  try {
1645
1703
  if (_x && !_x.done && (_f = _w.return)) _f.call(_w);
1646
1704
  }
1647
- finally { if (e_18) throw e_18.error; }
1705
+ finally { if (e_20) throw e_20.error; }
1648
1706
  }
1649
1707
  if (typeof activeGroup === 'string') {
1650
1708
  var panel = this.getPanel(activeGroup);
@@ -1662,7 +1720,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1662
1720
  for (var _y = __values(this.groups), _z = _y.next(); !_z.done; _z = _y.next()) {
1663
1721
  var group = _z.value;
1664
1722
  try {
1665
- for (var _0 = (e_20 = void 0, __values(group.panels)), _1 = _0.next(); !_1.done; _1 = _0.next()) {
1723
+ for (var _0 = (e_22 = void 0, __values(group.panels)), _1 = _0.next(); !_1.done; _1 = _0.next()) {
1666
1724
  var panel = _1.value;
1667
1725
  this.removePanel(panel, {
1668
1726
  removeEmptyGroup: false,
@@ -1670,21 +1728,21 @@ var DockviewComponent = /** @class */ (function (_super) {
1670
1728
  });
1671
1729
  }
1672
1730
  }
1673
- catch (e_20_1) { e_20 = { error: e_20_1 }; }
1731
+ catch (e_22_1) { e_22 = { error: e_22_1 }; }
1674
1732
  finally {
1675
1733
  try {
1676
1734
  if (_1 && !_1.done && (_h = _0.return)) _h.call(_0);
1677
1735
  }
1678
- finally { if (e_20) throw e_20.error; }
1736
+ finally { if (e_22) throw e_22.error; }
1679
1737
  }
1680
1738
  }
1681
1739
  }
1682
- catch (e_19_1) { e_19 = { error: e_19_1 }; }
1740
+ catch (e_21_1) { e_21 = { error: e_21_1 }; }
1683
1741
  finally {
1684
1742
  try {
1685
1743
  if (_z && !_z.done && (_g = _y.return)) _g.call(_y);
1686
1744
  }
1687
- finally { if (e_19) throw e_19.error; }
1745
+ finally { if (e_21) throw e_21.error; }
1688
1746
  }
1689
1747
  try {
1690
1748
  /**
@@ -1698,12 +1756,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1698
1756
  this._onDidRemoveGroup.fire(group);
1699
1757
  }
1700
1758
  }
1701
- catch (e_21_1) { e_21 = { error: e_21_1 }; }
1759
+ catch (e_23_1) { e_23 = { error: e_23_1 }; }
1702
1760
  finally {
1703
1761
  try {
1704
1762
  if (_3 && !_3.done && (_j = _2.return)) _j.call(_2);
1705
1763
  }
1706
- finally { if (e_21) throw e_21.error; }
1764
+ finally { if (e_23) throw e_23.error; }
1707
1765
  }
1708
1766
  try {
1709
1767
  // iterate over a reassigned array since original array will be modified
@@ -1712,12 +1770,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1712
1770
  floatingGroup.dispose();
1713
1771
  }
1714
1772
  }
1715
- catch (e_22_1) { e_22 = { error: e_22_1 }; }
1773
+ catch (e_24_1) { e_24 = { error: e_24_1 }; }
1716
1774
  finally {
1717
1775
  try {
1718
1776
  if (_5 && !_5.done && (_k = _4.return)) _k.call(_4);
1719
1777
  }
1720
- finally { if (e_22) throw e_22.error; }
1778
+ finally { if (e_24) throw e_24.error; }
1721
1779
  }
1722
1780
  // fires clean-up events and clears the underlying HTML gridview.
1723
1781
  this.clear();
@@ -1734,7 +1792,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1734
1792
  this._onDidLayoutFromJSON.fire();
1735
1793
  };
1736
1794
  DockviewComponent.prototype.clear = function () {
1737
- var e_24, _a, e_25, _b;
1795
+ var e_26, _a, e_27, _b;
1738
1796
  var groups = Array.from(this._groups.values()).map(function (_) { return _.value; });
1739
1797
  var hasActiveGroup = !!this.activeGroup;
1740
1798
  try {
@@ -1744,17 +1802,17 @@ var DockviewComponent = /** @class */ (function (_super) {
1744
1802
  // Edge groups are structural - only clear their panels, not the group itself
1745
1803
  var panels = __spreadArray([], __read(group.panels), false);
1746
1804
  try {
1747
- for (var panels_1 = (e_25 = void 0, __values(panels)), panels_1_1 = panels_1.next(); !panels_1_1.done; panels_1_1 = panels_1.next()) {
1805
+ for (var panels_1 = (e_27 = void 0, __values(panels)), panels_1_1 = panels_1.next(); !panels_1_1.done; panels_1_1 = panels_1.next()) {
1748
1806
  var panel = panels_1_1.value;
1749
1807
  this.removePanel(panel, { removeEmptyGroup: false });
1750
1808
  }
1751
1809
  }
1752
- catch (e_25_1) { e_25 = { error: e_25_1 }; }
1810
+ catch (e_27_1) { e_27 = { error: e_27_1 }; }
1753
1811
  finally {
1754
1812
  try {
1755
1813
  if (panels_1_1 && !panels_1_1.done && (_b = panels_1.return)) _b.call(panels_1);
1756
1814
  }
1757
- finally { if (e_25) throw e_25.error; }
1815
+ finally { if (e_27) throw e_27.error; }
1758
1816
  }
1759
1817
  continue;
1760
1818
  }
@@ -1762,12 +1820,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1762
1820
  this.removeGroup(group, { skipActive: true });
1763
1821
  }
1764
1822
  }
1765
- catch (e_24_1) { e_24 = { error: e_24_1 }; }
1823
+ catch (e_26_1) { e_26 = { error: e_26_1 }; }
1766
1824
  finally {
1767
1825
  try {
1768
1826
  if (groups_1_1 && !groups_1_1.done && (_a = groups_1.return)) _a.call(groups_1);
1769
1827
  }
1770
- finally { if (e_24) throw e_24.error; }
1828
+ finally { if (e_26) throw e_26.error; }
1771
1829
  }
1772
1830
  if (hasActiveGroup) {
1773
1831
  this.doSetGroupAndPanelActive(undefined);
@@ -1775,7 +1833,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1775
1833
  this.gridview.clear();
1776
1834
  };
1777
1835
  DockviewComponent.prototype.closeAllGroups = function () {
1778
- var e_26, _a;
1836
+ var e_28, _a;
1779
1837
  try {
1780
1838
  for (var _b = __values(this._groups.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
1781
1839
  var entry = _c.value;
@@ -1783,12 +1841,12 @@ var DockviewComponent = /** @class */ (function (_super) {
1783
1841
  group.value.model.closeAllPanels();
1784
1842
  }
1785
1843
  }
1786
- catch (e_26_1) { e_26 = { error: e_26_1 }; }
1844
+ catch (e_28_1) { e_28 = { error: e_28_1 }; }
1787
1845
  finally {
1788
1846
  try {
1789
1847
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1790
1848
  }
1791
- finally { if (e_26) throw e_26.error; }
1849
+ finally { if (e_28) throw e_28.error; }
1792
1850
  }
1793
1851
  };
1794
1852
  DockviewComponent.prototype.addPanel = function (options) {
@@ -2040,7 +2098,7 @@ var DockviewComponent = /** @class */ (function (_super) {
2040
2098
  this.doRemoveGroup(group, options);
2041
2099
  };
2042
2100
  DockviewComponent.prototype.doRemoveGroup = function (group, options) {
2043
- var e_27, _a;
2101
+ var e_29, _a;
2044
2102
  var _b;
2045
2103
  // Edge groups are permanent structural elements - never remove them from the layout
2046
2104
  if (__spreadArray([], __read(this._edgeGroups.values()), false).includes(group)) {
@@ -2057,12 +2115,12 @@ var DockviewComponent = /** @class */ (function (_super) {
2057
2115
  });
2058
2116
  }
2059
2117
  }
2060
- catch (e_27_1) { e_27 = { error: e_27_1 }; }
2118
+ catch (e_29_1) { e_29 = { error: e_29_1 }; }
2061
2119
  finally {
2062
2120
  try {
2063
2121
  if (panels_2_1 && !panels_2_1.done && (_a = panels_2.return)) _a.call(panels_2);
2064
2122
  }
2065
- finally { if (e_27) throw e_27.error; }
2123
+ finally { if (e_29) throw e_29.error; }
2066
2124
  }
2067
2125
  }
2068
2126
  var activePanel = this.activePanel;
@@ -2256,8 +2314,11 @@ var DockviewComponent = /** @class */ (function (_super) {
2256
2314
  * the source group is a popout group with a single panel
2257
2315
  *
2258
2316
  * 1. remove the panel from the group without triggering any events
2259
- * 2. remove the popout group
2260
- * 3. create a new group at the requested location and add that panel
2317
+ * 2. remove the popout group — this may cascade-remove the empty
2318
+ * reference group it left behind in the main grid (see
2319
+ * doRemoveGroup for popout groups), which can shift grid indices
2320
+ * 3. recompute the target location now that the grid is stable
2321
+ * 4. create a new group at the recomputed location and add that panel
2261
2322
  */
2262
2323
  var popoutGroup_1 = this._popoutGroups.find(function (group) { return group.popoutGroup === sourceGroup; });
2263
2324
  var removedPanel_2 = this.movingLock(function () {
@@ -2267,7 +2328,8 @@ var DockviewComponent = /** @class */ (function (_super) {
2267
2328
  });
2268
2329
  });
2269
2330
  this.doRemoveGroup(sourceGroup, { skipActive: true });
2270
- var newGroup_1 = this.createGroupAtLocation(targetLocation);
2331
+ var updatedTargetLocation = (0, gridview_1.getRelativeLocation)(this.gridview.orientation, (0, gridview_1.getGridLocation)(destinationGroup.element), destinationTarget);
2332
+ var newGroup_1 = this.createGroupAtLocation(updatedTargetLocation);
2271
2333
  this.movingLock(function () {
2272
2334
  return newGroup_1.model.openPanel(removedPanel_2, {
2273
2335
  skipSetActive: true,
@@ -2390,9 +2452,9 @@ var DockviewComponent = /** @class */ (function (_super) {
2390
2452
  return;
2391
2453
  }
2392
2454
  var addPanelsToGroup = function (targetGroup) {
2393
- var e_28, _a, e_29, _b;
2455
+ var e_30, _a, e_31, _b;
2394
2456
  _this.movingLock(function () {
2395
- var e_30, _a;
2457
+ var e_32, _a;
2396
2458
  try {
2397
2459
  for (var removedPanels_3 = __values(removedPanels), removedPanels_3_1 = removedPanels_3.next(); !removedPanels_3_1.done; removedPanels_3_1 = removedPanels_3.next()) {
2398
2460
  var panel = removedPanels_3_1.value;
@@ -2403,12 +2465,12 @@ var DockviewComponent = /** @class */ (function (_super) {
2403
2465
  });
2404
2466
  }
2405
2467
  }
2406
- catch (e_30_1) { e_30 = { error: e_30_1 }; }
2468
+ catch (e_32_1) { e_32 = { error: e_32_1 }; }
2407
2469
  finally {
2408
2470
  try {
2409
2471
  if (removedPanels_3_1 && !removedPanels_3_1.done && (_a = removedPanels_3.return)) _a.call(removedPanels_3);
2410
2472
  }
2411
- finally { if (e_30) throw e_30.error; }
2473
+ finally { if (e_32) throw e_32.error; }
2412
2474
  }
2413
2475
  });
2414
2476
  // Recreate the tab group in the destination
@@ -2424,12 +2486,12 @@ var DockviewComponent = /** @class */ (function (_super) {
2424
2486
  targetGroup.model.addPanelToTabGroup(newTabGroup.id, panel.id);
2425
2487
  }
2426
2488
  }
2427
- catch (e_28_1) { e_28 = { error: e_28_1 }; }
2489
+ catch (e_30_1) { e_30 = { error: e_30_1 }; }
2428
2490
  finally {
2429
2491
  try {
2430
2492
  if (removedPanels_1_1 && !removedPanels_1_1.done && (_a = removedPanels_1.return)) _a.call(removedPanels_1);
2431
2493
  }
2432
- finally { if (e_28) throw e_28.error; }
2494
+ finally { if (e_30) throw e_30.error; }
2433
2495
  }
2434
2496
  if (!options.skipSetActive) {
2435
2497
  _this.doSetGroupAndPanelActive(targetGroup);
@@ -2443,12 +2505,12 @@ var DockviewComponent = /** @class */ (function (_super) {
2443
2505
  });
2444
2506
  }
2445
2507
  }
2446
- catch (e_29_1) { e_29 = { error: e_29_1 }; }
2508
+ catch (e_31_1) { e_31 = { error: e_31_1 }; }
2447
2509
  finally {
2448
2510
  try {
2449
2511
  if (removedPanels_2_1 && !removedPanels_2_1.done && (_b = removedPanels_2.return)) _b.call(removedPanels_2);
2450
2512
  }
2451
- finally { if (e_29) throw e_29.error; }
2513
+ finally { if (e_31) throw e_31.error; }
2452
2514
  }
2453
2515
  };
2454
2516
  var targetGroup;
@@ -2474,7 +2536,7 @@ var DockviewComponent = /** @class */ (function (_super) {
2474
2536
  addPanelsToGroup(targetGroup);
2475
2537
  };
2476
2538
  DockviewComponent.prototype.moveGroup = function (options) {
2477
- var e_31, _a, e_32, _b, e_33, _c, e_34, _d;
2539
+ var e_33, _a, e_34, _b, e_35, _c, e_36, _d;
2478
2540
  var _this = this;
2479
2541
  var from = options.from.group;
2480
2542
  var to = options.to.group;
@@ -2506,7 +2568,7 @@ var DockviewComponent = /** @class */ (function (_super) {
2506
2568
  this.doRemoveGroup(from, { skipActive: true });
2507
2569
  }
2508
2570
  this.movingLock(function () {
2509
- var e_35, _a;
2571
+ var e_37, _a;
2510
2572
  try {
2511
2573
  for (var panels_4 = __values(panels_3), panels_4_1 = panels_4.next(); !panels_4_1.done; panels_4_1 = panels_4.next()) {
2512
2574
  var panel = panels_4_1.value;
@@ -2516,12 +2578,12 @@ var DockviewComponent = /** @class */ (function (_super) {
2516
2578
  });
2517
2579
  }
2518
2580
  }
2519
- catch (e_35_1) { e_35 = { error: e_35_1 }; }
2581
+ catch (e_37_1) { e_37 = { error: e_37_1 }; }
2520
2582
  finally {
2521
2583
  try {
2522
2584
  if (panels_4_1 && !panels_4_1.done && (_a = panels_4.return)) _a.call(panels_4);
2523
2585
  }
2524
- finally { if (e_35) throw e_35.error; }
2586
+ finally { if (e_37) throw e_37.error; }
2525
2587
  }
2526
2588
  });
2527
2589
  try {
@@ -2534,26 +2596,26 @@ var DockviewComponent = /** @class */ (function (_super) {
2534
2596
  componentParams: snapshot.componentParams,
2535
2597
  });
2536
2598
  try {
2537
- for (var _e = (e_32 = void 0, __values(snapshot.panelIds)), _f = _e.next(); !_f.done; _f = _e.next()) {
2599
+ for (var _e = (e_34 = void 0, __values(snapshot.panelIds)), _f = _e.next(); !_f.done; _f = _e.next()) {
2538
2600
  var panelId = _f.value;
2539
2601
  to.model.addPanelToTabGroup(newTabGroup.id, panelId);
2540
2602
  }
2541
2603
  }
2542
- catch (e_32_1) { e_32 = { error: e_32_1 }; }
2604
+ catch (e_34_1) { e_34 = { error: e_34_1 }; }
2543
2605
  finally {
2544
2606
  try {
2545
2607
  if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
2546
2608
  }
2547
- finally { if (e_32) throw e_32.error; }
2609
+ finally { if (e_34) throw e_34.error; }
2548
2610
  }
2549
2611
  }
2550
2612
  }
2551
- catch (e_31_1) { e_31 = { error: e_31_1 }; }
2613
+ catch (e_33_1) { e_33 = { error: e_33_1 }; }
2552
2614
  finally {
2553
2615
  try {
2554
2616
  if (tabGroupSnapshots_1_1 && !tabGroupSnapshots_1_1.done && (_a = tabGroupSnapshots_1.return)) _a.call(tabGroupSnapshots_1);
2555
2617
  }
2556
- finally { if (e_31) throw e_31.error; }
2618
+ finally { if (e_33) throw e_33.error; }
2557
2619
  }
2558
2620
  // Ensure group becomes active after move
2559
2621
  if (options.skipSetActive !== true) {
@@ -2596,7 +2658,7 @@ var DockviewComponent = /** @class */ (function (_super) {
2596
2658
  });
2597
2659
  source = this.createGroup();
2598
2660
  this.movingLock(function () {
2599
- var e_36, _a;
2661
+ var e_38, _a;
2600
2662
  try {
2601
2663
  for (var movedPanels_2 = __values(movedPanels_1), movedPanels_2_1 = movedPanels_2.next(); !movedPanels_2_1.done; movedPanels_2_1 = movedPanels_2.next()) {
2602
2664
  var panel = movedPanels_2_1.value;
@@ -2606,12 +2668,12 @@ var DockviewComponent = /** @class */ (function (_super) {
2606
2668
  });
2607
2669
  }
2608
2670
  }
2609
- catch (e_36_1) { e_36 = { error: e_36_1 }; }
2671
+ catch (e_38_1) { e_38 = { error: e_38_1 }; }
2610
2672
  finally {
2611
2673
  try {
2612
2674
  if (movedPanels_2_1 && !movedPanels_2_1.done && (_a = movedPanels_2.return)) _a.call(movedPanels_2);
2613
2675
  }
2614
- finally { if (e_36) throw e_36.error; }
2676
+ finally { if (e_38) throw e_38.error; }
2615
2677
  }
2616
2678
  });
2617
2679
  try {
@@ -2624,26 +2686,26 @@ var DockviewComponent = /** @class */ (function (_super) {
2624
2686
  componentParams: snapshot.componentParams,
2625
2687
  });
2626
2688
  try {
2627
- for (var _g = (e_34 = void 0, __values(snapshot.panelIds)), _h = _g.next(); !_h.done; _h = _g.next()) {
2689
+ for (var _g = (e_36 = void 0, __values(snapshot.panelIds)), _h = _g.next(); !_h.done; _h = _g.next()) {
2628
2690
  var panelId = _h.value;
2629
2691
  source.model.addPanelToTabGroup(newTabGroup.id, panelId);
2630
2692
  }
2631
2693
  }
2632
- catch (e_34_1) { e_34 = { error: e_34_1 }; }
2694
+ catch (e_36_1) { e_36 = { error: e_36_1 }; }
2633
2695
  finally {
2634
2696
  try {
2635
2697
  if (_h && !_h.done && (_d = _g.return)) _d.call(_g);
2636
2698
  }
2637
- finally { if (e_34) throw e_34.error; }
2699
+ finally { if (e_36) throw e_36.error; }
2638
2700
  }
2639
2701
  }
2640
2702
  }
2641
- catch (e_33_1) { e_33 = { error: e_33_1 }; }
2703
+ catch (e_35_1) { e_35 = { error: e_35_1 }; }
2642
2704
  finally {
2643
2705
  try {
2644
2706
  if (tabGroupSnapshots_2_1 && !tabGroupSnapshots_2_1.done && (_c = tabGroupSnapshots_2.return)) _c.call(tabGroupSnapshots_2);
2645
2707
  }
2646
- finally { if (e_33) throw e_33.error; }
2708
+ finally { if (e_35) throw e_35.error; }
2647
2709
  }
2648
2710
  }
2649
2711
  else {
@@ -2947,7 +3009,7 @@ var DockviewComponent = /** @class */ (function (_super) {
2947
3009
  }
2948
3010
  };
2949
3011
  DockviewComponent.prototype.updateTheme = function () {
2950
- var e_37, _a;
3012
+ var e_39, _a;
2951
3013
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
2952
3014
  var theme = (_b = this._options.theme) !== null && _b !== void 0 ? _b : theme_1.themeAbyss;
2953
3015
  // Apply the theme class only to the shell so edge groups and the
@@ -2988,12 +3050,12 @@ var DockviewComponent = /** @class */ (function (_super) {
2988
3050
  group.model.updateTabGroups();
2989
3051
  }
2990
3052
  }
2991
- catch (e_37_1) { e_37 = { error: e_37_1 }; }
3053
+ catch (e_39_1) { e_39 = { error: e_39_1 }; }
2992
3054
  finally {
2993
3055
  try {
2994
3056
  if (_m && !_m.done && (_a = _l.return)) _a.call(_l);
2995
3057
  }
2996
- finally { if (e_37) throw e_37.error; }
3058
+ finally { if (e_39) throw e_39.error; }
2997
3059
  }
2998
3060
  };
2999
3061
  return DockviewComponent;