dockview-core 1.7.5 → 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 +40 -20
- 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/splitview.d.ts.map +1 -1
- package/dist/cjs/splitview/splitview.js +12 -11
- package/dist/cjs/splitview/splitview.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 +808 -158
- 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 +807 -157
- package/dist/dockview-core.amd.noStyle.js.map +1 -0
- package/dist/dockview-core.cjs.js +808 -158
- package/dist/dockview-core.cjs.js.map +1 -0
- package/dist/dockview-core.esm.js +809 -158
- 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 +808 -158
- 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 +807 -157
- 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 +40 -19
- 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/splitview.d.ts.map +1 -1
- package/dist/esm/splitview/splitview.js +12 -11
- package/dist/esm/splitview/splitview.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 +217 -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}\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) => {
|
|
@@ -918,7 +936,7 @@ class Splitview {
|
|
|
918
936
|
//add sash
|
|
919
937
|
const sash = document.createElement('div');
|
|
920
938
|
sash.className = 'sash';
|
|
921
|
-
const
|
|
939
|
+
const onPointerStart = (event) => {
|
|
922
940
|
for (const item of this.viewItems) {
|
|
923
941
|
item.enabled = false;
|
|
924
942
|
}
|
|
@@ -977,11 +995,10 @@ class Splitview {
|
|
|
977
995
|
size: snappedViewItem.size,
|
|
978
996
|
};
|
|
979
997
|
}
|
|
980
|
-
|
|
981
|
-
const mousemove = (mousemoveEvent) => {
|
|
998
|
+
const onPointerMove = (event) => {
|
|
982
999
|
const current = this._orientation === Orientation.HORIZONTAL
|
|
983
|
-
?
|
|
984
|
-
:
|
|
1000
|
+
? event.clientX
|
|
1001
|
+
: event.clientY;
|
|
985
1002
|
const delta = current - start;
|
|
986
1003
|
this.resize(sashIndex, delta, sizes, undefined, undefined, minDelta, maxDelta, snapBefore, snapAfter);
|
|
987
1004
|
this.distributeEmptySpace();
|
|
@@ -995,18 +1012,20 @@ class Splitview {
|
|
|
995
1012
|
iframe.style.pointerEvents = 'auto';
|
|
996
1013
|
}
|
|
997
1014
|
this.saveProportions();
|
|
998
|
-
document.removeEventListener('
|
|
999
|
-
document.removeEventListener('
|
|
1015
|
+
document.removeEventListener('pointermove', onPointerMove);
|
|
1016
|
+
document.removeEventListener('pointerup', end);
|
|
1017
|
+
document.removeEventListener('pointercancel', end);
|
|
1000
1018
|
this._onDidSashEnd.fire(undefined);
|
|
1001
1019
|
};
|
|
1002
|
-
document.addEventListener('
|
|
1003
|
-
document.addEventListener('
|
|
1020
|
+
document.addEventListener('pointermove', onPointerMove);
|
|
1021
|
+
document.addEventListener('pointerup', end);
|
|
1022
|
+
document.addEventListener('pointercancel', end);
|
|
1004
1023
|
};
|
|
1005
|
-
sash.addEventListener('
|
|
1024
|
+
sash.addEventListener('pointerdown', onPointerStart);
|
|
1006
1025
|
const sashItem = {
|
|
1007
1026
|
container: sash,
|
|
1008
1027
|
disposable: () => {
|
|
1009
|
-
sash.removeEventListener('
|
|
1028
|
+
sash.removeEventListener('pointerdown', onPointerStart);
|
|
1010
1029
|
this.sashContainer.removeChild(sash);
|
|
1011
1030
|
},
|
|
1012
1031
|
};
|
|
@@ -1630,7 +1649,7 @@ class BranchNode extends CompositeDisposable {
|
|
|
1630
1649
|
: true,
|
|
1631
1650
|
};
|
|
1632
1651
|
}),
|
|
1633
|
-
size: this.
|
|
1652
|
+
size: this.orthogonalSize,
|
|
1634
1653
|
};
|
|
1635
1654
|
this.children = childDescriptors.map((c) => c.node);
|
|
1636
1655
|
this.splitview = new Splitview(this.element, {
|
|
@@ -1693,7 +1712,7 @@ class BranchNode extends CompositeDisposable {
|
|
|
1693
1712
|
layout(size, orthogonalSize) {
|
|
1694
1713
|
this._size = orthogonalSize;
|
|
1695
1714
|
this._orthogonalSize = size;
|
|
1696
|
-
this.splitview.layout(
|
|
1715
|
+
this.splitview.layout(orthogonalSize, size);
|
|
1697
1716
|
}
|
|
1698
1717
|
addChild(node, size, index, skipLayout) {
|
|
1699
1718
|
if (index < 0 || index > this.children.length) {
|
|
@@ -1918,9 +1937,9 @@ class Gridview {
|
|
|
1918
1937
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
1919
1938
|
}
|
|
1920
1939
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
1921
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize
|
|
1940
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
1922
1941
|
}
|
|
1923
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize
|
|
1942
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
1924
1943
|
let result;
|
|
1925
1944
|
if (node.type === 'branch') {
|
|
1926
1945
|
const serializedChildren = node.data;
|
|
@@ -1930,9 +1949,9 @@ class Gridview {
|
|
|
1930
1949
|
visible: serializedChild.visible,
|
|
1931
1950
|
};
|
|
1932
1951
|
});
|
|
1933
|
-
//
|
|
1934
|
-
//
|
|
1935
|
-
|
|
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);
|
|
1936
1955
|
}
|
|
1937
1956
|
else {
|
|
1938
1957
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -1965,7 +1984,8 @@ class Gridview {
|
|
|
1965
1984
|
const oldRoot = this.root;
|
|
1966
1985
|
oldRoot.element.remove();
|
|
1967
1986
|
this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
|
|
1968
|
-
if (oldRoot.children.length ===
|
|
1987
|
+
if (oldRoot.children.length === 0) ;
|
|
1988
|
+
else if (oldRoot.children.length === 1) {
|
|
1969
1989
|
// can remove one level of redundant branching if there is only a single child
|
|
1970
1990
|
const childReference = oldRoot.children[0];
|
|
1971
1991
|
const child = oldRoot.removeChild(0); // remove to prevent disposal when disposing of unwanted root
|
|
@@ -2099,52 +2119,70 @@ class Gridview {
|
|
|
2099
2119
|
if (!(parent instanceof BranchNode)) {
|
|
2100
2120
|
throw new Error('Invalid location');
|
|
2101
2121
|
}
|
|
2102
|
-
const
|
|
2103
|
-
if (!(
|
|
2122
|
+
const nodeToRemove = parent.children[index];
|
|
2123
|
+
if (!(nodeToRemove instanceof LeafNode)) {
|
|
2104
2124
|
throw new Error('Invalid location');
|
|
2105
2125
|
}
|
|
2106
2126
|
parent.removeChild(index, sizing);
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2127
|
+
nodeToRemove.dispose();
|
|
2128
|
+
if (parent.children.length !== 1) {
|
|
2129
|
+
return nodeToRemove.view;
|
|
2130
|
+
}
|
|
2131
|
+
// if the parent has only one child and we know the parent is a BranchNode we can make the tree
|
|
2132
|
+
// more efficiently spaced by replacing the parent BranchNode with the child.
|
|
2133
|
+
// if that child is a LeafNode then we simply replace the BranchNode with the child otherwise if the child
|
|
2134
|
+
// is a BranchNode too we should spread it's children into the grandparent.
|
|
2135
|
+
// refer to the remaining child as the sibling
|
|
2113
2136
|
const sibling = parent.children[0];
|
|
2114
2137
|
if (pathToParent.length === 0) {
|
|
2115
|
-
// parent is root
|
|
2138
|
+
// if the parent is root
|
|
2116
2139
|
if (sibling instanceof LeafNode) {
|
|
2117
|
-
|
|
2140
|
+
// if the sibling is a leaf node no action is required
|
|
2141
|
+
return nodeToRemove.view;
|
|
2118
2142
|
}
|
|
2119
|
-
//
|
|
2143
|
+
// otherwise the sibling is a branch node. since the parent is the root and the root has only one child
|
|
2144
|
+
// which is a branch node we can just set this branch node to be the new root node
|
|
2145
|
+
// for good housekeeping we'll removing the sibling from it's existing tree
|
|
2120
2146
|
parent.removeChild(0, sizing);
|
|
2147
|
+
// and set that sibling node to be root
|
|
2121
2148
|
this.root = sibling;
|
|
2122
|
-
return
|
|
2149
|
+
return nodeToRemove.view;
|
|
2123
2150
|
}
|
|
2151
|
+
// otherwise the parent is apart of a large sub-tree
|
|
2124
2152
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2125
2153
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2126
2154
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2155
|
+
// either way we need to remove the sibling from it's existing tree
|
|
2127
2156
|
parent.removeChild(0, sizing);
|
|
2157
|
+
// note the sizes of all of the grandparents children
|
|
2128
2158
|
const sizes = grandParent.children.map((_size, i) => grandParent.getChildSize(i));
|
|
2129
|
-
|
|
2159
|
+
// remove the parent from the grandparent since we are moving the sibling to take the parents place
|
|
2160
|
+
// this parent is no longer used and can be disposed of
|
|
2161
|
+
grandParent.removeChild(parentIndex, sizing).dispose();
|
|
2130
2162
|
if (sibling instanceof BranchNode) {
|
|
2163
|
+
// replace the parent with the siblings children
|
|
2131
2164
|
sizes.splice(parentIndex, 1, ...sibling.children.map((c) => c.size));
|
|
2165
|
+
// and add those siblings to the grandparent
|
|
2132
2166
|
for (let i = 0; i < sibling.children.length; i++) {
|
|
2133
2167
|
const child = sibling.children[i];
|
|
2134
2168
|
grandParent.addChild(child, child.size, parentIndex + i);
|
|
2135
2169
|
}
|
|
2136
2170
|
}
|
|
2137
2171
|
else {
|
|
2172
|
+
// otherwise create a new leaf node and add that to the grandparent
|
|
2138
2173
|
const newSibling = new LeafNode(sibling.view, orthogonal(sibling.orientation), sibling.size);
|
|
2139
2174
|
const siblingSizing = isSiblingVisible
|
|
2140
2175
|
? sibling.orthogonalSize
|
|
2141
2176
|
: Sizing.Invisible(sibling.orthogonalSize);
|
|
2142
2177
|
grandParent.addChild(newSibling, siblingSizing, parentIndex);
|
|
2143
2178
|
}
|
|
2179
|
+
// the containing node of the sibling is no longer required and can be disposed of
|
|
2180
|
+
sibling.dispose();
|
|
2181
|
+
// resize everything
|
|
2144
2182
|
for (let i = 0; i < sizes.length; i++) {
|
|
2145
2183
|
grandParent.resizeChild(i, sizes[i]);
|
|
2146
2184
|
}
|
|
2147
|
-
return
|
|
2185
|
+
return nodeToRemove.view;
|
|
2148
2186
|
}
|
|
2149
2187
|
layout(width, height) {
|
|
2150
2188
|
const [size, orthogonalSize] = this.root.orientation === Orientation.HORIZONTAL
|
|
@@ -2463,6 +2501,9 @@ class DockviewApi {
|
|
|
2463
2501
|
addPanel(options) {
|
|
2464
2502
|
return this.component.addPanel(options);
|
|
2465
2503
|
}
|
|
2504
|
+
removePanel(panel) {
|
|
2505
|
+
this.component.removePanel(panel);
|
|
2506
|
+
}
|
|
2466
2507
|
addGroup(options) {
|
|
2467
2508
|
return this.component.addGroup(options);
|
|
2468
2509
|
}
|
|
@@ -2481,6 +2522,9 @@ class DockviewApi {
|
|
|
2481
2522
|
getGroup(id) {
|
|
2482
2523
|
return this.component.getPanel(id);
|
|
2483
2524
|
}
|
|
2525
|
+
addFloatingGroup(item, coord) {
|
|
2526
|
+
return this.component.addFloatingGroup(item, coord);
|
|
2527
|
+
}
|
|
2484
2528
|
fromJSON(data) {
|
|
2485
2529
|
this.component.fromJSON(data);
|
|
2486
2530
|
}
|
|
@@ -2573,10 +2617,14 @@ class Droptarget extends CompositeDisposable {
|
|
|
2573
2617
|
this._onDrop = new Emitter();
|
|
2574
2618
|
this.onDrop = this._onDrop.event;
|
|
2575
2619
|
// use a set to take advantage of #<set>.has
|
|
2576
|
-
|
|
2620
|
+
this._acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
|
|
2577
2621
|
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
2578
2622
|
onDragEnter: () => undefined,
|
|
2579
2623
|
onDragOver: (e) => {
|
|
2624
|
+
if (this._acceptedTargetZonesSet.size === 0) {
|
|
2625
|
+
this.removeDropTarget();
|
|
2626
|
+
return;
|
|
2627
|
+
}
|
|
2580
2628
|
const width = this.element.clientWidth;
|
|
2581
2629
|
const height = this.element.clientHeight;
|
|
2582
2630
|
if (width === 0 || height === 0) {
|
|
@@ -2585,20 +2633,28 @@ class Droptarget extends CompositeDisposable {
|
|
|
2585
2633
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
2586
2634
|
const x = e.clientX - rect.left;
|
|
2587
2635
|
const y = e.clientY - rect.top;
|
|
2588
|
-
const quadrant = this.calculateQuadrant(
|
|
2589
|
-
|
|
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) {
|
|
2590
2643
|
// no drop target should be displayed
|
|
2591
2644
|
this.removeDropTarget();
|
|
2592
2645
|
return;
|
|
2593
2646
|
}
|
|
2594
2647
|
if (typeof this.options.canDisplayOverlay === 'boolean') {
|
|
2595
2648
|
if (!this.options.canDisplayOverlay) {
|
|
2649
|
+
this.removeDropTarget();
|
|
2596
2650
|
return;
|
|
2597
2651
|
}
|
|
2598
2652
|
}
|
|
2599
2653
|
else if (!this.options.canDisplayOverlay(e, quadrant)) {
|
|
2654
|
+
this.removeDropTarget();
|
|
2600
2655
|
return;
|
|
2601
2656
|
}
|
|
2657
|
+
this.markAsUsed(e);
|
|
2602
2658
|
if (!this.targetElement) {
|
|
2603
2659
|
this.targetElement = document.createElement('div');
|
|
2604
2660
|
this.targetElement.className = 'drop-target-dropzone';
|
|
@@ -2609,12 +2665,6 @@ class Droptarget extends CompositeDisposable {
|
|
|
2609
2665
|
this.element.classList.add('drop-target');
|
|
2610
2666
|
this.element.append(this.targetElement);
|
|
2611
2667
|
}
|
|
2612
|
-
if (this.options.acceptedTargetZones.length === 0) {
|
|
2613
|
-
return;
|
|
2614
|
-
}
|
|
2615
|
-
if (!this.targetElement || !this.overlayElement) {
|
|
2616
|
-
return;
|
|
2617
|
-
}
|
|
2618
2668
|
this.toggleClasses(quadrant, width, height);
|
|
2619
2669
|
this.setState(quadrant);
|
|
2620
2670
|
},
|
|
@@ -2637,10 +2687,26 @@ class Droptarget extends CompositeDisposable {
|
|
|
2637
2687
|
},
|
|
2638
2688
|
}));
|
|
2639
2689
|
}
|
|
2690
|
+
setTargetZones(acceptedTargetZones) {
|
|
2691
|
+
this._acceptedTargetZonesSet = new Set(acceptedTargetZones);
|
|
2692
|
+
}
|
|
2640
2693
|
dispose() {
|
|
2641
2694
|
this.removeDropTarget();
|
|
2642
2695
|
super.dispose();
|
|
2643
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
|
+
}
|
|
2644
2710
|
toggleClasses(quadrant, width, height) {
|
|
2645
2711
|
var _a, _b, _c, _d;
|
|
2646
2712
|
if (!this.overlayElement) {
|
|
@@ -2735,6 +2801,7 @@ class Droptarget extends CompositeDisposable {
|
|
|
2735
2801
|
}
|
|
2736
2802
|
}
|
|
2737
2803
|
}
|
|
2804
|
+
Droptarget.USED_EVENT_ID = '__dockview_droptarget_event_is_used__';
|
|
2738
2805
|
function calculateQuadrantAsPercentage(overlayType, x, y, width, height, threshold) {
|
|
2739
2806
|
const xp = (100 * x) / width;
|
|
2740
2807
|
const yp = (100 * y) / height;
|
|
@@ -2864,8 +2931,15 @@ class DragHandler extends CompositeDisposable {
|
|
|
2864
2931
|
this.addDisposables(this._onDragStart, this.dataDisposable, this.pointerEventsDisposable);
|
|
2865
2932
|
this.configure();
|
|
2866
2933
|
}
|
|
2934
|
+
isCancelled(_event) {
|
|
2935
|
+
return false;
|
|
2936
|
+
}
|
|
2867
2937
|
configure() {
|
|
2868
2938
|
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2939
|
+
if (this.isCancelled(event)) {
|
|
2940
|
+
event.preventDefault();
|
|
2941
|
+
return;
|
|
2942
|
+
}
|
|
2869
2943
|
const iframes = [
|
|
2870
2944
|
...getElementsByTagName('iframe'),
|
|
2871
2945
|
...getElementsByTagName('webview'),
|
|
@@ -2939,13 +3013,6 @@ class Tab extends CompositeDisposable {
|
|
|
2939
3013
|
if (event.defaultPrevented) {
|
|
2940
3014
|
return;
|
|
2941
3015
|
}
|
|
2942
|
-
/**
|
|
2943
|
-
* TODO: alternative to stopPropagation
|
|
2944
|
-
*
|
|
2945
|
-
* I need to stop the event propagation here since otherwise it'll be intercepted by event handlers
|
|
2946
|
-
* on the tabs-container. I cannot use event.preventDefault() since I need the on DragStart event to occur
|
|
2947
|
-
*/
|
|
2948
|
-
event.stopPropagation();
|
|
2949
3016
|
this._onChanged.fire(event);
|
|
2950
3017
|
}));
|
|
2951
3018
|
this.droptarget = new Droptarget(this._element, {
|
|
@@ -3003,6 +3070,22 @@ class GroupDragHandler extends DragHandler {
|
|
|
3003
3070
|
this.accessorId = accessorId;
|
|
3004
3071
|
this.group = group;
|
|
3005
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;
|
|
3006
3089
|
}
|
|
3007
3090
|
getData(dataTransfer) {
|
|
3008
3091
|
this.panelTransfer.setData([new PanelTransfer(this.accessorId, this.group.id, null)], PanelTransfer.prototype);
|
|
@@ -3093,17 +3176,30 @@ class TabsContainer extends CompositeDisposable {
|
|
|
3093
3176
|
hide() {
|
|
3094
3177
|
this._element.style.display = 'none';
|
|
3095
3178
|
}
|
|
3096
|
-
|
|
3097
|
-
if (this.
|
|
3179
|
+
setRightActionsElement(element) {
|
|
3180
|
+
if (this.rightActions === element) {
|
|
3098
3181
|
return;
|
|
3099
3182
|
}
|
|
3100
|
-
if (this.
|
|
3101
|
-
this.
|
|
3102
|
-
this.
|
|
3183
|
+
if (this.rightActions) {
|
|
3184
|
+
this.rightActions.remove();
|
|
3185
|
+
this.rightActions = undefined;
|
|
3103
3186
|
}
|
|
3104
3187
|
if (element) {
|
|
3105
|
-
this.
|
|
3106
|
-
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;
|
|
3107
3203
|
}
|
|
3108
3204
|
}
|
|
3109
3205
|
get element() {
|
|
@@ -3138,19 +3234,35 @@ class TabsContainer extends CompositeDisposable {
|
|
|
3138
3234
|
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3139
3235
|
}
|
|
3140
3236
|
}));
|
|
3141
|
-
this.
|
|
3142
|
-
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';
|
|
3143
3241
|
this.tabContainer = document.createElement('div');
|
|
3144
3242
|
this.tabContainer.className = 'tabs-container';
|
|
3145
3243
|
this.voidContainer = new VoidContainer(this.accessor, this.group);
|
|
3146
3244
|
this._element.appendChild(this.tabContainer);
|
|
3245
|
+
this._element.appendChild(this.leftActionsContainer);
|
|
3147
3246
|
this._element.appendChild(this.voidContainer.element);
|
|
3148
|
-
this._element.appendChild(this.
|
|
3247
|
+
this._element.appendChild(this.rightActionsContainer);
|
|
3149
3248
|
this.addDisposables(this.voidContainer, this.voidContainer.onDrop((event) => {
|
|
3150
3249
|
this._onDrop.fire({
|
|
3151
3250
|
event: event.nativeEvent,
|
|
3152
3251
|
index: this.tabs.length,
|
|
3153
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
|
+
}
|
|
3154
3266
|
}), addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
3155
3267
|
if (event.defaultPrevented) {
|
|
3156
3268
|
return;
|
|
@@ -3204,6 +3316,21 @@ class TabsContainer extends CompositeDisposable {
|
|
|
3204
3316
|
tabToAdd.setContent(panel.view.tab);
|
|
3205
3317
|
const disposable = CompositeDisposable.from(tabToAdd.onChanged((event) => {
|
|
3206
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
|
+
}
|
|
3207
3334
|
const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
3208
3335
|
this.group.model.isContentFocused;
|
|
3209
3336
|
const isLeftClick = event.button === 0;
|
|
@@ -3273,6 +3400,17 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3273
3400
|
}
|
|
3274
3401
|
return isAncestor(document.activeElement, this.contentContainer.element);
|
|
3275
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
|
+
}
|
|
3276
3414
|
constructor(container, accessor, id, options, groupPanel) {
|
|
3277
3415
|
super();
|
|
3278
3416
|
this.container = container;
|
|
@@ -3282,6 +3420,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3282
3420
|
this.groupPanel = groupPanel;
|
|
3283
3421
|
this._isGroupActive = false;
|
|
3284
3422
|
this._locked = false;
|
|
3423
|
+
this._isFloating = false;
|
|
3285
3424
|
this.mostRecentlyUsed = [];
|
|
3286
3425
|
this._onDidChange = new Emitter();
|
|
3287
3426
|
this.onDidChange = this._onDidChange.event;
|
|
@@ -3298,7 +3437,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3298
3437
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
3299
3438
|
this._onDidActivePanelChange = new Emitter();
|
|
3300
3439
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
3301
|
-
this.container
|
|
3440
|
+
toggleClass(this.container, 'groupview', true);
|
|
3302
3441
|
this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
|
|
3303
3442
|
this.contentContainer = new ContentContainer();
|
|
3304
3443
|
this.dropTarget = new Droptarget(this.contentContainer.element, {
|
|
@@ -3308,6 +3447,9 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3308
3447
|
return false;
|
|
3309
3448
|
}
|
|
3310
3449
|
const data = getPanelData();
|
|
3450
|
+
if (!data && event.shiftKey && !this.isFloating) {
|
|
3451
|
+
return false;
|
|
3452
|
+
}
|
|
3311
3453
|
if (data && data.viewId === this.accessor.id) {
|
|
3312
3454
|
if (data.groupId === this.id) {
|
|
3313
3455
|
if (position === 'center') {
|
|
@@ -3352,14 +3494,25 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3352
3494
|
// correctly initialized
|
|
3353
3495
|
this.setActive(this.isActive, true, true);
|
|
3354
3496
|
this.updateContainer();
|
|
3355
|
-
if (this.accessor.options.
|
|
3356
|
-
this.
|
|
3357
|
-
|
|
3358
|
-
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({
|
|
3359
3502
|
containerApi: new DockviewApi(this.accessor),
|
|
3360
3503
|
api: this.groupPanel.api,
|
|
3361
3504
|
});
|
|
3362
|
-
this.tabsContainer.
|
|
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({
|
|
3512
|
+
containerApi: new DockviewApi(this.accessor),
|
|
3513
|
+
api: this.groupPanel.api,
|
|
3514
|
+
});
|
|
3515
|
+
this.tabsContainer.setLeftActionsElement(this._leftHeaderActions.element);
|
|
3363
3516
|
}
|
|
3364
3517
|
}
|
|
3365
3518
|
indexOf(panel) {
|
|
@@ -3492,7 +3645,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3492
3645
|
return this._activePanel === panel;
|
|
3493
3646
|
}
|
|
3494
3647
|
updateActions(element) {
|
|
3495
|
-
this.tabsContainer.
|
|
3648
|
+
this.tabsContainer.setRightActionsElement(element);
|
|
3496
3649
|
}
|
|
3497
3650
|
setActive(isGroupActive, skipFocus = false, force = false) {
|
|
3498
3651
|
var _a, _b, _c, _d;
|
|
@@ -3664,9 +3817,10 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
3664
3817
|
}
|
|
3665
3818
|
}
|
|
3666
3819
|
dispose() {
|
|
3667
|
-
var _a, _b;
|
|
3820
|
+
var _a, _b, _c;
|
|
3668
3821
|
super.dispose();
|
|
3669
|
-
(
|
|
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);
|
|
3670
3824
|
for (const panel of this.panels) {
|
|
3671
3825
|
panel.dispose();
|
|
3672
3826
|
}
|
|
@@ -4460,8 +4614,8 @@ class GridviewPanel extends BasePanelView {
|
|
|
4460
4614
|
get isActive() {
|
|
4461
4615
|
return this.api.isActive;
|
|
4462
4616
|
}
|
|
4463
|
-
constructor(id, component, options) {
|
|
4464
|
-
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));
|
|
4465
4619
|
this._evaluatedMinimumWidth = 0;
|
|
4466
4620
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4467
4621
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -4559,6 +4713,32 @@ class GridviewPanel extends BasePanelView {
|
|
|
4559
4713
|
}
|
|
4560
4714
|
}
|
|
4561
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
|
+
|
|
4562
4742
|
class DockviewGroupPanel extends GridviewPanel {
|
|
4563
4743
|
get panels() {
|
|
4564
4744
|
return this._model.panels;
|
|
@@ -4585,7 +4765,8 @@ class DockviewGroupPanel extends GridviewPanel {
|
|
|
4585
4765
|
super(id, 'groupview_default', {
|
|
4586
4766
|
minimumHeight: 100,
|
|
4587
4767
|
minimumWidth: 100,
|
|
4588
|
-
});
|
|
4768
|
+
}, new DockviewGroupPanelApiImpl(id, accessor));
|
|
4769
|
+
this.api.initialize(this); // cannot use 'this' after after 'super' call
|
|
4589
4770
|
this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
|
|
4590
4771
|
}
|
|
4591
4772
|
initialize() {
|
|
@@ -4603,7 +4784,6 @@ class DockviewGroupPanel extends GridviewPanel {
|
|
|
4603
4784
|
return this._model;
|
|
4604
4785
|
}
|
|
4605
4786
|
toJSON() {
|
|
4606
|
-
// TODO fix typing
|
|
4607
4787
|
return this.model.toJSON();
|
|
4608
4788
|
}
|
|
4609
4789
|
}
|
|
@@ -4657,9 +4837,10 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
4657
4837
|
get group() {
|
|
4658
4838
|
return this._group;
|
|
4659
4839
|
}
|
|
4660
|
-
constructor(panel, group) {
|
|
4840
|
+
constructor(panel, group, accessor) {
|
|
4661
4841
|
super(panel.id);
|
|
4662
4842
|
this.panel = panel;
|
|
4843
|
+
this.accessor = accessor;
|
|
4663
4844
|
this._onDidTitleChange = new Emitter();
|
|
4664
4845
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
4665
4846
|
this._onDidActiveGroupChange = new Emitter();
|
|
@@ -4671,6 +4852,10 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
4671
4852
|
this._group = group;
|
|
4672
4853
|
this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
4673
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
|
+
}
|
|
4674
4859
|
setTitle(title) {
|
|
4675
4860
|
this.panel.setTitle(title);
|
|
4676
4861
|
}
|
|
@@ -4695,7 +4880,7 @@ class DockviewPanel extends CompositeDisposable {
|
|
|
4695
4880
|
this.containerApi = containerApi;
|
|
4696
4881
|
this.view = view;
|
|
4697
4882
|
this._group = group;
|
|
4698
|
-
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
4883
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
4699
4884
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
4700
4885
|
accessor.setActivePanel(this);
|
|
4701
4886
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -5036,6 +5221,296 @@ class Watermark extends CompositeDisposable {
|
|
|
5036
5221
|
}
|
|
5037
5222
|
}
|
|
5038
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
|
+
|
|
5039
5514
|
class DockviewComponent extends BaseGrid {
|
|
5040
5515
|
get orientation() {
|
|
5041
5516
|
return this.gridview.orientation;
|
|
@@ -5076,7 +5551,8 @@ class DockviewComponent extends BaseGrid {
|
|
|
5076
5551
|
this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
|
|
5077
5552
|
this._onDidActivePanelChange = new Emitter();
|
|
5078
5553
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
5079
|
-
this.
|
|
5554
|
+
this.floatingGroups = [];
|
|
5555
|
+
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
5080
5556
|
this.addDisposables(this._onDidDrop, Event.any(this.onDidAddGroup, this.onDidRemoveGroup)(() => {
|
|
5081
5557
|
this.updateWatermark();
|
|
5082
5558
|
}), Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
@@ -5106,6 +5582,11 @@ class DockviewComponent extends BaseGrid {
|
|
|
5106
5582
|
if (data.viewId !== this.id) {
|
|
5107
5583
|
return false;
|
|
5108
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
|
+
}
|
|
5109
5590
|
return true;
|
|
5110
5591
|
}
|
|
5111
5592
|
if (this.options.showDndOverlay) {
|
|
@@ -5118,7 +5599,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5118
5599
|
}
|
|
5119
5600
|
return false;
|
|
5120
5601
|
},
|
|
5121
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right'],
|
|
5602
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
5122
5603
|
overlayModel: {
|
|
5123
5604
|
activationSize: { type: 'pixels', value: 10 },
|
|
5124
5605
|
size: { type: 'pixels', value: 20 },
|
|
@@ -5136,6 +5617,75 @@ class DockviewComponent extends BaseGrid {
|
|
|
5136
5617
|
this._api = new DockviewApi(this);
|
|
5137
5618
|
this.updateWatermark();
|
|
5138
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
|
+
}
|
|
5139
5689
|
orthogonalize(position) {
|
|
5140
5690
|
switch (position) {
|
|
5141
5691
|
case 'top':
|
|
@@ -5158,6 +5708,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5158
5708
|
switch (position) {
|
|
5159
5709
|
case 'top':
|
|
5160
5710
|
case 'left':
|
|
5711
|
+
case 'center':
|
|
5161
5712
|
return this.createGroupAtLocation([0]); // insert into first position
|
|
5162
5713
|
case 'bottom':
|
|
5163
5714
|
case 'right':
|
|
@@ -5175,6 +5726,15 @@ class DockviewComponent extends BaseGrid {
|
|
|
5175
5726
|
}
|
|
5176
5727
|
this.layout(this.gridview.width, this.gridview.height, true);
|
|
5177
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
|
+
}
|
|
5178
5738
|
focus() {
|
|
5179
5739
|
var _a;
|
|
5180
5740
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -5237,51 +5797,81 @@ class DockviewComponent extends BaseGrid {
|
|
|
5237
5797
|
collection[panel.id] = panel.toJSON();
|
|
5238
5798
|
return collection;
|
|
5239
5799
|
}, {});
|
|
5240
|
-
|
|
5800
|
+
const floats = this.floatingGroups.map((floatingGroup) => {
|
|
5801
|
+
return {
|
|
5802
|
+
data: floatingGroup.group.toJSON(),
|
|
5803
|
+
position: floatingGroup.overlay.toJSON(),
|
|
5804
|
+
};
|
|
5805
|
+
});
|
|
5806
|
+
const result = {
|
|
5241
5807
|
grid: data,
|
|
5242
5808
|
panels,
|
|
5243
5809
|
activeGroup: (_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.id,
|
|
5244
5810
|
};
|
|
5811
|
+
if (floats.length > 0) {
|
|
5812
|
+
result.floatingGroups = floats;
|
|
5813
|
+
}
|
|
5814
|
+
return result;
|
|
5245
5815
|
}
|
|
5246
5816
|
fromJSON(data) {
|
|
5817
|
+
var _a;
|
|
5247
5818
|
this.clear();
|
|
5248
5819
|
const { grid, panels, activeGroup } = data;
|
|
5249
5820
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
5250
5821
|
throw new Error('root must be of type branch');
|
|
5251
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
|
+
};
|
|
5252
5849
|
this.gridview.deserialize(grid, {
|
|
5253
5850
|
fromJSON: (node) => {
|
|
5254
|
-
|
|
5255
|
-
const group = this.createGroup({
|
|
5256
|
-
id,
|
|
5257
|
-
locked: !!locked,
|
|
5258
|
-
hideHeader: !!hideHeader,
|
|
5259
|
-
});
|
|
5260
|
-
this._onDidAddGroup.fire(group);
|
|
5261
|
-
for (const child of views) {
|
|
5262
|
-
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
5263
|
-
const isActive = typeof activeView === 'string' &&
|
|
5264
|
-
activeView === panel.id;
|
|
5265
|
-
group.model.openPanel(panel, {
|
|
5266
|
-
skipSetPanelActive: !isActive,
|
|
5267
|
-
skipSetGroupActive: true,
|
|
5268
|
-
});
|
|
5269
|
-
}
|
|
5270
|
-
if (!group.activePanel && group.panels.length > 0) {
|
|
5271
|
-
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
5272
|
-
skipSetGroupActive: true,
|
|
5273
|
-
});
|
|
5274
|
-
}
|
|
5275
|
-
return group;
|
|
5851
|
+
return createGroupFromSerializedState(node.data);
|
|
5276
5852
|
},
|
|
5277
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
|
+
}
|
|
5278
5869
|
if (typeof activeGroup === 'string') {
|
|
5279
5870
|
const panel = this.getPanel(activeGroup);
|
|
5280
5871
|
if (panel) {
|
|
5281
5872
|
this.doSetGroupActive(panel);
|
|
5282
5873
|
}
|
|
5283
5874
|
}
|
|
5284
|
-
this.gridview.layout(this.width, this.height);
|
|
5285
5875
|
this._onDidLayoutFromJSON.fire();
|
|
5286
5876
|
}
|
|
5287
5877
|
clear() {
|
|
@@ -5290,7 +5880,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5290
5880
|
const hasActivePanel = !!this.activePanel;
|
|
5291
5881
|
for (const group of groups) {
|
|
5292
5882
|
// remove the group will automatically remove the panels
|
|
5293
|
-
this.removeGroup(group, true);
|
|
5883
|
+
this.removeGroup(group, { skipActive: true });
|
|
5294
5884
|
}
|
|
5295
5885
|
if (hasActiveGroup) {
|
|
5296
5886
|
this.doSetGroupActive(undefined);
|
|
@@ -5312,6 +5902,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
5312
5902
|
throw new Error(`panel with id ${options.id} already exists`);
|
|
5313
5903
|
}
|
|
5314
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
|
+
}
|
|
5315
5908
|
if (options.position) {
|
|
5316
5909
|
if (isPanelOptionsWithPanel(options.position)) {
|
|
5317
5910
|
const referencePanel = typeof options.position.referencePanel === 'string'
|
|
@@ -5344,7 +5937,20 @@ class DockviewComponent extends BaseGrid {
|
|
|
5344
5937
|
let panel;
|
|
5345
5938
|
if (referenceGroup) {
|
|
5346
5939
|
const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
|
|
5347
|
-
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') {
|
|
5348
5954
|
panel = this.createPanel(options, referenceGroup);
|
|
5349
5955
|
referenceGroup.model.openPanel(panel);
|
|
5350
5956
|
}
|
|
@@ -5356,6 +5962,19 @@ class DockviewComponent extends BaseGrid {
|
|
|
5356
5962
|
group.model.openPanel(panel);
|
|
5357
5963
|
}
|
|
5358
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
|
+
}
|
|
5359
5978
|
else {
|
|
5360
5979
|
const group = this.createGroupAtLocation();
|
|
5361
5980
|
panel = this.createPanel(options, group);
|
|
@@ -5372,7 +5991,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
5372
5991
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
5373
5992
|
}
|
|
5374
5993
|
group.model.removePanel(panel);
|
|
5375
|
-
|
|
5994
|
+
if (!options.skipDispose) {
|
|
5995
|
+
panel.dispose();
|
|
5996
|
+
}
|
|
5376
5997
|
if (group.size === 0 && options.removeEmptyGroup) {
|
|
5377
5998
|
this.removeGroup(group);
|
|
5378
5999
|
}
|
|
@@ -5387,7 +6008,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5387
6008
|
}
|
|
5388
6009
|
updateWatermark() {
|
|
5389
6010
|
var _a, _b;
|
|
5390
|
-
if (this.groups.length === 0) {
|
|
6011
|
+
if (this.groups.filter((x) => !x.api.isFloating).length === 0) {
|
|
5391
6012
|
if (!this.watermark) {
|
|
5392
6013
|
this.watermark = this.createWatermarkComponent();
|
|
5393
6014
|
this.watermark.init({
|
|
@@ -5396,7 +6017,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
5396
6017
|
const watermarkContainer = document.createElement('div');
|
|
5397
6018
|
watermarkContainer.className = 'dv-watermark-container';
|
|
5398
6019
|
watermarkContainer.appendChild(this.watermark.element);
|
|
5399
|
-
this.element.appendChild(watermarkContainer);
|
|
6020
|
+
this.gridview.element.appendChild(watermarkContainer);
|
|
5400
6021
|
}
|
|
5401
6022
|
}
|
|
5402
6023
|
else if (this.watermark) {
|
|
@@ -5446,15 +6067,28 @@ class DockviewComponent extends BaseGrid {
|
|
|
5446
6067
|
return group;
|
|
5447
6068
|
}
|
|
5448
6069
|
}
|
|
5449
|
-
removeGroup(group,
|
|
6070
|
+
removeGroup(group, options) {
|
|
6071
|
+
var _a;
|
|
5450
6072
|
const panels = [...group.panels]; // reassign since group panels will mutate
|
|
5451
6073
|
for (const panel of panels) {
|
|
5452
6074
|
this.removePanel(panel, {
|
|
5453
6075
|
removeEmptyGroup: false,
|
|
5454
|
-
skipDispose: false,
|
|
6076
|
+
skipDispose: (_a = options === null || options === void 0 ? void 0 : options.skipDispose) !== null && _a !== void 0 ? _a : false,
|
|
5455
6077
|
});
|
|
5456
6078
|
}
|
|
5457
|
-
|
|
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);
|
|
5458
6092
|
}
|
|
5459
6093
|
moveGroupOrPanel(destinationGroup, sourceGroupId, sourceItemId, destinationTarget, destinationIndex) {
|
|
5460
6094
|
var _a;
|
|
@@ -5485,25 +6119,26 @@ class DockviewComponent extends BaseGrid {
|
|
|
5485
6119
|
const targetLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
5486
6120
|
if (sourceGroup && sourceGroup.size < 2) {
|
|
5487
6121
|
const [targetParentLocation, to] = tail(targetLocation);
|
|
5488
|
-
const
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
5499
|
-
skipActive: true,
|
|
5500
|
-
skipDispose: true,
|
|
5501
|
-
});
|
|
5502
|
-
// after deleting the group we need to re-evaulate the ref location
|
|
5503
|
-
const updatedReferenceLocation = getGridLocation(destinationGroup.element);
|
|
5504
|
-
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
|
|
5505
|
-
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
|
+
}
|
|
5506
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);
|
|
5507
6142
|
}
|
|
5508
6143
|
else {
|
|
5509
6144
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(sourceItemId)) ||
|
|
@@ -5532,7 +6167,13 @@ class DockviewComponent extends BaseGrid {
|
|
|
5532
6167
|
}
|
|
5533
6168
|
}
|
|
5534
6169
|
else {
|
|
5535
|
-
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
|
+
}
|
|
5536
6177
|
const referenceLocation = getGridLocation(referenceGroup.element);
|
|
5537
6178
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
5538
6179
|
this.gridview.addView(sourceGroup, Sizing.Distribute, dropLocation);
|
|
@@ -5687,6 +6328,9 @@ class GridviewComponent extends BaseGrid {
|
|
|
5687
6328
|
this.clear();
|
|
5688
6329
|
const { grid, activePanel } = serializedGridview;
|
|
5689
6330
|
const queue = [];
|
|
6331
|
+
// take note of the existing dimensions
|
|
6332
|
+
const width = this.width;
|
|
6333
|
+
const height = this.height;
|
|
5690
6334
|
this.gridview.deserialize(grid, {
|
|
5691
6335
|
fromJSON: (node) => {
|
|
5692
6336
|
const { data } = node;
|
|
@@ -5712,7 +6356,7 @@ class GridviewComponent extends BaseGrid {
|
|
|
5712
6356
|
return view;
|
|
5713
6357
|
},
|
|
5714
6358
|
});
|
|
5715
|
-
this.layout(
|
|
6359
|
+
this.layout(width, height, true);
|
|
5716
6360
|
queue.forEach((f) => f());
|
|
5717
6361
|
if (typeof activePanel === 'string') {
|
|
5718
6362
|
const panel = this.getPanel(activePanel);
|
|
@@ -6026,6 +6670,9 @@ class SplitviewComponent extends Resizable {
|
|
|
6026
6670
|
this.clear();
|
|
6027
6671
|
const { views, orientation, size, activeView } = serializedSplitview;
|
|
6028
6672
|
const queue = [];
|
|
6673
|
+
// take note of the existing dimensions
|
|
6674
|
+
const width = this.width;
|
|
6675
|
+
const height = this.height;
|
|
6029
6676
|
this.splitview = new Splitview(this.element, {
|
|
6030
6677
|
orientation,
|
|
6031
6678
|
proportionalLayout: this.options.proportionalLayout,
|
|
@@ -6062,7 +6709,7 @@ class SplitviewComponent extends Resizable {
|
|
|
6062
6709
|
}),
|
|
6063
6710
|
},
|
|
6064
6711
|
});
|
|
6065
|
-
this.layout(
|
|
6712
|
+
this.layout(width, height);
|
|
6066
6713
|
queue.forEach((f) => f());
|
|
6067
6714
|
if (typeof activeView === 'string') {
|
|
6068
6715
|
const panel = this.getPanel(activeView);
|
|
@@ -6329,6 +6976,9 @@ class PaneviewComponent extends Resizable {
|
|
|
6329
6976
|
this.clear();
|
|
6330
6977
|
const { views, size } = serializedPaneview;
|
|
6331
6978
|
const queue = [];
|
|
6979
|
+
// take note of the existing dimensions
|
|
6980
|
+
const width = this.width;
|
|
6981
|
+
const height = this.height;
|
|
6332
6982
|
this.paneview = new Paneview(this.element, {
|
|
6333
6983
|
orientation: Orientation.VERTICAL,
|
|
6334
6984
|
descriptor: {
|
|
@@ -6384,7 +7034,7 @@ class PaneviewComponent extends Resizable {
|
|
|
6384
7034
|
}),
|
|
6385
7035
|
},
|
|
6386
7036
|
});
|
|
6387
|
-
this.layout(
|
|
7037
|
+
this.layout(width, height);
|
|
6388
7038
|
queue.forEach((f) => f());
|
|
6389
7039
|
this._onDidLayoutfromJSON.fire();
|
|
6390
7040
|
}
|
|
@@ -6523,4 +7173,5 @@ class SplitviewPanel extends BasePanelView {
|
|
|
6523
7173
|
}
|
|
6524
7174
|
}
|
|
6525
7175
|
|
|
6526
|
-
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
|