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
package/dist/dockview-core.js
CHANGED
|
@@ -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
|
*/
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
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}";
|
|
40
|
+
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}";
|
|
41
41
|
styleInject(css_248z);
|
|
42
42
|
|
|
43
43
|
class TransferObject {
|
|
@@ -307,6 +307,31 @@
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
+
function createComponent(id, componentName, components = {}, frameworkComponents = {}, createFrameworkComponent, fallback) {
|
|
311
|
+
const Component = typeof componentName === 'string'
|
|
312
|
+
? components[componentName]
|
|
313
|
+
: undefined;
|
|
314
|
+
const FrameworkComponent = typeof componentName === 'string'
|
|
315
|
+
? frameworkComponents[componentName]
|
|
316
|
+
: undefined;
|
|
317
|
+
if (Component && FrameworkComponent) {
|
|
318
|
+
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
319
|
+
}
|
|
320
|
+
if (FrameworkComponent) {
|
|
321
|
+
if (!createFrameworkComponent) {
|
|
322
|
+
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
323
|
+
}
|
|
324
|
+
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
325
|
+
}
|
|
326
|
+
if (!Component) {
|
|
327
|
+
if (fallback) {
|
|
328
|
+
return fallback();
|
|
329
|
+
}
|
|
330
|
+
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
331
|
+
}
|
|
332
|
+
return new Component(id, componentName);
|
|
333
|
+
}
|
|
334
|
+
|
|
310
335
|
function watchElementResize(element, cb) {
|
|
311
336
|
const observer = new ResizeObserver((entires) => {
|
|
312
337
|
/**
|
|
@@ -420,31 +445,16 @@
|
|
|
420
445
|
refreshState() {
|
|
421
446
|
this._refreshStateHandler();
|
|
422
447
|
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
434
|
-
}
|
|
435
|
-
if (FrameworkComponent) {
|
|
436
|
-
if (!createFrameworkComponent) {
|
|
437
|
-
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
438
|
-
}
|
|
439
|
-
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
440
|
-
}
|
|
441
|
-
if (!Component) {
|
|
442
|
-
if (fallback) {
|
|
443
|
-
return fallback();
|
|
444
|
-
}
|
|
445
|
-
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
446
|
-
}
|
|
447
|
-
return new Component(id, componentName);
|
|
448
|
+
}
|
|
449
|
+
// quasi: apparently, but not really; seemingly
|
|
450
|
+
const QUASI_PREVENT_DEFAULT_KEY = 'dv-quasiPreventDefault';
|
|
451
|
+
// mark an event directly for other listeners to check
|
|
452
|
+
function quasiPreventDefault(event) {
|
|
453
|
+
event[QUASI_PREVENT_DEFAULT_KEY] = true;
|
|
454
|
+
}
|
|
455
|
+
// check if this event has been marked
|
|
456
|
+
function quasiDefaultPrevented(event) {
|
|
457
|
+
return event[QUASI_PREVENT_DEFAULT_KEY];
|
|
448
458
|
}
|
|
449
459
|
|
|
450
460
|
function tail(arr) {
|
|
@@ -495,6 +505,14 @@
|
|
|
495
505
|
}
|
|
496
506
|
}
|
|
497
507
|
return -1;
|
|
508
|
+
}
|
|
509
|
+
function remove(array, value) {
|
|
510
|
+
const index = array.findIndex((t) => t === value);
|
|
511
|
+
if (index > -1) {
|
|
512
|
+
array.splice(index, 1);
|
|
513
|
+
return true;
|
|
514
|
+
}
|
|
515
|
+
return false;
|
|
498
516
|
}
|
|
499
517
|
|
|
500
518
|
const clamp = (value, min, max) => {
|
|
@@ -924,7 +942,7 @@
|
|
|
924
942
|
//add sash
|
|
925
943
|
const sash = document.createElement('div');
|
|
926
944
|
sash.className = 'sash';
|
|
927
|
-
const
|
|
945
|
+
const onPointerStart = (event) => {
|
|
928
946
|
for (const item of this.viewItems) {
|
|
929
947
|
item.enabled = false;
|
|
930
948
|
}
|
|
@@ -983,11 +1001,10 @@
|
|
|
983
1001
|
size: snappedViewItem.size,
|
|
984
1002
|
};
|
|
985
1003
|
}
|
|
986
|
-
|
|
987
|
-
const mousemove = (mousemoveEvent) => {
|
|
1004
|
+
const onPointerMove = (event) => {
|
|
988
1005
|
const current = this._orientation === exports.Orientation.HORIZONTAL
|
|
989
|
-
?
|
|
990
|
-
:
|
|
1006
|
+
? event.clientX
|
|
1007
|
+
: event.clientY;
|
|
991
1008
|
const delta = current - start;
|
|
992
1009
|
this.resize(sashIndex, delta, sizes, undefined, undefined, minDelta, maxDelta, snapBefore, snapAfter);
|
|
993
1010
|
this.distributeEmptySpace();
|
|
@@ -1001,18 +1018,20 @@
|
|
|
1001
1018
|
iframe.style.pointerEvents = 'auto';
|
|
1002
1019
|
}
|
|
1003
1020
|
this.saveProportions();
|
|
1004
|
-
document.removeEventListener('
|
|
1005
|
-
document.removeEventListener('
|
|
1021
|
+
document.removeEventListener('pointermove', onPointerMove);
|
|
1022
|
+
document.removeEventListener('pointerup', end);
|
|
1023
|
+
document.removeEventListener('pointercancel', end);
|
|
1006
1024
|
this._onDidSashEnd.fire(undefined);
|
|
1007
1025
|
};
|
|
1008
|
-
document.addEventListener('
|
|
1009
|
-
document.addEventListener('
|
|
1026
|
+
document.addEventListener('pointermove', onPointerMove);
|
|
1027
|
+
document.addEventListener('pointerup', end);
|
|
1028
|
+
document.addEventListener('pointercancel', end);
|
|
1010
1029
|
};
|
|
1011
|
-
sash.addEventListener('
|
|
1030
|
+
sash.addEventListener('pointerdown', onPointerStart);
|
|
1012
1031
|
const sashItem = {
|
|
1013
1032
|
container: sash,
|
|
1014
1033
|
disposable: () => {
|
|
1015
|
-
sash.removeEventListener('
|
|
1034
|
+
sash.removeEventListener('pointerdown', onPointerStart);
|
|
1016
1035
|
this.sashContainer.removeChild(sash);
|
|
1017
1036
|
},
|
|
1018
1037
|
};
|
|
@@ -1636,7 +1655,7 @@
|
|
|
1636
1655
|
: true,
|
|
1637
1656
|
};
|
|
1638
1657
|
}),
|
|
1639
|
-
size: this.
|
|
1658
|
+
size: this.orthogonalSize,
|
|
1640
1659
|
};
|
|
1641
1660
|
this.children = childDescriptors.map((c) => c.node);
|
|
1642
1661
|
this.splitview = new Splitview(this.element, {
|
|
@@ -1699,7 +1718,7 @@
|
|
|
1699
1718
|
layout(size, orthogonalSize) {
|
|
1700
1719
|
this._size = orthogonalSize;
|
|
1701
1720
|
this._orthogonalSize = size;
|
|
1702
|
-
this.splitview.layout(
|
|
1721
|
+
this.splitview.layout(orthogonalSize, size);
|
|
1703
1722
|
}
|
|
1704
1723
|
addChild(node, size, index, skipLayout) {
|
|
1705
1724
|
if (index < 0 || index > this.children.length) {
|
|
@@ -1924,9 +1943,9 @@
|
|
|
1924
1943
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
1925
1944
|
}
|
|
1926
1945
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
1927
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize
|
|
1946
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
1928
1947
|
}
|
|
1929
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize
|
|
1948
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
1930
1949
|
let result;
|
|
1931
1950
|
if (node.type === 'branch') {
|
|
1932
1951
|
const serializedChildren = node.data;
|
|
@@ -1936,9 +1955,9 @@
|
|
|
1936
1955
|
visible: serializedChild.visible,
|
|
1937
1956
|
};
|
|
1938
1957
|
});
|
|
1939
|
-
//
|
|
1940
|
-
//
|
|
1941
|
-
|
|
1958
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, node.size, // <- orthogonal size - flips at each depth
|
|
1959
|
+
orthogonalSize, // <- size - flips at each depth
|
|
1960
|
+
children);
|
|
1942
1961
|
}
|
|
1943
1962
|
else {
|
|
1944
1963
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -1971,7 +1990,8 @@
|
|
|
1971
1990
|
const oldRoot = this.root;
|
|
1972
1991
|
oldRoot.element.remove();
|
|
1973
1992
|
this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
|
|
1974
|
-
if (oldRoot.children.length ===
|
|
1993
|
+
if (oldRoot.children.length === 0) ;
|
|
1994
|
+
else if (oldRoot.children.length === 1) {
|
|
1975
1995
|
// can remove one level of redundant branching if there is only a single child
|
|
1976
1996
|
const childReference = oldRoot.children[0];
|
|
1977
1997
|
const child = oldRoot.removeChild(0); // remove to prevent disposal when disposing of unwanted root
|
|
@@ -2105,52 +2125,70 @@
|
|
|
2105
2125
|
if (!(parent instanceof BranchNode)) {
|
|
2106
2126
|
throw new Error('Invalid location');
|
|
2107
2127
|
}
|
|
2108
|
-
const
|
|
2109
|
-
if (!(
|
|
2128
|
+
const nodeToRemove = parent.children[index];
|
|
2129
|
+
if (!(nodeToRemove instanceof LeafNode)) {
|
|
2110
2130
|
throw new Error('Invalid location');
|
|
2111
2131
|
}
|
|
2112
2132
|
parent.removeChild(index, sizing);
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2133
|
+
nodeToRemove.dispose();
|
|
2134
|
+
if (parent.children.length !== 1) {
|
|
2135
|
+
return nodeToRemove.view;
|
|
2136
|
+
}
|
|
2137
|
+
// if the parent has only one child and we know the parent is a BranchNode we can make the tree
|
|
2138
|
+
// more efficiently spaced by replacing the parent BranchNode with the child.
|
|
2139
|
+
// if that child is a LeafNode then we simply replace the BranchNode with the child otherwise if the child
|
|
2140
|
+
// is a BranchNode too we should spread it's children into the grandparent.
|
|
2141
|
+
// refer to the remaining child as the sibling
|
|
2119
2142
|
const sibling = parent.children[0];
|
|
2120
2143
|
if (pathToParent.length === 0) {
|
|
2121
|
-
// parent is root
|
|
2144
|
+
// if the parent is root
|
|
2122
2145
|
if (sibling instanceof LeafNode) {
|
|
2123
|
-
|
|
2146
|
+
// if the sibling is a leaf node no action is required
|
|
2147
|
+
return nodeToRemove.view;
|
|
2124
2148
|
}
|
|
2125
|
-
//
|
|
2149
|
+
// otherwise the sibling is a branch node. since the parent is the root and the root has only one child
|
|
2150
|
+
// which is a branch node we can just set this branch node to be the new root node
|
|
2151
|
+
// for good housekeeping we'll removing the sibling from it's existing tree
|
|
2126
2152
|
parent.removeChild(0, sizing);
|
|
2153
|
+
// and set that sibling node to be root
|
|
2127
2154
|
this.root = sibling;
|
|
2128
|
-
return
|
|
2155
|
+
return nodeToRemove.view;
|
|
2129
2156
|
}
|
|
2157
|
+
// otherwise the parent is apart of a large sub-tree
|
|
2130
2158
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2131
2159
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2132
2160
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2161
|
+
// either way we need to remove the sibling from it's existing tree
|
|
2133
2162
|
parent.removeChild(0, sizing);
|
|
2163
|
+
// note the sizes of all of the grandparents children
|
|
2134
2164
|
const sizes = grandParent.children.map((_size, i) => grandParent.getChildSize(i));
|
|
2135
|
-
|
|
2165
|
+
// remove the parent from the grandparent since we are moving the sibling to take the parents place
|
|
2166
|
+
// this parent is no longer used and can be disposed of
|
|
2167
|
+
grandParent.removeChild(parentIndex, sizing).dispose();
|
|
2136
2168
|
if (sibling instanceof BranchNode) {
|
|
2169
|
+
// replace the parent with the siblings children
|
|
2137
2170
|
sizes.splice(parentIndex, 1, ...sibling.children.map((c) => c.size));
|
|
2171
|
+
// and add those siblings to the grandparent
|
|
2138
2172
|
for (let i = 0; i < sibling.children.length; i++) {
|
|
2139
2173
|
const child = sibling.children[i];
|
|
2140
2174
|
grandParent.addChild(child, child.size, parentIndex + i);
|
|
2141
2175
|
}
|
|
2142
2176
|
}
|
|
2143
2177
|
else {
|
|
2178
|
+
// otherwise create a new leaf node and add that to the grandparent
|
|
2144
2179
|
const newSibling = new LeafNode(sibling.view, orthogonal(sibling.orientation), sibling.size);
|
|
2145
2180
|
const siblingSizing = isSiblingVisible
|
|
2146
2181
|
? sibling.orthogonalSize
|
|
2147
2182
|
: exports.Sizing.Invisible(sibling.orthogonalSize);
|
|
2148
2183
|
grandParent.addChild(newSibling, siblingSizing, parentIndex);
|
|
2149
2184
|
}
|
|
2185
|
+
// the containing node of the sibling is no longer required and can be disposed of
|
|
2186
|
+
sibling.dispose();
|
|
2187
|
+
// resize everything
|
|
2150
2188
|
for (let i = 0; i < sizes.length; i++) {
|
|
2151
2189
|
grandParent.resizeChild(i, sizes[i]);
|
|
2152
2190
|
}
|
|
2153
|
-
return
|
|
2191
|
+
return nodeToRemove.view;
|
|
2154
2192
|
}
|
|
2155
2193
|
layout(width, height) {
|
|
2156
2194
|
const [size, orthogonalSize] = this.root.orientation === exports.Orientation.HORIZONTAL
|
|
@@ -2469,6 +2507,9 @@
|
|
|
2469
2507
|
addPanel(options) {
|
|
2470
2508
|
return this.component.addPanel(options);
|
|
2471
2509
|
}
|
|
2510
|
+
removePanel(panel) {
|
|
2511
|
+
this.component.removePanel(panel);
|
|
2512
|
+
}
|
|
2472
2513
|
addGroup(options) {
|
|
2473
2514
|
return this.component.addGroup(options);
|
|
2474
2515
|
}
|
|
@@ -2487,6 +2528,9 @@
|
|
|
2487
2528
|
getGroup(id) {
|
|
2488
2529
|
return this.component.getPanel(id);
|
|
2489
2530
|
}
|
|
2531
|
+
addFloatingGroup(item, coord) {
|
|
2532
|
+
return this.component.addFloatingGroup(item, coord);
|
|
2533
|
+
}
|
|
2490
2534
|
fromJSON(data) {
|
|
2491
2535
|
this.component.fromJSON(data);
|
|
2492
2536
|
}
|
|
@@ -2579,10 +2623,14 @@
|
|
|
2579
2623
|
this._onDrop = new Emitter();
|
|
2580
2624
|
this.onDrop = this._onDrop.event;
|
|
2581
2625
|
// use a set to take advantage of #<set>.has
|
|
2582
|
-
|
|
2626
|
+
this._acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
|
|
2583
2627
|
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
2584
2628
|
onDragEnter: () => undefined,
|
|
2585
2629
|
onDragOver: (e) => {
|
|
2630
|
+
if (this._acceptedTargetZonesSet.size === 0) {
|
|
2631
|
+
this.removeDropTarget();
|
|
2632
|
+
return;
|
|
2633
|
+
}
|
|
2586
2634
|
const width = this.element.clientWidth;
|
|
2587
2635
|
const height = this.element.clientHeight;
|
|
2588
2636
|
if (width === 0 || height === 0) {
|
|
@@ -2591,20 +2639,28 @@
|
|
|
2591
2639
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
2592
2640
|
const x = e.clientX - rect.left;
|
|
2593
2641
|
const y = e.clientY - rect.top;
|
|
2594
|
-
const quadrant = this.calculateQuadrant(
|
|
2595
|
-
|
|
2642
|
+
const quadrant = this.calculateQuadrant(this._acceptedTargetZonesSet, x, y, width, height);
|
|
2643
|
+
/**
|
|
2644
|
+
* If the event has already been used by another DropTarget instance
|
|
2645
|
+
* then don't show a second drop target, only one target should be
|
|
2646
|
+
* active at any one time
|
|
2647
|
+
*/
|
|
2648
|
+
if (this.isAlreadyUsed(e) || quadrant === null) {
|
|
2596
2649
|
// no drop target should be displayed
|
|
2597
2650
|
this.removeDropTarget();
|
|
2598
2651
|
return;
|
|
2599
2652
|
}
|
|
2600
2653
|
if (typeof this.options.canDisplayOverlay === 'boolean') {
|
|
2601
2654
|
if (!this.options.canDisplayOverlay) {
|
|
2655
|
+
this.removeDropTarget();
|
|
2602
2656
|
return;
|
|
2603
2657
|
}
|
|
2604
2658
|
}
|
|
2605
2659
|
else if (!this.options.canDisplayOverlay(e, quadrant)) {
|
|
2660
|
+
this.removeDropTarget();
|
|
2606
2661
|
return;
|
|
2607
2662
|
}
|
|
2663
|
+
this.markAsUsed(e);
|
|
2608
2664
|
if (!this.targetElement) {
|
|
2609
2665
|
this.targetElement = document.createElement('div');
|
|
2610
2666
|
this.targetElement.className = 'drop-target-dropzone';
|
|
@@ -2615,12 +2671,6 @@
|
|
|
2615
2671
|
this.element.classList.add('drop-target');
|
|
2616
2672
|
this.element.append(this.targetElement);
|
|
2617
2673
|
}
|
|
2618
|
-
if (this.options.acceptedTargetZones.length === 0) {
|
|
2619
|
-
return;
|
|
2620
|
-
}
|
|
2621
|
-
if (!this.targetElement || !this.overlayElement) {
|
|
2622
|
-
return;
|
|
2623
|
-
}
|
|
2624
2674
|
this.toggleClasses(quadrant, width, height);
|
|
2625
2675
|
this.setState(quadrant);
|
|
2626
2676
|
},
|
|
@@ -2643,10 +2693,26 @@
|
|
|
2643
2693
|
},
|
|
2644
2694
|
}));
|
|
2645
2695
|
}
|
|
2696
|
+
setTargetZones(acceptedTargetZones) {
|
|
2697
|
+
this._acceptedTargetZonesSet = new Set(acceptedTargetZones);
|
|
2698
|
+
}
|
|
2646
2699
|
dispose() {
|
|
2647
2700
|
this.removeDropTarget();
|
|
2648
2701
|
super.dispose();
|
|
2649
2702
|
}
|
|
2703
|
+
/**
|
|
2704
|
+
* Add a property to the event object for other potential listeners to check
|
|
2705
|
+
*/
|
|
2706
|
+
markAsUsed(event) {
|
|
2707
|
+
event[Droptarget.USED_EVENT_ID] = true;
|
|
2708
|
+
}
|
|
2709
|
+
/**
|
|
2710
|
+
* Check is the event has already been used by another instance od DropTarget
|
|
2711
|
+
*/
|
|
2712
|
+
isAlreadyUsed(event) {
|
|
2713
|
+
const value = event[Droptarget.USED_EVENT_ID];
|
|
2714
|
+
return typeof value === 'boolean' && value;
|
|
2715
|
+
}
|
|
2650
2716
|
toggleClasses(quadrant, width, height) {
|
|
2651
2717
|
var _a, _b, _c, _d;
|
|
2652
2718
|
if (!this.overlayElement) {
|
|
@@ -2741,6 +2807,7 @@
|
|
|
2741
2807
|
}
|
|
2742
2808
|
}
|
|
2743
2809
|
}
|
|
2810
|
+
Droptarget.USED_EVENT_ID = '__dockview_droptarget_event_is_used__';
|
|
2744
2811
|
function calculateQuadrantAsPercentage(overlayType, x, y, width, height, threshold) {
|
|
2745
2812
|
const xp = (100 * x) / width;
|
|
2746
2813
|
const yp = (100 * y) / height;
|
|
@@ -2870,8 +2937,15 @@
|
|
|
2870
2937
|
this.addDisposables(this._onDragStart, this.dataDisposable, this.pointerEventsDisposable);
|
|
2871
2938
|
this.configure();
|
|
2872
2939
|
}
|
|
2940
|
+
isCancelled(_event) {
|
|
2941
|
+
return false;
|
|
2942
|
+
}
|
|
2873
2943
|
configure() {
|
|
2874
2944
|
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2945
|
+
if (this.isCancelled(event)) {
|
|
2946
|
+
event.preventDefault();
|
|
2947
|
+
return;
|
|
2948
|
+
}
|
|
2875
2949
|
const iframes = [
|
|
2876
2950
|
...getElementsByTagName('iframe'),
|
|
2877
2951
|
...getElementsByTagName('webview'),
|
|
@@ -2945,13 +3019,6 @@
|
|
|
2945
3019
|
if (event.defaultPrevented) {
|
|
2946
3020
|
return;
|
|
2947
3021
|
}
|
|
2948
|
-
/**
|
|
2949
|
-
* TODO: alternative to stopPropagation
|
|
2950
|
-
*
|
|
2951
|
-
* I need to stop the event propagation here since otherwise it'll be intercepted by event handlers
|
|
2952
|
-
* on the tabs-container. I cannot use event.preventDefault() since I need the on DragStart event to occur
|
|
2953
|
-
*/
|
|
2954
|
-
event.stopPropagation();
|
|
2955
3022
|
this._onChanged.fire(event);
|
|
2956
3023
|
}));
|
|
2957
3024
|
this.droptarget = new Droptarget(this._element, {
|
|
@@ -3009,6 +3076,22 @@
|
|
|
3009
3076
|
this.accessorId = accessorId;
|
|
3010
3077
|
this.group = group;
|
|
3011
3078
|
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
3079
|
+
this.addDisposables(addDisposableListener(element, 'mousedown', (e) => {
|
|
3080
|
+
if (e.shiftKey) {
|
|
3081
|
+
/**
|
|
3082
|
+
* You cannot call e.preventDefault() because that will prevent drag events from firing
|
|
3083
|
+
* but we also need to stop any group overlay drag events from occuring
|
|
3084
|
+
* Use a custom event marker that can be checked by the overlay drag events
|
|
3085
|
+
*/
|
|
3086
|
+
quasiPreventDefault(e);
|
|
3087
|
+
}
|
|
3088
|
+
}, true));
|
|
3089
|
+
}
|
|
3090
|
+
isCancelled(_event) {
|
|
3091
|
+
if (this.group.api.isFloating && !_event.shiftKey) {
|
|
3092
|
+
return true;
|
|
3093
|
+
}
|
|
3094
|
+
return false;
|
|
3012
3095
|
}
|
|
3013
3096
|
getData(dataTransfer) {
|
|
3014
3097
|
this.panelTransfer.setData([new PanelTransfer(this.accessorId, this.group.id, null)], PanelTransfer.prototype);
|
|
@@ -3099,17 +3182,30 @@
|
|
|
3099
3182
|
hide() {
|
|
3100
3183
|
this._element.style.display = 'none';
|
|
3101
3184
|
}
|
|
3102
|
-
|
|
3103
|
-
if (this.
|
|
3185
|
+
setRightActionsElement(element) {
|
|
3186
|
+
if (this.rightActions === element) {
|
|
3104
3187
|
return;
|
|
3105
3188
|
}
|
|
3106
|
-
if (this.
|
|
3107
|
-
this.
|
|
3108
|
-
this.
|
|
3189
|
+
if (this.rightActions) {
|
|
3190
|
+
this.rightActions.remove();
|
|
3191
|
+
this.rightActions = undefined;
|
|
3109
3192
|
}
|
|
3110
3193
|
if (element) {
|
|
3111
|
-
this.
|
|
3112
|
-
this.
|
|
3194
|
+
this.rightActionsContainer.appendChild(element);
|
|
3195
|
+
this.rightActions = element;
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
setLeftActionsElement(element) {
|
|
3199
|
+
if (this.leftActions === element) {
|
|
3200
|
+
return;
|
|
3201
|
+
}
|
|
3202
|
+
if (this.leftActions) {
|
|
3203
|
+
this.leftActions.remove();
|
|
3204
|
+
this.leftActions = undefined;
|
|
3205
|
+
}
|
|
3206
|
+
if (element) {
|
|
3207
|
+
this.leftActionsContainer.appendChild(element);
|
|
3208
|
+
this.leftActions = element;
|
|
3113
3209
|
}
|
|
3114
3210
|
}
|
|
3115
3211
|
get element() {
|
|
@@ -3144,19 +3240,35 @@
|
|
|
3144
3240
|
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3145
3241
|
}
|
|
3146
3242
|
}));
|
|
3147
|
-
this.
|
|
3148
|
-
this.
|
|
3243
|
+
this.rightActionsContainer = document.createElement('div');
|
|
3244
|
+
this.rightActionsContainer.className = 'right-actions-container';
|
|
3245
|
+
this.leftActionsContainer = document.createElement('div');
|
|
3246
|
+
this.leftActionsContainer.className = 'left-actions-container';
|
|
3149
3247
|
this.tabContainer = document.createElement('div');
|
|
3150
3248
|
this.tabContainer.className = 'tabs-container';
|
|
3151
3249
|
this.voidContainer = new VoidContainer(this.accessor, this.group);
|
|
3152
3250
|
this._element.appendChild(this.tabContainer);
|
|
3251
|
+
this._element.appendChild(this.leftActionsContainer);
|
|
3153
3252
|
this._element.appendChild(this.voidContainer.element);
|
|
3154
|
-
this._element.appendChild(this.
|
|
3253
|
+
this._element.appendChild(this.rightActionsContainer);
|
|
3155
3254
|
this.addDisposables(this.voidContainer, this.voidContainer.onDrop((event) => {
|
|
3156
3255
|
this._onDrop.fire({
|
|
3157
3256
|
event: event.nativeEvent,
|
|
3158
3257
|
index: this.tabs.length,
|
|
3159
3258
|
});
|
|
3259
|
+
}), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
|
|
3260
|
+
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
3261
|
+
if (isFloatingGroupsEnabled &&
|
|
3262
|
+
event.shiftKey &&
|
|
3263
|
+
!this.group.api.isFloating) {
|
|
3264
|
+
event.preventDefault();
|
|
3265
|
+
const { top, left } = this.element.getBoundingClientRect();
|
|
3266
|
+
const { top: rootTop, left: rootLeft } = this.accessor.element.getBoundingClientRect();
|
|
3267
|
+
this.accessor.addFloatingGroup(this.group, {
|
|
3268
|
+
x: left - rootLeft + 20,
|
|
3269
|
+
y: top - rootTop + 20,
|
|
3270
|
+
}, { inDragMode: true });
|
|
3271
|
+
}
|
|
3160
3272
|
}), addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
3161
3273
|
if (event.defaultPrevented) {
|
|
3162
3274
|
return;
|
|
@@ -3210,6 +3322,21 @@
|
|
|
3210
3322
|
tabToAdd.setContent(panel.view.tab);
|
|
3211
3323
|
const disposable = CompositeDisposable.from(tabToAdd.onChanged((event) => {
|
|
3212
3324
|
var _a;
|
|
3325
|
+
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
3326
|
+
const isFloatingWithOnePanel = this.group.api.isFloating && this.size === 1;
|
|
3327
|
+
if (isFloatingGroupsEnabled &&
|
|
3328
|
+
!isFloatingWithOnePanel &&
|
|
3329
|
+
event.shiftKey) {
|
|
3330
|
+
event.preventDefault();
|
|
3331
|
+
const panel = this.accessor.getGroupPanel(tabToAdd.panelId);
|
|
3332
|
+
const { top, left } = tabToAdd.element.getBoundingClientRect();
|
|
3333
|
+
const { top: rootTop, left: rootLeft } = this.accessor.element.getBoundingClientRect();
|
|
3334
|
+
this.accessor.addFloatingGroup(panel, {
|
|
3335
|
+
x: left - rootLeft,
|
|
3336
|
+
y: top - rootTop,
|
|
3337
|
+
}, { inDragMode: true });
|
|
3338
|
+
return;
|
|
3339
|
+
}
|
|
3213
3340
|
const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
3214
3341
|
this.group.model.isContentFocused;
|
|
3215
3342
|
const isLeftClick = event.button === 0;
|
|
@@ -3279,6 +3406,17 @@
|
|
|
3279
3406
|
}
|
|
3280
3407
|
return isAncestor(document.activeElement, this.contentContainer.element);
|
|
3281
3408
|
}
|
|
3409
|
+
get isFloating() {
|
|
3410
|
+
return this._isFloating;
|
|
3411
|
+
}
|
|
3412
|
+
set isFloating(value) {
|
|
3413
|
+
this._isFloating = value;
|
|
3414
|
+
this.dropTarget.setTargetZones(value ? ['center'] : ['top', 'bottom', 'left', 'right', 'center']);
|
|
3415
|
+
toggleClass(this.container, 'dv-groupview-floating', value);
|
|
3416
|
+
this.groupPanel.api._onDidFloatingStateChange.fire({
|
|
3417
|
+
isFloating: this.isFloating,
|
|
3418
|
+
});
|
|
3419
|
+
}
|
|
3282
3420
|
constructor(container, accessor, id, options, groupPanel) {
|
|
3283
3421
|
super();
|
|
3284
3422
|
this.container = container;
|
|
@@ -3288,6 +3426,7 @@
|
|
|
3288
3426
|
this.groupPanel = groupPanel;
|
|
3289
3427
|
this._isGroupActive = false;
|
|
3290
3428
|
this._locked = false;
|
|
3429
|
+
this._isFloating = false;
|
|
3291
3430
|
this.mostRecentlyUsed = [];
|
|
3292
3431
|
this._onDidChange = new Emitter();
|
|
3293
3432
|
this.onDidChange = this._onDidChange.event;
|
|
@@ -3304,7 +3443,7 @@
|
|
|
3304
3443
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
3305
3444
|
this._onDidActivePanelChange = new Emitter();
|
|
3306
3445
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
3307
|
-
this.container
|
|
3446
|
+
toggleClass(this.container, 'groupview', true);
|
|
3308
3447
|
this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
|
|
3309
3448
|
this.contentContainer = new ContentContainer();
|
|
3310
3449
|
this.dropTarget = new Droptarget(this.contentContainer.element, {
|
|
@@ -3314,6 +3453,9 @@
|
|
|
3314
3453
|
return false;
|
|
3315
3454
|
}
|
|
3316
3455
|
const data = getPanelData();
|
|
3456
|
+
if (!data && event.shiftKey && !this.isFloating) {
|
|
3457
|
+
return false;
|
|
3458
|
+
}
|
|
3317
3459
|
if (data && data.viewId === this.accessor.id) {
|
|
3318
3460
|
if (data.groupId === this.id) {
|
|
3319
3461
|
if (position === 'center') {
|
|
@@ -3358,14 +3500,25 @@
|
|
|
3358
3500
|
// correctly initialized
|
|
3359
3501
|
this.setActive(this.isActive, true, true);
|
|
3360
3502
|
this.updateContainer();
|
|
3361
|
-
if (this.accessor.options.
|
|
3362
|
-
this.
|
|
3363
|
-
|
|
3364
|
-
this.
|
|
3503
|
+
if (this.accessor.options.createRightHeaderActionsElement) {
|
|
3504
|
+
this._rightHeaderActions =
|
|
3505
|
+
this.accessor.options.createRightHeaderActionsElement(this.groupPanel);
|
|
3506
|
+
this.addDisposables(this._rightHeaderActions);
|
|
3507
|
+
this._rightHeaderActions.init({
|
|
3365
3508
|
containerApi: new DockviewApi(this.accessor),
|
|
3366
3509
|
api: this.groupPanel.api,
|
|
3367
3510
|
});
|
|
3368
|
-
this.tabsContainer.
|
|
3511
|
+
this.tabsContainer.setRightActionsElement(this._rightHeaderActions.element);
|
|
3512
|
+
}
|
|
3513
|
+
if (this.accessor.options.createLeftHeaderActionsElement) {
|
|
3514
|
+
this._leftHeaderActions =
|
|
3515
|
+
this.accessor.options.createLeftHeaderActionsElement(this.groupPanel);
|
|
3516
|
+
this.addDisposables(this._leftHeaderActions);
|
|
3517
|
+
this._leftHeaderActions.init({
|
|
3518
|
+
containerApi: new DockviewApi(this.accessor),
|
|
3519
|
+
api: this.groupPanel.api,
|
|
3520
|
+
});
|
|
3521
|
+
this.tabsContainer.setLeftActionsElement(this._leftHeaderActions.element);
|
|
3369
3522
|
}
|
|
3370
3523
|
}
|
|
3371
3524
|
indexOf(panel) {
|
|
@@ -3498,7 +3651,7 @@
|
|
|
3498
3651
|
return this._activePanel === panel;
|
|
3499
3652
|
}
|
|
3500
3653
|
updateActions(element) {
|
|
3501
|
-
this.tabsContainer.
|
|
3654
|
+
this.tabsContainer.setRightActionsElement(element);
|
|
3502
3655
|
}
|
|
3503
3656
|
setActive(isGroupActive, skipFocus = false, force = false) {
|
|
3504
3657
|
var _a, _b, _c, _d;
|
|
@@ -3670,9 +3823,10 @@
|
|
|
3670
3823
|
}
|
|
3671
3824
|
}
|
|
3672
3825
|
dispose() {
|
|
3673
|
-
var _a, _b;
|
|
3826
|
+
var _a, _b, _c;
|
|
3674
3827
|
super.dispose();
|
|
3675
|
-
(
|
|
3828
|
+
(_a = this.watermark) === null || _a === void 0 ? void 0 : _a.element.remove();
|
|
3829
|
+
(_c = (_b = this.watermark) === null || _b === void 0 ? void 0 : _b.dispose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
3676
3830
|
for (const panel of this.panels) {
|
|
3677
3831
|
panel.dispose();
|
|
3678
3832
|
}
|
|
@@ -4466,8 +4620,8 @@
|
|
|
4466
4620
|
get isActive() {
|
|
4467
4621
|
return this.api.isActive;
|
|
4468
4622
|
}
|
|
4469
|
-
constructor(id, component, options) {
|
|
4470
|
-
super(id, component, new GridviewPanelApiImpl(id));
|
|
4623
|
+
constructor(id, component, options, api) {
|
|
4624
|
+
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
|
|
4471
4625
|
this._evaluatedMinimumWidth = 0;
|
|
4472
4626
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4473
4627
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -4565,6 +4719,32 @@
|
|
|
4565
4719
|
}
|
|
4566
4720
|
}
|
|
4567
4721
|
|
|
4722
|
+
class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
4723
|
+
get isFloating() {
|
|
4724
|
+
if (!this._group) {
|
|
4725
|
+
throw new Error(`DockviewGroupPanelApiImpl not initialized`);
|
|
4726
|
+
}
|
|
4727
|
+
return this._group.model.isFloating;
|
|
4728
|
+
}
|
|
4729
|
+
constructor(id, accessor) {
|
|
4730
|
+
super(id);
|
|
4731
|
+
this.accessor = accessor;
|
|
4732
|
+
this._onDidFloatingStateChange = new Emitter();
|
|
4733
|
+
this.onDidFloatingStateChange = this._onDidFloatingStateChange.event;
|
|
4734
|
+
this.addDisposables(this._onDidFloatingStateChange);
|
|
4735
|
+
}
|
|
4736
|
+
moveTo(options) {
|
|
4737
|
+
var _a;
|
|
4738
|
+
if (!this._group) {
|
|
4739
|
+
throw new Error(`DockviewGroupPanelApiImpl not initialized`);
|
|
4740
|
+
}
|
|
4741
|
+
this.accessor.moveGroupOrPanel(options.group, this._group.id, undefined, (_a = options.position) !== null && _a !== void 0 ? _a : 'center');
|
|
4742
|
+
}
|
|
4743
|
+
initialize(group) {
|
|
4744
|
+
this._group = group;
|
|
4745
|
+
}
|
|
4746
|
+
}
|
|
4747
|
+
|
|
4568
4748
|
class DockviewGroupPanel extends GridviewPanel {
|
|
4569
4749
|
get panels() {
|
|
4570
4750
|
return this._model.panels;
|
|
@@ -4591,7 +4771,8 @@
|
|
|
4591
4771
|
super(id, 'groupview_default', {
|
|
4592
4772
|
minimumHeight: 100,
|
|
4593
4773
|
minimumWidth: 100,
|
|
4594
|
-
});
|
|
4774
|
+
}, new DockviewGroupPanelApiImpl(id, accessor));
|
|
4775
|
+
this.api.initialize(this); // cannot use 'this' after after 'super' call
|
|
4595
4776
|
this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
|
|
4596
4777
|
}
|
|
4597
4778
|
initialize() {
|
|
@@ -4609,7 +4790,6 @@
|
|
|
4609
4790
|
return this._model;
|
|
4610
4791
|
}
|
|
4611
4792
|
toJSON() {
|
|
4612
|
-
// TODO fix typing
|
|
4613
4793
|
return this.model.toJSON();
|
|
4614
4794
|
}
|
|
4615
4795
|
}
|
|
@@ -4663,9 +4843,10 @@
|
|
|
4663
4843
|
get group() {
|
|
4664
4844
|
return this._group;
|
|
4665
4845
|
}
|
|
4666
|
-
constructor(panel, group) {
|
|
4846
|
+
constructor(panel, group, accessor) {
|
|
4667
4847
|
super(panel.id);
|
|
4668
4848
|
this.panel = panel;
|
|
4849
|
+
this.accessor = accessor;
|
|
4669
4850
|
this._onDidTitleChange = new Emitter();
|
|
4670
4851
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
4671
4852
|
this._onDidActiveGroupChange = new Emitter();
|
|
@@ -4677,6 +4858,10 @@
|
|
|
4677
4858
|
this._group = group;
|
|
4678
4859
|
this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
4679
4860
|
}
|
|
4861
|
+
moveTo(options) {
|
|
4862
|
+
var _a;
|
|
4863
|
+
this.accessor.moveGroupOrPanel(options.group, this._group.id, this.panel.id, (_a = options.position) !== null && _a !== void 0 ? _a : 'center', options.index);
|
|
4864
|
+
}
|
|
4680
4865
|
setTitle(title) {
|
|
4681
4866
|
this.panel.setTitle(title);
|
|
4682
4867
|
}
|
|
@@ -4701,7 +4886,7 @@
|
|
|
4701
4886
|
this.containerApi = containerApi;
|
|
4702
4887
|
this.view = view;
|
|
4703
4888
|
this._group = group;
|
|
4704
|
-
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
4889
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
4705
4890
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
4706
4891
|
accessor.setActivePanel(this);
|
|
4707
4892
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -5042,6 +5227,296 @@
|
|
|
5042
5227
|
}
|
|
5043
5228
|
}
|
|
5044
5229
|
|
|
5230
|
+
const bringElementToFront = (() => {
|
|
5231
|
+
let previous = null;
|
|
5232
|
+
function pushToTop(element) {
|
|
5233
|
+
if (previous !== element && previous !== null) {
|
|
5234
|
+
toggleClass(previous, 'dv-bring-to-front', false);
|
|
5235
|
+
}
|
|
5236
|
+
toggleClass(element, 'dv-bring-to-front', true);
|
|
5237
|
+
previous = element;
|
|
5238
|
+
}
|
|
5239
|
+
return pushToTop;
|
|
5240
|
+
})();
|
|
5241
|
+
class Overlay extends CompositeDisposable {
|
|
5242
|
+
constructor(options) {
|
|
5243
|
+
super();
|
|
5244
|
+
this.options = options;
|
|
5245
|
+
this._element = document.createElement('div');
|
|
5246
|
+
this._onDidChange = new Emitter();
|
|
5247
|
+
this.onDidChange = this._onDidChange.event;
|
|
5248
|
+
this._onDidChangeEnd = new Emitter();
|
|
5249
|
+
this.onDidChangeEnd = this._onDidChangeEnd.event;
|
|
5250
|
+
this.addDisposables(this._onDidChange, this._onDidChangeEnd);
|
|
5251
|
+
this._element.className = 'dv-resize-container';
|
|
5252
|
+
this.setupResize('top');
|
|
5253
|
+
this.setupResize('bottom');
|
|
5254
|
+
this.setupResize('left');
|
|
5255
|
+
this.setupResize('right');
|
|
5256
|
+
this.setupResize('topleft');
|
|
5257
|
+
this.setupResize('topright');
|
|
5258
|
+
this.setupResize('bottomleft');
|
|
5259
|
+
this.setupResize('bottomright');
|
|
5260
|
+
this._element.appendChild(this.options.content);
|
|
5261
|
+
this.options.container.appendChild(this._element);
|
|
5262
|
+
// if input bad resize within acceptable boundaries
|
|
5263
|
+
this.setBounds({
|
|
5264
|
+
height: this.options.height,
|
|
5265
|
+
width: this.options.width,
|
|
5266
|
+
top: this.options.top,
|
|
5267
|
+
left: this.options.left,
|
|
5268
|
+
});
|
|
5269
|
+
}
|
|
5270
|
+
setBounds(bounds = {}) {
|
|
5271
|
+
if (typeof bounds.height === 'number') {
|
|
5272
|
+
this._element.style.height = `${bounds.height}px`;
|
|
5273
|
+
}
|
|
5274
|
+
if (typeof bounds.width === 'number') {
|
|
5275
|
+
this._element.style.width = `${bounds.width}px`;
|
|
5276
|
+
}
|
|
5277
|
+
if (typeof bounds.top === 'number') {
|
|
5278
|
+
this._element.style.top = `${bounds.top}px`;
|
|
5279
|
+
}
|
|
5280
|
+
if (typeof bounds.left === 'number') {
|
|
5281
|
+
this._element.style.left = `${bounds.left}px`;
|
|
5282
|
+
}
|
|
5283
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5284
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5285
|
+
// region: ensure bounds within allowable limits
|
|
5286
|
+
// a minimum width of minimumViewportWidth must be inside the viewport
|
|
5287
|
+
const xOffset = Math.max(0, overlayRect.width - this.options.minimumInViewportWidth);
|
|
5288
|
+
// a minimum height of minimumViewportHeight must be inside the viewport
|
|
5289
|
+
const yOffset = Math.max(0, overlayRect.height - this.options.minimumInViewportHeight);
|
|
5290
|
+
const left = clamp(overlayRect.left - containerRect.left, -xOffset, Math.max(0, containerRect.width - overlayRect.width + xOffset));
|
|
5291
|
+
const top = clamp(overlayRect.top - containerRect.top, -yOffset, Math.max(0, containerRect.height - overlayRect.height + yOffset));
|
|
5292
|
+
this._element.style.left = `${left}px`;
|
|
5293
|
+
this._element.style.top = `${top}px`;
|
|
5294
|
+
this._onDidChange.fire();
|
|
5295
|
+
}
|
|
5296
|
+
toJSON() {
|
|
5297
|
+
const container = this.options.container.getBoundingClientRect();
|
|
5298
|
+
const element = this._element.getBoundingClientRect();
|
|
5299
|
+
return {
|
|
5300
|
+
top: element.top - container.top,
|
|
5301
|
+
left: element.left - container.left,
|
|
5302
|
+
width: element.width,
|
|
5303
|
+
height: element.height,
|
|
5304
|
+
};
|
|
5305
|
+
}
|
|
5306
|
+
setupDrag(dragTarget, options = { inDragMode: false }) {
|
|
5307
|
+
const move = new MutableDisposable();
|
|
5308
|
+
const track = () => {
|
|
5309
|
+
let offset = null;
|
|
5310
|
+
const iframes = [
|
|
5311
|
+
...getElementsByTagName('iframe'),
|
|
5312
|
+
...getElementsByTagName('webview'),
|
|
5313
|
+
];
|
|
5314
|
+
for (const iframe of iframes) {
|
|
5315
|
+
iframe.style.pointerEvents = 'none';
|
|
5316
|
+
}
|
|
5317
|
+
move.value = new CompositeDisposable({
|
|
5318
|
+
dispose: () => {
|
|
5319
|
+
for (const iframe of iframes) {
|
|
5320
|
+
iframe.style.pointerEvents = 'auto';
|
|
5321
|
+
}
|
|
5322
|
+
},
|
|
5323
|
+
}, addDisposableWindowListener(window, 'mousemove', (e) => {
|
|
5324
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5325
|
+
const x = e.clientX - containerRect.left;
|
|
5326
|
+
const y = e.clientY - containerRect.top;
|
|
5327
|
+
toggleClass(this._element, 'dv-resize-container-dragging', true);
|
|
5328
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5329
|
+
if (offset === null) {
|
|
5330
|
+
offset = {
|
|
5331
|
+
x: e.clientX - overlayRect.left,
|
|
5332
|
+
y: e.clientY - overlayRect.top,
|
|
5333
|
+
};
|
|
5334
|
+
}
|
|
5335
|
+
const xOffset = Math.max(0, overlayRect.width - this.options.minimumInViewportWidth);
|
|
5336
|
+
const yOffset = Math.max(0, overlayRect.height -
|
|
5337
|
+
this.options.minimumInViewportHeight);
|
|
5338
|
+
const left = clamp(x - offset.x, -xOffset, Math.max(0, containerRect.width - overlayRect.width + xOffset));
|
|
5339
|
+
const top = clamp(y - offset.y, -yOffset, Math.max(0, containerRect.height - overlayRect.height + yOffset));
|
|
5340
|
+
this.setBounds({ top, left });
|
|
5341
|
+
}), addDisposableWindowListener(window, 'mouseup', () => {
|
|
5342
|
+
toggleClass(this._element, 'dv-resize-container-dragging', false);
|
|
5343
|
+
move.dispose();
|
|
5344
|
+
this._onDidChangeEnd.fire();
|
|
5345
|
+
}));
|
|
5346
|
+
};
|
|
5347
|
+
this.addDisposables(move, addDisposableListener(dragTarget, 'mousedown', (event) => {
|
|
5348
|
+
if (event.defaultPrevented) {
|
|
5349
|
+
event.preventDefault();
|
|
5350
|
+
return;
|
|
5351
|
+
}
|
|
5352
|
+
// if somebody has marked this event then treat as a defaultPrevented
|
|
5353
|
+
// without actually calling event.preventDefault()
|
|
5354
|
+
if (quasiDefaultPrevented(event)) {
|
|
5355
|
+
return;
|
|
5356
|
+
}
|
|
5357
|
+
track();
|
|
5358
|
+
}), addDisposableListener(this.options.content, 'mousedown', (event) => {
|
|
5359
|
+
if (event.defaultPrevented) {
|
|
5360
|
+
return;
|
|
5361
|
+
}
|
|
5362
|
+
// if somebody has marked this event then treat as a defaultPrevented
|
|
5363
|
+
// without actually calling event.preventDefault()
|
|
5364
|
+
if (quasiDefaultPrevented(event)) {
|
|
5365
|
+
return;
|
|
5366
|
+
}
|
|
5367
|
+
if (event.shiftKey) {
|
|
5368
|
+
track();
|
|
5369
|
+
}
|
|
5370
|
+
}), addDisposableListener(this.options.content, 'mousedown', () => {
|
|
5371
|
+
bringElementToFront(this._element);
|
|
5372
|
+
}, true));
|
|
5373
|
+
bringElementToFront(this._element);
|
|
5374
|
+
if (options.inDragMode) {
|
|
5375
|
+
track();
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5378
|
+
setupResize(direction) {
|
|
5379
|
+
const resizeHandleElement = document.createElement('div');
|
|
5380
|
+
resizeHandleElement.className = `dv-resize-handle-${direction}`;
|
|
5381
|
+
this._element.appendChild(resizeHandleElement);
|
|
5382
|
+
const move = new MutableDisposable();
|
|
5383
|
+
this.addDisposables(move, addDisposableListener(resizeHandleElement, 'mousedown', (e) => {
|
|
5384
|
+
e.preventDefault();
|
|
5385
|
+
let startPosition = null;
|
|
5386
|
+
const iframes = [
|
|
5387
|
+
...getElementsByTagName('iframe'),
|
|
5388
|
+
...getElementsByTagName('webview'),
|
|
5389
|
+
];
|
|
5390
|
+
for (const iframe of iframes) {
|
|
5391
|
+
iframe.style.pointerEvents = 'none';
|
|
5392
|
+
}
|
|
5393
|
+
move.value = new CompositeDisposable(addDisposableWindowListener(window, 'mousemove', (e) => {
|
|
5394
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5395
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5396
|
+
const y = e.clientY - containerRect.top;
|
|
5397
|
+
const x = e.clientX - containerRect.left;
|
|
5398
|
+
if (startPosition === null) {
|
|
5399
|
+
// record the initial dimensions since as all subsequence moves are relative to this
|
|
5400
|
+
startPosition = {
|
|
5401
|
+
originalY: y,
|
|
5402
|
+
originalHeight: overlayRect.height,
|
|
5403
|
+
originalX: x,
|
|
5404
|
+
originalWidth: overlayRect.width,
|
|
5405
|
+
};
|
|
5406
|
+
}
|
|
5407
|
+
let top = undefined;
|
|
5408
|
+
let height = undefined;
|
|
5409
|
+
let left = undefined;
|
|
5410
|
+
let width = undefined;
|
|
5411
|
+
const minimumInViewportHeight = this.options.minimumInViewportHeight;
|
|
5412
|
+
const minimumInViewportWidth = this.options.minimumInViewportWidth;
|
|
5413
|
+
function moveTop() {
|
|
5414
|
+
top = clamp(y, -Number.MAX_VALUE, startPosition.originalY +
|
|
5415
|
+
startPosition.originalHeight >
|
|
5416
|
+
containerRect.height
|
|
5417
|
+
? containerRect.height -
|
|
5418
|
+
minimumInViewportHeight
|
|
5419
|
+
: Math.max(0, startPosition.originalY +
|
|
5420
|
+
startPosition.originalHeight -
|
|
5421
|
+
Overlay.MINIMUM_HEIGHT));
|
|
5422
|
+
height =
|
|
5423
|
+
startPosition.originalY +
|
|
5424
|
+
startPosition.originalHeight -
|
|
5425
|
+
top;
|
|
5426
|
+
}
|
|
5427
|
+
function moveBottom() {
|
|
5428
|
+
top =
|
|
5429
|
+
startPosition.originalY -
|
|
5430
|
+
startPosition.originalHeight;
|
|
5431
|
+
height = clamp(y - top, top < 0
|
|
5432
|
+
? -top + minimumInViewportHeight
|
|
5433
|
+
: Overlay.MINIMUM_HEIGHT, Number.MAX_VALUE);
|
|
5434
|
+
}
|
|
5435
|
+
function moveLeft() {
|
|
5436
|
+
left = clamp(x, -Number.MAX_VALUE, startPosition.originalX +
|
|
5437
|
+
startPosition.originalWidth >
|
|
5438
|
+
containerRect.width
|
|
5439
|
+
? containerRect.width -
|
|
5440
|
+
minimumInViewportWidth
|
|
5441
|
+
: Math.max(0, startPosition.originalX +
|
|
5442
|
+
startPosition.originalWidth -
|
|
5443
|
+
Overlay.MINIMUM_WIDTH));
|
|
5444
|
+
width =
|
|
5445
|
+
startPosition.originalX +
|
|
5446
|
+
startPosition.originalWidth -
|
|
5447
|
+
left;
|
|
5448
|
+
}
|
|
5449
|
+
function moveRight() {
|
|
5450
|
+
left =
|
|
5451
|
+
startPosition.originalX -
|
|
5452
|
+
startPosition.originalWidth;
|
|
5453
|
+
width = clamp(x - left, left < 0
|
|
5454
|
+
? -left + minimumInViewportWidth
|
|
5455
|
+
: Overlay.MINIMUM_WIDTH, Number.MAX_VALUE);
|
|
5456
|
+
}
|
|
5457
|
+
switch (direction) {
|
|
5458
|
+
case 'top':
|
|
5459
|
+
moveTop();
|
|
5460
|
+
break;
|
|
5461
|
+
case 'bottom':
|
|
5462
|
+
moveBottom();
|
|
5463
|
+
break;
|
|
5464
|
+
case 'left':
|
|
5465
|
+
moveLeft();
|
|
5466
|
+
break;
|
|
5467
|
+
case 'right':
|
|
5468
|
+
moveRight();
|
|
5469
|
+
break;
|
|
5470
|
+
case 'topleft':
|
|
5471
|
+
moveTop();
|
|
5472
|
+
moveLeft();
|
|
5473
|
+
break;
|
|
5474
|
+
case 'topright':
|
|
5475
|
+
moveTop();
|
|
5476
|
+
moveRight();
|
|
5477
|
+
break;
|
|
5478
|
+
case 'bottomleft':
|
|
5479
|
+
moveBottom();
|
|
5480
|
+
moveLeft();
|
|
5481
|
+
break;
|
|
5482
|
+
case 'bottomright':
|
|
5483
|
+
moveBottom();
|
|
5484
|
+
moveRight();
|
|
5485
|
+
break;
|
|
5486
|
+
}
|
|
5487
|
+
this.setBounds({ height, width, top, left });
|
|
5488
|
+
}), {
|
|
5489
|
+
dispose: () => {
|
|
5490
|
+
for (const iframe of iframes) {
|
|
5491
|
+
iframe.style.pointerEvents = 'auto';
|
|
5492
|
+
}
|
|
5493
|
+
},
|
|
5494
|
+
}, addDisposableWindowListener(window, 'mouseup', () => {
|
|
5495
|
+
move.dispose();
|
|
5496
|
+
this._onDidChangeEnd.fire();
|
|
5497
|
+
}));
|
|
5498
|
+
}));
|
|
5499
|
+
}
|
|
5500
|
+
dispose() {
|
|
5501
|
+
this._element.remove();
|
|
5502
|
+
super.dispose();
|
|
5503
|
+
}
|
|
5504
|
+
}
|
|
5505
|
+
Overlay.MINIMUM_HEIGHT = 20;
|
|
5506
|
+
Overlay.MINIMUM_WIDTH = 20;
|
|
5507
|
+
|
|
5508
|
+
class DockviewFloatingGroupPanel extends CompositeDisposable {
|
|
5509
|
+
constructor(group, overlay) {
|
|
5510
|
+
super();
|
|
5511
|
+
this.group = group;
|
|
5512
|
+
this.overlay = overlay;
|
|
5513
|
+
this.addDisposables(overlay);
|
|
5514
|
+
}
|
|
5515
|
+
position(bounds) {
|
|
5516
|
+
this.overlay.setBounds(bounds);
|
|
5517
|
+
}
|
|
5518
|
+
}
|
|
5519
|
+
|
|
5045
5520
|
class DockviewComponent extends BaseGrid {
|
|
5046
5521
|
get orientation() {
|
|
5047
5522
|
return this.gridview.orientation;
|
|
@@ -5082,7 +5557,8 @@
|
|
|
5082
5557
|
this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
|
|
5083
5558
|
this._onDidActivePanelChange = new Emitter();
|
|
5084
5559
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
5085
|
-
this.
|
|
5560
|
+
this.floatingGroups = [];
|
|
5561
|
+
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
5086
5562
|
this.addDisposables(this._onDidDrop, exports.DockviewEvent.any(this.onDidAddGroup, this.onDidRemoveGroup)(() => {
|
|
5087
5563
|
this.updateWatermark();
|
|
5088
5564
|
}), exports.DockviewEvent.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
@@ -5112,6 +5588,11 @@
|
|
|
5112
5588
|
if (data.viewId !== this.id) {
|
|
5113
5589
|
return false;
|
|
5114
5590
|
}
|
|
5591
|
+
if (position === 'center') {
|
|
5592
|
+
// center drop target is only allowed if there are no panels in the grid
|
|
5593
|
+
// floating panels are allowed
|
|
5594
|
+
return this.gridview.length === 0;
|
|
5595
|
+
}
|
|
5115
5596
|
return true;
|
|
5116
5597
|
}
|
|
5117
5598
|
if (this.options.showDndOverlay) {
|
|
@@ -5124,7 +5605,7 @@
|
|
|
5124
5605
|
}
|
|
5125
5606
|
return false;
|
|
5126
5607
|
},
|
|
5127
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right'],
|
|
5608
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
5128
5609
|
overlayModel: {
|
|
5129
5610
|
activationSize: { type: 'pixels', value: 10 },
|
|
5130
5611
|
size: { type: 'pixels', value: 20 },
|
|
@@ -5142,6 +5623,75 @@
|
|
|
5142
5623
|
this._api = new DockviewApi(this);
|
|
5143
5624
|
this.updateWatermark();
|
|
5144
5625
|
}
|
|
5626
|
+
addFloatingGroup(item, coord, options) {
|
|
5627
|
+
var _a, _b;
|
|
5628
|
+
let group;
|
|
5629
|
+
if (item instanceof DockviewPanel) {
|
|
5630
|
+
group = this.createGroup();
|
|
5631
|
+
this.removePanel(item, {
|
|
5632
|
+
removeEmptyGroup: true,
|
|
5633
|
+
skipDispose: true,
|
|
5634
|
+
});
|
|
5635
|
+
group.model.openPanel(item);
|
|
5636
|
+
}
|
|
5637
|
+
else {
|
|
5638
|
+
group = item;
|
|
5639
|
+
const skip = typeof (options === null || options === void 0 ? void 0 : options.skipRemoveGroup) === 'boolean' &&
|
|
5640
|
+
options.skipRemoveGroup;
|
|
5641
|
+
if (!skip) {
|
|
5642
|
+
this.doRemoveGroup(item, { skipDispose: true });
|
|
5643
|
+
}
|
|
5644
|
+
}
|
|
5645
|
+
group.model.isFloating = true;
|
|
5646
|
+
const overlayLeft = typeof (coord === null || coord === void 0 ? void 0 : coord.x) === 'number' ? Math.max(coord.x, 0) : 100;
|
|
5647
|
+
const overlayTop = typeof (coord === null || coord === void 0 ? void 0 : coord.y) === 'number' ? Math.max(coord.y, 0) : 100;
|
|
5648
|
+
const overlay = new Overlay({
|
|
5649
|
+
container: this.gridview.element,
|
|
5650
|
+
content: group.element,
|
|
5651
|
+
height: (_a = coord === null || coord === void 0 ? void 0 : coord.height) !== null && _a !== void 0 ? _a : 300,
|
|
5652
|
+
width: (_b = coord === null || coord === void 0 ? void 0 : coord.width) !== null && _b !== void 0 ? _b : 300,
|
|
5653
|
+
left: overlayLeft,
|
|
5654
|
+
top: overlayTop,
|
|
5655
|
+
minimumInViewportWidth: 100,
|
|
5656
|
+
minimumInViewportHeight: 100,
|
|
5657
|
+
});
|
|
5658
|
+
const el = group.element.querySelector('.void-container');
|
|
5659
|
+
if (!el) {
|
|
5660
|
+
throw new Error('failed to find drag handle');
|
|
5661
|
+
}
|
|
5662
|
+
overlay.setupDrag(el, {
|
|
5663
|
+
inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
|
|
5664
|
+
? options.inDragMode
|
|
5665
|
+
: false,
|
|
5666
|
+
});
|
|
5667
|
+
const floatingGroupPanel = new DockviewFloatingGroupPanel(group, overlay);
|
|
5668
|
+
const disposable = watchElementResize(group.element, (entry) => {
|
|
5669
|
+
const { width, height } = entry.contentRect;
|
|
5670
|
+
group.layout(width, height); // let the group know it's size is changing so it can fire events to the panel
|
|
5671
|
+
});
|
|
5672
|
+
floatingGroupPanel.addDisposables(overlay.onDidChange(() => {
|
|
5673
|
+
// this is either a resize or a move
|
|
5674
|
+
// to inform the panels .layout(...) the group with it's current size
|
|
5675
|
+
// don't care about resize since the above watcher handles that
|
|
5676
|
+
group.layout(group.height, group.width);
|
|
5677
|
+
}), overlay.onDidChangeEnd(() => {
|
|
5678
|
+
this._bufferOnDidLayoutChange.fire();
|
|
5679
|
+
}), group.onDidChange((event) => {
|
|
5680
|
+
overlay.setBounds({
|
|
5681
|
+
height: event === null || event === void 0 ? void 0 : event.height,
|
|
5682
|
+
width: event === null || event === void 0 ? void 0 : event.width,
|
|
5683
|
+
});
|
|
5684
|
+
}), {
|
|
5685
|
+
dispose: () => {
|
|
5686
|
+
disposable.dispose();
|
|
5687
|
+
group.model.isFloating = false;
|
|
5688
|
+
remove(this.floatingGroups, floatingGroupPanel);
|
|
5689
|
+
this.updateWatermark();
|
|
5690
|
+
},
|
|
5691
|
+
});
|
|
5692
|
+
this.floatingGroups.push(floatingGroupPanel);
|
|
5693
|
+
this.updateWatermark();
|
|
5694
|
+
}
|
|
5145
5695
|
orthogonalize(position) {
|
|
5146
5696
|
switch (position) {
|
|
5147
5697
|
case 'top':
|
|
@@ -5164,6 +5714,7 @@
|
|
|
5164
5714
|
switch (position) {
|
|
5165
5715
|
case 'top':
|
|
5166
5716
|
case 'left':
|
|
5717
|
+
case 'center':
|
|
5167
5718
|
return this.createGroupAtLocation([0]); // insert into first position
|
|
5168
5719
|
case 'bottom':
|
|
5169
5720
|
case 'right':
|
|
@@ -5181,6 +5732,15 @@
|
|
|
5181
5732
|
}
|
|
5182
5733
|
this.layout(this.gridview.width, this.gridview.height, true);
|
|
5183
5734
|
}
|
|
5735
|
+
layout(width, height, forceResize) {
|
|
5736
|
+
super.layout(width, height, forceResize);
|
|
5737
|
+
if (this.floatingGroups) {
|
|
5738
|
+
for (const floating of this.floatingGroups) {
|
|
5739
|
+
// ensure floting groups stay within visible boundaries
|
|
5740
|
+
floating.overlay.setBounds();
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5184
5744
|
focus() {
|
|
5185
5745
|
var _a;
|
|
5186
5746
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -5243,51 +5803,81 @@
|
|
|
5243
5803
|
collection[panel.id] = panel.toJSON();
|
|
5244
5804
|
return collection;
|
|
5245
5805
|
}, {});
|
|
5246
|
-
|
|
5806
|
+
const floats = this.floatingGroups.map((floatingGroup) => {
|
|
5807
|
+
return {
|
|
5808
|
+
data: floatingGroup.group.toJSON(),
|
|
5809
|
+
position: floatingGroup.overlay.toJSON(),
|
|
5810
|
+
};
|
|
5811
|
+
});
|
|
5812
|
+
const result = {
|
|
5247
5813
|
grid: data,
|
|
5248
5814
|
panels,
|
|
5249
5815
|
activeGroup: (_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.id,
|
|
5250
5816
|
};
|
|
5817
|
+
if (floats.length > 0) {
|
|
5818
|
+
result.floatingGroups = floats;
|
|
5819
|
+
}
|
|
5820
|
+
return result;
|
|
5251
5821
|
}
|
|
5252
5822
|
fromJSON(data) {
|
|
5823
|
+
var _a;
|
|
5253
5824
|
this.clear();
|
|
5254
5825
|
const { grid, panels, activeGroup } = data;
|
|
5255
5826
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
5256
5827
|
throw new Error('root must be of type branch');
|
|
5257
5828
|
}
|
|
5829
|
+
// take note of the existing dimensions
|
|
5830
|
+
const width = this.width;
|
|
5831
|
+
const height = this.height;
|
|
5832
|
+
const createGroupFromSerializedState = (data) => {
|
|
5833
|
+
const { id, locked, hideHeader, views, activeView } = data;
|
|
5834
|
+
const group = this.createGroup({
|
|
5835
|
+
id,
|
|
5836
|
+
locked: !!locked,
|
|
5837
|
+
hideHeader: !!hideHeader,
|
|
5838
|
+
});
|
|
5839
|
+
this._onDidAddGroup.fire(group);
|
|
5840
|
+
for (const child of views) {
|
|
5841
|
+
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
5842
|
+
const isActive = typeof activeView === 'string' && activeView === panel.id;
|
|
5843
|
+
group.model.openPanel(panel, {
|
|
5844
|
+
skipSetPanelActive: !isActive,
|
|
5845
|
+
skipSetGroupActive: true,
|
|
5846
|
+
});
|
|
5847
|
+
}
|
|
5848
|
+
if (!group.activePanel && group.panels.length > 0) {
|
|
5849
|
+
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
5850
|
+
skipSetGroupActive: true,
|
|
5851
|
+
});
|
|
5852
|
+
}
|
|
5853
|
+
return group;
|
|
5854
|
+
};
|
|
5258
5855
|
this.gridview.deserialize(grid, {
|
|
5259
5856
|
fromJSON: (node) => {
|
|
5260
|
-
|
|
5261
|
-
const group = this.createGroup({
|
|
5262
|
-
id,
|
|
5263
|
-
locked: !!locked,
|
|
5264
|
-
hideHeader: !!hideHeader,
|
|
5265
|
-
});
|
|
5266
|
-
this._onDidAddGroup.fire(group);
|
|
5267
|
-
for (const child of views) {
|
|
5268
|
-
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
5269
|
-
const isActive = typeof activeView === 'string' &&
|
|
5270
|
-
activeView === panel.id;
|
|
5271
|
-
group.model.openPanel(panel, {
|
|
5272
|
-
skipSetPanelActive: !isActive,
|
|
5273
|
-
skipSetGroupActive: true,
|
|
5274
|
-
});
|
|
5275
|
-
}
|
|
5276
|
-
if (!group.activePanel && group.panels.length > 0) {
|
|
5277
|
-
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
5278
|
-
skipSetGroupActive: true,
|
|
5279
|
-
});
|
|
5280
|
-
}
|
|
5281
|
-
return group;
|
|
5857
|
+
return createGroupFromSerializedState(node.data);
|
|
5282
5858
|
},
|
|
5283
5859
|
});
|
|
5860
|
+
this.layout(width, height, true);
|
|
5861
|
+
const serializedFloatingGroups = (_a = data.floatingGroups) !== null && _a !== void 0 ? _a : [];
|
|
5862
|
+
for (const serializedFloatingGroup of serializedFloatingGroups) {
|
|
5863
|
+
const { data, position } = serializedFloatingGroup;
|
|
5864
|
+
const group = createGroupFromSerializedState(data);
|
|
5865
|
+
this.addFloatingGroup(group, {
|
|
5866
|
+
x: position.left,
|
|
5867
|
+
y: position.top,
|
|
5868
|
+
height: position.height,
|
|
5869
|
+
width: position.width,
|
|
5870
|
+
}, { skipRemoveGroup: true, inDragMode: false });
|
|
5871
|
+
}
|
|
5872
|
+
for (const floatingGroup of this.floatingGroups) {
|
|
5873
|
+
floatingGroup.overlay.setBounds();
|
|
5874
|
+
}
|
|
5284
5875
|
if (typeof activeGroup === 'string') {
|
|
5285
5876
|
const panel = this.getPanel(activeGroup);
|
|
5286
5877
|
if (panel) {
|
|
5287
5878
|
this.doSetGroupActive(panel);
|
|
5288
5879
|
}
|
|
5289
5880
|
}
|
|
5290
|
-
this.gridview.layout(this.width, this.height);
|
|
5291
5881
|
this._onDidLayoutFromJSON.fire();
|
|
5292
5882
|
}
|
|
5293
5883
|
clear() {
|
|
@@ -5296,7 +5886,7 @@
|
|
|
5296
5886
|
const hasActivePanel = !!this.activePanel;
|
|
5297
5887
|
for (const group of groups) {
|
|
5298
5888
|
// remove the group will automatically remove the panels
|
|
5299
|
-
this.removeGroup(group, true);
|
|
5889
|
+
this.removeGroup(group, { skipActive: true });
|
|
5300
5890
|
}
|
|
5301
5891
|
if (hasActiveGroup) {
|
|
5302
5892
|
this.doSetGroupActive(undefined);
|
|
@@ -5318,6 +5908,9 @@
|
|
|
5318
5908
|
throw new Error(`panel with id ${options.id} already exists`);
|
|
5319
5909
|
}
|
|
5320
5910
|
let referenceGroup;
|
|
5911
|
+
if (options.position && options.floating) {
|
|
5912
|
+
throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
5913
|
+
}
|
|
5321
5914
|
if (options.position) {
|
|
5322
5915
|
if (isPanelOptionsWithPanel(options.position)) {
|
|
5323
5916
|
const referencePanel = typeof options.position.referencePanel === 'string'
|
|
@@ -5350,7 +5943,20 @@
|
|
|
5350
5943
|
let panel;
|
|
5351
5944
|
if (referenceGroup) {
|
|
5352
5945
|
const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
|
|
5353
|
-
if (
|
|
5946
|
+
if (options.floating) {
|
|
5947
|
+
const group = this.createGroup();
|
|
5948
|
+
panel = this.createPanel(options, group);
|
|
5949
|
+
group.model.openPanel(panel);
|
|
5950
|
+
const o = typeof options.floating === 'object' &&
|
|
5951
|
+
options.floating !== null
|
|
5952
|
+
? options.floating
|
|
5953
|
+
: {};
|
|
5954
|
+
this.addFloatingGroup(group, o, {
|
|
5955
|
+
inDragMode: false,
|
|
5956
|
+
skipRemoveGroup: true,
|
|
5957
|
+
});
|
|
5958
|
+
}
|
|
5959
|
+
else if (referenceGroup.api.isFloating || target === 'center') {
|
|
5354
5960
|
panel = this.createPanel(options, referenceGroup);
|
|
5355
5961
|
referenceGroup.model.openPanel(panel);
|
|
5356
5962
|
}
|
|
@@ -5362,6 +5968,19 @@
|
|
|
5362
5968
|
group.model.openPanel(panel);
|
|
5363
5969
|
}
|
|
5364
5970
|
}
|
|
5971
|
+
else if (options.floating) {
|
|
5972
|
+
const group = this.createGroup();
|
|
5973
|
+
panel = this.createPanel(options, group);
|
|
5974
|
+
group.model.openPanel(panel);
|
|
5975
|
+
const o = typeof options.floating === 'object' &&
|
|
5976
|
+
options.floating !== null
|
|
5977
|
+
? options.floating
|
|
5978
|
+
: {};
|
|
5979
|
+
this.addFloatingGroup(group, o, {
|
|
5980
|
+
inDragMode: false,
|
|
5981
|
+
skipRemoveGroup: true,
|
|
5982
|
+
});
|
|
5983
|
+
}
|
|
5365
5984
|
else {
|
|
5366
5985
|
const group = this.createGroupAtLocation();
|
|
5367
5986
|
panel = this.createPanel(options, group);
|
|
@@ -5378,7 +5997,9 @@
|
|
|
5378
5997
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
5379
5998
|
}
|
|
5380
5999
|
group.model.removePanel(panel);
|
|
5381
|
-
|
|
6000
|
+
if (!options.skipDispose) {
|
|
6001
|
+
panel.dispose();
|
|
6002
|
+
}
|
|
5382
6003
|
if (group.size === 0 && options.removeEmptyGroup) {
|
|
5383
6004
|
this.removeGroup(group);
|
|
5384
6005
|
}
|
|
@@ -5393,7 +6014,7 @@
|
|
|
5393
6014
|
}
|
|
5394
6015
|
updateWatermark() {
|
|
5395
6016
|
var _a, _b;
|
|
5396
|
-
if (this.groups.length === 0) {
|
|
6017
|
+
if (this.groups.filter((x) => !x.api.isFloating).length === 0) {
|
|
5397
6018
|
if (!this.watermark) {
|
|
5398
6019
|
this.watermark = this.createWatermarkComponent();
|
|
5399
6020
|
this.watermark.init({
|
|
@@ -5402,7 +6023,7 @@
|
|
|
5402
6023
|
const watermarkContainer = document.createElement('div');
|
|
5403
6024
|
watermarkContainer.className = 'dv-watermark-container';
|
|
5404
6025
|
watermarkContainer.appendChild(this.watermark.element);
|
|
5405
|
-
this.element.appendChild(watermarkContainer);
|
|
6026
|
+
this.gridview.element.appendChild(watermarkContainer);
|
|
5406
6027
|
}
|
|
5407
6028
|
}
|
|
5408
6029
|
else if (this.watermark) {
|
|
@@ -5452,15 +6073,28 @@
|
|
|
5452
6073
|
return group;
|
|
5453
6074
|
}
|
|
5454
6075
|
}
|
|
5455
|
-
removeGroup(group,
|
|
6076
|
+
removeGroup(group, options) {
|
|
6077
|
+
var _a;
|
|
5456
6078
|
const panels = [...group.panels]; // reassign since group panels will mutate
|
|
5457
6079
|
for (const panel of panels) {
|
|
5458
6080
|
this.removePanel(panel, {
|
|
5459
6081
|
removeEmptyGroup: false,
|
|
5460
|
-
skipDispose: false,
|
|
6082
|
+
skipDispose: (_a = options === null || options === void 0 ? void 0 : options.skipDispose) !== null && _a !== void 0 ? _a : false,
|
|
5461
6083
|
});
|
|
5462
6084
|
}
|
|
5463
|
-
|
|
6085
|
+
this.doRemoveGroup(group, options);
|
|
6086
|
+
}
|
|
6087
|
+
doRemoveGroup(group, options) {
|
|
6088
|
+
const floatingGroup = this.floatingGroups.find((_) => _.group === group);
|
|
6089
|
+
if (floatingGroup) {
|
|
6090
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
6091
|
+
floatingGroup.group.dispose();
|
|
6092
|
+
this._groups.delete(group.id);
|
|
6093
|
+
}
|
|
6094
|
+
floatingGroup.dispose();
|
|
6095
|
+
return floatingGroup.group;
|
|
6096
|
+
}
|
|
6097
|
+
return super.doRemoveGroup(group, options);
|
|
5464
6098
|
}
|
|
5465
6099
|
moveGroupOrPanel(destinationGroup, sourceGroupId, sourceItemId, destinationTarget, destinationIndex) {
|
|
5466
6100
|
var _a;
|
|
@@ -5491,25 +6125,26 @@
|
|
|
5491
6125
|
const targetLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
5492
6126
|
if (sourceGroup && sourceGroup.size < 2) {
|
|
5493
6127
|
const [targetParentLocation, to] = tail(targetLocation);
|
|
5494
|
-
const
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
5505
|
-
skipActive: true,
|
|
5506
|
-
skipDispose: true,
|
|
5507
|
-
});
|
|
5508
|
-
// after deleting the group we need to re-evaulate the ref location
|
|
5509
|
-
const updatedReferenceLocation = getGridLocation(destinationGroup.element);
|
|
5510
|
-
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
|
|
5511
|
-
this.doAddGroup(targetGroup, location);
|
|
6128
|
+
const isFloating = this.floatingGroups.find((x) => x.group === sourceGroup);
|
|
6129
|
+
if (!isFloating) {
|
|
6130
|
+
const sourceLocation = getGridLocation(sourceGroup.element);
|
|
6131
|
+
const [sourceParentLocation, from] = tail(sourceLocation);
|
|
6132
|
+
if (sequenceEquals(sourceParentLocation, targetParentLocation)) {
|
|
6133
|
+
// special case when 'swapping' two views within same grid location
|
|
6134
|
+
// if a group has one tab - we are essentially moving the 'group'
|
|
6135
|
+
// which is equivalent to swapping two views in this case
|
|
6136
|
+
this.gridview.moveView(sourceParentLocation, from, to);
|
|
6137
|
+
}
|
|
5512
6138
|
}
|
|
6139
|
+
// source group will become empty so delete the group
|
|
6140
|
+
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
6141
|
+
skipActive: true,
|
|
6142
|
+
skipDispose: true,
|
|
6143
|
+
});
|
|
6144
|
+
// after deleting the group we need to re-evaulate the ref location
|
|
6145
|
+
const updatedReferenceLocation = getGridLocation(destinationGroup.element);
|
|
6146
|
+
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
|
|
6147
|
+
this.doAddGroup(targetGroup, location);
|
|
5513
6148
|
}
|
|
5514
6149
|
else {
|
|
5515
6150
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(sourceItemId)) ||
|
|
@@ -5538,7 +6173,13 @@
|
|
|
5538
6173
|
}
|
|
5539
6174
|
}
|
|
5540
6175
|
else {
|
|
5541
|
-
this.
|
|
6176
|
+
const floatingGroup = this.floatingGroups.find((x) => x.group === sourceGroup);
|
|
6177
|
+
if (floatingGroup) {
|
|
6178
|
+
floatingGroup.dispose();
|
|
6179
|
+
}
|
|
6180
|
+
else {
|
|
6181
|
+
this.gridview.removeView(getGridLocation(sourceGroup.element));
|
|
6182
|
+
}
|
|
5542
6183
|
const referenceLocation = getGridLocation(referenceGroup.element);
|
|
5543
6184
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
5544
6185
|
this.gridview.addView(sourceGroup, exports.Sizing.Distribute, dropLocation);
|
|
@@ -5693,6 +6334,9 @@
|
|
|
5693
6334
|
this.clear();
|
|
5694
6335
|
const { grid, activePanel } = serializedGridview;
|
|
5695
6336
|
const queue = [];
|
|
6337
|
+
// take note of the existing dimensions
|
|
6338
|
+
const width = this.width;
|
|
6339
|
+
const height = this.height;
|
|
5696
6340
|
this.gridview.deserialize(grid, {
|
|
5697
6341
|
fromJSON: (node) => {
|
|
5698
6342
|
const { data } = node;
|
|
@@ -5718,7 +6362,7 @@
|
|
|
5718
6362
|
return view;
|
|
5719
6363
|
},
|
|
5720
6364
|
});
|
|
5721
|
-
this.layout(
|
|
6365
|
+
this.layout(width, height, true);
|
|
5722
6366
|
queue.forEach((f) => f());
|
|
5723
6367
|
if (typeof activePanel === 'string') {
|
|
5724
6368
|
const panel = this.getPanel(activePanel);
|
|
@@ -6032,6 +6676,9 @@
|
|
|
6032
6676
|
this.clear();
|
|
6033
6677
|
const { views, orientation, size, activeView } = serializedSplitview;
|
|
6034
6678
|
const queue = [];
|
|
6679
|
+
// take note of the existing dimensions
|
|
6680
|
+
const width = this.width;
|
|
6681
|
+
const height = this.height;
|
|
6035
6682
|
this.splitview = new Splitview(this.element, {
|
|
6036
6683
|
orientation,
|
|
6037
6684
|
proportionalLayout: this.options.proportionalLayout,
|
|
@@ -6068,7 +6715,7 @@
|
|
|
6068
6715
|
}),
|
|
6069
6716
|
},
|
|
6070
6717
|
});
|
|
6071
|
-
this.layout(
|
|
6718
|
+
this.layout(width, height);
|
|
6072
6719
|
queue.forEach((f) => f());
|
|
6073
6720
|
if (typeof activeView === 'string') {
|
|
6074
6721
|
const panel = this.getPanel(activeView);
|
|
@@ -6335,6 +6982,9 @@
|
|
|
6335
6982
|
this.clear();
|
|
6336
6983
|
const { views, size } = serializedPaneview;
|
|
6337
6984
|
const queue = [];
|
|
6985
|
+
// take note of the existing dimensions
|
|
6986
|
+
const width = this.width;
|
|
6987
|
+
const height = this.height;
|
|
6338
6988
|
this.paneview = new Paneview(this.element, {
|
|
6339
6989
|
orientation: exports.Orientation.VERTICAL,
|
|
6340
6990
|
descriptor: {
|
|
@@ -6390,7 +7040,7 @@
|
|
|
6390
7040
|
}),
|
|
6391
7041
|
},
|
|
6392
7042
|
});
|
|
6393
|
-
this.layout(
|
|
7043
|
+
this.layout(width, height);
|
|
6394
7044
|
queue.forEach((f) => f());
|
|
6395
7045
|
this._onDidLayoutfromJSON.fire();
|
|
6396
7046
|
}
|
|
@@ -6576,6 +7226,6 @@
|
|
|
6576
7226
|
exports.orthogonal = orthogonal;
|
|
6577
7227
|
exports.positionToDirection = positionToDirection;
|
|
6578
7228
|
exports.toTarget = toTarget;
|
|
6579
|
-
exports.watchElementResize = watchElementResize;
|
|
6580
7229
|
|
|
6581
7230
|
}));
|
|
7231
|
+
//# sourceMappingURL=dockview-core.js.map
|