dockview-core 8.4.1 → 8.5.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.
- package/dist/cjs/dockview/dockviewShell.d.ts +3 -0
- package/dist/dockview-core.js +25 -20
- package/dist/dockview-core.min.js +146 -2
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.noStyle.js +24 -19
- package/dist/package/main.cjs.js +24 -19
- package/dist/package/main.cjs.min.js +2 -2
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +24 -19
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 8.
|
|
3
|
+
* @version 8.5.1
|
|
4
4
|
* @link https://github.com/dockview/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -6076,24 +6076,25 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
6076
6076
|
else this._element.removeAttribute("aria-labelledby");
|
|
6077
6077
|
}
|
|
6078
6078
|
renderPanel(panel, options) {
|
|
6079
|
-
var _options$asActive
|
|
6080
|
-
const doRender = ((_options$asActive = options === null || options === void 0 ? void 0 : options.asActive) !== null && _options$asActive !== void 0 ? _options$asActive : true) || this.
|
|
6081
|
-
if (
|
|
6082
|
-
var _this$panel
|
|
6083
|
-
this.panel.view.content.element.
|
|
6084
|
-
|
|
6079
|
+
var _options$asActive;
|
|
6080
|
+
const doRender = ((_options$asActive = options === null || options === void 0 ? void 0 : options.asActive) !== null && _options$asActive !== void 0 ? _options$asActive : true) || this.group.isPanelActive(panel);
|
|
6081
|
+
if (doRender || this.panel === panel) {
|
|
6082
|
+
var _this$panel;
|
|
6083
|
+
if (((_this$panel = this.panel) === null || _this$panel === void 0 ? void 0 : _this$panel.view.content.element.parentElement) === this._element) {
|
|
6084
|
+
var _this$panel$view$cont, _this$panel$view$cont2;
|
|
6085
|
+
this.panel.view.content.element.remove();
|
|
6086
|
+
(_this$panel$view$cont = (_this$panel$view$cont2 = this.panel.view.content).onHide) === null || _this$panel$view$cont === void 0 || _this$panel$view$cont.call(_this$panel$view$cont2);
|
|
6087
|
+
}
|
|
6088
|
+
this.panel = panel;
|
|
6085
6089
|
}
|
|
6086
|
-
this.panel = panel;
|
|
6087
6090
|
let container;
|
|
6088
6091
|
switch (panel.api.renderer) {
|
|
6089
6092
|
case "onlyWhenVisible":
|
|
6090
6093
|
this.group.renderContainer.detatch(panel);
|
|
6091
|
-
if (
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
(_this$panel$view$cont3 = (_this$panel$view$cont4 = this.panel.view.content).onShow) === null || _this$panel$view$cont3 === void 0 || _this$panel$view$cont3.call(_this$panel$view$cont4);
|
|
6096
|
-
}
|
|
6094
|
+
if (doRender) {
|
|
6095
|
+
var _panel$view$content$o, _panel$view$content;
|
|
6096
|
+
this._element.appendChild(panel.view.content.element);
|
|
6097
|
+
(_panel$view$content$o = (_panel$view$content = panel.view.content).onShow) === null || _panel$view$content$o === void 0 || _panel$view$content$o.call(_panel$view$content);
|
|
6097
6098
|
}
|
|
6098
6099
|
container = this._element;
|
|
6099
6100
|
break;
|
|
@@ -6122,9 +6123,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
6122
6123
|
closePanel() {
|
|
6123
6124
|
if (this.panel) {
|
|
6124
6125
|
if (this.panel.api.renderer === "onlyWhenVisible") {
|
|
6125
|
-
var _this$panel$view$
|
|
6126
|
+
var _this$panel$view$cont3, _this$panel$view$cont4;
|
|
6126
6127
|
this.panel.view.content.element.remove();
|
|
6127
|
-
(_this$panel$view$
|
|
6128
|
+
(_this$panel$view$cont3 = (_this$panel$view$cont4 = this.panel.view.content).onHide) === null || _this$panel$view$cont3 === void 0 || _this$panel$view$cont3.call(_this$panel$view$cont4);
|
|
6128
6129
|
}
|
|
6129
6130
|
}
|
|
6130
6131
|
this.panel = void 0;
|
|
@@ -11157,7 +11158,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
11157
11158
|
this.rerender(panel);
|
|
11158
11159
|
});
|
|
11159
11160
|
if (this._activePanel) {
|
|
11160
|
-
this.contentContainer.renderPanel(this._activePanel, { asActive: true });
|
|
11161
11161
|
const { width, height } = this.contentDimensions();
|
|
11162
11162
|
this._activePanel.layout(width, height);
|
|
11163
11163
|
}
|
|
@@ -15145,9 +15145,14 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
15145
15145
|
get isCollapsed() {
|
|
15146
15146
|
return this._isCollapsed;
|
|
15147
15147
|
}
|
|
15148
|
+
/** Includes the gap share, as expanding restores a slot size. */
|
|
15148
15149
|
get lastExpandedSize() {
|
|
15149
15150
|
return this._lastExpandedSize;
|
|
15150
15151
|
}
|
|
15152
|
+
/** Without the gap share. */
|
|
15153
|
+
get lastExpandedContentSize() {
|
|
15154
|
+
return this._lastExpandedSize - this._gapAdd;
|
|
15155
|
+
}
|
|
15151
15156
|
get collapsedSize() {
|
|
15152
15157
|
return this._effectiveBaseCollapsed + this._gapAdd;
|
|
15153
15158
|
}
|
|
@@ -15211,7 +15216,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
15211
15216
|
if (this._isCollapsed) this._onDidChange.fire({ size: this.collapsedSize });
|
|
15212
15217
|
}
|
|
15213
15218
|
layout(size, orthogonalSize) {
|
|
15214
|
-
if (!this._isCollapsed) this._lastExpandedSize = size;
|
|
15219
|
+
if (!this._isCollapsed) this._lastExpandedSize = size + this._gapAdd;
|
|
15215
15220
|
if (this._orientation === "horizontal") this._group.layout(size, orthogonalSize);
|
|
15216
15221
|
else this._group.layout(orthogonalSize, size);
|
|
15217
15222
|
}
|
|
@@ -15642,7 +15647,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
15642
15647
|
* the auto-hide peek overlay. */
|
|
15643
15648
|
getEdgeGroupExpandedSize(position) {
|
|
15644
15649
|
var _this$_getView$lastEx, _this$_getView2;
|
|
15645
|
-
return (_this$_getView$lastEx = (_this$_getView2 = this._getView(position)) === null || _this$_getView2 === void 0 ? void 0 : _this$_getView2.
|
|
15650
|
+
return (_this$_getView$lastEx = (_this$_getView2 = this._getView(position)) === null || _this$_getView2 === void 0 ? void 0 : _this$_getView2.lastExpandedContentSize) !== null && _this$_getView$lastEx !== void 0 ? _this$_getView$lastEx : 0;
|
|
15646
15651
|
}
|
|
15647
15652
|
_getView(position) {
|
|
15648
15653
|
switch (position) {
|
package/dist/package/main.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 8.
|
|
3
|
+
* @version 8.5.1
|
|
4
4
|
* @link https://github.com/dockview/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -6071,24 +6071,25 @@ var ContentContainer = class extends CompositeDisposable {
|
|
|
6071
6071
|
else this._element.removeAttribute("aria-labelledby");
|
|
6072
6072
|
}
|
|
6073
6073
|
renderPanel(panel, options) {
|
|
6074
|
-
var _options$asActive
|
|
6075
|
-
const doRender = ((_options$asActive = options === null || options === void 0 ? void 0 : options.asActive) !== null && _options$asActive !== void 0 ? _options$asActive : true) || this.
|
|
6076
|
-
if (
|
|
6077
|
-
var _this$panel
|
|
6078
|
-
this.panel.view.content.element.
|
|
6079
|
-
|
|
6074
|
+
var _options$asActive;
|
|
6075
|
+
const doRender = ((_options$asActive = options === null || options === void 0 ? void 0 : options.asActive) !== null && _options$asActive !== void 0 ? _options$asActive : true) || this.group.isPanelActive(panel);
|
|
6076
|
+
if (doRender || this.panel === panel) {
|
|
6077
|
+
var _this$panel;
|
|
6078
|
+
if (((_this$panel = this.panel) === null || _this$panel === void 0 ? void 0 : _this$panel.view.content.element.parentElement) === this._element) {
|
|
6079
|
+
var _this$panel$view$cont, _this$panel$view$cont2;
|
|
6080
|
+
this.panel.view.content.element.remove();
|
|
6081
|
+
(_this$panel$view$cont = (_this$panel$view$cont2 = this.panel.view.content).onHide) === null || _this$panel$view$cont === void 0 || _this$panel$view$cont.call(_this$panel$view$cont2);
|
|
6082
|
+
}
|
|
6083
|
+
this.panel = panel;
|
|
6080
6084
|
}
|
|
6081
|
-
this.panel = panel;
|
|
6082
6085
|
let container;
|
|
6083
6086
|
switch (panel.api.renderer) {
|
|
6084
6087
|
case "onlyWhenVisible":
|
|
6085
6088
|
this.group.renderContainer.detatch(panel);
|
|
6086
|
-
if (
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
(_this$panel$view$cont3 = (_this$panel$view$cont4 = this.panel.view.content).onShow) === null || _this$panel$view$cont3 === void 0 || _this$panel$view$cont3.call(_this$panel$view$cont4);
|
|
6091
|
-
}
|
|
6089
|
+
if (doRender) {
|
|
6090
|
+
var _panel$view$content$o, _panel$view$content;
|
|
6091
|
+
this._element.appendChild(panel.view.content.element);
|
|
6092
|
+
(_panel$view$content$o = (_panel$view$content = panel.view.content).onShow) === null || _panel$view$content$o === void 0 || _panel$view$content$o.call(_panel$view$content);
|
|
6092
6093
|
}
|
|
6093
6094
|
container = this._element;
|
|
6094
6095
|
break;
|
|
@@ -6117,9 +6118,9 @@ var ContentContainer = class extends CompositeDisposable {
|
|
|
6117
6118
|
closePanel() {
|
|
6118
6119
|
if (this.panel) {
|
|
6119
6120
|
if (this.panel.api.renderer === "onlyWhenVisible") {
|
|
6120
|
-
var _this$panel$view$
|
|
6121
|
+
var _this$panel$view$cont3, _this$panel$view$cont4;
|
|
6121
6122
|
this.panel.view.content.element.remove();
|
|
6122
|
-
(_this$panel$view$
|
|
6123
|
+
(_this$panel$view$cont3 = (_this$panel$view$cont4 = this.panel.view.content).onHide) === null || _this$panel$view$cont3 === void 0 || _this$panel$view$cont3.call(_this$panel$view$cont4);
|
|
6123
6124
|
}
|
|
6124
6125
|
}
|
|
6125
6126
|
this.panel = void 0;
|
|
@@ -11152,7 +11153,6 @@ var DockviewGroupPanelModel = class extends CompositeDisposable {
|
|
|
11152
11153
|
this.rerender(panel);
|
|
11153
11154
|
});
|
|
11154
11155
|
if (this._activePanel) {
|
|
11155
|
-
this.contentContainer.renderPanel(this._activePanel, { asActive: true });
|
|
11156
11156
|
const { width, height } = this.contentDimensions();
|
|
11157
11157
|
this._activePanel.layout(width, height);
|
|
11158
11158
|
}
|
|
@@ -15140,9 +15140,14 @@ var EdgeGroupView = class {
|
|
|
15140
15140
|
get isCollapsed() {
|
|
15141
15141
|
return this._isCollapsed;
|
|
15142
15142
|
}
|
|
15143
|
+
/** Includes the gap share, as expanding restores a slot size. */
|
|
15143
15144
|
get lastExpandedSize() {
|
|
15144
15145
|
return this._lastExpandedSize;
|
|
15145
15146
|
}
|
|
15147
|
+
/** Without the gap share. */
|
|
15148
|
+
get lastExpandedContentSize() {
|
|
15149
|
+
return this._lastExpandedSize - this._gapAdd;
|
|
15150
|
+
}
|
|
15146
15151
|
get collapsedSize() {
|
|
15147
15152
|
return this._effectiveBaseCollapsed + this._gapAdd;
|
|
15148
15153
|
}
|
|
@@ -15206,7 +15211,7 @@ var EdgeGroupView = class {
|
|
|
15206
15211
|
if (this._isCollapsed) this._onDidChange.fire({ size: this.collapsedSize });
|
|
15207
15212
|
}
|
|
15208
15213
|
layout(size, orthogonalSize) {
|
|
15209
|
-
if (!this._isCollapsed) this._lastExpandedSize = size;
|
|
15214
|
+
if (!this._isCollapsed) this._lastExpandedSize = size + this._gapAdd;
|
|
15210
15215
|
if (this._orientation === "horizontal") this._group.layout(size, orthogonalSize);
|
|
15211
15216
|
else this._group.layout(orthogonalSize, size);
|
|
15212
15217
|
}
|
|
@@ -15637,7 +15642,7 @@ var ShellManager = class {
|
|
|
15637
15642
|
* the auto-hide peek overlay. */
|
|
15638
15643
|
getEdgeGroupExpandedSize(position) {
|
|
15639
15644
|
var _this$_getView$lastEx, _this$_getView2;
|
|
15640
|
-
return (_this$_getView$lastEx = (_this$_getView2 = this._getView(position)) === null || _this$_getView2 === void 0 ? void 0 : _this$_getView2.
|
|
15645
|
+
return (_this$_getView$lastEx = (_this$_getView2 = this._getView(position)) === null || _this$_getView2 === void 0 ? void 0 : _this$_getView2.lastExpandedContentSize) !== null && _this$_getView$lastEx !== void 0 ? _this$_getView$lastEx : 0;
|
|
15641
15646
|
}
|
|
15642
15647
|
_getView(position) {
|
|
15643
15648
|
switch (position) {
|