dockview-core 1.15.0 → 1.15.1

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 (35) hide show
  1. package/dist/cjs/api/component.api.d.ts +1 -0
  2. package/dist/cjs/api/component.api.js +7 -0
  3. package/dist/cjs/dockview/dockviewComponent.d.ts +7 -3
  4. package/dist/cjs/dockview/dockviewComponent.js +18 -8
  5. package/dist/cjs/dockview/options.d.ts +2 -2
  6. package/dist/cjs/types.d.ts +1 -1
  7. package/dist/dockview-core.amd.js +18 -9
  8. package/dist/dockview-core.amd.js.map +1 -1
  9. package/dist/dockview-core.amd.min.js +2 -2
  10. package/dist/dockview-core.amd.min.js.map +1 -1
  11. package/dist/dockview-core.amd.min.noStyle.js +2 -2
  12. package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
  13. package/dist/dockview-core.amd.noStyle.js +18 -9
  14. package/dist/dockview-core.amd.noStyle.js.map +1 -1
  15. package/dist/dockview-core.cjs.js +18 -9
  16. package/dist/dockview-core.cjs.js.map +1 -1
  17. package/dist/dockview-core.esm.js +18 -9
  18. package/dist/dockview-core.esm.js.map +1 -1
  19. package/dist/dockview-core.esm.min.js +2 -2
  20. package/dist/dockview-core.esm.min.js.map +1 -1
  21. package/dist/dockview-core.js +18 -9
  22. package/dist/dockview-core.js.map +1 -1
  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 +18 -9
  28. package/dist/dockview-core.noStyle.js.map +1 -1
  29. package/dist/esm/api/component.api.d.ts +1 -0
  30. package/dist/esm/api/component.api.js +3 -0
  31. package/dist/esm/dockview/dockviewComponent.d.ts +7 -3
  32. package/dist/esm/dockview/dockviewComponent.js +14 -8
  33. package/dist/esm/dockview/options.d.ts +2 -2
  34. package/dist/esm/types.d.ts +1 -1
  35. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 1.15.0
3
+ * @version 1.15.1
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -3241,6 +3241,9 @@ define(['exports'], (function (exports) { 'use strict';
3241
3241
  get totalPanels() {
3242
3242
  return this.component.totalPanels;
3243
3243
  }
3244
+ get gap() {
3245
+ return this.component.gap;
3246
+ }
3244
3247
  /**
3245
3248
  * Invoked when the active group changes. May be undefined if no group is active.
3246
3249
  */
@@ -7193,6 +7196,9 @@ define(['exports'], (function (exports) { 'use strict';
7193
7196
  get api() {
7194
7197
  return this._api;
7195
7198
  }
7199
+ get gap() {
7200
+ return this.gridview.margin;
7201
+ }
7196
7202
  constructor(options) {
7197
7203
  var _a;
7198
7204
  super({
@@ -7362,7 +7368,7 @@ define(['exports'], (function (exports) { 'use strict';
7362
7368
  var _a, _b, _c;
7363
7369
  if (itemToPopout instanceof DockviewPanel &&
7364
7370
  itemToPopout.group.size === 1) {
7365
- return this.addPopoutGroup(itemToPopout.group);
7371
+ return this.addPopoutGroup(itemToPopout.group, options);
7366
7372
  }
7367
7373
  const theme = getDockviewTheme(this.gridview.element);
7368
7374
  const element = this.element;
@@ -7580,14 +7586,14 @@ define(['exports'], (function (exports) { 'use strict';
7580
7586
  else {
7581
7587
  result.top = DEFAULT_FLOATING_GROUP_POSITION.top;
7582
7588
  }
7583
- if ('width' in options.position) {
7584
- result.width = Math.max(options.position.width, 0);
7589
+ if (typeof options.width === 'number') {
7590
+ result.width = Math.max(options.width, 0);
7585
7591
  }
7586
7592
  else {
7587
7593
  result.width = DEFAULT_FLOATING_GROUP_POSITION.width;
7588
7594
  }
7589
- if ('height' in options.position) {
7590
- result.height = Math.max(options.position.height, 0);
7595
+ if (typeof options.height === 'number') {
7596
+ result.height = Math.max(options.height, 0);
7591
7597
  }
7592
7598
  else {
7593
7599
  result.height = DEFAULT_FLOATING_GROUP_POSITION.height;
@@ -7718,7 +7724,10 @@ define(['exports'], (function (exports) { 'use strict';
7718
7724
  if (changed_rootOverlayOptions) {
7719
7725
  this._rootDropTarget.setOverlayModel(options.rootOverlayModel);
7720
7726
  }
7721
- if (this.gridview.margin !== 0 && options.gap === undefined) {
7727
+ if (
7728
+ // if explicitly set as `undefined`
7729
+ 'gap' in options &&
7730
+ options.gap === undefined) {
7722
7731
  this.gridview.margin = 0;
7723
7732
  }
7724
7733
  if (typeof options.gap === 'number') {
@@ -8019,11 +8028,11 @@ define(['exports'], (function (exports) { 'use strict';
8019
8028
  if (options.floating) {
8020
8029
  const group = this.createGroup();
8021
8030
  this._onDidAddGroup.fire(group);
8022
- const o = typeof options.floating === 'object' &&
8031
+ const floatingGroupOptions = typeof options.floating === 'object' &&
8023
8032
  options.floating !== null
8024
8033
  ? options.floating
8025
8034
  : {};
8026
- this.addFloatingGroup(group, Object.assign(Object.assign({}, o), { inDragMode: false, skipRemoveGroup: true, skipActiveGroup: true }));
8035
+ this.addFloatingGroup(group, Object.assign(Object.assign({}, floatingGroupOptions), { inDragMode: false, skipRemoveGroup: true, skipActiveGroup: true }));
8027
8036
  panel = this.createPanel(options, group);
8028
8037
  group.model.openPanel(panel, {
8029
8038
  skipSetActive: options.inactive,