dockview-core 1.7.6 → 1.8.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.
- package/README.md +2 -1
- package/dist/cjs/api/component.api.d.ts +6 -1
- package/dist/cjs/api/component.api.d.ts.map +1 -1
- package/dist/cjs/api/component.api.js +6 -0
- package/dist/cjs/api/component.api.js.map +1 -1
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +30 -0
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts.map +1 -0
- package/dist/cjs/api/dockviewGroupPanelApi.js +54 -0
- package/dist/cjs/api/dockviewGroupPanelApi.js.map +1 -0
- package/dist/cjs/api/dockviewPanelApi.d.ts +14 -1
- package/dist/cjs/api/dockviewPanelApi.d.ts.map +1 -1
- package/dist/cjs/api/dockviewPanelApi.js +6 -1
- package/dist/cjs/api/dockviewPanelApi.js.map +1 -1
- package/dist/cjs/array.d.ts +1 -0
- package/dist/cjs/array.d.ts.map +1 -1
- package/dist/cjs/array.js +10 -1
- package/dist/cjs/array.js.map +1 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts +1 -0
- package/dist/cjs/dnd/abstractDragHandler.d.ts.map +1 -1
- package/dist/cjs/dnd/abstractDragHandler.js +7 -0
- package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
- package/dist/cjs/dnd/droptarget.d.ts +11 -0
- package/dist/cjs/dnd/droptarget.d.ts.map +1 -1
- package/dist/cjs/dnd/droptarget.js +32 -9
- package/dist/cjs/dnd/droptarget.js.map +1 -1
- package/dist/cjs/dnd/groupDragHandler.d.ts +1 -0
- package/dist/cjs/dnd/groupDragHandler.d.ts.map +1 -1
- package/dist/cjs/dnd/groupDragHandler.js +18 -0
- package/dist/cjs/dnd/groupDragHandler.js.map +1 -1
- package/dist/cjs/dnd/overlay.d.ts +40 -0
- package/dist/cjs/dnd/overlay.d.ts.map +1 -0
- package/dist/cjs/dnd/overlay.js +382 -0
- package/dist/cjs/dnd/overlay.js.map +1 -0
- package/dist/cjs/dockview/components/tab/tab.d.ts +2 -2
- package/dist/cjs/dockview/components/tab/tab.d.ts.map +1 -1
- package/dist/cjs/dockview/components/tab/tab.js +0 -7
- package/dist/cjs/dockview/components/tab/tab.js.map +1 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +8 -4
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts.map +1 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +54 -10
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/dockview/deserializer.d.ts +2 -2
- package/dist/cjs/dockview/deserializer.d.ts.map +1 -1
- package/dist/cjs/dockview/deserializer.js.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +41 -9
- package/dist/cjs/dockview/dockviewComponent.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.js +277 -76
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +24 -0
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts.map +1 -0
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +35 -0
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js.map +1 -0
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +5 -6
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.js +3 -2
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +5 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +43 -12
- package/dist/cjs/dockview/dockviewGroupPanelModel.js.map +1 -1
- package/dist/cjs/dockview/dockviewPanel.d.ts +2 -2
- package/dist/cjs/dockview/dockviewPanel.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewPanel.js +1 -1
- package/dist/cjs/dockview/dockviewPanel.js.map +1 -1
- package/dist/cjs/dockview/options.d.ts +22 -6
- package/dist/cjs/dockview/options.d.ts.map +1 -1
- package/dist/cjs/dockview/options.js.map +1 -1
- package/dist/cjs/dom.d.ts +5 -3
- package/dist/cjs/dom.d.ts.map +1 -1
- package/dist/cjs/dom.js +13 -1
- package/dist/cjs/dom.js.map +1 -1
- package/dist/cjs/events.d.ts.map +1 -1
- package/dist/cjs/gridview/branchNode.js +2 -2
- package/dist/cjs/gridview/branchNode.js.map +1 -1
- package/dist/cjs/gridview/gridview.d.ts.map +1 -1
- package/dist/cjs/gridview/gridview.js +9 -7
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.js +4 -1
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/gridview/gridviewPanel.d.ts +3 -3
- package/dist/cjs/gridview/gridviewPanel.d.ts.map +1 -1
- package/dist/cjs/gridview/gridviewPanel.js +2 -2
- package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/math.d.ts.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.js +4 -1
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.d.ts.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.js +4 -1
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
- package/dist/dockview-core.amd.js +764 -133
- package/dist/dockview-core.amd.js.map +1 -0
- package/dist/dockview-core.amd.min.js +3 -2
- package/dist/dockview-core.amd.min.js.map +1 -0
- package/dist/dockview-core.amd.min.noStyle.js +3 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -0
- package/dist/dockview-core.amd.noStyle.js +763 -132
- package/dist/dockview-core.amd.noStyle.js.map +1 -0
- package/dist/dockview-core.cjs.js +764 -133
- package/dist/dockview-core.cjs.js.map +1 -0
- package/dist/dockview-core.esm.js +765 -133
- package/dist/dockview-core.esm.js.map +1 -0
- package/dist/dockview-core.esm.min.js +3 -2
- package/dist/dockview-core.esm.min.js.map +1 -0
- package/dist/dockview-core.js +764 -133
- package/dist/dockview-core.js.map +1 -0
- package/dist/dockview-core.min.js +3 -2
- package/dist/dockview-core.min.js.map +1 -0
- package/dist/dockview-core.min.noStyle.js +3 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -0
- package/dist/dockview-core.noStyle.js +763 -132
- package/dist/dockview-core.noStyle.js.map +1 -0
- package/dist/esm/api/component.api.d.ts +6 -1
- package/dist/esm/api/component.api.d.ts.map +1 -1
- package/dist/esm/api/component.api.js +6 -0
- package/dist/esm/api/component.api.js.map +1 -1
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +30 -0
- package/dist/esm/api/dockviewGroupPanelApi.d.ts.map +1 -0
- package/dist/esm/api/dockviewGroupPanelApi.js +28 -0
- package/dist/esm/api/dockviewGroupPanelApi.js.map +1 -0
- package/dist/esm/api/dockviewPanelApi.d.ts +14 -1
- package/dist/esm/api/dockviewPanelApi.d.ts.map +1 -1
- package/dist/esm/api/dockviewPanelApi.js +6 -1
- package/dist/esm/api/dockviewPanelApi.js.map +1 -1
- package/dist/esm/array.d.ts +1 -0
- package/dist/esm/array.d.ts.map +1 -1
- package/dist/esm/array.js +8 -0
- package/dist/esm/array.js.map +1 -1
- package/dist/esm/dnd/abstractDragHandler.d.ts +1 -0
- package/dist/esm/dnd/abstractDragHandler.d.ts.map +1 -1
- package/dist/esm/dnd/abstractDragHandler.js +7 -0
- package/dist/esm/dnd/abstractDragHandler.js.map +1 -1
- package/dist/esm/dnd/droptarget.d.ts +11 -0
- package/dist/esm/dnd/droptarget.d.ts.map +1 -1
- package/dist/esm/dnd/droptarget.js +32 -9
- package/dist/esm/dnd/droptarget.js.map +1 -1
- package/dist/esm/dnd/groupDragHandler.d.ts +1 -0
- package/dist/esm/dnd/groupDragHandler.d.ts.map +1 -1
- package/dist/esm/dnd/groupDragHandler.js +18 -0
- package/dist/esm/dnd/groupDragHandler.js.map +1 -1
- package/dist/esm/dnd/overlay.d.ts +40 -0
- package/dist/esm/dnd/overlay.d.ts.map +1 -0
- package/dist/esm/dnd/overlay.js +282 -0
- package/dist/esm/dnd/overlay.js.map +1 -0
- package/dist/esm/dockview/components/tab/tab.d.ts +2 -2
- package/dist/esm/dockview/components/tab/tab.d.ts.map +1 -1
- package/dist/esm/dockview/components/tab/tab.js +0 -7
- package/dist/esm/dockview/components/tab/tab.js.map +1 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +8 -4
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts.map +1 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +54 -10
- package/dist/esm/dockview/components/titlebar/tabsContainer.js.map +1 -1
- package/dist/esm/dockview/deserializer.d.ts +2 -2
- package/dist/esm/dockview/deserializer.d.ts.map +1 -1
- package/dist/esm/dockview/deserializer.js.map +1 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +41 -9
- package/dist/esm/dockview/dockviewComponent.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewComponent.js +223 -54
- package/dist/esm/dockview/dockviewComponent.js.map +1 -1
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +24 -0
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts.map +1 -0
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +13 -0
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js.map +1 -0
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +5 -6
- package/dist/esm/dockview/dockviewGroupPanel.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewGroupPanel.js +3 -2
- package/dist/esm/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +5 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.js +36 -9
- package/dist/esm/dockview/dockviewGroupPanelModel.js.map +1 -1
- package/dist/esm/dockview/dockviewPanel.d.ts +2 -2
- package/dist/esm/dockview/dockviewPanel.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewPanel.js +1 -1
- package/dist/esm/dockview/dockviewPanel.js.map +1 -1
- package/dist/esm/dockview/options.d.ts +22 -6
- package/dist/esm/dockview/options.d.ts.map +1 -1
- package/dist/esm/dockview/options.js.map +1 -1
- package/dist/esm/dom.d.ts +5 -3
- package/dist/esm/dom.d.ts.map +1 -1
- package/dist/esm/dom.js +10 -0
- package/dist/esm/dom.js.map +1 -1
- package/dist/esm/events.d.ts.map +1 -1
- package/dist/esm/gridview/branchNode.js +2 -2
- package/dist/esm/gridview/branchNode.js.map +1 -1
- package/dist/esm/gridview/gridview.d.ts.map +1 -1
- package/dist/esm/gridview/gridview.js +9 -6
- package/dist/esm/gridview/gridview.js.map +1 -1
- package/dist/esm/gridview/gridviewComponent.d.ts.map +1 -1
- package/dist/esm/gridview/gridviewComponent.js +4 -1
- package/dist/esm/gridview/gridviewComponent.js.map +1 -1
- package/dist/esm/gridview/gridviewPanel.d.ts +3 -3
- package/dist/esm/gridview/gridviewPanel.d.ts.map +1 -1
- package/dist/esm/gridview/gridviewPanel.js +2 -2
- package/dist/esm/gridview/gridviewPanel.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/math.d.ts.map +1 -1
- package/dist/esm/math.js.map +1 -1
- package/dist/esm/paneview/paneviewComponent.d.ts.map +1 -1
- package/dist/esm/paneview/paneviewComponent.js +4 -1
- package/dist/esm/paneview/paneviewComponent.js.map +1 -1
- package/dist/esm/splitview/splitviewComponent.d.ts.map +1 -1
- package/dist/esm/splitview/splitviewComponent.js +4 -1
- package/dist/esm/splitview/splitviewComponent.js.map +1 -1
- package/dist/styles/dockview.css +216 -1
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.8.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -31,7 +31,7 @@ function styleInject(css, ref) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
var css_248z = ".dockview-svg {\n display: inline-block;\n fill: currentcolor;\n line-height: 1;\n stroke: currentcolor;\n stroke-width: 0;\n}\n.dockview-theme-dark {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-tabs-and-actions-container-background-color: #2d2d30;\n --dv-tabs-and-actions-container-height: 20px;\n --dv-tabs-and-actions-container-font-size: 11px;\n --dv-activegroup-visiblepanel-tab-background-color: #007acc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #3f3f46;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: white;\n --dv-inactivegroup-visiblepanel-tab-color: white;\n --dv-inactivegroup-hiddenpanel-tab-color: white;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-activegroup-hiddenpanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n}\n\n.dockview-theme-abyss {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: #000c18;\n --dv-tabs-and-actions-container-background-color: #1c1c2a;\n --dv-activegroup-visiblepanel-tab-background-color: #000c18;\n --dv-activegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #000c18;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-tab-divider-color: #2b2b4a;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.25);\n --dv-separator-border: #2b2b4a;\n --dv-paneview-header-border-color: #2b2b4a;\n --dv-paneview-active-outline-color: #596f99;\n}\n\n.dockview-theme-dracula {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: #282a36;\n --dv-tabs-and-actions-container-background-color: #191a21;\n --dv-activegroup-visiblepanel-tab-background-color: #282a36;\n --dv-activegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #282a36;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-tab-divider-color: #191a21;\n --dv-activegroup-visiblepanel-tab-color: rgb(248, 248, 242);\n --dv-activegroup-hiddenpanel-tab-color: rgb(98, 114, 164);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(248, 248, 242, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(98, 114, 164, 0.5);\n --dv-separator-border: #bd93f9;\n --dv-paneview-header-border-color: #bd93f9;\n --dv-paneview-active-outline-color: #6272a4;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n top: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #94527e;\n z-index: 999;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n bottom: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #5e3d5a;\n z-index: 999;\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition: top 70ms ease-out, left 70ms ease-out, width 70ms ease-out, height 70ms ease-out, opacity 0.15s ease-out;\n will-change: transform;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.dv-dockview {\n position: relative;\n background-color: var(--dv-group-view-background-color);\n}\n.dv-dockview .dv-watermark-container {\n position: absolute;\n top: 0px;\n left: 0px;\n height: 100%;\n width: 100%;\n}\n\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);\n color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n\n/**\n * when a tab is dragged we lose the above stylings because they are conditional on parent elements\n * therefore we also set some stylings for the dragging event\n **/\n.tab.dv-tab-dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--dv-group-view-background-color);\n overflow: hidden;\n}\n.groupview:focus {\n outline: none;\n}\n.groupview.empty > .tabs-and-actions-container {\n display: none;\n}\n.groupview > .content-container {\n flex-grow: 1;\n overflow: hidden;\n outline: none;\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\n}\n.pane-container {\n height: 100%;\n width: 100%;\n}\n.pane-container.animated .view {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.pane-container .view {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n padding: 0px !important;\n}\n.pane-container .view:not(:first-child)::before {\n background-color: transparent !important;\n}\n.pane-container .view:not(:first-child) .pane > .pane-header {\n border-top: 1px solid var(--dv-paneview-header-border-color);\n}\n.pane-container .view .default-header {\n background-color: var(--dv-group-view-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n display: flex;\n padding: 0px 8px;\n cursor: pointer;\n}\n.pane-container .view .default-header .dockview-pane-header-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.pane-container .view .default-header > span {\n padding-left: 8px;\n flex-grow: 1;\n}\n.pane-container:first-of-type > .pane > .pane-header {\n border-top: none !important;\n}\n.pane-container .pane {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n}\n.pane-container .pane .pane-header {\n box-sizing: border-box;\n user-select: none;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-header.pane-draggable {\n cursor: pointer;\n}\n.pane-container .pane .pane-header:focus:before, .pane-container .pane .pane-header:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.pane-container .pane .pane-body {\n overflow-y: auto;\n overflow-x: hidden;\n flex-grow: 1;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-body:focus:before, .pane-container .pane .pane-body:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.split-view-container {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n}\n.split-view-container.animation .view,\n.split-view-container.animation .sash {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.split-view-container.horizontal {\n height: 100%;\n}\n.split-view-container.horizontal > .sash-container > .sash {\n height: 100%;\n width: 4px;\n}\n.split-view-container.horizontal > .sash-container > .sash.enabled {\n cursor: ew-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.horizontal > .sash-container > .sash.maximum {\n cursor: w-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.minimum {\n cursor: e-resize;\n}\n.split-view-container.horizontal > .view-container > .view:not(:first-child)::before {\n height: 100%;\n width: 1px;\n}\n.split-view-container.vertical {\n width: 100%;\n}\n.split-view-container.vertical > .sash-container > .sash {\n width: 100%;\n height: 4px;\n}\n.split-view-container.vertical > .sash-container > .sash.enabled {\n cursor: ns-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.vertical > .sash-container > .sash.maximum {\n cursor: n-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.minimum {\n cursor: s-resize;\n}\n.split-view-container.vertical > .view-container > .view {\n width: 100%;\n}\n.split-view-container.vertical > .view-container > .view:not(:first-child)::before {\n height: 1px;\n width: 100%;\n}\n.split-view-container .sash-container {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n.split-view-container .sash-container .sash {\n position: absolute;\n z-index: 99;\n outline: none;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n touch-action: none;\n}\n.split-view-container .sash-container .sash:active {\n transition: background-color 0.1s ease-in-out;\n background-color: var(--dv-active-sash-color, transparent);\n}\n.split-view-container .sash-container .sash:hover {\n background-color: var(--dv-active-sash-color, transparent);\n transition: background-color 0.1s ease-in-out;\n transition-delay: 0.5s;\n}\n.split-view-container .view-container {\n position: relative;\n height: 100%;\n width: 100%;\n background-color: var(--dv-background-color);\n}\n.split-view-container .view-container .view {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n position: absolute;\n}\n.split-view-container.separator-border .view:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-separator-border);\n}\n.dv-dragged {\n transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */\n}\n\n.tab {\n flex-shrink: 0;\n}\n.tab.dv-tab-dragging .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.tab.active-tab > .default-tab .tab-action {\n visibility: visible;\n}\n.tab.inactive-tab > .default-tab .tab-action {\n visibility: hidden;\n}\n.tab.inactive-tab > .default-tab:hover .tab-action {\n visibility: visible;\n}\n.tab .default-tab {\n position: relative;\n height: 100%;\n display: flex;\n min-width: 80px;\n align-items: center;\n padding: 0px 8px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n display: flex;\n}\n.tab .default-tab .action-container .tab-list {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .default-tab .action-container .tab-list .tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.tabs-and-actions-container {\n display: flex;\n background-color: var(--dv-tabs-and-actions-container-background-color);\n flex-shrink: 0;\n box-sizing: border-box;\n height: var(--dv-tabs-and-actions-container-height);\n font-size: var(--dv-tabs-and-actions-container-font-size);\n}\n.tabs-and-actions-container.hidden {\n display: none;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container .tab {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .void-container {\n flex-grow: 0;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n cursor: grab;\n}\n.tabs-and-actions-container .tabs-container {\n display: flex;\n overflow-x: overlay;\n overflow-y: hidden;\n scrollbar-width: thin;\n /* Track */\n /* Handle */\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar {\n height: 3px;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-thumb {\n background: var(--dv-tabs-container-scrollbar-color);\n}\n.tabs-and-actions-container .tabs-container .tab {\n -webkit-user-drag: element;\n outline: none;\n min-width: 75px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n}\n.tabs-and-actions-container .tabs-container .tab:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-tab-divider-color);\n width: 1px;\n height: 100%;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-container {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}\n.watermark .actions-container {\n display: flex;\n align-items: center;\n padding: 0px 8px;\n}\n.watermark .actions-container .close-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.watermark .actions-container .close-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}";
|
|
34
|
+
var css_248z = ".dockview-svg {\n display: inline-block;\n fill: currentcolor;\n line-height: 1;\n stroke: currentcolor;\n stroke-width: 0;\n}\n.dockview-theme-dark {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-tabs-and-actions-container-background-color: #2d2d30;\n --dv-tabs-and-actions-container-height: 20px;\n --dv-tabs-and-actions-container-font-size: 11px;\n --dv-activegroup-visiblepanel-tab-background-color: #007acc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #3f3f46;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: white;\n --dv-inactivegroup-visiblepanel-tab-color: white;\n --dv-inactivegroup-hiddenpanel-tab-color: white;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-activegroup-hiddenpanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n}\n\n.dockview-theme-abyss {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #000c18;\n --dv-tabs-and-actions-container-background-color: #1c1c2a;\n --dv-activegroup-visiblepanel-tab-background-color: #000c18;\n --dv-activegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #000c18;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-tab-divider-color: #2b2b4a;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.25);\n --dv-separator-border: #2b2b4a;\n --dv-paneview-header-border-color: #2b2b4a;\n --dv-paneview-active-outline-color: #596f99;\n}\n\n.dockview-theme-dracula {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #282a36;\n --dv-tabs-and-actions-container-background-color: #191a21;\n --dv-activegroup-visiblepanel-tab-background-color: #282a36;\n --dv-activegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #282a36;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-tab-divider-color: #191a21;\n --dv-activegroup-visiblepanel-tab-color: rgb(248, 248, 242);\n --dv-activegroup-hiddenpanel-tab-color: rgb(98, 114, 164);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(248, 248, 242, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(98, 114, 164, 0.5);\n --dv-separator-border: #bd93f9;\n --dv-paneview-header-border-color: #bd93f9;\n --dv-paneview-active-outline-color: #6272a4;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n top: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #94527e;\n z-index: 999;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n bottom: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #5e3d5a;\n z-index: 999;\n}\n\n.dockview-theme-replit {\n --dv-background-color: black;\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-floating-box-shadow: 8px 8px 8px 0px rgba(83, 89, 93, 0.5);\n --dv-group-view-background-color: #ebeced;\n --dv-tabs-and-actions-container-background-color: #fcfcfc;\n --dv-activegroup-visiblepanel-tab-background-color: #f0f1f2;\n --dv-activegroup-hiddenpanel-tab-background-color: ##fcfcfc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #f0f1f2;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #fcfcfc;\n --dv-tab-divider-color: transparent;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgb(51, 51, 51);\n --dv-inactivegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-inactivegroup-hiddenpanel-tab-color: rgb(51, 51, 51);\n --dv-separator-border: transparent;\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n --dv-background-color: #ebeced;\n --dv-separator-handle-background-color: #cfd1d3;\n --dv-separator-handle-hover-background-color: #babbbb;\n}\n.dockview-theme-replit.dv-dockview {\n padding: 3px;\n}\n.dockview-theme-replit .view:has(> .groupview) {\n padding: 3px;\n}\n.dockview-theme-replit .dv-resize-container:has(> .groupview) {\n border-radius: 8px;\n}\n.dockview-theme-replit .groupview {\n overflow: hidden;\n border-radius: 10px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container {\n border-bottom: 1px solid rgba(128, 128, 128, 0.35);\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab {\n margin: 4px;\n border-radius: 8px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab .dockview-svg {\n height: 8px;\n width: 8px;\n}\n.dockview-theme-replit .groupview .tabs-and-actions-container .tab:hover {\n background-color: #e4e5e6 !important;\n}\n.dockview-theme-replit .groupview .content-container {\n background-color: #fcfcfc;\n}\n.dockview-theme-replit .groupview.active-group {\n border: 1px solid rgba(128, 128, 128, 0.35);\n}\n.dockview-theme-replit .groupview.inactive-group {\n border: 1px solid transparent;\n}\n.dockview-theme-replit .vertical > .sash-container > .sash::after {\n content: \"\";\n height: 4px;\n width: 40px;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--dv-separator-handle-background-color);\n position: absolute;\n}\n.dockview-theme-replit .vertical > .sash-container > .sash:hover::after {\n background-color: var(--dv-separator-handle-hover-background-color);\n}\n.dockview-theme-replit .horizontal > .sash-container > .sash::after {\n content: \"\";\n height: 40px;\n width: 4px;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--dv-separator-handle-background-color);\n position: absolute;\n}\n.dockview-theme-replit .horizontal > .sash-container > .sash:hover::after {\n background-color: var(--dv-separator-handle-hover-background-color);\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 1000;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition: top 70ms ease-out, left 70ms ease-out, width 70ms ease-out, height 70ms ease-out, opacity 0.15s ease-out;\n will-change: transform;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.dv-debug .dv-resize-container .dv-resize-handle-top {\n background-color: red;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-bottom {\n background-color: green;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-left {\n background-color: yellow;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-right {\n background-color: blue;\n}\n.dv-debug .dv-resize-container .dv-resize-handle-topleft,\n.dv-debug .dv-resize-container .dv-resize-handle-topright,\n.dv-debug .dv-resize-container .dv-resize-handle-bottomleft,\n.dv-debug .dv-resize-container .dv-resize-handle-bottomright {\n background-color: cyan;\n}\n\n.dv-resize-container {\n position: absolute;\n z-index: 997;\n border: 1px solid var(--dv-tab-divider-color);\n box-shadow: var(--dv-floating-box-shadow);\n}\n.dv-resize-container.dv-bring-to-front {\n z-index: 998;\n}\n.dv-resize-container.dv-resize-container-dragging {\n opacity: 0.5;\n}\n.dv-resize-container .dv-resize-handle-top {\n height: 4px;\n width: calc(100% - 8px);\n left: 4px;\n top: -2px;\n z-index: 999;\n position: absolute;\n cursor: ns-resize;\n}\n.dv-resize-container .dv-resize-handle-bottom {\n height: 4px;\n width: calc(100% - 8px);\n left: 4px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: ns-resize;\n}\n.dv-resize-container .dv-resize-handle-left {\n height: calc(100% - 8px);\n width: 4px;\n left: -2px;\n top: 4px;\n z-index: 999;\n position: absolute;\n cursor: ew-resize;\n}\n.dv-resize-container .dv-resize-handle-right {\n height: calc(100% - 8px);\n width: 4px;\n right: -2px;\n top: 4px;\n z-index: 999;\n position: absolute;\n cursor: ew-resize;\n}\n.dv-resize-container .dv-resize-handle-topleft {\n height: 4px;\n width: 4px;\n top: -2px;\n left: -2px;\n z-index: 999;\n position: absolute;\n cursor: nw-resize;\n}\n.dv-resize-container .dv-resize-handle-topright {\n height: 4px;\n width: 4px;\n right: -2px;\n top: -2px;\n z-index: 999;\n position: absolute;\n cursor: ne-resize;\n}\n.dv-resize-container .dv-resize-handle-bottomleft {\n height: 4px;\n width: 4px;\n left: -2px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: sw-resize;\n}\n.dv-resize-container .dv-resize-handle-bottomright {\n height: 4px;\n width: 4px;\n right: -2px;\n bottom: -2px;\n z-index: 999;\n position: absolute;\n cursor: se-resize;\n}\n.dv-dockview {\n position: relative;\n background-color: var(--dv-group-view-background-color);\n}\n.dv-dockview .dv-watermark-container {\n position: absolute;\n top: 0px;\n left: 0px;\n height: 100%;\n width: 100%;\n z-index: 1;\n}\n\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);\n color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n\n/**\n * when a tab is dragged we lose the above stylings because they are conditional on parent elements\n * therefore we also set some stylings for the dragging event\n **/\n.tab.dv-tab-dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--dv-group-view-background-color);\n overflow: hidden;\n}\n.groupview:focus {\n outline: none;\n}\n.groupview.empty > .tabs-and-actions-container {\n display: none;\n}\n.groupview > .content-container {\n flex-grow: 1;\n overflow: hidden;\n outline: none;\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\n}\n.pane-container {\n height: 100%;\n width: 100%;\n}\n.pane-container.animated .view {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.pane-container .view {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n padding: 0px !important;\n}\n.pane-container .view:not(:first-child)::before {\n background-color: transparent !important;\n}\n.pane-container .view:not(:first-child) .pane > .pane-header {\n border-top: 1px solid var(--dv-paneview-header-border-color);\n}\n.pane-container .view .default-header {\n background-color: var(--dv-group-view-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n display: flex;\n padding: 0px 8px;\n cursor: pointer;\n}\n.pane-container .view .default-header .dockview-pane-header-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.pane-container .view .default-header > span {\n padding-left: 8px;\n flex-grow: 1;\n}\n.pane-container:first-of-type > .pane > .pane-header {\n border-top: none !important;\n}\n.pane-container .pane {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n}\n.pane-container .pane .pane-header {\n box-sizing: border-box;\n user-select: none;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-header.pane-draggable {\n cursor: pointer;\n}\n.pane-container .pane .pane-header:focus:before, .pane-container .pane .pane-header:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.pane-container .pane .pane-body {\n overflow-y: auto;\n overflow-x: hidden;\n flex-grow: 1;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-body:focus:before, .pane-container .pane .pane-body:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.dv-debug .split-view-container .sash-container .sash.enabled {\n background-color: black;\n}\n.dv-debug .split-view-container .sash-container .sash.disabled {\n background-color: orange;\n}\n.dv-debug .split-view-container .sash-container .sash.maximum {\n background-color: green;\n}\n.dv-debug .split-view-container .sash-container .sash.minimum {\n background-color: red;\n}\n\n.split-view-container {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n}\n.split-view-container.animation .view,\n.split-view-container.animation .sash {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.split-view-container.horizontal {\n height: 100%;\n}\n.split-view-container.horizontal > .sash-container > .sash {\n height: 100%;\n width: 4px;\n}\n.split-view-container.horizontal > .sash-container > .sash.enabled {\n cursor: ew-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.horizontal > .sash-container > .sash.maximum {\n cursor: w-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.minimum {\n cursor: e-resize;\n}\n.split-view-container.horizontal > .view-container > .view:not(:first-child)::before {\n height: 100%;\n width: 1px;\n}\n.split-view-container.vertical {\n width: 100%;\n}\n.split-view-container.vertical > .sash-container > .sash {\n width: 100%;\n height: 4px;\n}\n.split-view-container.vertical > .sash-container > .sash.enabled {\n cursor: ns-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.vertical > .sash-container > .sash.maximum {\n cursor: n-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.minimum {\n cursor: s-resize;\n}\n.split-view-container.vertical > .view-container > .view {\n width: 100%;\n}\n.split-view-container.vertical > .view-container > .view:not(:first-child)::before {\n height: 1px;\n width: 100%;\n}\n.split-view-container .sash-container {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n.split-view-container .sash-container .sash {\n position: absolute;\n z-index: 99;\n outline: none;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n touch-action: none;\n}\n.split-view-container .sash-container .sash:active {\n transition: background-color 0.1s ease-in-out;\n background-color: var(--dv-active-sash-color, transparent);\n}\n.split-view-container .sash-container .sash:hover {\n background-color: var(--dv-active-sash-color, transparent);\n transition: background-color 0.1s ease-in-out;\n transition-delay: 0.5s;\n}\n.split-view-container .view-container {\n position: relative;\n height: 100%;\n width: 100%;\n background-color: var(--dv-background-color);\n}\n.split-view-container .view-container .view {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n position: absolute;\n}\n.split-view-container.separator-border .view:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-separator-border);\n}\n.dv-dragged {\n transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */\n}\n\n.tab {\n flex-shrink: 0;\n}\n.tab.dv-tab-dragging .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.tab.active-tab > .default-tab .tab-action {\n visibility: visible;\n}\n.tab.inactive-tab > .default-tab .tab-action {\n visibility: hidden;\n}\n.tab.inactive-tab > .default-tab:hover .tab-action {\n visibility: visible;\n}\n.tab .default-tab {\n position: relative;\n height: 100%;\n display: flex;\n min-width: 80px;\n align-items: center;\n padding: 0px 8px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n display: flex;\n}\n.tab .default-tab .action-container .tab-list {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .default-tab .action-container .tab-list .tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.tabs-and-actions-container {\n display: flex;\n background-color: var(--dv-tabs-and-actions-container-background-color);\n flex-shrink: 0;\n box-sizing: border-box;\n height: var(--dv-tabs-and-actions-container-height);\n font-size: var(--dv-tabs-and-actions-container-font-size);\n}\n.tabs-and-actions-container.hidden {\n display: none;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container .tab {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .void-container {\n flex-grow: 0;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n cursor: grab;\n}\n.tabs-and-actions-container .tabs-container {\n display: flex;\n overflow-x: overlay;\n overflow-y: hidden;\n scrollbar-width: thin;\n /* Track */\n /* Handle */\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar {\n height: 3px;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-thumb {\n background: var(--dv-tabs-container-scrollbar-color);\n}\n.tabs-and-actions-container .tabs-container .tab {\n -webkit-user-drag: element;\n outline: none;\n min-width: 75px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n}\n.tabs-and-actions-container .tabs-container .tab:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-tab-divider-color);\n width: 1px;\n height: 100%;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-container {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}\n.watermark .actions-container {\n display: flex;\n align-items: center;\n padding: 0px 8px;\n}\n.watermark .actions-container .close-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.watermark .actions-container .close-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}";
|
|
35
35
|
styleInject(css_248z);
|
|
36
36
|
|
|
37
37
|
class TransferObject {
|
|
@@ -301,6 +301,31 @@ class MutableDisposable {
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
+
function createComponent(id, componentName, components = {}, frameworkComponents = {}, createFrameworkComponent, fallback) {
|
|
305
|
+
const Component = typeof componentName === 'string'
|
|
306
|
+
? components[componentName]
|
|
307
|
+
: undefined;
|
|
308
|
+
const FrameworkComponent = typeof componentName === 'string'
|
|
309
|
+
? frameworkComponents[componentName]
|
|
310
|
+
: undefined;
|
|
311
|
+
if (Component && FrameworkComponent) {
|
|
312
|
+
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
313
|
+
}
|
|
314
|
+
if (FrameworkComponent) {
|
|
315
|
+
if (!createFrameworkComponent) {
|
|
316
|
+
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
317
|
+
}
|
|
318
|
+
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
319
|
+
}
|
|
320
|
+
if (!Component) {
|
|
321
|
+
if (fallback) {
|
|
322
|
+
return fallback();
|
|
323
|
+
}
|
|
324
|
+
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
325
|
+
}
|
|
326
|
+
return new Component(id, componentName);
|
|
327
|
+
}
|
|
328
|
+
|
|
304
329
|
function watchElementResize(element, cb) {
|
|
305
330
|
const observer = new ResizeObserver((entires) => {
|
|
306
331
|
/**
|
|
@@ -414,31 +439,16 @@ class FocusTracker extends CompositeDisposable {
|
|
|
414
439
|
refreshState() {
|
|
415
440
|
this._refreshStateHandler();
|
|
416
441
|
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
428
|
-
}
|
|
429
|
-
if (FrameworkComponent) {
|
|
430
|
-
if (!createFrameworkComponent) {
|
|
431
|
-
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
432
|
-
}
|
|
433
|
-
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
434
|
-
}
|
|
435
|
-
if (!Component) {
|
|
436
|
-
if (fallback) {
|
|
437
|
-
return fallback();
|
|
438
|
-
}
|
|
439
|
-
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
440
|
-
}
|
|
441
|
-
return new Component(id, componentName);
|
|
442
|
+
}
|
|
443
|
+
// quasi: apparently, but not really; seemingly
|
|
444
|
+
const QUASI_PREVENT_DEFAULT_KEY = 'dv-quasiPreventDefault';
|
|
445
|
+
// mark an event directly for other listeners to check
|
|
446
|
+
function quasiPreventDefault(event) {
|
|
447
|
+
event[QUASI_PREVENT_DEFAULT_KEY] = true;
|
|
448
|
+
}
|
|
449
|
+
// check if this event has been marked
|
|
450
|
+
function quasiDefaultPrevented(event) {
|
|
451
|
+
return event[QUASI_PREVENT_DEFAULT_KEY];
|
|
442
452
|
}
|
|
443
453
|
|
|
444
454
|
function tail(arr) {
|
|
@@ -489,6 +499,14 @@ function firstIndex(array, fn) {
|
|
|
489
499
|
}
|
|
490
500
|
}
|
|
491
501
|
return -1;
|
|
502
|
+
}
|
|
503
|
+
function remove(array, value) {
|
|
504
|
+
const index = array.findIndex((t) => t === value);
|
|
505
|
+
if (index > -1) {
|
|
506
|
+
array.splice(index, 1);
|
|
507
|
+
return true;
|
|
508
|
+
}
|
|
509
|
+
return false;
|
|
492
510
|
}
|
|
493
511
|
|
|
494
512
|
const clamp = (value, min, max) => {
|
|
@@ -1631,7 +1649,7 @@ class BranchNode extends CompositeDisposable {
|
|
|
1631
1649
|
: true,
|
|
1632
1650
|
};
|
|
1633
1651
|
}),
|
|
1634
|
-
size: this.
|
|
1652
|
+
size: this.orthogonalSize,
|
|
1635
1653
|
};
|
|
1636
1654
|
this.children = childDescriptors.map((c) => c.node);
|
|
1637
1655
|
this.splitview = new Splitview(this.element, {
|
|
@@ -1694,7 +1712,7 @@ class BranchNode extends CompositeDisposable {
|
|
|
1694
1712
|
layout(size, orthogonalSize) {
|
|
1695
1713
|
this._size = orthogonalSize;
|
|
1696
1714
|
this._orthogonalSize = size;
|
|
1697
|
-
this.splitview.layout(
|
|
1715
|
+
this.splitview.layout(orthogonalSize, size);
|
|
1698
1716
|
}
|
|
1699
1717
|
addChild(node, size, index, skipLayout) {
|
|
1700
1718
|
if (index < 0 || index > this.children.length) {
|
|
@@ -1919,9 +1937,9 @@ class Gridview {
|
|
|
1919
1937
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
1920
1938
|
}
|
|
1921
1939
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
1922
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize
|
|
1940
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
1923
1941
|
}
|
|
1924
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize
|
|
1942
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
1925
1943
|
let result;
|
|
1926
1944
|
if (node.type === 'branch') {
|
|
1927
1945
|
const serializedChildren = node.data;
|
|
@@ -1931,9 +1949,9 @@ class Gridview {
|
|
|
1931
1949
|
visible: serializedChild.visible,
|
|
1932
1950
|
};
|
|
1933
1951
|
});
|
|
1934
|
-
//
|
|
1935
|
-
//
|
|
1936
|
-
|
|
1952
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, node.size, // <- orthogonal size - flips at each depth
|
|
1953
|
+
orthogonalSize, // <- size - flips at each depth
|
|
1954
|
+
children);
|
|
1937
1955
|
}
|
|
1938
1956
|
else {
|
|
1939
1957
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -1966,7 +1984,8 @@ class Gridview {
|
|
|
1966
1984
|
const oldRoot = this.root;
|
|
1967
1985
|
oldRoot.element.remove();
|
|
1968
1986
|
this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
|
|
1969
|
-
if (oldRoot.children.length ===
|
|
1987
|
+
if (oldRoot.children.length === 0) ;
|
|
1988
|
+
else if (oldRoot.children.length === 1) {
|
|
1970
1989
|
// can remove one level of redundant branching if there is only a single child
|
|
1971
1990
|
const childReference = oldRoot.children[0];
|
|
1972
1991
|
const child = oldRoot.removeChild(0); // remove to prevent disposal when disposing of unwanted root
|
|
@@ -2482,6 +2501,9 @@ class DockviewApi {
|
|
|
2482
2501
|
addPanel(options) {
|
|
2483
2502
|
return this.component.addPanel(options);
|
|
2484
2503
|
}
|
|
2504
|
+
removePanel(panel) {
|
|
2505
|
+
this.component.removePanel(panel);
|
|
2506
|
+
}
|
|
2485
2507
|
addGroup(options) {
|
|
2486
2508
|
return this.component.addGroup(options);
|
|
2487
2509
|
}
|
|
@@ -2500,6 +2522,9 @@ class DockviewApi {
|
|
|
2500
2522
|
getGroup(id) {
|
|
2501
2523
|
return this.component.getPanel(id);
|
|
2502
2524
|
}
|
|
2525
|
+
addFloatingGroup(item, coord) {
|
|
2526
|
+
return this.component.addFloatingGroup(item, coord);
|
|
2527
|
+
}
|
|
2503
2528
|
fromJSON(data) {
|
|
2504
2529
|
this.component.fromJSON(data);
|
|
2505
2530
|
}
|
|
@@ -2592,10 +2617,14 @@ class Droptarget extends CompositeDisposable {
|
|
|
2592
2617
|
this._onDrop = new Emitter();
|
|
2593
2618
|
this.onDrop = this._onDrop.event;
|
|
2594
2619
|
// use a set to take advantage of #<set>.has
|
|
2595
|
-
|
|
2620
|
+
this._acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
|
|
2596
2621
|
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
2597
2622
|
onDragEnter: () => undefined,
|
|
2598
2623
|
onDragOver: (e) => {
|
|
2624
|
+
if (this._acceptedTargetZonesSet.size === 0) {
|
|
2625
|
+
this.removeDropTarget();
|
|
2626
|
+
return;
|
|
2627
|
+
}
|
|
2599
2628
|
const width = this.element.clientWidth;
|
|
2600
2629
|
const height = this.element.clientHeight;
|
|
2601
2630
|
if (width === 0 || height === 0) {
|
|
@@ -2604,20 +2633,28 @@ class Droptarget extends CompositeDisposable {
|
|
|
2604
2633
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
2605
2634
|
const x = e.clientX - rect.left;
|
|
2606
2635
|
const y = e.clientY - rect.top;
|
|
2607
|
-
const quadrant = this.calculateQuadrant(
|
|
2608
|
-
|
|
2636
|
+
const quadrant = this.calculateQuadrant(this._acceptedTargetZonesSet, x, y, width, height);
|
|
2637
|
+
/**
|
|
2638
|
+
* If the event has already been used by another DropTarget instance
|
|
2639
|
+
* then don't show a second drop target, only one target should be
|
|
2640
|
+
* active at any one time
|
|
2641
|
+
*/
|
|
2642
|
+
if (this.isAlreadyUsed(e) || quadrant === null) {
|
|
2609
2643
|
// no drop target should be displayed
|
|
2610
2644
|
this.removeDropTarget();
|
|
2611
2645
|
return;
|
|
2612
2646
|
}
|
|
2613
2647
|
if (typeof this.options.canDisplayOverlay === 'boolean') {
|
|
2614
2648
|
if (!this.options.canDisplayOverlay) {
|
|
2649
|
+
this.removeDropTarget();
|
|
2615
2650
|
return;
|
|
2616
2651
|
}
|
|
2617
2652
|
}
|
|
2618
2653
|
else if (!this.options.canDisplayOverlay(e, quadrant)) {
|
|
2654
|
+
this.removeDropTarget();
|
|
2619
2655
|
return;
|
|
2620
2656
|
}
|
|
2657
|
+
this.markAsUsed(e);
|
|
2621
2658
|
if (!this.targetElement) {
|
|
2622
2659
|
this.targetElement = document.createElement('div');
|
|
2623
2660
|
this.targetElement.className = 'drop-target-dropzone';
|
|
@@ -2628,12 +2665,6 @@ class Droptarget extends CompositeDisposable {
|
|
|
2628
2665
|
this.element.classList.add('drop-target');
|
|
2629
2666
|
this.element.append(this.targetElement);
|
|
2630
2667
|
}
|
|
2631
|
-
if (this.options.acceptedTargetZones.length === 0) {
|
|
2632
|
-
return;
|
|
2633
|
-
}
|
|
2634
|
-
if (!this.targetElement || !this.overlayElement) {
|
|
2635
|
-
return;
|
|
2636
|
-
}
|
|
2637
2668
|
this.toggleClasses(quadrant, width, height);
|
|
2638
2669
|
this.setState(quadrant);
|
|
2639
2670
|
},
|
|
@@ -2656,10 +2687,26 @@ class Droptarget extends CompositeDisposable {
|
|
|
2656
2687
|
},
|
|
2657
2688
|
}));
|
|
2658
2689
|
}
|
|
2690
|
+
setTargetZones(acceptedTargetZones) {
|
|
2691
|
+
this._acceptedTargetZonesSet = new Set(acceptedTargetZones);
|
|
2692
|
+
}
|
|
2659
2693
|
dispose() {
|
|
2660
2694
|
this.removeDropTarget();
|
|
2661
2695
|
super.dispose();
|
|
2662
2696
|
}
|
|
2697
|
+
/**
|
|
2698
|
+
* Add a property to the event object for other potential listeners to check
|
|
2699
|
+
*/
|
|
2700
|
+
markAsUsed(event) {
|
|
2701
|
+
event[Droptarget.USED_EVENT_ID] = true;
|
|
2702
|
+
}
|
|
2703
|
+
/**
|
|
2704
|
+
* Check is the event has already been used by another instance od DropTarget
|
|
2705
|
+
*/
|
|
2706
|
+
isAlreadyUsed(event) {
|
|
2707
|
+
const value = event[Droptarget.USED_EVENT_ID];
|
|
2708
|
+
return typeof value === 'boolean' && value;
|
|
2709
|
+
}
|
|
2663
2710
|
toggleClasses(quadrant, width, height) {
|
|
2664
2711
|
var _a, _b, _c, _d;
|
|
2665
2712
|
if (!this.overlayElement) {
|
|
@@ -2754,6 +2801,7 @@ class Droptarget extends CompositeDisposable {
|
|
|
2754
2801
|
}
|
|
2755
2802
|
}
|
|
2756
2803
|
}
|
|
2804
|
+
Droptarget.USED_EVENT_ID = '__dockview_droptarget_event_is_used__';
|
|
2757
2805
|
function calculateQuadrantAsPercentage(overlayType, x, y, width, height, threshold) {
|
|
2758
2806
|
const xp = (100 * x) / width;
|
|
2759
2807
|
const yp = (100 * y) / height;
|
|
@@ -2883,8 +2931,15 @@ class DragHandler extends CompositeDisposable {
|
|
|
2883
2931
|
this.addDisposables(this._onDragStart, this.dataDisposable, this.pointerEventsDisposable);
|
|
2884
2932
|
this.configure();
|
|
2885
2933
|
}
|
|
2934
|
+
isCancelled(_event) {
|
|
2935
|
+
return false;
|
|
2936
|
+
}
|
|
2886
2937
|
configure() {
|
|
2887
2938
|
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2939
|
+
if (this.isCancelled(event)) {
|
|
2940
|
+
event.preventDefault();
|
|
2941
|
+
return;
|
|
2942
|
+
}
|
|
2888
2943
|
const iframes = [
|
|
2889
2944
|
...getElementsByTagName('iframe'),
|
|
2890
2945
|
...getElementsByTagName('webview'),
|
|
@@ -2958,13 +3013,6 @@ class Tab extends CompositeDisposable {
|
|
|
2958
3013
|
if (event.defaultPrevented) {
|
|
2959
3014
|
return;
|
|
2960
3015
|
}
|
|
2961
|
-
/**
|
|
2962
|
-
* TODO: alternative to stopPropagation
|
|
2963
|
-
*
|
|
2964
|
-
* I need to stop the event propagation here since otherwise it'll be intercepted by event handlers
|
|
2965
|
-
* on the tabs-container. I cannot use event.preventDefault() since I need the on DragStart event to occur
|
|
2966
|
-
*/
|
|
2967
|
-
event.stopPropagation();
|
|
2968
3016
|
this._onChanged.fire(event);
|
|
2969
3017
|
}));
|
|
2970
3018
|
this.droptarget = new Droptarget(this._element, {
|
|
@@ -3022,6 +3070,22 @@ class GroupDragHandler extends DragHandler {
|
|
|
3022
3070
|
this.accessorId = accessorId;
|
|
3023
3071
|
this.group = group;
|
|
3024
3072
|
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
3073
|
+
this.addDisposables(addDisposableListener(element, 'mousedown', (e) => {
|
|
3074
|
+
if (e.shiftKey) {
|
|
3075
|
+
/**
|
|
3076
|
+
* You cannot call e.preventDefault() because that will prevent drag events from firing
|
|
3077
|
+
* but we also need to stop any group overlay drag events from occuring
|
|
3078
|
+
* Use a custom event marker that can be checked by the overlay drag events
|
|
3079
|
+
*/
|
|
3080
|
+
quasiPreventDefault(e);
|
|
3081
|
+
}
|
|
3082
|
+
}, true));
|
|
3083
|
+
}
|
|
3084
|
+
isCancelled(_event) {
|
|
3085
|
+
if (this.group.api.isFloating && !_event.shiftKey) {
|
|
3086
|
+
return true;
|
|
3087
|
+
}
|
|
3088
|
+
return false;
|
|
3025
3089
|
}
|
|
3026
3090
|
getData(dataTransfer) {
|
|
3027
3091
|
this.panelTransfer.setData([new PanelTransfer(this.accessorId, this.group.id, null)], PanelTransfer.prototype);
|
|
@@ -3112,17 +3176,30 @@ class TabsContainer extends CompositeDisposable {
|
|
|
3112
3176
|
hide() {
|
|
3113
3177
|
this._element.style.display = 'none';
|
|
3114
3178
|
}
|
|
3115
|
-
|
|
3116
|
-
if (this.
|
|
3179
|
+
setRightActionsElement(element) {
|
|
3180
|
+
if (this.rightActions === element) {
|
|
3117
3181
|
return;
|
|
3118
3182
|
}
|
|
3119
|
-
if (this.
|
|
3120
|
-
this.
|
|
3121
|
-
this.
|
|
3183
|
+
if (this.rightActions) {
|
|
3184
|
+
this.rightActions.remove();
|
|
3185
|
+
this.rightActions = undefined;
|
|
3122
3186
|
}
|
|
3123
3187
|
if (element) {
|
|
3124
|
-
this.
|
|
3125
|
-
this.
|
|
3188
|
+
this.rightActionsContainer.appendChild(element);
|
|
3189
|
+
this.rightActions = element;
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
setLeftActionsElement(element) {
|
|
3193
|
+
if (this.leftActions === element) {
|
|
3194
|
+
return;
|
|
3195
|
+
}
|
|
3196
|
+
if (this.leftActions) {
|
|
3197
|
+
this.leftActions.remove();
|
|
3198
|
+
this.leftActions = undefined;
|
|
3199
|
+
}
|
|
3200
|
+
if (element) {
|
|
3201
|
+
this.leftActionsContainer.appendChild(element);
|
|
3202
|
+
this.leftActions = element;
|
|
3126
3203
|
}
|
|
3127
3204
|
}
|
|
3128
3205
|
get element() {
|
|
@@ -3157,19 +3234,35 @@ class TabsContainer extends CompositeDisposable {
|
|
|
3157
3234
|
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3158
3235
|
}
|
|
3159
3236
|
}));
|
|
3160
|
-
this.
|
|
3161
|
-
this.
|
|
3237
|
+
this.rightActionsContainer = document.createElement('div');
|
|
3238
|
+
this.rightActionsContainer.className = 'right-actions-container';
|
|
3239
|
+
this.leftActionsContainer = document.createElement('div');
|
|
3240
|
+
this.leftActionsContainer.className = 'left-actions-container';
|
|
3162
3241
|
this.tabContainer = document.createElement('div');
|
|
3163
3242
|
this.tabContainer.className = 'tabs-container';
|
|
3164
3243
|
this.voidContainer = new VoidContainer(this.accessor, this.group);
|
|
3165
3244
|
this._element.appendChild(this.tabContainer);
|
|
3245
|
+
this._element.appendChild(this.leftActionsContainer);
|
|
3166
3246
|
this._element.appendChild(this.voidContainer.element);
|
|
3167
|
-
this._element.appendChild(this.
|
|
3247
|
+
this._element.appendChild(this.rightActionsContainer);
|
|
3168
3248
|
this.addDisposables(this.voidContainer, this.voidContainer.onDrop((event) => {
|
|
3169
3249
|
this._onDrop.fire({
|
|
3170
3250
|
event: event.nativeEvent,
|
|
3171
3251
|
index: this.tabs.length,
|
|
3172
3252
|
});
|
|
3253
|
+
}), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
|
|
3254
|
+
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
3255
|
+
if (isFloatingGroupsEnabled &&
|
|
3256
|
+
event.shiftKey &&
|
|
3257
|
+
!this.group.api.isFloating) {
|
|
3258
|
+
event.preventDefault();
|
|
3259
|
+
const { top, left } = this.element.getBoundingClientRect();
|
|
3260
|
+
const { top: rootTop, left: rootLeft } = this.accessor.element.getBoundingClientRect();
|
|
3261
|
+
this.accessor.addFloatingGroup(this.group, {
|
|
3262
|
+
x: left - rootLeft + 20,
|
|
3263
|
+
y: top - rootTop + 20,
|
|
3264
|
+
}, { inDragMode: true });
|
|
3265
|
+
}
|
|
3173
3266
|
}), addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
3174
3267
|
if (event.defaultPrevented) {
|
|
3175
3268
|
return;
|
|
@@ -3223,6 +3316,21 @@ class TabsContainer extends CompositeDisposable {
|
|
|
3223
3316
|
tabToAdd.setContent(panel.view.tab);
|
|
3224
3317
|
const disposable = CompositeDisposable.from(tabToAdd.onChanged((event) => {
|
|
3225
3318
|
var _a;
|
|
3319
|
+
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
3320
|
+
const isFloatingWithOnePanel = this.group.api.isFloating && this.size === 1;
|
|
3321
|
+
if (isFloatingGroupsEnabled &&
|
|
3322
|
+
!isFloatingWithOnePanel &&
|
|
3323
|
+
event.shiftKey) {
|
|
3324
|
+
event.preventDefault();
|
|
3325
|
+
const panel = this.accessor.getGroupPanel(tabToAdd.panelId);
|
|
3326
|
+
const { top, left } = tabToAdd.element.getBoundingClientRect();
|
|
3327
|
+
const { top: rootTop, left: rootLeft } = this.accessor.element.getBoundingClientRect();
|
|
3328
|
+
this.accessor.addFloatingGroup(panel, {
|
|
3329
|
+
x: left - rootLeft,
|
|
3330
|
+
y: top - rootTop,
|
|
3331
|
+
}, { inDragMode: true });
|
|
3332
|
+
return;
|
|
3333
|
+
}
|
|
3226
3334
|
const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
3227
3335
|
this.group.model.isContentFocused;
|
|
3228
3336
|
const isLeftClick = event.button === 0;
|
|
@@ -3292,6 +3400,17 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3292
3400
|
}
|
|
3293
3401
|
return isAncestor(document.activeElement, this.contentContainer.element);
|
|
3294
3402
|
}
|
|
3403
|
+
get isFloating() {
|
|
3404
|
+
return this._isFloating;
|
|
3405
|
+
}
|
|
3406
|
+
set isFloating(value) {
|
|
3407
|
+
this._isFloating = value;
|
|
3408
|
+
this.dropTarget.setTargetZones(value ? ['center'] : ['top', 'bottom', 'left', 'right', 'center']);
|
|
3409
|
+
toggleClass(this.container, 'dv-groupview-floating', value);
|
|
3410
|
+
this.groupPanel.api._onDidFloatingStateChange.fire({
|
|
3411
|
+
isFloating: this.isFloating,
|
|
3412
|
+
});
|
|
3413
|
+
}
|
|
3295
3414
|
constructor(container, accessor, id, options, groupPanel) {
|
|
3296
3415
|
super();
|
|
3297
3416
|
this.container = container;
|
|
@@ -3301,6 +3420,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3301
3420
|
this.groupPanel = groupPanel;
|
|
3302
3421
|
this._isGroupActive = false;
|
|
3303
3422
|
this._locked = false;
|
|
3423
|
+
this._isFloating = false;
|
|
3304
3424
|
this.mostRecentlyUsed = [];
|
|
3305
3425
|
this._onDidChange = new Emitter();
|
|
3306
3426
|
this.onDidChange = this._onDidChange.event;
|
|
@@ -3317,7 +3437,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3317
3437
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
3318
3438
|
this._onDidActivePanelChange = new Emitter();
|
|
3319
3439
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
3320
|
-
this.container
|
|
3440
|
+
toggleClass(this.container, 'groupview', true);
|
|
3321
3441
|
this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
|
|
3322
3442
|
this.contentContainer = new ContentContainer();
|
|
3323
3443
|
this.dropTarget = new Droptarget(this.contentContainer.element, {
|
|
@@ -3327,6 +3447,9 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3327
3447
|
return false;
|
|
3328
3448
|
}
|
|
3329
3449
|
const data = getPanelData();
|
|
3450
|
+
if (!data && event.shiftKey && !this.isFloating) {
|
|
3451
|
+
return false;
|
|
3452
|
+
}
|
|
3330
3453
|
if (data && data.viewId === this.accessor.id) {
|
|
3331
3454
|
if (data.groupId === this.id) {
|
|
3332
3455
|
if (position === 'center') {
|
|
@@ -3371,14 +3494,25 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3371
3494
|
// correctly initialized
|
|
3372
3495
|
this.setActive(this.isActive, true, true);
|
|
3373
3496
|
this.updateContainer();
|
|
3374
|
-
if (this.accessor.options.
|
|
3375
|
-
this.
|
|
3376
|
-
|
|
3377
|
-
this.
|
|
3497
|
+
if (this.accessor.options.createRightHeaderActionsElement) {
|
|
3498
|
+
this._rightHeaderActions =
|
|
3499
|
+
this.accessor.options.createRightHeaderActionsElement(this.groupPanel);
|
|
3500
|
+
this.addDisposables(this._rightHeaderActions);
|
|
3501
|
+
this._rightHeaderActions.init({
|
|
3502
|
+
containerApi: new DockviewApi(this.accessor),
|
|
3503
|
+
api: this.groupPanel.api,
|
|
3504
|
+
});
|
|
3505
|
+
this.tabsContainer.setRightActionsElement(this._rightHeaderActions.element);
|
|
3506
|
+
}
|
|
3507
|
+
if (this.accessor.options.createLeftHeaderActionsElement) {
|
|
3508
|
+
this._leftHeaderActions =
|
|
3509
|
+
this.accessor.options.createLeftHeaderActionsElement(this.groupPanel);
|
|
3510
|
+
this.addDisposables(this._leftHeaderActions);
|
|
3511
|
+
this._leftHeaderActions.init({
|
|
3378
3512
|
containerApi: new DockviewApi(this.accessor),
|
|
3379
3513
|
api: this.groupPanel.api,
|
|
3380
3514
|
});
|
|
3381
|
-
this.tabsContainer.
|
|
3515
|
+
this.tabsContainer.setLeftActionsElement(this._leftHeaderActions.element);
|
|
3382
3516
|
}
|
|
3383
3517
|
}
|
|
3384
3518
|
indexOf(panel) {
|
|
@@ -3511,7 +3645,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3511
3645
|
return this._activePanel === panel;
|
|
3512
3646
|
}
|
|
3513
3647
|
updateActions(element) {
|
|
3514
|
-
this.tabsContainer.
|
|
3648
|
+
this.tabsContainer.setRightActionsElement(element);
|
|
3515
3649
|
}
|
|
3516
3650
|
setActive(isGroupActive, skipFocus = false, force = false) {
|
|
3517
3651
|
var _a, _b, _c, _d;
|
|
@@ -3683,9 +3817,10 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3683
3817
|
}
|
|
3684
3818
|
}
|
|
3685
3819
|
dispose() {
|
|
3686
|
-
var _a, _b;
|
|
3820
|
+
var _a, _b, _c;
|
|
3687
3821
|
super.dispose();
|
|
3688
|
-
(
|
|
3822
|
+
(_a = this.watermark) === null || _a === void 0 ? void 0 : _a.element.remove();
|
|
3823
|
+
(_c = (_b = this.watermark) === null || _b === void 0 ? void 0 : _b.dispose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
3689
3824
|
for (const panel of this.panels) {
|
|
3690
3825
|
panel.dispose();
|
|
3691
3826
|
}
|
|
@@ -4479,8 +4614,8 @@ class GridviewPanel extends BasePanelView {
|
|
|
4479
4614
|
get isActive() {
|
|
4480
4615
|
return this.api.isActive;
|
|
4481
4616
|
}
|
|
4482
|
-
constructor(id, component, options) {
|
|
4483
|
-
super(id, component, new GridviewPanelApiImpl(id));
|
|
4617
|
+
constructor(id, component, options, api) {
|
|
4618
|
+
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
|
|
4484
4619
|
this._evaluatedMinimumWidth = 0;
|
|
4485
4620
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4486
4621
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -4578,6 +4713,32 @@ class GridviewPanel extends BasePanelView {
|
|
|
4578
4713
|
}
|
|
4579
4714
|
}
|
|
4580
4715
|
|
|
4716
|
+
class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
4717
|
+
get isFloating() {
|
|
4718
|
+
if (!this._group) {
|
|
4719
|
+
throw new Error(`DockviewGroupPanelApiImpl not initialized`);
|
|
4720
|
+
}
|
|
4721
|
+
return this._group.model.isFloating;
|
|
4722
|
+
}
|
|
4723
|
+
constructor(id, accessor) {
|
|
4724
|
+
super(id);
|
|
4725
|
+
this.accessor = accessor;
|
|
4726
|
+
this._onDidFloatingStateChange = new Emitter();
|
|
4727
|
+
this.onDidFloatingStateChange = this._onDidFloatingStateChange.event;
|
|
4728
|
+
this.addDisposables(this._onDidFloatingStateChange);
|
|
4729
|
+
}
|
|
4730
|
+
moveTo(options) {
|
|
4731
|
+
var _a;
|
|
4732
|
+
if (!this._group) {
|
|
4733
|
+
throw new Error(`DockviewGroupPanelApiImpl not initialized`);
|
|
4734
|
+
}
|
|
4735
|
+
this.accessor.moveGroupOrPanel(options.group, this._group.id, undefined, (_a = options.position) !== null && _a !== void 0 ? _a : 'center');
|
|
4736
|
+
}
|
|
4737
|
+
initialize(group) {
|
|
4738
|
+
this._group = group;
|
|
4739
|
+
}
|
|
4740
|
+
}
|
|
4741
|
+
|
|
4581
4742
|
class DockviewGroupPanel extends GridviewPanel {
|
|
4582
4743
|
get panels() {
|
|
4583
4744
|
return this._model.panels;
|
|
@@ -4604,7 +4765,8 @@ class DockviewGroupPanel extends GridviewPanel {
|
|
|
4604
4765
|
super(id, 'groupview_default', {
|
|
4605
4766
|
minimumHeight: 100,
|
|
4606
4767
|
minimumWidth: 100,
|
|
4607
|
-
});
|
|
4768
|
+
}, new DockviewGroupPanelApiImpl(id, accessor));
|
|
4769
|
+
this.api.initialize(this); // cannot use 'this' after after 'super' call
|
|
4608
4770
|
this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
|
|
4609
4771
|
}
|
|
4610
4772
|
initialize() {
|
|
@@ -4622,7 +4784,6 @@ class DockviewGroupPanel extends GridviewPanel {
|
|
|
4622
4784
|
return this._model;
|
|
4623
4785
|
}
|
|
4624
4786
|
toJSON() {
|
|
4625
|
-
// TODO fix typing
|
|
4626
4787
|
return this.model.toJSON();
|
|
4627
4788
|
}
|
|
4628
4789
|
}
|
|
@@ -4676,9 +4837,10 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
4676
4837
|
get group() {
|
|
4677
4838
|
return this._group;
|
|
4678
4839
|
}
|
|
4679
|
-
constructor(panel, group) {
|
|
4840
|
+
constructor(panel, group, accessor) {
|
|
4680
4841
|
super(panel.id);
|
|
4681
4842
|
this.panel = panel;
|
|
4843
|
+
this.accessor = accessor;
|
|
4682
4844
|
this._onDidTitleChange = new Emitter();
|
|
4683
4845
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
4684
4846
|
this._onDidActiveGroupChange = new Emitter();
|
|
@@ -4690,6 +4852,10 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
4690
4852
|
this._group = group;
|
|
4691
4853
|
this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
4692
4854
|
}
|
|
4855
|
+
moveTo(options) {
|
|
4856
|
+
var _a;
|
|
4857
|
+
this.accessor.moveGroupOrPanel(options.group, this._group.id, this.panel.id, (_a = options.position) !== null && _a !== void 0 ? _a : 'center', options.index);
|
|
4858
|
+
}
|
|
4693
4859
|
setTitle(title) {
|
|
4694
4860
|
this.panel.setTitle(title);
|
|
4695
4861
|
}
|
|
@@ -4714,7 +4880,7 @@ class DockviewPanel extends CompositeDisposable {
|
|
|
4714
4880
|
this.containerApi = containerApi;
|
|
4715
4881
|
this.view = view;
|
|
4716
4882
|
this._group = group;
|
|
4717
|
-
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
4883
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
4718
4884
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
4719
4885
|
accessor.setActivePanel(this);
|
|
4720
4886
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -5055,6 +5221,296 @@ class Watermark extends CompositeDisposable {
|
|
|
5055
5221
|
}
|
|
5056
5222
|
}
|
|
5057
5223
|
|
|
5224
|
+
const bringElementToFront = (() => {
|
|
5225
|
+
let previous = null;
|
|
5226
|
+
function pushToTop(element) {
|
|
5227
|
+
if (previous !== element && previous !== null) {
|
|
5228
|
+
toggleClass(previous, 'dv-bring-to-front', false);
|
|
5229
|
+
}
|
|
5230
|
+
toggleClass(element, 'dv-bring-to-front', true);
|
|
5231
|
+
previous = element;
|
|
5232
|
+
}
|
|
5233
|
+
return pushToTop;
|
|
5234
|
+
})();
|
|
5235
|
+
class Overlay extends CompositeDisposable {
|
|
5236
|
+
constructor(options) {
|
|
5237
|
+
super();
|
|
5238
|
+
this.options = options;
|
|
5239
|
+
this._element = document.createElement('div');
|
|
5240
|
+
this._onDidChange = new Emitter();
|
|
5241
|
+
this.onDidChange = this._onDidChange.event;
|
|
5242
|
+
this._onDidChangeEnd = new Emitter();
|
|
5243
|
+
this.onDidChangeEnd = this._onDidChangeEnd.event;
|
|
5244
|
+
this.addDisposables(this._onDidChange, this._onDidChangeEnd);
|
|
5245
|
+
this._element.className = 'dv-resize-container';
|
|
5246
|
+
this.setupResize('top');
|
|
5247
|
+
this.setupResize('bottom');
|
|
5248
|
+
this.setupResize('left');
|
|
5249
|
+
this.setupResize('right');
|
|
5250
|
+
this.setupResize('topleft');
|
|
5251
|
+
this.setupResize('topright');
|
|
5252
|
+
this.setupResize('bottomleft');
|
|
5253
|
+
this.setupResize('bottomright');
|
|
5254
|
+
this._element.appendChild(this.options.content);
|
|
5255
|
+
this.options.container.appendChild(this._element);
|
|
5256
|
+
// if input bad resize within acceptable boundaries
|
|
5257
|
+
this.setBounds({
|
|
5258
|
+
height: this.options.height,
|
|
5259
|
+
width: this.options.width,
|
|
5260
|
+
top: this.options.top,
|
|
5261
|
+
left: this.options.left,
|
|
5262
|
+
});
|
|
5263
|
+
}
|
|
5264
|
+
setBounds(bounds = {}) {
|
|
5265
|
+
if (typeof bounds.height === 'number') {
|
|
5266
|
+
this._element.style.height = `${bounds.height}px`;
|
|
5267
|
+
}
|
|
5268
|
+
if (typeof bounds.width === 'number') {
|
|
5269
|
+
this._element.style.width = `${bounds.width}px`;
|
|
5270
|
+
}
|
|
5271
|
+
if (typeof bounds.top === 'number') {
|
|
5272
|
+
this._element.style.top = `${bounds.top}px`;
|
|
5273
|
+
}
|
|
5274
|
+
if (typeof bounds.left === 'number') {
|
|
5275
|
+
this._element.style.left = `${bounds.left}px`;
|
|
5276
|
+
}
|
|
5277
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5278
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5279
|
+
// region: ensure bounds within allowable limits
|
|
5280
|
+
// a minimum width of minimumViewportWidth must be inside the viewport
|
|
5281
|
+
const xOffset = Math.max(0, overlayRect.width - this.options.minimumInViewportWidth);
|
|
5282
|
+
// a minimum height of minimumViewportHeight must be inside the viewport
|
|
5283
|
+
const yOffset = Math.max(0, overlayRect.height - this.options.minimumInViewportHeight);
|
|
5284
|
+
const left = clamp(overlayRect.left - containerRect.left, -xOffset, Math.max(0, containerRect.width - overlayRect.width + xOffset));
|
|
5285
|
+
const top = clamp(overlayRect.top - containerRect.top, -yOffset, Math.max(0, containerRect.height - overlayRect.height + yOffset));
|
|
5286
|
+
this._element.style.left = `${left}px`;
|
|
5287
|
+
this._element.style.top = `${top}px`;
|
|
5288
|
+
this._onDidChange.fire();
|
|
5289
|
+
}
|
|
5290
|
+
toJSON() {
|
|
5291
|
+
const container = this.options.container.getBoundingClientRect();
|
|
5292
|
+
const element = this._element.getBoundingClientRect();
|
|
5293
|
+
return {
|
|
5294
|
+
top: element.top - container.top,
|
|
5295
|
+
left: element.left - container.left,
|
|
5296
|
+
width: element.width,
|
|
5297
|
+
height: element.height,
|
|
5298
|
+
};
|
|
5299
|
+
}
|
|
5300
|
+
setupDrag(dragTarget, options = { inDragMode: false }) {
|
|
5301
|
+
const move = new MutableDisposable();
|
|
5302
|
+
const track = () => {
|
|
5303
|
+
let offset = null;
|
|
5304
|
+
const iframes = [
|
|
5305
|
+
...getElementsByTagName('iframe'),
|
|
5306
|
+
...getElementsByTagName('webview'),
|
|
5307
|
+
];
|
|
5308
|
+
for (const iframe of iframes) {
|
|
5309
|
+
iframe.style.pointerEvents = 'none';
|
|
5310
|
+
}
|
|
5311
|
+
move.value = new CompositeDisposable({
|
|
5312
|
+
dispose: () => {
|
|
5313
|
+
for (const iframe of iframes) {
|
|
5314
|
+
iframe.style.pointerEvents = 'auto';
|
|
5315
|
+
}
|
|
5316
|
+
},
|
|
5317
|
+
}, addDisposableWindowListener(window, 'mousemove', (e) => {
|
|
5318
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5319
|
+
const x = e.clientX - containerRect.left;
|
|
5320
|
+
const y = e.clientY - containerRect.top;
|
|
5321
|
+
toggleClass(this._element, 'dv-resize-container-dragging', true);
|
|
5322
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5323
|
+
if (offset === null) {
|
|
5324
|
+
offset = {
|
|
5325
|
+
x: e.clientX - overlayRect.left,
|
|
5326
|
+
y: e.clientY - overlayRect.top,
|
|
5327
|
+
};
|
|
5328
|
+
}
|
|
5329
|
+
const xOffset = Math.max(0, overlayRect.width - this.options.minimumInViewportWidth);
|
|
5330
|
+
const yOffset = Math.max(0, overlayRect.height -
|
|
5331
|
+
this.options.minimumInViewportHeight);
|
|
5332
|
+
const left = clamp(x - offset.x, -xOffset, Math.max(0, containerRect.width - overlayRect.width + xOffset));
|
|
5333
|
+
const top = clamp(y - offset.y, -yOffset, Math.max(0, containerRect.height - overlayRect.height + yOffset));
|
|
5334
|
+
this.setBounds({ top, left });
|
|
5335
|
+
}), addDisposableWindowListener(window, 'mouseup', () => {
|
|
5336
|
+
toggleClass(this._element, 'dv-resize-container-dragging', false);
|
|
5337
|
+
move.dispose();
|
|
5338
|
+
this._onDidChangeEnd.fire();
|
|
5339
|
+
}));
|
|
5340
|
+
};
|
|
5341
|
+
this.addDisposables(move, addDisposableListener(dragTarget, 'mousedown', (event) => {
|
|
5342
|
+
if (event.defaultPrevented) {
|
|
5343
|
+
event.preventDefault();
|
|
5344
|
+
return;
|
|
5345
|
+
}
|
|
5346
|
+
// if somebody has marked this event then treat as a defaultPrevented
|
|
5347
|
+
// without actually calling event.preventDefault()
|
|
5348
|
+
if (quasiDefaultPrevented(event)) {
|
|
5349
|
+
return;
|
|
5350
|
+
}
|
|
5351
|
+
track();
|
|
5352
|
+
}), addDisposableListener(this.options.content, 'mousedown', (event) => {
|
|
5353
|
+
if (event.defaultPrevented) {
|
|
5354
|
+
return;
|
|
5355
|
+
}
|
|
5356
|
+
// if somebody has marked this event then treat as a defaultPrevented
|
|
5357
|
+
// without actually calling event.preventDefault()
|
|
5358
|
+
if (quasiDefaultPrevented(event)) {
|
|
5359
|
+
return;
|
|
5360
|
+
}
|
|
5361
|
+
if (event.shiftKey) {
|
|
5362
|
+
track();
|
|
5363
|
+
}
|
|
5364
|
+
}), addDisposableListener(this.options.content, 'mousedown', () => {
|
|
5365
|
+
bringElementToFront(this._element);
|
|
5366
|
+
}, true));
|
|
5367
|
+
bringElementToFront(this._element);
|
|
5368
|
+
if (options.inDragMode) {
|
|
5369
|
+
track();
|
|
5370
|
+
}
|
|
5371
|
+
}
|
|
5372
|
+
setupResize(direction) {
|
|
5373
|
+
const resizeHandleElement = document.createElement('div');
|
|
5374
|
+
resizeHandleElement.className = `dv-resize-handle-${direction}`;
|
|
5375
|
+
this._element.appendChild(resizeHandleElement);
|
|
5376
|
+
const move = new MutableDisposable();
|
|
5377
|
+
this.addDisposables(move, addDisposableListener(resizeHandleElement, 'mousedown', (e) => {
|
|
5378
|
+
e.preventDefault();
|
|
5379
|
+
let startPosition = null;
|
|
5380
|
+
const iframes = [
|
|
5381
|
+
...getElementsByTagName('iframe'),
|
|
5382
|
+
...getElementsByTagName('webview'),
|
|
5383
|
+
];
|
|
5384
|
+
for (const iframe of iframes) {
|
|
5385
|
+
iframe.style.pointerEvents = 'none';
|
|
5386
|
+
}
|
|
5387
|
+
move.value = new CompositeDisposable(addDisposableWindowListener(window, 'mousemove', (e) => {
|
|
5388
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5389
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5390
|
+
const y = e.clientY - containerRect.top;
|
|
5391
|
+
const x = e.clientX - containerRect.left;
|
|
5392
|
+
if (startPosition === null) {
|
|
5393
|
+
// record the initial dimensions since as all subsequence moves are relative to this
|
|
5394
|
+
startPosition = {
|
|
5395
|
+
originalY: y,
|
|
5396
|
+
originalHeight: overlayRect.height,
|
|
5397
|
+
originalX: x,
|
|
5398
|
+
originalWidth: overlayRect.width,
|
|
5399
|
+
};
|
|
5400
|
+
}
|
|
5401
|
+
let top = undefined;
|
|
5402
|
+
let height = undefined;
|
|
5403
|
+
let left = undefined;
|
|
5404
|
+
let width = undefined;
|
|
5405
|
+
const minimumInViewportHeight = this.options.minimumInViewportHeight;
|
|
5406
|
+
const minimumInViewportWidth = this.options.minimumInViewportWidth;
|
|
5407
|
+
function moveTop() {
|
|
5408
|
+
top = clamp(y, -Number.MAX_VALUE, startPosition.originalY +
|
|
5409
|
+
startPosition.originalHeight >
|
|
5410
|
+
containerRect.height
|
|
5411
|
+
? containerRect.height -
|
|
5412
|
+
minimumInViewportHeight
|
|
5413
|
+
: Math.max(0, startPosition.originalY +
|
|
5414
|
+
startPosition.originalHeight -
|
|
5415
|
+
Overlay.MINIMUM_HEIGHT));
|
|
5416
|
+
height =
|
|
5417
|
+
startPosition.originalY +
|
|
5418
|
+
startPosition.originalHeight -
|
|
5419
|
+
top;
|
|
5420
|
+
}
|
|
5421
|
+
function moveBottom() {
|
|
5422
|
+
top =
|
|
5423
|
+
startPosition.originalY -
|
|
5424
|
+
startPosition.originalHeight;
|
|
5425
|
+
height = clamp(y - top, top < 0
|
|
5426
|
+
? -top + minimumInViewportHeight
|
|
5427
|
+
: Overlay.MINIMUM_HEIGHT, Number.MAX_VALUE);
|
|
5428
|
+
}
|
|
5429
|
+
function moveLeft() {
|
|
5430
|
+
left = clamp(x, -Number.MAX_VALUE, startPosition.originalX +
|
|
5431
|
+
startPosition.originalWidth >
|
|
5432
|
+
containerRect.width
|
|
5433
|
+
? containerRect.width -
|
|
5434
|
+
minimumInViewportWidth
|
|
5435
|
+
: Math.max(0, startPosition.originalX +
|
|
5436
|
+
startPosition.originalWidth -
|
|
5437
|
+
Overlay.MINIMUM_WIDTH));
|
|
5438
|
+
width =
|
|
5439
|
+
startPosition.originalX +
|
|
5440
|
+
startPosition.originalWidth -
|
|
5441
|
+
left;
|
|
5442
|
+
}
|
|
5443
|
+
function moveRight() {
|
|
5444
|
+
left =
|
|
5445
|
+
startPosition.originalX -
|
|
5446
|
+
startPosition.originalWidth;
|
|
5447
|
+
width = clamp(x - left, left < 0
|
|
5448
|
+
? -left + minimumInViewportWidth
|
|
5449
|
+
: Overlay.MINIMUM_WIDTH, Number.MAX_VALUE);
|
|
5450
|
+
}
|
|
5451
|
+
switch (direction) {
|
|
5452
|
+
case 'top':
|
|
5453
|
+
moveTop();
|
|
5454
|
+
break;
|
|
5455
|
+
case 'bottom':
|
|
5456
|
+
moveBottom();
|
|
5457
|
+
break;
|
|
5458
|
+
case 'left':
|
|
5459
|
+
moveLeft();
|
|
5460
|
+
break;
|
|
5461
|
+
case 'right':
|
|
5462
|
+
moveRight();
|
|
5463
|
+
break;
|
|
5464
|
+
case 'topleft':
|
|
5465
|
+
moveTop();
|
|
5466
|
+
moveLeft();
|
|
5467
|
+
break;
|
|
5468
|
+
case 'topright':
|
|
5469
|
+
moveTop();
|
|
5470
|
+
moveRight();
|
|
5471
|
+
break;
|
|
5472
|
+
case 'bottomleft':
|
|
5473
|
+
moveBottom();
|
|
5474
|
+
moveLeft();
|
|
5475
|
+
break;
|
|
5476
|
+
case 'bottomright':
|
|
5477
|
+
moveBottom();
|
|
5478
|
+
moveRight();
|
|
5479
|
+
break;
|
|
5480
|
+
}
|
|
5481
|
+
this.setBounds({ height, width, top, left });
|
|
5482
|
+
}), {
|
|
5483
|
+
dispose: () => {
|
|
5484
|
+
for (const iframe of iframes) {
|
|
5485
|
+
iframe.style.pointerEvents = 'auto';
|
|
5486
|
+
}
|
|
5487
|
+
},
|
|
5488
|
+
}, addDisposableWindowListener(window, 'mouseup', () => {
|
|
5489
|
+
move.dispose();
|
|
5490
|
+
this._onDidChangeEnd.fire();
|
|
5491
|
+
}));
|
|
5492
|
+
}));
|
|
5493
|
+
}
|
|
5494
|
+
dispose() {
|
|
5495
|
+
this._element.remove();
|
|
5496
|
+
super.dispose();
|
|
5497
|
+
}
|
|
5498
|
+
}
|
|
5499
|
+
Overlay.MINIMUM_HEIGHT = 20;
|
|
5500
|
+
Overlay.MINIMUM_WIDTH = 20;
|
|
5501
|
+
|
|
5502
|
+
class DockviewFloatingGroupPanel extends CompositeDisposable {
|
|
5503
|
+
constructor(group, overlay) {
|
|
5504
|
+
super();
|
|
5505
|
+
this.group = group;
|
|
5506
|
+
this.overlay = overlay;
|
|
5507
|
+
this.addDisposables(overlay);
|
|
5508
|
+
}
|
|
5509
|
+
position(bounds) {
|
|
5510
|
+
this.overlay.setBounds(bounds);
|
|
5511
|
+
}
|
|
5512
|
+
}
|
|
5513
|
+
|
|
5058
5514
|
class DockviewComponent extends BaseGrid {
|
|
5059
5515
|
get orientation() {
|
|
5060
5516
|
return this.gridview.orientation;
|
|
@@ -5095,7 +5551,8 @@ class DockviewComponent extends BaseGrid {
|
|
|
5095
5551
|
this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
|
|
5096
5552
|
this._onDidActivePanelChange = new Emitter();
|
|
5097
5553
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
5098
|
-
this.
|
|
5554
|
+
this.floatingGroups = [];
|
|
5555
|
+
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
5099
5556
|
this.addDisposables(this._onDidDrop, Event.any(this.onDidAddGroup, this.onDidRemoveGroup)(() => {
|
|
5100
5557
|
this.updateWatermark();
|
|
5101
5558
|
}), Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
@@ -5125,6 +5582,11 @@ class DockviewComponent extends BaseGrid {
|
|
|
5125
5582
|
if (data.viewId !== this.id) {
|
|
5126
5583
|
return false;
|
|
5127
5584
|
}
|
|
5585
|
+
if (position === 'center') {
|
|
5586
|
+
// center drop target is only allowed if there are no panels in the grid
|
|
5587
|
+
// floating panels are allowed
|
|
5588
|
+
return this.gridview.length === 0;
|
|
5589
|
+
}
|
|
5128
5590
|
return true;
|
|
5129
5591
|
}
|
|
5130
5592
|
if (this.options.showDndOverlay) {
|
|
@@ -5137,7 +5599,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5137
5599
|
}
|
|
5138
5600
|
return false;
|
|
5139
5601
|
},
|
|
5140
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right'],
|
|
5602
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
5141
5603
|
overlayModel: {
|
|
5142
5604
|
activationSize: { type: 'pixels', value: 10 },
|
|
5143
5605
|
size: { type: 'pixels', value: 20 },
|
|
@@ -5155,6 +5617,75 @@ class DockviewComponent extends BaseGrid {
|
|
|
5155
5617
|
this._api = new DockviewApi(this);
|
|
5156
5618
|
this.updateWatermark();
|
|
5157
5619
|
}
|
|
5620
|
+
addFloatingGroup(item, coord, options) {
|
|
5621
|
+
var _a, _b;
|
|
5622
|
+
let group;
|
|
5623
|
+
if (item instanceof DockviewPanel) {
|
|
5624
|
+
group = this.createGroup();
|
|
5625
|
+
this.removePanel(item, {
|
|
5626
|
+
removeEmptyGroup: true,
|
|
5627
|
+
skipDispose: true,
|
|
5628
|
+
});
|
|
5629
|
+
group.model.openPanel(item);
|
|
5630
|
+
}
|
|
5631
|
+
else {
|
|
5632
|
+
group = item;
|
|
5633
|
+
const skip = typeof (options === null || options === void 0 ? void 0 : options.skipRemoveGroup) === 'boolean' &&
|
|
5634
|
+
options.skipRemoveGroup;
|
|
5635
|
+
if (!skip) {
|
|
5636
|
+
this.doRemoveGroup(item, { skipDispose: true });
|
|
5637
|
+
}
|
|
5638
|
+
}
|
|
5639
|
+
group.model.isFloating = true;
|
|
5640
|
+
const overlayLeft = typeof (coord === null || coord === void 0 ? void 0 : coord.x) === 'number' ? Math.max(coord.x, 0) : 100;
|
|
5641
|
+
const overlayTop = typeof (coord === null || coord === void 0 ? void 0 : coord.y) === 'number' ? Math.max(coord.y, 0) : 100;
|
|
5642
|
+
const overlay = new Overlay({
|
|
5643
|
+
container: this.gridview.element,
|
|
5644
|
+
content: group.element,
|
|
5645
|
+
height: (_a = coord === null || coord === void 0 ? void 0 : coord.height) !== null && _a !== void 0 ? _a : 300,
|
|
5646
|
+
width: (_b = coord === null || coord === void 0 ? void 0 : coord.width) !== null && _b !== void 0 ? _b : 300,
|
|
5647
|
+
left: overlayLeft,
|
|
5648
|
+
top: overlayTop,
|
|
5649
|
+
minimumInViewportWidth: 100,
|
|
5650
|
+
minimumInViewportHeight: 100,
|
|
5651
|
+
});
|
|
5652
|
+
const el = group.element.querySelector('.void-container');
|
|
5653
|
+
if (!el) {
|
|
5654
|
+
throw new Error('failed to find drag handle');
|
|
5655
|
+
}
|
|
5656
|
+
overlay.setupDrag(el, {
|
|
5657
|
+
inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
|
|
5658
|
+
? options.inDragMode
|
|
5659
|
+
: false,
|
|
5660
|
+
});
|
|
5661
|
+
const floatingGroupPanel = new DockviewFloatingGroupPanel(group, overlay);
|
|
5662
|
+
const disposable = watchElementResize(group.element, (entry) => {
|
|
5663
|
+
const { width, height } = entry.contentRect;
|
|
5664
|
+
group.layout(width, height); // let the group know it's size is changing so it can fire events to the panel
|
|
5665
|
+
});
|
|
5666
|
+
floatingGroupPanel.addDisposables(overlay.onDidChange(() => {
|
|
5667
|
+
// this is either a resize or a move
|
|
5668
|
+
// to inform the panels .layout(...) the group with it's current size
|
|
5669
|
+
// don't care about resize since the above watcher handles that
|
|
5670
|
+
group.layout(group.height, group.width);
|
|
5671
|
+
}), overlay.onDidChangeEnd(() => {
|
|
5672
|
+
this._bufferOnDidLayoutChange.fire();
|
|
5673
|
+
}), group.onDidChange((event) => {
|
|
5674
|
+
overlay.setBounds({
|
|
5675
|
+
height: event === null || event === void 0 ? void 0 : event.height,
|
|
5676
|
+
width: event === null || event === void 0 ? void 0 : event.width,
|
|
5677
|
+
});
|
|
5678
|
+
}), {
|
|
5679
|
+
dispose: () => {
|
|
5680
|
+
disposable.dispose();
|
|
5681
|
+
group.model.isFloating = false;
|
|
5682
|
+
remove(this.floatingGroups, floatingGroupPanel);
|
|
5683
|
+
this.updateWatermark();
|
|
5684
|
+
},
|
|
5685
|
+
});
|
|
5686
|
+
this.floatingGroups.push(floatingGroupPanel);
|
|
5687
|
+
this.updateWatermark();
|
|
5688
|
+
}
|
|
5158
5689
|
orthogonalize(position) {
|
|
5159
5690
|
switch (position) {
|
|
5160
5691
|
case 'top':
|
|
@@ -5177,6 +5708,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5177
5708
|
switch (position) {
|
|
5178
5709
|
case 'top':
|
|
5179
5710
|
case 'left':
|
|
5711
|
+
case 'center':
|
|
5180
5712
|
return this.createGroupAtLocation([0]); // insert into first position
|
|
5181
5713
|
case 'bottom':
|
|
5182
5714
|
case 'right':
|
|
@@ -5194,6 +5726,15 @@ class DockviewComponent extends BaseGrid {
|
|
|
5194
5726
|
}
|
|
5195
5727
|
this.layout(this.gridview.width, this.gridview.height, true);
|
|
5196
5728
|
}
|
|
5729
|
+
layout(width, height, forceResize) {
|
|
5730
|
+
super.layout(width, height, forceResize);
|
|
5731
|
+
if (this.floatingGroups) {
|
|
5732
|
+
for (const floating of this.floatingGroups) {
|
|
5733
|
+
// ensure floting groups stay within visible boundaries
|
|
5734
|
+
floating.overlay.setBounds();
|
|
5735
|
+
}
|
|
5736
|
+
}
|
|
5737
|
+
}
|
|
5197
5738
|
focus() {
|
|
5198
5739
|
var _a;
|
|
5199
5740
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -5256,51 +5797,81 @@ class DockviewComponent extends BaseGrid {
|
|
|
5256
5797
|
collection[panel.id] = panel.toJSON();
|
|
5257
5798
|
return collection;
|
|
5258
5799
|
}, {});
|
|
5259
|
-
|
|
5800
|
+
const floats = this.floatingGroups.map((floatingGroup) => {
|
|
5801
|
+
return {
|
|
5802
|
+
data: floatingGroup.group.toJSON(),
|
|
5803
|
+
position: floatingGroup.overlay.toJSON(),
|
|
5804
|
+
};
|
|
5805
|
+
});
|
|
5806
|
+
const result = {
|
|
5260
5807
|
grid: data,
|
|
5261
5808
|
panels,
|
|
5262
5809
|
activeGroup: (_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.id,
|
|
5263
5810
|
};
|
|
5811
|
+
if (floats.length > 0) {
|
|
5812
|
+
result.floatingGroups = floats;
|
|
5813
|
+
}
|
|
5814
|
+
return result;
|
|
5264
5815
|
}
|
|
5265
5816
|
fromJSON(data) {
|
|
5817
|
+
var _a;
|
|
5266
5818
|
this.clear();
|
|
5267
5819
|
const { grid, panels, activeGroup } = data;
|
|
5268
5820
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
5269
5821
|
throw new Error('root must be of type branch');
|
|
5270
5822
|
}
|
|
5823
|
+
// take note of the existing dimensions
|
|
5824
|
+
const width = this.width;
|
|
5825
|
+
const height = this.height;
|
|
5826
|
+
const createGroupFromSerializedState = (data) => {
|
|
5827
|
+
const { id, locked, hideHeader, views, activeView } = data;
|
|
5828
|
+
const group = this.createGroup({
|
|
5829
|
+
id,
|
|
5830
|
+
locked: !!locked,
|
|
5831
|
+
hideHeader: !!hideHeader,
|
|
5832
|
+
});
|
|
5833
|
+
this._onDidAddGroup.fire(group);
|
|
5834
|
+
for (const child of views) {
|
|
5835
|
+
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
5836
|
+
const isActive = typeof activeView === 'string' && activeView === panel.id;
|
|
5837
|
+
group.model.openPanel(panel, {
|
|
5838
|
+
skipSetPanelActive: !isActive,
|
|
5839
|
+
skipSetGroupActive: true,
|
|
5840
|
+
});
|
|
5841
|
+
}
|
|
5842
|
+
if (!group.activePanel && group.panels.length > 0) {
|
|
5843
|
+
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
5844
|
+
skipSetGroupActive: true,
|
|
5845
|
+
});
|
|
5846
|
+
}
|
|
5847
|
+
return group;
|
|
5848
|
+
};
|
|
5271
5849
|
this.gridview.deserialize(grid, {
|
|
5272
5850
|
fromJSON: (node) => {
|
|
5273
|
-
|
|
5274
|
-
const group = this.createGroup({
|
|
5275
|
-
id,
|
|
5276
|
-
locked: !!locked,
|
|
5277
|
-
hideHeader: !!hideHeader,
|
|
5278
|
-
});
|
|
5279
|
-
this._onDidAddGroup.fire(group);
|
|
5280
|
-
for (const child of views) {
|
|
5281
|
-
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
5282
|
-
const isActive = typeof activeView === 'string' &&
|
|
5283
|
-
activeView === panel.id;
|
|
5284
|
-
group.model.openPanel(panel, {
|
|
5285
|
-
skipSetPanelActive: !isActive,
|
|
5286
|
-
skipSetGroupActive: true,
|
|
5287
|
-
});
|
|
5288
|
-
}
|
|
5289
|
-
if (!group.activePanel && group.panels.length > 0) {
|
|
5290
|
-
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
5291
|
-
skipSetGroupActive: true,
|
|
5292
|
-
});
|
|
5293
|
-
}
|
|
5294
|
-
return group;
|
|
5851
|
+
return createGroupFromSerializedState(node.data);
|
|
5295
5852
|
},
|
|
5296
5853
|
});
|
|
5854
|
+
this.layout(width, height, true);
|
|
5855
|
+
const serializedFloatingGroups = (_a = data.floatingGroups) !== null && _a !== void 0 ? _a : [];
|
|
5856
|
+
for (const serializedFloatingGroup of serializedFloatingGroups) {
|
|
5857
|
+
const { data, position } = serializedFloatingGroup;
|
|
5858
|
+
const group = createGroupFromSerializedState(data);
|
|
5859
|
+
this.addFloatingGroup(group, {
|
|
5860
|
+
x: position.left,
|
|
5861
|
+
y: position.top,
|
|
5862
|
+
height: position.height,
|
|
5863
|
+
width: position.width,
|
|
5864
|
+
}, { skipRemoveGroup: true, inDragMode: false });
|
|
5865
|
+
}
|
|
5866
|
+
for (const floatingGroup of this.floatingGroups) {
|
|
5867
|
+
floatingGroup.overlay.setBounds();
|
|
5868
|
+
}
|
|
5297
5869
|
if (typeof activeGroup === 'string') {
|
|
5298
5870
|
const panel = this.getPanel(activeGroup);
|
|
5299
5871
|
if (panel) {
|
|
5300
5872
|
this.doSetGroupActive(panel);
|
|
5301
5873
|
}
|
|
5302
5874
|
}
|
|
5303
|
-
this.gridview.layout(this.width, this.height);
|
|
5304
5875
|
this._onDidLayoutFromJSON.fire();
|
|
5305
5876
|
}
|
|
5306
5877
|
clear() {
|
|
@@ -5309,7 +5880,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5309
5880
|
const hasActivePanel = !!this.activePanel;
|
|
5310
5881
|
for (const group of groups) {
|
|
5311
5882
|
// remove the group will automatically remove the panels
|
|
5312
|
-
this.removeGroup(group, true);
|
|
5883
|
+
this.removeGroup(group, { skipActive: true });
|
|
5313
5884
|
}
|
|
5314
5885
|
if (hasActiveGroup) {
|
|
5315
5886
|
this.doSetGroupActive(undefined);
|
|
@@ -5331,6 +5902,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
5331
5902
|
throw new Error(`panel with id ${options.id} already exists`);
|
|
5332
5903
|
}
|
|
5333
5904
|
let referenceGroup;
|
|
5905
|
+
if (options.position && options.floating) {
|
|
5906
|
+
throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
5907
|
+
}
|
|
5334
5908
|
if (options.position) {
|
|
5335
5909
|
if (isPanelOptionsWithPanel(options.position)) {
|
|
5336
5910
|
const referencePanel = typeof options.position.referencePanel === 'string'
|
|
@@ -5363,7 +5937,20 @@ class DockviewComponent extends BaseGrid {
|
|
|
5363
5937
|
let panel;
|
|
5364
5938
|
if (referenceGroup) {
|
|
5365
5939
|
const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
|
|
5366
|
-
if (
|
|
5940
|
+
if (options.floating) {
|
|
5941
|
+
const group = this.createGroup();
|
|
5942
|
+
panel = this.createPanel(options, group);
|
|
5943
|
+
group.model.openPanel(panel);
|
|
5944
|
+
const o = typeof options.floating === 'object' &&
|
|
5945
|
+
options.floating !== null
|
|
5946
|
+
? options.floating
|
|
5947
|
+
: {};
|
|
5948
|
+
this.addFloatingGroup(group, o, {
|
|
5949
|
+
inDragMode: false,
|
|
5950
|
+
skipRemoveGroup: true,
|
|
5951
|
+
});
|
|
5952
|
+
}
|
|
5953
|
+
else if (referenceGroup.api.isFloating || target === 'center') {
|
|
5367
5954
|
panel = this.createPanel(options, referenceGroup);
|
|
5368
5955
|
referenceGroup.model.openPanel(panel);
|
|
5369
5956
|
}
|
|
@@ -5375,6 +5962,19 @@ class DockviewComponent extends BaseGrid {
|
|
|
5375
5962
|
group.model.openPanel(panel);
|
|
5376
5963
|
}
|
|
5377
5964
|
}
|
|
5965
|
+
else if (options.floating) {
|
|
5966
|
+
const group = this.createGroup();
|
|
5967
|
+
panel = this.createPanel(options, group);
|
|
5968
|
+
group.model.openPanel(panel);
|
|
5969
|
+
const o = typeof options.floating === 'object' &&
|
|
5970
|
+
options.floating !== null
|
|
5971
|
+
? options.floating
|
|
5972
|
+
: {};
|
|
5973
|
+
this.addFloatingGroup(group, o, {
|
|
5974
|
+
inDragMode: false,
|
|
5975
|
+
skipRemoveGroup: true,
|
|
5976
|
+
});
|
|
5977
|
+
}
|
|
5378
5978
|
else {
|
|
5379
5979
|
const group = this.createGroupAtLocation();
|
|
5380
5980
|
panel = this.createPanel(options, group);
|
|
@@ -5391,7 +5991,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
5391
5991
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
5392
5992
|
}
|
|
5393
5993
|
group.model.removePanel(panel);
|
|
5394
|
-
|
|
5994
|
+
if (!options.skipDispose) {
|
|
5995
|
+
panel.dispose();
|
|
5996
|
+
}
|
|
5395
5997
|
if (group.size === 0 && options.removeEmptyGroup) {
|
|
5396
5998
|
this.removeGroup(group);
|
|
5397
5999
|
}
|
|
@@ -5406,7 +6008,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5406
6008
|
}
|
|
5407
6009
|
updateWatermark() {
|
|
5408
6010
|
var _a, _b;
|
|
5409
|
-
if (this.groups.length === 0) {
|
|
6011
|
+
if (this.groups.filter((x) => !x.api.isFloating).length === 0) {
|
|
5410
6012
|
if (!this.watermark) {
|
|
5411
6013
|
this.watermark = this.createWatermarkComponent();
|
|
5412
6014
|
this.watermark.init({
|
|
@@ -5415,7 +6017,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5415
6017
|
const watermarkContainer = document.createElement('div');
|
|
5416
6018
|
watermarkContainer.className = 'dv-watermark-container';
|
|
5417
6019
|
watermarkContainer.appendChild(this.watermark.element);
|
|
5418
|
-
this.element.appendChild(watermarkContainer);
|
|
6020
|
+
this.gridview.element.appendChild(watermarkContainer);
|
|
5419
6021
|
}
|
|
5420
6022
|
}
|
|
5421
6023
|
else if (this.watermark) {
|
|
@@ -5465,15 +6067,28 @@ class DockviewComponent extends BaseGrid {
|
|
|
5465
6067
|
return group;
|
|
5466
6068
|
}
|
|
5467
6069
|
}
|
|
5468
|
-
removeGroup(group,
|
|
6070
|
+
removeGroup(group, options) {
|
|
6071
|
+
var _a;
|
|
5469
6072
|
const panels = [...group.panels]; // reassign since group panels will mutate
|
|
5470
6073
|
for (const panel of panels) {
|
|
5471
6074
|
this.removePanel(panel, {
|
|
5472
6075
|
removeEmptyGroup: false,
|
|
5473
|
-
skipDispose: false,
|
|
6076
|
+
skipDispose: (_a = options === null || options === void 0 ? void 0 : options.skipDispose) !== null && _a !== void 0 ? _a : false,
|
|
5474
6077
|
});
|
|
5475
6078
|
}
|
|
5476
|
-
|
|
6079
|
+
this.doRemoveGroup(group, options);
|
|
6080
|
+
}
|
|
6081
|
+
doRemoveGroup(group, options) {
|
|
6082
|
+
const floatingGroup = this.floatingGroups.find((_) => _.group === group);
|
|
6083
|
+
if (floatingGroup) {
|
|
6084
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
6085
|
+
floatingGroup.group.dispose();
|
|
6086
|
+
this._groups.delete(group.id);
|
|
6087
|
+
}
|
|
6088
|
+
floatingGroup.dispose();
|
|
6089
|
+
return floatingGroup.group;
|
|
6090
|
+
}
|
|
6091
|
+
return super.doRemoveGroup(group, options);
|
|
5477
6092
|
}
|
|
5478
6093
|
moveGroupOrPanel(destinationGroup, sourceGroupId, sourceItemId, destinationTarget, destinationIndex) {
|
|
5479
6094
|
var _a;
|
|
@@ -5504,25 +6119,26 @@ class DockviewComponent extends BaseGrid {
|
|
|
5504
6119
|
const targetLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
5505
6120
|
if (sourceGroup && sourceGroup.size < 2) {
|
|
5506
6121
|
const [targetParentLocation, to] = tail(targetLocation);
|
|
5507
|
-
const
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
5518
|
-
skipActive: true,
|
|
5519
|
-
skipDispose: true,
|
|
5520
|
-
});
|
|
5521
|
-
// after deleting the group we need to re-evaulate the ref location
|
|
5522
|
-
const updatedReferenceLocation = getGridLocation(destinationGroup.element);
|
|
5523
|
-
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
|
|
5524
|
-
this.doAddGroup(targetGroup, location);
|
|
6122
|
+
const isFloating = this.floatingGroups.find((x) => x.group === sourceGroup);
|
|
6123
|
+
if (!isFloating) {
|
|
6124
|
+
const sourceLocation = getGridLocation(sourceGroup.element);
|
|
6125
|
+
const [sourceParentLocation, from] = tail(sourceLocation);
|
|
6126
|
+
if (sequenceEquals(sourceParentLocation, targetParentLocation)) {
|
|
6127
|
+
// special case when 'swapping' two views within same grid location
|
|
6128
|
+
// if a group has one tab - we are essentially moving the 'group'
|
|
6129
|
+
// which is equivalent to swapping two views in this case
|
|
6130
|
+
this.gridview.moveView(sourceParentLocation, from, to);
|
|
6131
|
+
}
|
|
5525
6132
|
}
|
|
6133
|
+
// source group will become empty so delete the group
|
|
6134
|
+
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
6135
|
+
skipActive: true,
|
|
6136
|
+
skipDispose: true,
|
|
6137
|
+
});
|
|
6138
|
+
// after deleting the group we need to re-evaulate the ref location
|
|
6139
|
+
const updatedReferenceLocation = getGridLocation(destinationGroup.element);
|
|
6140
|
+
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
|
|
6141
|
+
this.doAddGroup(targetGroup, location);
|
|
5526
6142
|
}
|
|
5527
6143
|
else {
|
|
5528
6144
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(sourceItemId)) ||
|
|
@@ -5551,7 +6167,13 @@ class DockviewComponent extends BaseGrid {
|
|
|
5551
6167
|
}
|
|
5552
6168
|
}
|
|
5553
6169
|
else {
|
|
5554
|
-
this.
|
|
6170
|
+
const floatingGroup = this.floatingGroups.find((x) => x.group === sourceGroup);
|
|
6171
|
+
if (floatingGroup) {
|
|
6172
|
+
floatingGroup.dispose();
|
|
6173
|
+
}
|
|
6174
|
+
else {
|
|
6175
|
+
this.gridview.removeView(getGridLocation(sourceGroup.element));
|
|
6176
|
+
}
|
|
5555
6177
|
const referenceLocation = getGridLocation(referenceGroup.element);
|
|
5556
6178
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
5557
6179
|
this.gridview.addView(sourceGroup, Sizing.Distribute, dropLocation);
|
|
@@ -5706,6 +6328,9 @@ class GridviewComponent extends BaseGrid {
|
|
|
5706
6328
|
this.clear();
|
|
5707
6329
|
const { grid, activePanel } = serializedGridview;
|
|
5708
6330
|
const queue = [];
|
|
6331
|
+
// take note of the existing dimensions
|
|
6332
|
+
const width = this.width;
|
|
6333
|
+
const height = this.height;
|
|
5709
6334
|
this.gridview.deserialize(grid, {
|
|
5710
6335
|
fromJSON: (node) => {
|
|
5711
6336
|
const { data } = node;
|
|
@@ -5731,7 +6356,7 @@ class GridviewComponent extends BaseGrid {
|
|
|
5731
6356
|
return view;
|
|
5732
6357
|
},
|
|
5733
6358
|
});
|
|
5734
|
-
this.layout(
|
|
6359
|
+
this.layout(width, height, true);
|
|
5735
6360
|
queue.forEach((f) => f());
|
|
5736
6361
|
if (typeof activePanel === 'string') {
|
|
5737
6362
|
const panel = this.getPanel(activePanel);
|
|
@@ -6045,6 +6670,9 @@ class SplitviewComponent extends Resizable {
|
|
|
6045
6670
|
this.clear();
|
|
6046
6671
|
const { views, orientation, size, activeView } = serializedSplitview;
|
|
6047
6672
|
const queue = [];
|
|
6673
|
+
// take note of the existing dimensions
|
|
6674
|
+
const width = this.width;
|
|
6675
|
+
const height = this.height;
|
|
6048
6676
|
this.splitview = new Splitview(this.element, {
|
|
6049
6677
|
orientation,
|
|
6050
6678
|
proportionalLayout: this.options.proportionalLayout,
|
|
@@ -6081,7 +6709,7 @@ class SplitviewComponent extends Resizable {
|
|
|
6081
6709
|
}),
|
|
6082
6710
|
},
|
|
6083
6711
|
});
|
|
6084
|
-
this.layout(
|
|
6712
|
+
this.layout(width, height);
|
|
6085
6713
|
queue.forEach((f) => f());
|
|
6086
6714
|
if (typeof activeView === 'string') {
|
|
6087
6715
|
const panel = this.getPanel(activeView);
|
|
@@ -6348,6 +6976,9 @@ class PaneviewComponent extends Resizable {
|
|
|
6348
6976
|
this.clear();
|
|
6349
6977
|
const { views, size } = serializedPaneview;
|
|
6350
6978
|
const queue = [];
|
|
6979
|
+
// take note of the existing dimensions
|
|
6980
|
+
const width = this.width;
|
|
6981
|
+
const height = this.height;
|
|
6351
6982
|
this.paneview = new Paneview(this.element, {
|
|
6352
6983
|
orientation: Orientation.VERTICAL,
|
|
6353
6984
|
descriptor: {
|
|
@@ -6403,7 +7034,7 @@ class PaneviewComponent extends Resizable {
|
|
|
6403
7034
|
}),
|
|
6404
7035
|
},
|
|
6405
7036
|
});
|
|
6406
|
-
this.layout(
|
|
7037
|
+
this.layout(width, height);
|
|
6407
7038
|
queue.forEach((f) => f());
|
|
6408
7039
|
this._onDidLayoutfromJSON.fire();
|
|
6409
7040
|
}
|
|
@@ -6542,4 +7173,5 @@ class SplitviewPanel extends BasePanelView {
|
|
|
6542
7173
|
}
|
|
6543
7174
|
}
|
|
6544
7175
|
|
|
6545
|
-
export { BaseGrid, ContentContainer, DefaultDockviewDeserialzier, DefaultTab, DockviewApi, DockviewComponent, CompositeDisposable as DockviewCompositeDisposable, DockviewDropTargets, Emitter as DockviewEmitter, Event as DockviewEvent, DockviewGroupPanel, DockviewGroupPanelModel, MutableDisposable as DockviewMutableDisposable, DockviewPanel, DraggablePaneviewPanel, Gridview, GridviewApi, GridviewComponent, GridviewPanel, LayoutPriority, LocalSelectionTransfer, Orientation, PaneFramework, PaneTransfer, PanelTransfer, Paneview, PaneviewApi, PaneviewComponent, PaneviewPanel, SashState, Sizing, Splitview, SplitviewApi, SplitviewComponent, SplitviewPanel, Tab, createComponent, directionToPosition, getDirectionOrientation, getGridLocation, getLocationOrientation, getPaneData, getPanelData, getRelativeLocation, indexInParent, isGridBranchNode, isGroupOptionsWithGroup, isGroupOptionsWithPanel, isPanelOptionsWithGroup, isPanelOptionsWithPanel, orthogonal, positionToDirection, toTarget
|
|
7176
|
+
export { BaseGrid, ContentContainer, DefaultDockviewDeserialzier, DefaultTab, DockviewApi, DockviewComponent, CompositeDisposable as DockviewCompositeDisposable, DockviewDropTargets, Emitter as DockviewEmitter, Event as DockviewEvent, DockviewGroupPanel, DockviewGroupPanelModel, MutableDisposable as DockviewMutableDisposable, DockviewPanel, DraggablePaneviewPanel, Gridview, GridviewApi, GridviewComponent, GridviewPanel, LayoutPriority, LocalSelectionTransfer, Orientation, PaneFramework, PaneTransfer, PanelTransfer, Paneview, PaneviewApi, PaneviewComponent, PaneviewPanel, SashState, Sizing, Splitview, SplitviewApi, SplitviewComponent, SplitviewPanel, Tab, createComponent, directionToPosition, getDirectionOrientation, getGridLocation, getLocationOrientation, getPaneData, getPanelData, getRelativeLocation, indexInParent, isGridBranchNode, isGroupOptionsWithGroup, isGroupOptionsWithPanel, isPanelOptionsWithGroup, isPanelOptionsWithPanel, orthogonal, positionToDirection, toTarget };
|
|
7177
|
+
//# sourceMappingURL=dockview-core.esm.js.map
|