dockview-core 1.7.5 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/cjs/api/component.api.d.ts +6 -1
- package/dist/cjs/api/component.api.d.ts.map +1 -1
- package/dist/cjs/api/component.api.js +6 -0
- package/dist/cjs/api/component.api.js.map +1 -1
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +30 -0
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts.map +1 -0
- package/dist/cjs/api/dockviewGroupPanelApi.js +54 -0
- package/dist/cjs/api/dockviewGroupPanelApi.js.map +1 -0
- package/dist/cjs/api/dockviewPanelApi.d.ts +14 -1
- package/dist/cjs/api/dockviewPanelApi.d.ts.map +1 -1
- package/dist/cjs/api/dockviewPanelApi.js +6 -1
- package/dist/cjs/api/dockviewPanelApi.js.map +1 -1
- package/dist/cjs/array.d.ts +1 -0
- package/dist/cjs/array.d.ts.map +1 -1
- package/dist/cjs/array.js +10 -1
- package/dist/cjs/array.js.map +1 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts +1 -0
- package/dist/cjs/dnd/abstractDragHandler.d.ts.map +1 -1
- package/dist/cjs/dnd/abstractDragHandler.js +7 -0
- package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
- package/dist/cjs/dnd/droptarget.d.ts +11 -0
- package/dist/cjs/dnd/droptarget.d.ts.map +1 -1
- package/dist/cjs/dnd/droptarget.js +32 -9
- package/dist/cjs/dnd/droptarget.js.map +1 -1
- package/dist/cjs/dnd/groupDragHandler.d.ts +1 -0
- package/dist/cjs/dnd/groupDragHandler.d.ts.map +1 -1
- package/dist/cjs/dnd/groupDragHandler.js +18 -0
- package/dist/cjs/dnd/groupDragHandler.js.map +1 -1
- package/dist/cjs/dnd/overlay.d.ts +40 -0
- package/dist/cjs/dnd/overlay.d.ts.map +1 -0
- package/dist/cjs/dnd/overlay.js +382 -0
- package/dist/cjs/dnd/overlay.js.map +1 -0
- package/dist/cjs/dockview/components/tab/tab.d.ts +2 -2
- package/dist/cjs/dockview/components/tab/tab.d.ts.map +1 -1
- package/dist/cjs/dockview/components/tab/tab.js +0 -7
- package/dist/cjs/dockview/components/tab/tab.js.map +1 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +8 -4
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts.map +1 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +54 -10
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/dockview/deserializer.d.ts +2 -2
- package/dist/cjs/dockview/deserializer.d.ts.map +1 -1
- package/dist/cjs/dockview/deserializer.js.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +41 -9
- package/dist/cjs/dockview/dockviewComponent.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.js +277 -76
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +24 -0
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts.map +1 -0
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +35 -0
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js.map +1 -0
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +5 -6
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.js +3 -2
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +5 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +43 -12
- package/dist/cjs/dockview/dockviewGroupPanelModel.js.map +1 -1
- package/dist/cjs/dockview/dockviewPanel.d.ts +2 -2
- package/dist/cjs/dockview/dockviewPanel.d.ts.map +1 -1
- package/dist/cjs/dockview/dockviewPanel.js +1 -1
- package/dist/cjs/dockview/dockviewPanel.js.map +1 -1
- package/dist/cjs/dockview/options.d.ts +22 -6
- package/dist/cjs/dockview/options.d.ts.map +1 -1
- package/dist/cjs/dockview/options.js.map +1 -1
- package/dist/cjs/dom.d.ts +5 -3
- package/dist/cjs/dom.d.ts.map +1 -1
- package/dist/cjs/dom.js +13 -1
- package/dist/cjs/dom.js.map +1 -1
- package/dist/cjs/events.d.ts.map +1 -1
- package/dist/cjs/gridview/branchNode.js +2 -2
- package/dist/cjs/gridview/branchNode.js.map +1 -1
- package/dist/cjs/gridview/gridview.d.ts.map +1 -1
- package/dist/cjs/gridview/gridview.js +40 -20
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.js +4 -1
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/gridview/gridviewPanel.d.ts +3 -3
- package/dist/cjs/gridview/gridviewPanel.d.ts.map +1 -1
- package/dist/cjs/gridview/gridviewPanel.js +2 -2
- package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/math.d.ts.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.js +4 -1
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/splitview/splitview.d.ts.map +1 -1
- package/dist/cjs/splitview/splitview.js +12 -11
- package/dist/cjs/splitview/splitview.js.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.d.ts.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.js +4 -1
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
- package/dist/dockview-core.amd.js +808 -158
- package/dist/dockview-core.amd.js.map +1 -0
- package/dist/dockview-core.amd.min.js +3 -2
- package/dist/dockview-core.amd.min.js.map +1 -0
- package/dist/dockview-core.amd.min.noStyle.js +3 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -0
- package/dist/dockview-core.amd.noStyle.js +807 -157
- package/dist/dockview-core.amd.noStyle.js.map +1 -0
- package/dist/dockview-core.cjs.js +808 -158
- package/dist/dockview-core.cjs.js.map +1 -0
- package/dist/dockview-core.esm.js +809 -158
- package/dist/dockview-core.esm.js.map +1 -0
- package/dist/dockview-core.esm.min.js +3 -2
- package/dist/dockview-core.esm.min.js.map +1 -0
- package/dist/dockview-core.js +808 -158
- package/dist/dockview-core.js.map +1 -0
- package/dist/dockview-core.min.js +3 -2
- package/dist/dockview-core.min.js.map +1 -0
- package/dist/dockview-core.min.noStyle.js +3 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -0
- package/dist/dockview-core.noStyle.js +807 -157
- package/dist/dockview-core.noStyle.js.map +1 -0
- package/dist/esm/api/component.api.d.ts +6 -1
- package/dist/esm/api/component.api.d.ts.map +1 -1
- package/dist/esm/api/component.api.js +6 -0
- package/dist/esm/api/component.api.js.map +1 -1
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +30 -0
- package/dist/esm/api/dockviewGroupPanelApi.d.ts.map +1 -0
- package/dist/esm/api/dockviewGroupPanelApi.js +28 -0
- package/dist/esm/api/dockviewGroupPanelApi.js.map +1 -0
- package/dist/esm/api/dockviewPanelApi.d.ts +14 -1
- package/dist/esm/api/dockviewPanelApi.d.ts.map +1 -1
- package/dist/esm/api/dockviewPanelApi.js +6 -1
- package/dist/esm/api/dockviewPanelApi.js.map +1 -1
- package/dist/esm/array.d.ts +1 -0
- package/dist/esm/array.d.ts.map +1 -1
- package/dist/esm/array.js +8 -0
- package/dist/esm/array.js.map +1 -1
- package/dist/esm/dnd/abstractDragHandler.d.ts +1 -0
- package/dist/esm/dnd/abstractDragHandler.d.ts.map +1 -1
- package/dist/esm/dnd/abstractDragHandler.js +7 -0
- package/dist/esm/dnd/abstractDragHandler.js.map +1 -1
- package/dist/esm/dnd/droptarget.d.ts +11 -0
- package/dist/esm/dnd/droptarget.d.ts.map +1 -1
- package/dist/esm/dnd/droptarget.js +32 -9
- package/dist/esm/dnd/droptarget.js.map +1 -1
- package/dist/esm/dnd/groupDragHandler.d.ts +1 -0
- package/dist/esm/dnd/groupDragHandler.d.ts.map +1 -1
- package/dist/esm/dnd/groupDragHandler.js +18 -0
- package/dist/esm/dnd/groupDragHandler.js.map +1 -1
- package/dist/esm/dnd/overlay.d.ts +40 -0
- package/dist/esm/dnd/overlay.d.ts.map +1 -0
- package/dist/esm/dnd/overlay.js +282 -0
- package/dist/esm/dnd/overlay.js.map +1 -0
- package/dist/esm/dockview/components/tab/tab.d.ts +2 -2
- package/dist/esm/dockview/components/tab/tab.d.ts.map +1 -1
- package/dist/esm/dockview/components/tab/tab.js +0 -7
- package/dist/esm/dockview/components/tab/tab.js.map +1 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +8 -4
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts.map +1 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +54 -10
- package/dist/esm/dockview/components/titlebar/tabsContainer.js.map +1 -1
- package/dist/esm/dockview/deserializer.d.ts +2 -2
- package/dist/esm/dockview/deserializer.d.ts.map +1 -1
- package/dist/esm/dockview/deserializer.js.map +1 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +41 -9
- package/dist/esm/dockview/dockviewComponent.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewComponent.js +223 -54
- package/dist/esm/dockview/dockviewComponent.js.map +1 -1
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +24 -0
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts.map +1 -0
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +13 -0
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js.map +1 -0
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +5 -6
- package/dist/esm/dockview/dockviewGroupPanel.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewGroupPanel.js +3 -2
- package/dist/esm/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +5 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.js +36 -9
- package/dist/esm/dockview/dockviewGroupPanelModel.js.map +1 -1
- package/dist/esm/dockview/dockviewPanel.d.ts +2 -2
- package/dist/esm/dockview/dockviewPanel.d.ts.map +1 -1
- package/dist/esm/dockview/dockviewPanel.js +1 -1
- package/dist/esm/dockview/dockviewPanel.js.map +1 -1
- package/dist/esm/dockview/options.d.ts +22 -6
- package/dist/esm/dockview/options.d.ts.map +1 -1
- package/dist/esm/dockview/options.js.map +1 -1
- package/dist/esm/dom.d.ts +5 -3
- package/dist/esm/dom.d.ts.map +1 -1
- package/dist/esm/dom.js +10 -0
- package/dist/esm/dom.js.map +1 -1
- package/dist/esm/events.d.ts.map +1 -1
- package/dist/esm/gridview/branchNode.js +2 -2
- package/dist/esm/gridview/branchNode.js.map +1 -1
- package/dist/esm/gridview/gridview.d.ts.map +1 -1
- package/dist/esm/gridview/gridview.js +40 -19
- package/dist/esm/gridview/gridview.js.map +1 -1
- package/dist/esm/gridview/gridviewComponent.d.ts.map +1 -1
- package/dist/esm/gridview/gridviewComponent.js +4 -1
- package/dist/esm/gridview/gridviewComponent.js.map +1 -1
- package/dist/esm/gridview/gridviewPanel.d.ts +3 -3
- package/dist/esm/gridview/gridviewPanel.d.ts.map +1 -1
- package/dist/esm/gridview/gridviewPanel.js +2 -2
- package/dist/esm/gridview/gridviewPanel.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/math.d.ts.map +1 -1
- package/dist/esm/math.js.map +1 -1
- package/dist/esm/paneview/paneviewComponent.d.ts.map +1 -1
- package/dist/esm/paneview/paneviewComponent.js +4 -1
- package/dist/esm/paneview/paneviewComponent.js.map +1 -1
- package/dist/esm/splitview/splitview.d.ts.map +1 -1
- package/dist/esm/splitview/splitview.js +12 -11
- package/dist/esm/splitview/splitview.js.map +1 -1
- package/dist/esm/splitview/splitviewComponent.d.ts.map +1 -1
- package/dist/esm/splitview/splitviewComponent.js +4 -1
- package/dist/esm/splitview/splitviewComponent.js.map +1 -1
- package/dist/styles/dockview.css +217 -1
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.8.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -33,7 +33,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
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}";
|
|
36
|
+
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}";
|
|
37
37
|
styleInject(css_248z);
|
|
38
38
|
|
|
39
39
|
class TransferObject {
|
|
@@ -303,6 +303,31 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
+
function createComponent(id, componentName, components = {}, frameworkComponents = {}, createFrameworkComponent, fallback) {
|
|
307
|
+
const Component = typeof componentName === 'string'
|
|
308
|
+
? components[componentName]
|
|
309
|
+
: undefined;
|
|
310
|
+
const FrameworkComponent = typeof componentName === 'string'
|
|
311
|
+
? frameworkComponents[componentName]
|
|
312
|
+
: undefined;
|
|
313
|
+
if (Component && FrameworkComponent) {
|
|
314
|
+
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
315
|
+
}
|
|
316
|
+
if (FrameworkComponent) {
|
|
317
|
+
if (!createFrameworkComponent) {
|
|
318
|
+
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
319
|
+
}
|
|
320
|
+
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
321
|
+
}
|
|
322
|
+
if (!Component) {
|
|
323
|
+
if (fallback) {
|
|
324
|
+
return fallback();
|
|
325
|
+
}
|
|
326
|
+
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
327
|
+
}
|
|
328
|
+
return new Component(id, componentName);
|
|
329
|
+
}
|
|
330
|
+
|
|
306
331
|
function watchElementResize(element, cb) {
|
|
307
332
|
const observer = new ResizeObserver((entires) => {
|
|
308
333
|
/**
|
|
@@ -416,31 +441,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
416
441
|
refreshState() {
|
|
417
442
|
this._refreshStateHandler();
|
|
418
443
|
}
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
430
|
-
}
|
|
431
|
-
if (FrameworkComponent) {
|
|
432
|
-
if (!createFrameworkComponent) {
|
|
433
|
-
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
434
|
-
}
|
|
435
|
-
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
436
|
-
}
|
|
437
|
-
if (!Component) {
|
|
438
|
-
if (fallback) {
|
|
439
|
-
return fallback();
|
|
440
|
-
}
|
|
441
|
-
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
442
|
-
}
|
|
443
|
-
return new Component(id, componentName);
|
|
444
|
+
}
|
|
445
|
+
// quasi: apparently, but not really; seemingly
|
|
446
|
+
const QUASI_PREVENT_DEFAULT_KEY = 'dv-quasiPreventDefault';
|
|
447
|
+
// mark an event directly for other listeners to check
|
|
448
|
+
function quasiPreventDefault(event) {
|
|
449
|
+
event[QUASI_PREVENT_DEFAULT_KEY] = true;
|
|
450
|
+
}
|
|
451
|
+
// check if this event has been marked
|
|
452
|
+
function quasiDefaultPrevented(event) {
|
|
453
|
+
return event[QUASI_PREVENT_DEFAULT_KEY];
|
|
444
454
|
}
|
|
445
455
|
|
|
446
456
|
function tail(arr) {
|
|
@@ -491,6 +501,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
491
501
|
}
|
|
492
502
|
}
|
|
493
503
|
return -1;
|
|
504
|
+
}
|
|
505
|
+
function remove(array, value) {
|
|
506
|
+
const index = array.findIndex((t) => t === value);
|
|
507
|
+
if (index > -1) {
|
|
508
|
+
array.splice(index, 1);
|
|
509
|
+
return true;
|
|
510
|
+
}
|
|
511
|
+
return false;
|
|
494
512
|
}
|
|
495
513
|
|
|
496
514
|
const clamp = (value, min, max) => {
|
|
@@ -920,7 +938,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
920
938
|
//add sash
|
|
921
939
|
const sash = document.createElement('div');
|
|
922
940
|
sash.className = 'sash';
|
|
923
|
-
const
|
|
941
|
+
const onPointerStart = (event) => {
|
|
924
942
|
for (const item of this.viewItems) {
|
|
925
943
|
item.enabled = false;
|
|
926
944
|
}
|
|
@@ -979,11 +997,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
979
997
|
size: snappedViewItem.size,
|
|
980
998
|
};
|
|
981
999
|
}
|
|
982
|
-
|
|
983
|
-
const mousemove = (mousemoveEvent) => {
|
|
1000
|
+
const onPointerMove = (event) => {
|
|
984
1001
|
const current = this._orientation === exports.Orientation.HORIZONTAL
|
|
985
|
-
?
|
|
986
|
-
:
|
|
1002
|
+
? event.clientX
|
|
1003
|
+
: event.clientY;
|
|
987
1004
|
const delta = current - start;
|
|
988
1005
|
this.resize(sashIndex, delta, sizes, undefined, undefined, minDelta, maxDelta, snapBefore, snapAfter);
|
|
989
1006
|
this.distributeEmptySpace();
|
|
@@ -997,18 +1014,20 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
997
1014
|
iframe.style.pointerEvents = 'auto';
|
|
998
1015
|
}
|
|
999
1016
|
this.saveProportions();
|
|
1000
|
-
document.removeEventListener('
|
|
1001
|
-
document.removeEventListener('
|
|
1017
|
+
document.removeEventListener('pointermove', onPointerMove);
|
|
1018
|
+
document.removeEventListener('pointerup', end);
|
|
1019
|
+
document.removeEventListener('pointercancel', end);
|
|
1002
1020
|
this._onDidSashEnd.fire(undefined);
|
|
1003
1021
|
};
|
|
1004
|
-
document.addEventListener('
|
|
1005
|
-
document.addEventListener('
|
|
1022
|
+
document.addEventListener('pointermove', onPointerMove);
|
|
1023
|
+
document.addEventListener('pointerup', end);
|
|
1024
|
+
document.addEventListener('pointercancel', end);
|
|
1006
1025
|
};
|
|
1007
|
-
sash.addEventListener('
|
|
1026
|
+
sash.addEventListener('pointerdown', onPointerStart);
|
|
1008
1027
|
const sashItem = {
|
|
1009
1028
|
container: sash,
|
|
1010
1029
|
disposable: () => {
|
|
1011
|
-
sash.removeEventListener('
|
|
1030
|
+
sash.removeEventListener('pointerdown', onPointerStart);
|
|
1012
1031
|
this.sashContainer.removeChild(sash);
|
|
1013
1032
|
},
|
|
1014
1033
|
};
|
|
@@ -1632,7 +1651,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1632
1651
|
: true,
|
|
1633
1652
|
};
|
|
1634
1653
|
}),
|
|
1635
|
-
size: this.
|
|
1654
|
+
size: this.orthogonalSize,
|
|
1636
1655
|
};
|
|
1637
1656
|
this.children = childDescriptors.map((c) => c.node);
|
|
1638
1657
|
this.splitview = new Splitview(this.element, {
|
|
@@ -1695,7 +1714,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1695
1714
|
layout(size, orthogonalSize) {
|
|
1696
1715
|
this._size = orthogonalSize;
|
|
1697
1716
|
this._orthogonalSize = size;
|
|
1698
|
-
this.splitview.layout(
|
|
1717
|
+
this.splitview.layout(orthogonalSize, size);
|
|
1699
1718
|
}
|
|
1700
1719
|
addChild(node, size, index, skipLayout) {
|
|
1701
1720
|
if (index < 0 || index > this.children.length) {
|
|
@@ -1920,9 +1939,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1920
1939
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
1921
1940
|
}
|
|
1922
1941
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
1923
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize
|
|
1942
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
1924
1943
|
}
|
|
1925
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize
|
|
1944
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
1926
1945
|
let result;
|
|
1927
1946
|
if (node.type === 'branch') {
|
|
1928
1947
|
const serializedChildren = node.data;
|
|
@@ -1932,9 +1951,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1932
1951
|
visible: serializedChild.visible,
|
|
1933
1952
|
};
|
|
1934
1953
|
});
|
|
1935
|
-
//
|
|
1936
|
-
//
|
|
1937
|
-
|
|
1954
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, node.size, // <- orthogonal size - flips at each depth
|
|
1955
|
+
orthogonalSize, // <- size - flips at each depth
|
|
1956
|
+
children);
|
|
1938
1957
|
}
|
|
1939
1958
|
else {
|
|
1940
1959
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -1967,7 +1986,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1967
1986
|
const oldRoot = this.root;
|
|
1968
1987
|
oldRoot.element.remove();
|
|
1969
1988
|
this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
|
|
1970
|
-
if (oldRoot.children.length ===
|
|
1989
|
+
if (oldRoot.children.length === 0) ;
|
|
1990
|
+
else if (oldRoot.children.length === 1) {
|
|
1971
1991
|
// can remove one level of redundant branching if there is only a single child
|
|
1972
1992
|
const childReference = oldRoot.children[0];
|
|
1973
1993
|
const child = oldRoot.removeChild(0); // remove to prevent disposal when disposing of unwanted root
|
|
@@ -2101,52 +2121,70 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2101
2121
|
if (!(parent instanceof BranchNode)) {
|
|
2102
2122
|
throw new Error('Invalid location');
|
|
2103
2123
|
}
|
|
2104
|
-
const
|
|
2105
|
-
if (!(
|
|
2124
|
+
const nodeToRemove = parent.children[index];
|
|
2125
|
+
if (!(nodeToRemove instanceof LeafNode)) {
|
|
2106
2126
|
throw new Error('Invalid location');
|
|
2107
2127
|
}
|
|
2108
2128
|
parent.removeChild(index, sizing);
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2129
|
+
nodeToRemove.dispose();
|
|
2130
|
+
if (parent.children.length !== 1) {
|
|
2131
|
+
return nodeToRemove.view;
|
|
2132
|
+
}
|
|
2133
|
+
// if the parent has only one child and we know the parent is a BranchNode we can make the tree
|
|
2134
|
+
// more efficiently spaced by replacing the parent BranchNode with the child.
|
|
2135
|
+
// if that child is a LeafNode then we simply replace the BranchNode with the child otherwise if the child
|
|
2136
|
+
// is a BranchNode too we should spread it's children into the grandparent.
|
|
2137
|
+
// refer to the remaining child as the sibling
|
|
2115
2138
|
const sibling = parent.children[0];
|
|
2116
2139
|
if (pathToParent.length === 0) {
|
|
2117
|
-
// parent is root
|
|
2140
|
+
// if the parent is root
|
|
2118
2141
|
if (sibling instanceof LeafNode) {
|
|
2119
|
-
|
|
2142
|
+
// if the sibling is a leaf node no action is required
|
|
2143
|
+
return nodeToRemove.view;
|
|
2120
2144
|
}
|
|
2121
|
-
//
|
|
2145
|
+
// otherwise the sibling is a branch node. since the parent is the root and the root has only one child
|
|
2146
|
+
// which is a branch node we can just set this branch node to be the new root node
|
|
2147
|
+
// for good housekeeping we'll removing the sibling from it's existing tree
|
|
2122
2148
|
parent.removeChild(0, sizing);
|
|
2149
|
+
// and set that sibling node to be root
|
|
2123
2150
|
this.root = sibling;
|
|
2124
|
-
return
|
|
2151
|
+
return nodeToRemove.view;
|
|
2125
2152
|
}
|
|
2153
|
+
// otherwise the parent is apart of a large sub-tree
|
|
2126
2154
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2127
2155
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2128
2156
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2157
|
+
// either way we need to remove the sibling from it's existing tree
|
|
2129
2158
|
parent.removeChild(0, sizing);
|
|
2159
|
+
// note the sizes of all of the grandparents children
|
|
2130
2160
|
const sizes = grandParent.children.map((_size, i) => grandParent.getChildSize(i));
|
|
2131
|
-
|
|
2161
|
+
// remove the parent from the grandparent since we are moving the sibling to take the parents place
|
|
2162
|
+
// this parent is no longer used and can be disposed of
|
|
2163
|
+
grandParent.removeChild(parentIndex, sizing).dispose();
|
|
2132
2164
|
if (sibling instanceof BranchNode) {
|
|
2165
|
+
// replace the parent with the siblings children
|
|
2133
2166
|
sizes.splice(parentIndex, 1, ...sibling.children.map((c) => c.size));
|
|
2167
|
+
// and add those siblings to the grandparent
|
|
2134
2168
|
for (let i = 0; i < sibling.children.length; i++) {
|
|
2135
2169
|
const child = sibling.children[i];
|
|
2136
2170
|
grandParent.addChild(child, child.size, parentIndex + i);
|
|
2137
2171
|
}
|
|
2138
2172
|
}
|
|
2139
2173
|
else {
|
|
2174
|
+
// otherwise create a new leaf node and add that to the grandparent
|
|
2140
2175
|
const newSibling = new LeafNode(sibling.view, orthogonal(sibling.orientation), sibling.size);
|
|
2141
2176
|
const siblingSizing = isSiblingVisible
|
|
2142
2177
|
? sibling.orthogonalSize
|
|
2143
2178
|
: exports.Sizing.Invisible(sibling.orthogonalSize);
|
|
2144
2179
|
grandParent.addChild(newSibling, siblingSizing, parentIndex);
|
|
2145
2180
|
}
|
|
2181
|
+
// the containing node of the sibling is no longer required and can be disposed of
|
|
2182
|
+
sibling.dispose();
|
|
2183
|
+
// resize everything
|
|
2146
2184
|
for (let i = 0; i < sizes.length; i++) {
|
|
2147
2185
|
grandParent.resizeChild(i, sizes[i]);
|
|
2148
2186
|
}
|
|
2149
|
-
return
|
|
2187
|
+
return nodeToRemove.view;
|
|
2150
2188
|
}
|
|
2151
2189
|
layout(width, height) {
|
|
2152
2190
|
const [size, orthogonalSize] = this.root.orientation === exports.Orientation.HORIZONTAL
|
|
@@ -2465,6 +2503,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2465
2503
|
addPanel(options) {
|
|
2466
2504
|
return this.component.addPanel(options);
|
|
2467
2505
|
}
|
|
2506
|
+
removePanel(panel) {
|
|
2507
|
+
this.component.removePanel(panel);
|
|
2508
|
+
}
|
|
2468
2509
|
addGroup(options) {
|
|
2469
2510
|
return this.component.addGroup(options);
|
|
2470
2511
|
}
|
|
@@ -2483,6 +2524,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2483
2524
|
getGroup(id) {
|
|
2484
2525
|
return this.component.getPanel(id);
|
|
2485
2526
|
}
|
|
2527
|
+
addFloatingGroup(item, coord) {
|
|
2528
|
+
return this.component.addFloatingGroup(item, coord);
|
|
2529
|
+
}
|
|
2486
2530
|
fromJSON(data) {
|
|
2487
2531
|
this.component.fromJSON(data);
|
|
2488
2532
|
}
|
|
@@ -2575,10 +2619,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2575
2619
|
this._onDrop = new Emitter();
|
|
2576
2620
|
this.onDrop = this._onDrop.event;
|
|
2577
2621
|
// use a set to take advantage of #<set>.has
|
|
2578
|
-
|
|
2622
|
+
this._acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
|
|
2579
2623
|
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
2580
2624
|
onDragEnter: () => undefined,
|
|
2581
2625
|
onDragOver: (e) => {
|
|
2626
|
+
if (this._acceptedTargetZonesSet.size === 0) {
|
|
2627
|
+
this.removeDropTarget();
|
|
2628
|
+
return;
|
|
2629
|
+
}
|
|
2582
2630
|
const width = this.element.clientWidth;
|
|
2583
2631
|
const height = this.element.clientHeight;
|
|
2584
2632
|
if (width === 0 || height === 0) {
|
|
@@ -2587,20 +2635,28 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2587
2635
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
2588
2636
|
const x = e.clientX - rect.left;
|
|
2589
2637
|
const y = e.clientY - rect.top;
|
|
2590
|
-
const quadrant = this.calculateQuadrant(
|
|
2591
|
-
|
|
2638
|
+
const quadrant = this.calculateQuadrant(this._acceptedTargetZonesSet, x, y, width, height);
|
|
2639
|
+
/**
|
|
2640
|
+
* If the event has already been used by another DropTarget instance
|
|
2641
|
+
* then don't show a second drop target, only one target should be
|
|
2642
|
+
* active at any one time
|
|
2643
|
+
*/
|
|
2644
|
+
if (this.isAlreadyUsed(e) || quadrant === null) {
|
|
2592
2645
|
// no drop target should be displayed
|
|
2593
2646
|
this.removeDropTarget();
|
|
2594
2647
|
return;
|
|
2595
2648
|
}
|
|
2596
2649
|
if (typeof this.options.canDisplayOverlay === 'boolean') {
|
|
2597
2650
|
if (!this.options.canDisplayOverlay) {
|
|
2651
|
+
this.removeDropTarget();
|
|
2598
2652
|
return;
|
|
2599
2653
|
}
|
|
2600
2654
|
}
|
|
2601
2655
|
else if (!this.options.canDisplayOverlay(e, quadrant)) {
|
|
2656
|
+
this.removeDropTarget();
|
|
2602
2657
|
return;
|
|
2603
2658
|
}
|
|
2659
|
+
this.markAsUsed(e);
|
|
2604
2660
|
if (!this.targetElement) {
|
|
2605
2661
|
this.targetElement = document.createElement('div');
|
|
2606
2662
|
this.targetElement.className = 'drop-target-dropzone';
|
|
@@ -2611,12 +2667,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2611
2667
|
this.element.classList.add('drop-target');
|
|
2612
2668
|
this.element.append(this.targetElement);
|
|
2613
2669
|
}
|
|
2614
|
-
if (this.options.acceptedTargetZones.length === 0) {
|
|
2615
|
-
return;
|
|
2616
|
-
}
|
|
2617
|
-
if (!this.targetElement || !this.overlayElement) {
|
|
2618
|
-
return;
|
|
2619
|
-
}
|
|
2620
2670
|
this.toggleClasses(quadrant, width, height);
|
|
2621
2671
|
this.setState(quadrant);
|
|
2622
2672
|
},
|
|
@@ -2639,10 +2689,26 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2639
2689
|
},
|
|
2640
2690
|
}));
|
|
2641
2691
|
}
|
|
2692
|
+
setTargetZones(acceptedTargetZones) {
|
|
2693
|
+
this._acceptedTargetZonesSet = new Set(acceptedTargetZones);
|
|
2694
|
+
}
|
|
2642
2695
|
dispose() {
|
|
2643
2696
|
this.removeDropTarget();
|
|
2644
2697
|
super.dispose();
|
|
2645
2698
|
}
|
|
2699
|
+
/**
|
|
2700
|
+
* Add a property to the event object for other potential listeners to check
|
|
2701
|
+
*/
|
|
2702
|
+
markAsUsed(event) {
|
|
2703
|
+
event[Droptarget.USED_EVENT_ID] = true;
|
|
2704
|
+
}
|
|
2705
|
+
/**
|
|
2706
|
+
* Check is the event has already been used by another instance od DropTarget
|
|
2707
|
+
*/
|
|
2708
|
+
isAlreadyUsed(event) {
|
|
2709
|
+
const value = event[Droptarget.USED_EVENT_ID];
|
|
2710
|
+
return typeof value === 'boolean' && value;
|
|
2711
|
+
}
|
|
2646
2712
|
toggleClasses(quadrant, width, height) {
|
|
2647
2713
|
var _a, _b, _c, _d;
|
|
2648
2714
|
if (!this.overlayElement) {
|
|
@@ -2737,6 +2803,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2737
2803
|
}
|
|
2738
2804
|
}
|
|
2739
2805
|
}
|
|
2806
|
+
Droptarget.USED_EVENT_ID = '__dockview_droptarget_event_is_used__';
|
|
2740
2807
|
function calculateQuadrantAsPercentage(overlayType, x, y, width, height, threshold) {
|
|
2741
2808
|
const xp = (100 * x) / width;
|
|
2742
2809
|
const yp = (100 * y) / height;
|
|
@@ -2866,8 +2933,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2866
2933
|
this.addDisposables(this._onDragStart, this.dataDisposable, this.pointerEventsDisposable);
|
|
2867
2934
|
this.configure();
|
|
2868
2935
|
}
|
|
2936
|
+
isCancelled(_event) {
|
|
2937
|
+
return false;
|
|
2938
|
+
}
|
|
2869
2939
|
configure() {
|
|
2870
2940
|
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2941
|
+
if (this.isCancelled(event)) {
|
|
2942
|
+
event.preventDefault();
|
|
2943
|
+
return;
|
|
2944
|
+
}
|
|
2871
2945
|
const iframes = [
|
|
2872
2946
|
...getElementsByTagName('iframe'),
|
|
2873
2947
|
...getElementsByTagName('webview'),
|
|
@@ -2941,13 +3015,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2941
3015
|
if (event.defaultPrevented) {
|
|
2942
3016
|
return;
|
|
2943
3017
|
}
|
|
2944
|
-
/**
|
|
2945
|
-
* TODO: alternative to stopPropagation
|
|
2946
|
-
*
|
|
2947
|
-
* I need to stop the event propagation here since otherwise it'll be intercepted by event handlers
|
|
2948
|
-
* on the tabs-container. I cannot use event.preventDefault() since I need the on DragStart event to occur
|
|
2949
|
-
*/
|
|
2950
|
-
event.stopPropagation();
|
|
2951
3018
|
this._onChanged.fire(event);
|
|
2952
3019
|
}));
|
|
2953
3020
|
this.droptarget = new Droptarget(this._element, {
|
|
@@ -3005,6 +3072,22 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3005
3072
|
this.accessorId = accessorId;
|
|
3006
3073
|
this.group = group;
|
|
3007
3074
|
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
3075
|
+
this.addDisposables(addDisposableListener(element, 'mousedown', (e) => {
|
|
3076
|
+
if (e.shiftKey) {
|
|
3077
|
+
/**
|
|
3078
|
+
* You cannot call e.preventDefault() because that will prevent drag events from firing
|
|
3079
|
+
* but we also need to stop any group overlay drag events from occuring
|
|
3080
|
+
* Use a custom event marker that can be checked by the overlay drag events
|
|
3081
|
+
*/
|
|
3082
|
+
quasiPreventDefault(e);
|
|
3083
|
+
}
|
|
3084
|
+
}, true));
|
|
3085
|
+
}
|
|
3086
|
+
isCancelled(_event) {
|
|
3087
|
+
if (this.group.api.isFloating && !_event.shiftKey) {
|
|
3088
|
+
return true;
|
|
3089
|
+
}
|
|
3090
|
+
return false;
|
|
3008
3091
|
}
|
|
3009
3092
|
getData(dataTransfer) {
|
|
3010
3093
|
this.panelTransfer.setData([new PanelTransfer(this.accessorId, this.group.id, null)], PanelTransfer.prototype);
|
|
@@ -3095,17 +3178,30 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3095
3178
|
hide() {
|
|
3096
3179
|
this._element.style.display = 'none';
|
|
3097
3180
|
}
|
|
3098
|
-
|
|
3099
|
-
if (this.
|
|
3181
|
+
setRightActionsElement(element) {
|
|
3182
|
+
if (this.rightActions === element) {
|
|
3100
3183
|
return;
|
|
3101
3184
|
}
|
|
3102
|
-
if (this.
|
|
3103
|
-
this.
|
|
3104
|
-
this.
|
|
3185
|
+
if (this.rightActions) {
|
|
3186
|
+
this.rightActions.remove();
|
|
3187
|
+
this.rightActions = undefined;
|
|
3105
3188
|
}
|
|
3106
3189
|
if (element) {
|
|
3107
|
-
this.
|
|
3108
|
-
this.
|
|
3190
|
+
this.rightActionsContainer.appendChild(element);
|
|
3191
|
+
this.rightActions = element;
|
|
3192
|
+
}
|
|
3193
|
+
}
|
|
3194
|
+
setLeftActionsElement(element) {
|
|
3195
|
+
if (this.leftActions === element) {
|
|
3196
|
+
return;
|
|
3197
|
+
}
|
|
3198
|
+
if (this.leftActions) {
|
|
3199
|
+
this.leftActions.remove();
|
|
3200
|
+
this.leftActions = undefined;
|
|
3201
|
+
}
|
|
3202
|
+
if (element) {
|
|
3203
|
+
this.leftActionsContainer.appendChild(element);
|
|
3204
|
+
this.leftActions = element;
|
|
3109
3205
|
}
|
|
3110
3206
|
}
|
|
3111
3207
|
get element() {
|
|
@@ -3140,19 +3236,35 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3140
3236
|
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3141
3237
|
}
|
|
3142
3238
|
}));
|
|
3143
|
-
this.
|
|
3144
|
-
this.
|
|
3239
|
+
this.rightActionsContainer = document.createElement('div');
|
|
3240
|
+
this.rightActionsContainer.className = 'right-actions-container';
|
|
3241
|
+
this.leftActionsContainer = document.createElement('div');
|
|
3242
|
+
this.leftActionsContainer.className = 'left-actions-container';
|
|
3145
3243
|
this.tabContainer = document.createElement('div');
|
|
3146
3244
|
this.tabContainer.className = 'tabs-container';
|
|
3147
3245
|
this.voidContainer = new VoidContainer(this.accessor, this.group);
|
|
3148
3246
|
this._element.appendChild(this.tabContainer);
|
|
3247
|
+
this._element.appendChild(this.leftActionsContainer);
|
|
3149
3248
|
this._element.appendChild(this.voidContainer.element);
|
|
3150
|
-
this._element.appendChild(this.
|
|
3249
|
+
this._element.appendChild(this.rightActionsContainer);
|
|
3151
3250
|
this.addDisposables(this.voidContainer, this.voidContainer.onDrop((event) => {
|
|
3152
3251
|
this._onDrop.fire({
|
|
3153
3252
|
event: event.nativeEvent,
|
|
3154
3253
|
index: this.tabs.length,
|
|
3155
3254
|
});
|
|
3255
|
+
}), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
|
|
3256
|
+
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
3257
|
+
if (isFloatingGroupsEnabled &&
|
|
3258
|
+
event.shiftKey &&
|
|
3259
|
+
!this.group.api.isFloating) {
|
|
3260
|
+
event.preventDefault();
|
|
3261
|
+
const { top, left } = this.element.getBoundingClientRect();
|
|
3262
|
+
const { top: rootTop, left: rootLeft } = this.accessor.element.getBoundingClientRect();
|
|
3263
|
+
this.accessor.addFloatingGroup(this.group, {
|
|
3264
|
+
x: left - rootLeft + 20,
|
|
3265
|
+
y: top - rootTop + 20,
|
|
3266
|
+
}, { inDragMode: true });
|
|
3267
|
+
}
|
|
3156
3268
|
}), addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
3157
3269
|
if (event.defaultPrevented) {
|
|
3158
3270
|
return;
|
|
@@ -3206,6 +3318,21 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3206
3318
|
tabToAdd.setContent(panel.view.tab);
|
|
3207
3319
|
const disposable = CompositeDisposable.from(tabToAdd.onChanged((event) => {
|
|
3208
3320
|
var _a;
|
|
3321
|
+
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
3322
|
+
const isFloatingWithOnePanel = this.group.api.isFloating && this.size === 1;
|
|
3323
|
+
if (isFloatingGroupsEnabled &&
|
|
3324
|
+
!isFloatingWithOnePanel &&
|
|
3325
|
+
event.shiftKey) {
|
|
3326
|
+
event.preventDefault();
|
|
3327
|
+
const panel = this.accessor.getGroupPanel(tabToAdd.panelId);
|
|
3328
|
+
const { top, left } = tabToAdd.element.getBoundingClientRect();
|
|
3329
|
+
const { top: rootTop, left: rootLeft } = this.accessor.element.getBoundingClientRect();
|
|
3330
|
+
this.accessor.addFloatingGroup(panel, {
|
|
3331
|
+
x: left - rootLeft,
|
|
3332
|
+
y: top - rootTop,
|
|
3333
|
+
}, { inDragMode: true });
|
|
3334
|
+
return;
|
|
3335
|
+
}
|
|
3209
3336
|
const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
3210
3337
|
this.group.model.isContentFocused;
|
|
3211
3338
|
const isLeftClick = event.button === 0;
|
|
@@ -3275,6 +3402,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3275
3402
|
}
|
|
3276
3403
|
return isAncestor(document.activeElement, this.contentContainer.element);
|
|
3277
3404
|
}
|
|
3405
|
+
get isFloating() {
|
|
3406
|
+
return this._isFloating;
|
|
3407
|
+
}
|
|
3408
|
+
set isFloating(value) {
|
|
3409
|
+
this._isFloating = value;
|
|
3410
|
+
this.dropTarget.setTargetZones(value ? ['center'] : ['top', 'bottom', 'left', 'right', 'center']);
|
|
3411
|
+
toggleClass(this.container, 'dv-groupview-floating', value);
|
|
3412
|
+
this.groupPanel.api._onDidFloatingStateChange.fire({
|
|
3413
|
+
isFloating: this.isFloating,
|
|
3414
|
+
});
|
|
3415
|
+
}
|
|
3278
3416
|
constructor(container, accessor, id, options, groupPanel) {
|
|
3279
3417
|
super();
|
|
3280
3418
|
this.container = container;
|
|
@@ -3284,6 +3422,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3284
3422
|
this.groupPanel = groupPanel;
|
|
3285
3423
|
this._isGroupActive = false;
|
|
3286
3424
|
this._locked = false;
|
|
3425
|
+
this._isFloating = false;
|
|
3287
3426
|
this.mostRecentlyUsed = [];
|
|
3288
3427
|
this._onDidChange = new Emitter();
|
|
3289
3428
|
this.onDidChange = this._onDidChange.event;
|
|
@@ -3300,7 +3439,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3300
3439
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
3301
3440
|
this._onDidActivePanelChange = new Emitter();
|
|
3302
3441
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
3303
|
-
this.container
|
|
3442
|
+
toggleClass(this.container, 'groupview', true);
|
|
3304
3443
|
this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
|
|
3305
3444
|
this.contentContainer = new ContentContainer();
|
|
3306
3445
|
this.dropTarget = new Droptarget(this.contentContainer.element, {
|
|
@@ -3310,6 +3449,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3310
3449
|
return false;
|
|
3311
3450
|
}
|
|
3312
3451
|
const data = getPanelData();
|
|
3452
|
+
if (!data && event.shiftKey && !this.isFloating) {
|
|
3453
|
+
return false;
|
|
3454
|
+
}
|
|
3313
3455
|
if (data && data.viewId === this.accessor.id) {
|
|
3314
3456
|
if (data.groupId === this.id) {
|
|
3315
3457
|
if (position === 'center') {
|
|
@@ -3354,14 +3496,25 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3354
3496
|
// correctly initialized
|
|
3355
3497
|
this.setActive(this.isActive, true, true);
|
|
3356
3498
|
this.updateContainer();
|
|
3357
|
-
if (this.accessor.options.
|
|
3358
|
-
this.
|
|
3359
|
-
|
|
3360
|
-
this.
|
|
3499
|
+
if (this.accessor.options.createRightHeaderActionsElement) {
|
|
3500
|
+
this._rightHeaderActions =
|
|
3501
|
+
this.accessor.options.createRightHeaderActionsElement(this.groupPanel);
|
|
3502
|
+
this.addDisposables(this._rightHeaderActions);
|
|
3503
|
+
this._rightHeaderActions.init({
|
|
3361
3504
|
containerApi: new DockviewApi(this.accessor),
|
|
3362
3505
|
api: this.groupPanel.api,
|
|
3363
3506
|
});
|
|
3364
|
-
this.tabsContainer.
|
|
3507
|
+
this.tabsContainer.setRightActionsElement(this._rightHeaderActions.element);
|
|
3508
|
+
}
|
|
3509
|
+
if (this.accessor.options.createLeftHeaderActionsElement) {
|
|
3510
|
+
this._leftHeaderActions =
|
|
3511
|
+
this.accessor.options.createLeftHeaderActionsElement(this.groupPanel);
|
|
3512
|
+
this.addDisposables(this._leftHeaderActions);
|
|
3513
|
+
this._leftHeaderActions.init({
|
|
3514
|
+
containerApi: new DockviewApi(this.accessor),
|
|
3515
|
+
api: this.groupPanel.api,
|
|
3516
|
+
});
|
|
3517
|
+
this.tabsContainer.setLeftActionsElement(this._leftHeaderActions.element);
|
|
3365
3518
|
}
|
|
3366
3519
|
}
|
|
3367
3520
|
indexOf(panel) {
|
|
@@ -3494,7 +3647,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3494
3647
|
return this._activePanel === panel;
|
|
3495
3648
|
}
|
|
3496
3649
|
updateActions(element) {
|
|
3497
|
-
this.tabsContainer.
|
|
3650
|
+
this.tabsContainer.setRightActionsElement(element);
|
|
3498
3651
|
}
|
|
3499
3652
|
setActive(isGroupActive, skipFocus = false, force = false) {
|
|
3500
3653
|
var _a, _b, _c, _d;
|
|
@@ -3666,9 +3819,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3666
3819
|
}
|
|
3667
3820
|
}
|
|
3668
3821
|
dispose() {
|
|
3669
|
-
var _a, _b;
|
|
3822
|
+
var _a, _b, _c;
|
|
3670
3823
|
super.dispose();
|
|
3671
|
-
(
|
|
3824
|
+
(_a = this.watermark) === null || _a === void 0 ? void 0 : _a.element.remove();
|
|
3825
|
+
(_c = (_b = this.watermark) === null || _b === void 0 ? void 0 : _b.dispose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
3672
3826
|
for (const panel of this.panels) {
|
|
3673
3827
|
panel.dispose();
|
|
3674
3828
|
}
|
|
@@ -4462,8 +4616,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4462
4616
|
get isActive() {
|
|
4463
4617
|
return this.api.isActive;
|
|
4464
4618
|
}
|
|
4465
|
-
constructor(id, component, options) {
|
|
4466
|
-
super(id, component, new GridviewPanelApiImpl(id));
|
|
4619
|
+
constructor(id, component, options, api) {
|
|
4620
|
+
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
|
|
4467
4621
|
this._evaluatedMinimumWidth = 0;
|
|
4468
4622
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4469
4623
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -4561,6 +4715,32 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4561
4715
|
}
|
|
4562
4716
|
}
|
|
4563
4717
|
|
|
4718
|
+
class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
4719
|
+
get isFloating() {
|
|
4720
|
+
if (!this._group) {
|
|
4721
|
+
throw new Error(`DockviewGroupPanelApiImpl not initialized`);
|
|
4722
|
+
}
|
|
4723
|
+
return this._group.model.isFloating;
|
|
4724
|
+
}
|
|
4725
|
+
constructor(id, accessor) {
|
|
4726
|
+
super(id);
|
|
4727
|
+
this.accessor = accessor;
|
|
4728
|
+
this._onDidFloatingStateChange = new Emitter();
|
|
4729
|
+
this.onDidFloatingStateChange = this._onDidFloatingStateChange.event;
|
|
4730
|
+
this.addDisposables(this._onDidFloatingStateChange);
|
|
4731
|
+
}
|
|
4732
|
+
moveTo(options) {
|
|
4733
|
+
var _a;
|
|
4734
|
+
if (!this._group) {
|
|
4735
|
+
throw new Error(`DockviewGroupPanelApiImpl not initialized`);
|
|
4736
|
+
}
|
|
4737
|
+
this.accessor.moveGroupOrPanel(options.group, this._group.id, undefined, (_a = options.position) !== null && _a !== void 0 ? _a : 'center');
|
|
4738
|
+
}
|
|
4739
|
+
initialize(group) {
|
|
4740
|
+
this._group = group;
|
|
4741
|
+
}
|
|
4742
|
+
}
|
|
4743
|
+
|
|
4564
4744
|
class DockviewGroupPanel extends GridviewPanel {
|
|
4565
4745
|
get panels() {
|
|
4566
4746
|
return this._model.panels;
|
|
@@ -4587,7 +4767,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4587
4767
|
super(id, 'groupview_default', {
|
|
4588
4768
|
minimumHeight: 100,
|
|
4589
4769
|
minimumWidth: 100,
|
|
4590
|
-
});
|
|
4770
|
+
}, new DockviewGroupPanelApiImpl(id, accessor));
|
|
4771
|
+
this.api.initialize(this); // cannot use 'this' after after 'super' call
|
|
4591
4772
|
this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
|
|
4592
4773
|
}
|
|
4593
4774
|
initialize() {
|
|
@@ -4605,7 +4786,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4605
4786
|
return this._model;
|
|
4606
4787
|
}
|
|
4607
4788
|
toJSON() {
|
|
4608
|
-
// TODO fix typing
|
|
4609
4789
|
return this.model.toJSON();
|
|
4610
4790
|
}
|
|
4611
4791
|
}
|
|
@@ -4659,9 +4839,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4659
4839
|
get group() {
|
|
4660
4840
|
return this._group;
|
|
4661
4841
|
}
|
|
4662
|
-
constructor(panel, group) {
|
|
4842
|
+
constructor(panel, group, accessor) {
|
|
4663
4843
|
super(panel.id);
|
|
4664
4844
|
this.panel = panel;
|
|
4845
|
+
this.accessor = accessor;
|
|
4665
4846
|
this._onDidTitleChange = new Emitter();
|
|
4666
4847
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
4667
4848
|
this._onDidActiveGroupChange = new Emitter();
|
|
@@ -4673,6 +4854,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4673
4854
|
this._group = group;
|
|
4674
4855
|
this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
4675
4856
|
}
|
|
4857
|
+
moveTo(options) {
|
|
4858
|
+
var _a;
|
|
4859
|
+
this.accessor.moveGroupOrPanel(options.group, this._group.id, this.panel.id, (_a = options.position) !== null && _a !== void 0 ? _a : 'center', options.index);
|
|
4860
|
+
}
|
|
4676
4861
|
setTitle(title) {
|
|
4677
4862
|
this.panel.setTitle(title);
|
|
4678
4863
|
}
|
|
@@ -4697,7 +4882,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4697
4882
|
this.containerApi = containerApi;
|
|
4698
4883
|
this.view = view;
|
|
4699
4884
|
this._group = group;
|
|
4700
|
-
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
4885
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
4701
4886
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
4702
4887
|
accessor.setActivePanel(this);
|
|
4703
4888
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -5038,6 +5223,296 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5038
5223
|
}
|
|
5039
5224
|
}
|
|
5040
5225
|
|
|
5226
|
+
const bringElementToFront = (() => {
|
|
5227
|
+
let previous = null;
|
|
5228
|
+
function pushToTop(element) {
|
|
5229
|
+
if (previous !== element && previous !== null) {
|
|
5230
|
+
toggleClass(previous, 'dv-bring-to-front', false);
|
|
5231
|
+
}
|
|
5232
|
+
toggleClass(element, 'dv-bring-to-front', true);
|
|
5233
|
+
previous = element;
|
|
5234
|
+
}
|
|
5235
|
+
return pushToTop;
|
|
5236
|
+
})();
|
|
5237
|
+
class Overlay extends CompositeDisposable {
|
|
5238
|
+
constructor(options) {
|
|
5239
|
+
super();
|
|
5240
|
+
this.options = options;
|
|
5241
|
+
this._element = document.createElement('div');
|
|
5242
|
+
this._onDidChange = new Emitter();
|
|
5243
|
+
this.onDidChange = this._onDidChange.event;
|
|
5244
|
+
this._onDidChangeEnd = new Emitter();
|
|
5245
|
+
this.onDidChangeEnd = this._onDidChangeEnd.event;
|
|
5246
|
+
this.addDisposables(this._onDidChange, this._onDidChangeEnd);
|
|
5247
|
+
this._element.className = 'dv-resize-container';
|
|
5248
|
+
this.setupResize('top');
|
|
5249
|
+
this.setupResize('bottom');
|
|
5250
|
+
this.setupResize('left');
|
|
5251
|
+
this.setupResize('right');
|
|
5252
|
+
this.setupResize('topleft');
|
|
5253
|
+
this.setupResize('topright');
|
|
5254
|
+
this.setupResize('bottomleft');
|
|
5255
|
+
this.setupResize('bottomright');
|
|
5256
|
+
this._element.appendChild(this.options.content);
|
|
5257
|
+
this.options.container.appendChild(this._element);
|
|
5258
|
+
// if input bad resize within acceptable boundaries
|
|
5259
|
+
this.setBounds({
|
|
5260
|
+
height: this.options.height,
|
|
5261
|
+
width: this.options.width,
|
|
5262
|
+
top: this.options.top,
|
|
5263
|
+
left: this.options.left,
|
|
5264
|
+
});
|
|
5265
|
+
}
|
|
5266
|
+
setBounds(bounds = {}) {
|
|
5267
|
+
if (typeof bounds.height === 'number') {
|
|
5268
|
+
this._element.style.height = `${bounds.height}px`;
|
|
5269
|
+
}
|
|
5270
|
+
if (typeof bounds.width === 'number') {
|
|
5271
|
+
this._element.style.width = `${bounds.width}px`;
|
|
5272
|
+
}
|
|
5273
|
+
if (typeof bounds.top === 'number') {
|
|
5274
|
+
this._element.style.top = `${bounds.top}px`;
|
|
5275
|
+
}
|
|
5276
|
+
if (typeof bounds.left === 'number') {
|
|
5277
|
+
this._element.style.left = `${bounds.left}px`;
|
|
5278
|
+
}
|
|
5279
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5280
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5281
|
+
// region: ensure bounds within allowable limits
|
|
5282
|
+
// a minimum width of minimumViewportWidth must be inside the viewport
|
|
5283
|
+
const xOffset = Math.max(0, overlayRect.width - this.options.minimumInViewportWidth);
|
|
5284
|
+
// a minimum height of minimumViewportHeight must be inside the viewport
|
|
5285
|
+
const yOffset = Math.max(0, overlayRect.height - this.options.minimumInViewportHeight);
|
|
5286
|
+
const left = clamp(overlayRect.left - containerRect.left, -xOffset, Math.max(0, containerRect.width - overlayRect.width + xOffset));
|
|
5287
|
+
const top = clamp(overlayRect.top - containerRect.top, -yOffset, Math.max(0, containerRect.height - overlayRect.height + yOffset));
|
|
5288
|
+
this._element.style.left = `${left}px`;
|
|
5289
|
+
this._element.style.top = `${top}px`;
|
|
5290
|
+
this._onDidChange.fire();
|
|
5291
|
+
}
|
|
5292
|
+
toJSON() {
|
|
5293
|
+
const container = this.options.container.getBoundingClientRect();
|
|
5294
|
+
const element = this._element.getBoundingClientRect();
|
|
5295
|
+
return {
|
|
5296
|
+
top: element.top - container.top,
|
|
5297
|
+
left: element.left - container.left,
|
|
5298
|
+
width: element.width,
|
|
5299
|
+
height: element.height,
|
|
5300
|
+
};
|
|
5301
|
+
}
|
|
5302
|
+
setupDrag(dragTarget, options = { inDragMode: false }) {
|
|
5303
|
+
const move = new MutableDisposable();
|
|
5304
|
+
const track = () => {
|
|
5305
|
+
let offset = null;
|
|
5306
|
+
const iframes = [
|
|
5307
|
+
...getElementsByTagName('iframe'),
|
|
5308
|
+
...getElementsByTagName('webview'),
|
|
5309
|
+
];
|
|
5310
|
+
for (const iframe of iframes) {
|
|
5311
|
+
iframe.style.pointerEvents = 'none';
|
|
5312
|
+
}
|
|
5313
|
+
move.value = new CompositeDisposable({
|
|
5314
|
+
dispose: () => {
|
|
5315
|
+
for (const iframe of iframes) {
|
|
5316
|
+
iframe.style.pointerEvents = 'auto';
|
|
5317
|
+
}
|
|
5318
|
+
},
|
|
5319
|
+
}, addDisposableWindowListener(window, 'mousemove', (e) => {
|
|
5320
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5321
|
+
const x = e.clientX - containerRect.left;
|
|
5322
|
+
const y = e.clientY - containerRect.top;
|
|
5323
|
+
toggleClass(this._element, 'dv-resize-container-dragging', true);
|
|
5324
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5325
|
+
if (offset === null) {
|
|
5326
|
+
offset = {
|
|
5327
|
+
x: e.clientX - overlayRect.left,
|
|
5328
|
+
y: e.clientY - overlayRect.top,
|
|
5329
|
+
};
|
|
5330
|
+
}
|
|
5331
|
+
const xOffset = Math.max(0, overlayRect.width - this.options.minimumInViewportWidth);
|
|
5332
|
+
const yOffset = Math.max(0, overlayRect.height -
|
|
5333
|
+
this.options.minimumInViewportHeight);
|
|
5334
|
+
const left = clamp(x - offset.x, -xOffset, Math.max(0, containerRect.width - overlayRect.width + xOffset));
|
|
5335
|
+
const top = clamp(y - offset.y, -yOffset, Math.max(0, containerRect.height - overlayRect.height + yOffset));
|
|
5336
|
+
this.setBounds({ top, left });
|
|
5337
|
+
}), addDisposableWindowListener(window, 'mouseup', () => {
|
|
5338
|
+
toggleClass(this._element, 'dv-resize-container-dragging', false);
|
|
5339
|
+
move.dispose();
|
|
5340
|
+
this._onDidChangeEnd.fire();
|
|
5341
|
+
}));
|
|
5342
|
+
};
|
|
5343
|
+
this.addDisposables(move, addDisposableListener(dragTarget, 'mousedown', (event) => {
|
|
5344
|
+
if (event.defaultPrevented) {
|
|
5345
|
+
event.preventDefault();
|
|
5346
|
+
return;
|
|
5347
|
+
}
|
|
5348
|
+
// if somebody has marked this event then treat as a defaultPrevented
|
|
5349
|
+
// without actually calling event.preventDefault()
|
|
5350
|
+
if (quasiDefaultPrevented(event)) {
|
|
5351
|
+
return;
|
|
5352
|
+
}
|
|
5353
|
+
track();
|
|
5354
|
+
}), addDisposableListener(this.options.content, 'mousedown', (event) => {
|
|
5355
|
+
if (event.defaultPrevented) {
|
|
5356
|
+
return;
|
|
5357
|
+
}
|
|
5358
|
+
// if somebody has marked this event then treat as a defaultPrevented
|
|
5359
|
+
// without actually calling event.preventDefault()
|
|
5360
|
+
if (quasiDefaultPrevented(event)) {
|
|
5361
|
+
return;
|
|
5362
|
+
}
|
|
5363
|
+
if (event.shiftKey) {
|
|
5364
|
+
track();
|
|
5365
|
+
}
|
|
5366
|
+
}), addDisposableListener(this.options.content, 'mousedown', () => {
|
|
5367
|
+
bringElementToFront(this._element);
|
|
5368
|
+
}, true));
|
|
5369
|
+
bringElementToFront(this._element);
|
|
5370
|
+
if (options.inDragMode) {
|
|
5371
|
+
track();
|
|
5372
|
+
}
|
|
5373
|
+
}
|
|
5374
|
+
setupResize(direction) {
|
|
5375
|
+
const resizeHandleElement = document.createElement('div');
|
|
5376
|
+
resizeHandleElement.className = `dv-resize-handle-${direction}`;
|
|
5377
|
+
this._element.appendChild(resizeHandleElement);
|
|
5378
|
+
const move = new MutableDisposable();
|
|
5379
|
+
this.addDisposables(move, addDisposableListener(resizeHandleElement, 'mousedown', (e) => {
|
|
5380
|
+
e.preventDefault();
|
|
5381
|
+
let startPosition = null;
|
|
5382
|
+
const iframes = [
|
|
5383
|
+
...getElementsByTagName('iframe'),
|
|
5384
|
+
...getElementsByTagName('webview'),
|
|
5385
|
+
];
|
|
5386
|
+
for (const iframe of iframes) {
|
|
5387
|
+
iframe.style.pointerEvents = 'none';
|
|
5388
|
+
}
|
|
5389
|
+
move.value = new CompositeDisposable(addDisposableWindowListener(window, 'mousemove', (e) => {
|
|
5390
|
+
const containerRect = this.options.container.getBoundingClientRect();
|
|
5391
|
+
const overlayRect = this._element.getBoundingClientRect();
|
|
5392
|
+
const y = e.clientY - containerRect.top;
|
|
5393
|
+
const x = e.clientX - containerRect.left;
|
|
5394
|
+
if (startPosition === null) {
|
|
5395
|
+
// record the initial dimensions since as all subsequence moves are relative to this
|
|
5396
|
+
startPosition = {
|
|
5397
|
+
originalY: y,
|
|
5398
|
+
originalHeight: overlayRect.height,
|
|
5399
|
+
originalX: x,
|
|
5400
|
+
originalWidth: overlayRect.width,
|
|
5401
|
+
};
|
|
5402
|
+
}
|
|
5403
|
+
let top = undefined;
|
|
5404
|
+
let height = undefined;
|
|
5405
|
+
let left = undefined;
|
|
5406
|
+
let width = undefined;
|
|
5407
|
+
const minimumInViewportHeight = this.options.minimumInViewportHeight;
|
|
5408
|
+
const minimumInViewportWidth = this.options.minimumInViewportWidth;
|
|
5409
|
+
function moveTop() {
|
|
5410
|
+
top = clamp(y, -Number.MAX_VALUE, startPosition.originalY +
|
|
5411
|
+
startPosition.originalHeight >
|
|
5412
|
+
containerRect.height
|
|
5413
|
+
? containerRect.height -
|
|
5414
|
+
minimumInViewportHeight
|
|
5415
|
+
: Math.max(0, startPosition.originalY +
|
|
5416
|
+
startPosition.originalHeight -
|
|
5417
|
+
Overlay.MINIMUM_HEIGHT));
|
|
5418
|
+
height =
|
|
5419
|
+
startPosition.originalY +
|
|
5420
|
+
startPosition.originalHeight -
|
|
5421
|
+
top;
|
|
5422
|
+
}
|
|
5423
|
+
function moveBottom() {
|
|
5424
|
+
top =
|
|
5425
|
+
startPosition.originalY -
|
|
5426
|
+
startPosition.originalHeight;
|
|
5427
|
+
height = clamp(y - top, top < 0
|
|
5428
|
+
? -top + minimumInViewportHeight
|
|
5429
|
+
: Overlay.MINIMUM_HEIGHT, Number.MAX_VALUE);
|
|
5430
|
+
}
|
|
5431
|
+
function moveLeft() {
|
|
5432
|
+
left = clamp(x, -Number.MAX_VALUE, startPosition.originalX +
|
|
5433
|
+
startPosition.originalWidth >
|
|
5434
|
+
containerRect.width
|
|
5435
|
+
? containerRect.width -
|
|
5436
|
+
minimumInViewportWidth
|
|
5437
|
+
: Math.max(0, startPosition.originalX +
|
|
5438
|
+
startPosition.originalWidth -
|
|
5439
|
+
Overlay.MINIMUM_WIDTH));
|
|
5440
|
+
width =
|
|
5441
|
+
startPosition.originalX +
|
|
5442
|
+
startPosition.originalWidth -
|
|
5443
|
+
left;
|
|
5444
|
+
}
|
|
5445
|
+
function moveRight() {
|
|
5446
|
+
left =
|
|
5447
|
+
startPosition.originalX -
|
|
5448
|
+
startPosition.originalWidth;
|
|
5449
|
+
width = clamp(x - left, left < 0
|
|
5450
|
+
? -left + minimumInViewportWidth
|
|
5451
|
+
: Overlay.MINIMUM_WIDTH, Number.MAX_VALUE);
|
|
5452
|
+
}
|
|
5453
|
+
switch (direction) {
|
|
5454
|
+
case 'top':
|
|
5455
|
+
moveTop();
|
|
5456
|
+
break;
|
|
5457
|
+
case 'bottom':
|
|
5458
|
+
moveBottom();
|
|
5459
|
+
break;
|
|
5460
|
+
case 'left':
|
|
5461
|
+
moveLeft();
|
|
5462
|
+
break;
|
|
5463
|
+
case 'right':
|
|
5464
|
+
moveRight();
|
|
5465
|
+
break;
|
|
5466
|
+
case 'topleft':
|
|
5467
|
+
moveTop();
|
|
5468
|
+
moveLeft();
|
|
5469
|
+
break;
|
|
5470
|
+
case 'topright':
|
|
5471
|
+
moveTop();
|
|
5472
|
+
moveRight();
|
|
5473
|
+
break;
|
|
5474
|
+
case 'bottomleft':
|
|
5475
|
+
moveBottom();
|
|
5476
|
+
moveLeft();
|
|
5477
|
+
break;
|
|
5478
|
+
case 'bottomright':
|
|
5479
|
+
moveBottom();
|
|
5480
|
+
moveRight();
|
|
5481
|
+
break;
|
|
5482
|
+
}
|
|
5483
|
+
this.setBounds({ height, width, top, left });
|
|
5484
|
+
}), {
|
|
5485
|
+
dispose: () => {
|
|
5486
|
+
for (const iframe of iframes) {
|
|
5487
|
+
iframe.style.pointerEvents = 'auto';
|
|
5488
|
+
}
|
|
5489
|
+
},
|
|
5490
|
+
}, addDisposableWindowListener(window, 'mouseup', () => {
|
|
5491
|
+
move.dispose();
|
|
5492
|
+
this._onDidChangeEnd.fire();
|
|
5493
|
+
}));
|
|
5494
|
+
}));
|
|
5495
|
+
}
|
|
5496
|
+
dispose() {
|
|
5497
|
+
this._element.remove();
|
|
5498
|
+
super.dispose();
|
|
5499
|
+
}
|
|
5500
|
+
}
|
|
5501
|
+
Overlay.MINIMUM_HEIGHT = 20;
|
|
5502
|
+
Overlay.MINIMUM_WIDTH = 20;
|
|
5503
|
+
|
|
5504
|
+
class DockviewFloatingGroupPanel extends CompositeDisposable {
|
|
5505
|
+
constructor(group, overlay) {
|
|
5506
|
+
super();
|
|
5507
|
+
this.group = group;
|
|
5508
|
+
this.overlay = overlay;
|
|
5509
|
+
this.addDisposables(overlay);
|
|
5510
|
+
}
|
|
5511
|
+
position(bounds) {
|
|
5512
|
+
this.overlay.setBounds(bounds);
|
|
5513
|
+
}
|
|
5514
|
+
}
|
|
5515
|
+
|
|
5041
5516
|
class DockviewComponent extends BaseGrid {
|
|
5042
5517
|
get orientation() {
|
|
5043
5518
|
return this.gridview.orientation;
|
|
@@ -5078,7 +5553,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5078
5553
|
this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
|
|
5079
5554
|
this._onDidActivePanelChange = new Emitter();
|
|
5080
5555
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
5081
|
-
this.
|
|
5556
|
+
this.floatingGroups = [];
|
|
5557
|
+
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
5082
5558
|
this.addDisposables(this._onDidDrop, exports.DockviewEvent.any(this.onDidAddGroup, this.onDidRemoveGroup)(() => {
|
|
5083
5559
|
this.updateWatermark();
|
|
5084
5560
|
}), exports.DockviewEvent.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
@@ -5108,6 +5584,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5108
5584
|
if (data.viewId !== this.id) {
|
|
5109
5585
|
return false;
|
|
5110
5586
|
}
|
|
5587
|
+
if (position === 'center') {
|
|
5588
|
+
// center drop target is only allowed if there are no panels in the grid
|
|
5589
|
+
// floating panels are allowed
|
|
5590
|
+
return this.gridview.length === 0;
|
|
5591
|
+
}
|
|
5111
5592
|
return true;
|
|
5112
5593
|
}
|
|
5113
5594
|
if (this.options.showDndOverlay) {
|
|
@@ -5120,7 +5601,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5120
5601
|
}
|
|
5121
5602
|
return false;
|
|
5122
5603
|
},
|
|
5123
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right'],
|
|
5604
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
5124
5605
|
overlayModel: {
|
|
5125
5606
|
activationSize: { type: 'pixels', value: 10 },
|
|
5126
5607
|
size: { type: 'pixels', value: 20 },
|
|
@@ -5138,6 +5619,75 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5138
5619
|
this._api = new DockviewApi(this);
|
|
5139
5620
|
this.updateWatermark();
|
|
5140
5621
|
}
|
|
5622
|
+
addFloatingGroup(item, coord, options) {
|
|
5623
|
+
var _a, _b;
|
|
5624
|
+
let group;
|
|
5625
|
+
if (item instanceof DockviewPanel) {
|
|
5626
|
+
group = this.createGroup();
|
|
5627
|
+
this.removePanel(item, {
|
|
5628
|
+
removeEmptyGroup: true,
|
|
5629
|
+
skipDispose: true,
|
|
5630
|
+
});
|
|
5631
|
+
group.model.openPanel(item);
|
|
5632
|
+
}
|
|
5633
|
+
else {
|
|
5634
|
+
group = item;
|
|
5635
|
+
const skip = typeof (options === null || options === void 0 ? void 0 : options.skipRemoveGroup) === 'boolean' &&
|
|
5636
|
+
options.skipRemoveGroup;
|
|
5637
|
+
if (!skip) {
|
|
5638
|
+
this.doRemoveGroup(item, { skipDispose: true });
|
|
5639
|
+
}
|
|
5640
|
+
}
|
|
5641
|
+
group.model.isFloating = true;
|
|
5642
|
+
const overlayLeft = typeof (coord === null || coord === void 0 ? void 0 : coord.x) === 'number' ? Math.max(coord.x, 0) : 100;
|
|
5643
|
+
const overlayTop = typeof (coord === null || coord === void 0 ? void 0 : coord.y) === 'number' ? Math.max(coord.y, 0) : 100;
|
|
5644
|
+
const overlay = new Overlay({
|
|
5645
|
+
container: this.gridview.element,
|
|
5646
|
+
content: group.element,
|
|
5647
|
+
height: (_a = coord === null || coord === void 0 ? void 0 : coord.height) !== null && _a !== void 0 ? _a : 300,
|
|
5648
|
+
width: (_b = coord === null || coord === void 0 ? void 0 : coord.width) !== null && _b !== void 0 ? _b : 300,
|
|
5649
|
+
left: overlayLeft,
|
|
5650
|
+
top: overlayTop,
|
|
5651
|
+
minimumInViewportWidth: 100,
|
|
5652
|
+
minimumInViewportHeight: 100,
|
|
5653
|
+
});
|
|
5654
|
+
const el = group.element.querySelector('.void-container');
|
|
5655
|
+
if (!el) {
|
|
5656
|
+
throw new Error('failed to find drag handle');
|
|
5657
|
+
}
|
|
5658
|
+
overlay.setupDrag(el, {
|
|
5659
|
+
inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
|
|
5660
|
+
? options.inDragMode
|
|
5661
|
+
: false,
|
|
5662
|
+
});
|
|
5663
|
+
const floatingGroupPanel = new DockviewFloatingGroupPanel(group, overlay);
|
|
5664
|
+
const disposable = watchElementResize(group.element, (entry) => {
|
|
5665
|
+
const { width, height } = entry.contentRect;
|
|
5666
|
+
group.layout(width, height); // let the group know it's size is changing so it can fire events to the panel
|
|
5667
|
+
});
|
|
5668
|
+
floatingGroupPanel.addDisposables(overlay.onDidChange(() => {
|
|
5669
|
+
// this is either a resize or a move
|
|
5670
|
+
// to inform the panels .layout(...) the group with it's current size
|
|
5671
|
+
// don't care about resize since the above watcher handles that
|
|
5672
|
+
group.layout(group.height, group.width);
|
|
5673
|
+
}), overlay.onDidChangeEnd(() => {
|
|
5674
|
+
this._bufferOnDidLayoutChange.fire();
|
|
5675
|
+
}), group.onDidChange((event) => {
|
|
5676
|
+
overlay.setBounds({
|
|
5677
|
+
height: event === null || event === void 0 ? void 0 : event.height,
|
|
5678
|
+
width: event === null || event === void 0 ? void 0 : event.width,
|
|
5679
|
+
});
|
|
5680
|
+
}), {
|
|
5681
|
+
dispose: () => {
|
|
5682
|
+
disposable.dispose();
|
|
5683
|
+
group.model.isFloating = false;
|
|
5684
|
+
remove(this.floatingGroups, floatingGroupPanel);
|
|
5685
|
+
this.updateWatermark();
|
|
5686
|
+
},
|
|
5687
|
+
});
|
|
5688
|
+
this.floatingGroups.push(floatingGroupPanel);
|
|
5689
|
+
this.updateWatermark();
|
|
5690
|
+
}
|
|
5141
5691
|
orthogonalize(position) {
|
|
5142
5692
|
switch (position) {
|
|
5143
5693
|
case 'top':
|
|
@@ -5160,6 +5710,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5160
5710
|
switch (position) {
|
|
5161
5711
|
case 'top':
|
|
5162
5712
|
case 'left':
|
|
5713
|
+
case 'center':
|
|
5163
5714
|
return this.createGroupAtLocation([0]); // insert into first position
|
|
5164
5715
|
case 'bottom':
|
|
5165
5716
|
case 'right':
|
|
@@ -5177,6 +5728,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5177
5728
|
}
|
|
5178
5729
|
this.layout(this.gridview.width, this.gridview.height, true);
|
|
5179
5730
|
}
|
|
5731
|
+
layout(width, height, forceResize) {
|
|
5732
|
+
super.layout(width, height, forceResize);
|
|
5733
|
+
if (this.floatingGroups) {
|
|
5734
|
+
for (const floating of this.floatingGroups) {
|
|
5735
|
+
// ensure floting groups stay within visible boundaries
|
|
5736
|
+
floating.overlay.setBounds();
|
|
5737
|
+
}
|
|
5738
|
+
}
|
|
5739
|
+
}
|
|
5180
5740
|
focus() {
|
|
5181
5741
|
var _a;
|
|
5182
5742
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -5239,51 +5799,81 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5239
5799
|
collection[panel.id] = panel.toJSON();
|
|
5240
5800
|
return collection;
|
|
5241
5801
|
}, {});
|
|
5242
|
-
|
|
5802
|
+
const floats = this.floatingGroups.map((floatingGroup) => {
|
|
5803
|
+
return {
|
|
5804
|
+
data: floatingGroup.group.toJSON(),
|
|
5805
|
+
position: floatingGroup.overlay.toJSON(),
|
|
5806
|
+
};
|
|
5807
|
+
});
|
|
5808
|
+
const result = {
|
|
5243
5809
|
grid: data,
|
|
5244
5810
|
panels,
|
|
5245
5811
|
activeGroup: (_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.id,
|
|
5246
5812
|
};
|
|
5813
|
+
if (floats.length > 0) {
|
|
5814
|
+
result.floatingGroups = floats;
|
|
5815
|
+
}
|
|
5816
|
+
return result;
|
|
5247
5817
|
}
|
|
5248
5818
|
fromJSON(data) {
|
|
5819
|
+
var _a;
|
|
5249
5820
|
this.clear();
|
|
5250
5821
|
const { grid, panels, activeGroup } = data;
|
|
5251
5822
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
5252
5823
|
throw new Error('root must be of type branch');
|
|
5253
5824
|
}
|
|
5825
|
+
// take note of the existing dimensions
|
|
5826
|
+
const width = this.width;
|
|
5827
|
+
const height = this.height;
|
|
5828
|
+
const createGroupFromSerializedState = (data) => {
|
|
5829
|
+
const { id, locked, hideHeader, views, activeView } = data;
|
|
5830
|
+
const group = this.createGroup({
|
|
5831
|
+
id,
|
|
5832
|
+
locked: !!locked,
|
|
5833
|
+
hideHeader: !!hideHeader,
|
|
5834
|
+
});
|
|
5835
|
+
this._onDidAddGroup.fire(group);
|
|
5836
|
+
for (const child of views) {
|
|
5837
|
+
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
5838
|
+
const isActive = typeof activeView === 'string' && activeView === panel.id;
|
|
5839
|
+
group.model.openPanel(panel, {
|
|
5840
|
+
skipSetPanelActive: !isActive,
|
|
5841
|
+
skipSetGroupActive: true,
|
|
5842
|
+
});
|
|
5843
|
+
}
|
|
5844
|
+
if (!group.activePanel && group.panels.length > 0) {
|
|
5845
|
+
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
5846
|
+
skipSetGroupActive: true,
|
|
5847
|
+
});
|
|
5848
|
+
}
|
|
5849
|
+
return group;
|
|
5850
|
+
};
|
|
5254
5851
|
this.gridview.deserialize(grid, {
|
|
5255
5852
|
fromJSON: (node) => {
|
|
5256
|
-
|
|
5257
|
-
const group = this.createGroup({
|
|
5258
|
-
id,
|
|
5259
|
-
locked: !!locked,
|
|
5260
|
-
hideHeader: !!hideHeader,
|
|
5261
|
-
});
|
|
5262
|
-
this._onDidAddGroup.fire(group);
|
|
5263
|
-
for (const child of views) {
|
|
5264
|
-
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
5265
|
-
const isActive = typeof activeView === 'string' &&
|
|
5266
|
-
activeView === panel.id;
|
|
5267
|
-
group.model.openPanel(panel, {
|
|
5268
|
-
skipSetPanelActive: !isActive,
|
|
5269
|
-
skipSetGroupActive: true,
|
|
5270
|
-
});
|
|
5271
|
-
}
|
|
5272
|
-
if (!group.activePanel && group.panels.length > 0) {
|
|
5273
|
-
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
5274
|
-
skipSetGroupActive: true,
|
|
5275
|
-
});
|
|
5276
|
-
}
|
|
5277
|
-
return group;
|
|
5853
|
+
return createGroupFromSerializedState(node.data);
|
|
5278
5854
|
},
|
|
5279
5855
|
});
|
|
5856
|
+
this.layout(width, height, true);
|
|
5857
|
+
const serializedFloatingGroups = (_a = data.floatingGroups) !== null && _a !== void 0 ? _a : [];
|
|
5858
|
+
for (const serializedFloatingGroup of serializedFloatingGroups) {
|
|
5859
|
+
const { data, position } = serializedFloatingGroup;
|
|
5860
|
+
const group = createGroupFromSerializedState(data);
|
|
5861
|
+
this.addFloatingGroup(group, {
|
|
5862
|
+
x: position.left,
|
|
5863
|
+
y: position.top,
|
|
5864
|
+
height: position.height,
|
|
5865
|
+
width: position.width,
|
|
5866
|
+
}, { skipRemoveGroup: true, inDragMode: false });
|
|
5867
|
+
}
|
|
5868
|
+
for (const floatingGroup of this.floatingGroups) {
|
|
5869
|
+
floatingGroup.overlay.setBounds();
|
|
5870
|
+
}
|
|
5280
5871
|
if (typeof activeGroup === 'string') {
|
|
5281
5872
|
const panel = this.getPanel(activeGroup);
|
|
5282
5873
|
if (panel) {
|
|
5283
5874
|
this.doSetGroupActive(panel);
|
|
5284
5875
|
}
|
|
5285
5876
|
}
|
|
5286
|
-
this.gridview.layout(this.width, this.height);
|
|
5287
5877
|
this._onDidLayoutFromJSON.fire();
|
|
5288
5878
|
}
|
|
5289
5879
|
clear() {
|
|
@@ -5292,7 +5882,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5292
5882
|
const hasActivePanel = !!this.activePanel;
|
|
5293
5883
|
for (const group of groups) {
|
|
5294
5884
|
// remove the group will automatically remove the panels
|
|
5295
|
-
this.removeGroup(group, true);
|
|
5885
|
+
this.removeGroup(group, { skipActive: true });
|
|
5296
5886
|
}
|
|
5297
5887
|
if (hasActiveGroup) {
|
|
5298
5888
|
this.doSetGroupActive(undefined);
|
|
@@ -5314,6 +5904,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5314
5904
|
throw new Error(`panel with id ${options.id} already exists`);
|
|
5315
5905
|
}
|
|
5316
5906
|
let referenceGroup;
|
|
5907
|
+
if (options.position && options.floating) {
|
|
5908
|
+
throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
5909
|
+
}
|
|
5317
5910
|
if (options.position) {
|
|
5318
5911
|
if (isPanelOptionsWithPanel(options.position)) {
|
|
5319
5912
|
const referencePanel = typeof options.position.referencePanel === 'string'
|
|
@@ -5346,7 +5939,20 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5346
5939
|
let panel;
|
|
5347
5940
|
if (referenceGroup) {
|
|
5348
5941
|
const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
|
|
5349
|
-
if (
|
|
5942
|
+
if (options.floating) {
|
|
5943
|
+
const group = this.createGroup();
|
|
5944
|
+
panel = this.createPanel(options, group);
|
|
5945
|
+
group.model.openPanel(panel);
|
|
5946
|
+
const o = typeof options.floating === 'object' &&
|
|
5947
|
+
options.floating !== null
|
|
5948
|
+
? options.floating
|
|
5949
|
+
: {};
|
|
5950
|
+
this.addFloatingGroup(group, o, {
|
|
5951
|
+
inDragMode: false,
|
|
5952
|
+
skipRemoveGroup: true,
|
|
5953
|
+
});
|
|
5954
|
+
}
|
|
5955
|
+
else if (referenceGroup.api.isFloating || target === 'center') {
|
|
5350
5956
|
panel = this.createPanel(options, referenceGroup);
|
|
5351
5957
|
referenceGroup.model.openPanel(panel);
|
|
5352
5958
|
}
|
|
@@ -5358,6 +5964,19 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5358
5964
|
group.model.openPanel(panel);
|
|
5359
5965
|
}
|
|
5360
5966
|
}
|
|
5967
|
+
else if (options.floating) {
|
|
5968
|
+
const group = this.createGroup();
|
|
5969
|
+
panel = this.createPanel(options, group);
|
|
5970
|
+
group.model.openPanel(panel);
|
|
5971
|
+
const o = typeof options.floating === 'object' &&
|
|
5972
|
+
options.floating !== null
|
|
5973
|
+
? options.floating
|
|
5974
|
+
: {};
|
|
5975
|
+
this.addFloatingGroup(group, o, {
|
|
5976
|
+
inDragMode: false,
|
|
5977
|
+
skipRemoveGroup: true,
|
|
5978
|
+
});
|
|
5979
|
+
}
|
|
5361
5980
|
else {
|
|
5362
5981
|
const group = this.createGroupAtLocation();
|
|
5363
5982
|
panel = this.createPanel(options, group);
|
|
@@ -5374,7 +5993,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5374
5993
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
5375
5994
|
}
|
|
5376
5995
|
group.model.removePanel(panel);
|
|
5377
|
-
|
|
5996
|
+
if (!options.skipDispose) {
|
|
5997
|
+
panel.dispose();
|
|
5998
|
+
}
|
|
5378
5999
|
if (group.size === 0 && options.removeEmptyGroup) {
|
|
5379
6000
|
this.removeGroup(group);
|
|
5380
6001
|
}
|
|
@@ -5389,7 +6010,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5389
6010
|
}
|
|
5390
6011
|
updateWatermark() {
|
|
5391
6012
|
var _a, _b;
|
|
5392
|
-
if (this.groups.length === 0) {
|
|
6013
|
+
if (this.groups.filter((x) => !x.api.isFloating).length === 0) {
|
|
5393
6014
|
if (!this.watermark) {
|
|
5394
6015
|
this.watermark = this.createWatermarkComponent();
|
|
5395
6016
|
this.watermark.init({
|
|
@@ -5398,7 +6019,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5398
6019
|
const watermarkContainer = document.createElement('div');
|
|
5399
6020
|
watermarkContainer.className = 'dv-watermark-container';
|
|
5400
6021
|
watermarkContainer.appendChild(this.watermark.element);
|
|
5401
|
-
this.element.appendChild(watermarkContainer);
|
|
6022
|
+
this.gridview.element.appendChild(watermarkContainer);
|
|
5402
6023
|
}
|
|
5403
6024
|
}
|
|
5404
6025
|
else if (this.watermark) {
|
|
@@ -5448,15 +6069,28 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5448
6069
|
return group;
|
|
5449
6070
|
}
|
|
5450
6071
|
}
|
|
5451
|
-
removeGroup(group,
|
|
6072
|
+
removeGroup(group, options) {
|
|
6073
|
+
var _a;
|
|
5452
6074
|
const panels = [...group.panels]; // reassign since group panels will mutate
|
|
5453
6075
|
for (const panel of panels) {
|
|
5454
6076
|
this.removePanel(panel, {
|
|
5455
6077
|
removeEmptyGroup: false,
|
|
5456
|
-
skipDispose: false,
|
|
6078
|
+
skipDispose: (_a = options === null || options === void 0 ? void 0 : options.skipDispose) !== null && _a !== void 0 ? _a : false,
|
|
5457
6079
|
});
|
|
5458
6080
|
}
|
|
5459
|
-
|
|
6081
|
+
this.doRemoveGroup(group, options);
|
|
6082
|
+
}
|
|
6083
|
+
doRemoveGroup(group, options) {
|
|
6084
|
+
const floatingGroup = this.floatingGroups.find((_) => _.group === group);
|
|
6085
|
+
if (floatingGroup) {
|
|
6086
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
6087
|
+
floatingGroup.group.dispose();
|
|
6088
|
+
this._groups.delete(group.id);
|
|
6089
|
+
}
|
|
6090
|
+
floatingGroup.dispose();
|
|
6091
|
+
return floatingGroup.group;
|
|
6092
|
+
}
|
|
6093
|
+
return super.doRemoveGroup(group, options);
|
|
5460
6094
|
}
|
|
5461
6095
|
moveGroupOrPanel(destinationGroup, sourceGroupId, sourceItemId, destinationTarget, destinationIndex) {
|
|
5462
6096
|
var _a;
|
|
@@ -5487,25 +6121,26 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5487
6121
|
const targetLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
5488
6122
|
if (sourceGroup && sourceGroup.size < 2) {
|
|
5489
6123
|
const [targetParentLocation, to] = tail(targetLocation);
|
|
5490
|
-
const
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
5501
|
-
skipActive: true,
|
|
5502
|
-
skipDispose: true,
|
|
5503
|
-
});
|
|
5504
|
-
// after deleting the group we need to re-evaulate the ref location
|
|
5505
|
-
const updatedReferenceLocation = getGridLocation(destinationGroup.element);
|
|
5506
|
-
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
|
|
5507
|
-
this.doAddGroup(targetGroup, location);
|
|
6124
|
+
const isFloating = this.floatingGroups.find((x) => x.group === sourceGroup);
|
|
6125
|
+
if (!isFloating) {
|
|
6126
|
+
const sourceLocation = getGridLocation(sourceGroup.element);
|
|
6127
|
+
const [sourceParentLocation, from] = tail(sourceLocation);
|
|
6128
|
+
if (sequenceEquals(sourceParentLocation, targetParentLocation)) {
|
|
6129
|
+
// special case when 'swapping' two views within same grid location
|
|
6130
|
+
// if a group has one tab - we are essentially moving the 'group'
|
|
6131
|
+
// which is equivalent to swapping two views in this case
|
|
6132
|
+
this.gridview.moveView(sourceParentLocation, from, to);
|
|
6133
|
+
}
|
|
5508
6134
|
}
|
|
6135
|
+
// source group will become empty so delete the group
|
|
6136
|
+
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
6137
|
+
skipActive: true,
|
|
6138
|
+
skipDispose: true,
|
|
6139
|
+
});
|
|
6140
|
+
// after deleting the group we need to re-evaulate the ref location
|
|
6141
|
+
const updatedReferenceLocation = getGridLocation(destinationGroup.element);
|
|
6142
|
+
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
|
|
6143
|
+
this.doAddGroup(targetGroup, location);
|
|
5509
6144
|
}
|
|
5510
6145
|
else {
|
|
5511
6146
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(sourceItemId)) ||
|
|
@@ -5534,7 +6169,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5534
6169
|
}
|
|
5535
6170
|
}
|
|
5536
6171
|
else {
|
|
5537
|
-
this.
|
|
6172
|
+
const floatingGroup = this.floatingGroups.find((x) => x.group === sourceGroup);
|
|
6173
|
+
if (floatingGroup) {
|
|
6174
|
+
floatingGroup.dispose();
|
|
6175
|
+
}
|
|
6176
|
+
else {
|
|
6177
|
+
this.gridview.removeView(getGridLocation(sourceGroup.element));
|
|
6178
|
+
}
|
|
5538
6179
|
const referenceLocation = getGridLocation(referenceGroup.element);
|
|
5539
6180
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
5540
6181
|
this.gridview.addView(sourceGroup, exports.Sizing.Distribute, dropLocation);
|
|
@@ -5689,6 +6330,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5689
6330
|
this.clear();
|
|
5690
6331
|
const { grid, activePanel } = serializedGridview;
|
|
5691
6332
|
const queue = [];
|
|
6333
|
+
// take note of the existing dimensions
|
|
6334
|
+
const width = this.width;
|
|
6335
|
+
const height = this.height;
|
|
5692
6336
|
this.gridview.deserialize(grid, {
|
|
5693
6337
|
fromJSON: (node) => {
|
|
5694
6338
|
const { data } = node;
|
|
@@ -5714,7 +6358,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5714
6358
|
return view;
|
|
5715
6359
|
},
|
|
5716
6360
|
});
|
|
5717
|
-
this.layout(
|
|
6361
|
+
this.layout(width, height, true);
|
|
5718
6362
|
queue.forEach((f) => f());
|
|
5719
6363
|
if (typeof activePanel === 'string') {
|
|
5720
6364
|
const panel = this.getPanel(activePanel);
|
|
@@ -6028,6 +6672,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6028
6672
|
this.clear();
|
|
6029
6673
|
const { views, orientation, size, activeView } = serializedSplitview;
|
|
6030
6674
|
const queue = [];
|
|
6675
|
+
// take note of the existing dimensions
|
|
6676
|
+
const width = this.width;
|
|
6677
|
+
const height = this.height;
|
|
6031
6678
|
this.splitview = new Splitview(this.element, {
|
|
6032
6679
|
orientation,
|
|
6033
6680
|
proportionalLayout: this.options.proportionalLayout,
|
|
@@ -6064,7 +6711,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6064
6711
|
}),
|
|
6065
6712
|
},
|
|
6066
6713
|
});
|
|
6067
|
-
this.layout(
|
|
6714
|
+
this.layout(width, height);
|
|
6068
6715
|
queue.forEach((f) => f());
|
|
6069
6716
|
if (typeof activeView === 'string') {
|
|
6070
6717
|
const panel = this.getPanel(activeView);
|
|
@@ -6331,6 +6978,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6331
6978
|
this.clear();
|
|
6332
6979
|
const { views, size } = serializedPaneview;
|
|
6333
6980
|
const queue = [];
|
|
6981
|
+
// take note of the existing dimensions
|
|
6982
|
+
const width = this.width;
|
|
6983
|
+
const height = this.height;
|
|
6334
6984
|
this.paneview = new Paneview(this.element, {
|
|
6335
6985
|
orientation: exports.Orientation.VERTICAL,
|
|
6336
6986
|
descriptor: {
|
|
@@ -6386,7 +7036,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6386
7036
|
}),
|
|
6387
7037
|
},
|
|
6388
7038
|
});
|
|
6389
|
-
this.layout(
|
|
7039
|
+
this.layout(width, height);
|
|
6390
7040
|
queue.forEach((f) => f());
|
|
6391
7041
|
this._onDidLayoutfromJSON.fire();
|
|
6392
7042
|
}
|
|
@@ -6572,6 +7222,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6572
7222
|
exports.orthogonal = orthogonal;
|
|
6573
7223
|
exports.positionToDirection = positionToDirection;
|
|
6574
7224
|
exports.toTarget = toTarget;
|
|
6575
|
-
exports.watchElementResize = watchElementResize;
|
|
6576
7225
|
|
|
6577
7226
|
}));
|
|
7227
|
+
//# sourceMappingURL=dockview-core.amd.js.map
|