dockview 1.1.0 → 1.2.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/dist/cjs/api/component.api.d.ts +1 -3
- package/dist/cjs/api/component.api.js +0 -14
- package/dist/cjs/api/component.api.js.map +1 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts +1 -1
- package/dist/cjs/dnd/abstractDragHandler.js +1 -2
- package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
- package/dist/cjs/dockview/deserializer.js.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +5 -3
- package/dist/cjs/dockview/dockviewComponent.js +45 -38
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +1 -0
- package/dist/cjs/dockview/dockviewGroupPanel.js +8 -0
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +3 -20
- package/dist/cjs/gridview/baseComponentGridview.js +9 -43
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
- package/dist/cjs/gridview/branchNode.js +1 -1
- package/dist/cjs/gridview/branchNode.js.map +1 -1
- package/dist/cjs/gridview/gridview.js +1 -0
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.js +0 -1
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/gridview/leafNode.js +1 -1
- package/dist/cjs/gridview/leafNode.js.map +1 -1
- package/dist/cjs/groupview/groupPanel.d.ts +1 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +8 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/paneview/paneview.js +3 -2
- package/dist/cjs/paneview/paneview.js.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +1 -0
- package/dist/cjs/paneview/paneviewComponent.js +4 -0
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/react/dockview/components.js +5 -1
- package/dist/cjs/react/dockview/components.js.map +1 -1
- package/dist/cjs/react/dockview/dockview.js +14 -1
- package/dist/cjs/react/dockview/dockview.js.map +1 -1
- package/dist/cjs/react/gridview/gridview.js +9 -2
- package/dist/cjs/react/gridview/gridview.js.map +1 -1
- package/dist/cjs/react/index.js +5 -1
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/react/paneview/paneview.js +5 -1
- package/dist/cjs/react/paneview/paneview.js.map +1 -1
- package/dist/cjs/react/react.js +5 -1
- package/dist/cjs/react/react.js.map +1 -1
- package/dist/cjs/react/splitview/splitview.js +8 -2
- package/dist/cjs/react/splitview/splitview.js.map +1 -1
- package/dist/cjs/splitview/core/splitview.js +1 -1
- package/dist/cjs/splitview/core/splitview.js.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.js +1 -0
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
- package/dist/dockview.amd.js +168 -207
- package/dist/dockview.amd.min.js +2 -2
- package/dist/dockview.amd.min.noStyle.js +2 -2
- package/dist/dockview.amd.noStyle.js +167 -206
- package/dist/dockview.cjs.js +168 -207
- package/dist/dockview.esm.js +168 -201
- package/dist/dockview.esm.min.js +2 -2
- package/dist/dockview.js +168 -207
- package/dist/dockview.min.js +2 -2
- package/dist/dockview.min.noStyle.js +2 -2
- package/dist/dockview.noStyle.js +167 -206
- package/dist/esm/api/component.api.d.ts +1 -3
- package/dist/esm/api/component.api.js +0 -6
- package/dist/esm/dnd/abstractDragHandler.d.ts +1 -1
- package/dist/esm/dnd/abstractDragHandler.js +1 -2
- package/dist/esm/dockview/dockviewComponent.d.ts +5 -3
- package/dist/esm/dockview/dockviewComponent.js +20 -36
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +1 -0
- package/dist/esm/dockview/dockviewGroupPanel.js +4 -0
- package/dist/esm/gridview/baseComponentGridview.d.ts +3 -20
- package/dist/esm/gridview/baseComponentGridview.js +9 -43
- package/dist/esm/gridview/branchNode.js +1 -1
- package/dist/esm/gridview/gridview.js +1 -0
- package/dist/esm/gridview/gridviewComponent.js +1 -2
- package/dist/esm/groupview/groupPanel.d.ts +1 -0
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +1 -2
- package/dist/esm/paneview/paneview.js +1 -1
- package/dist/esm/paneview/paneviewComponent.d.ts +1 -0
- package/dist/esm/paneview/paneviewComponent.js +4 -0
- package/dist/esm/react/dockview/dockview.js +9 -0
- package/dist/esm/react/gridview/gridview.js +4 -1
- package/dist/esm/react/splitview/splitview.js +3 -1
- package/dist/esm/splitview/core/splitview.js +1 -1
- package/dist/esm/splitview/splitviewComponent.js +1 -0
- package/dist/styles/dockview.css +9 -8
- package/package.json +11 -11
package/dist/dockview.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.2.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -34,9 +34,79 @@ function styleInject(css, ref) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
var css_248z = ".dockview-theme-dark {\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-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .actions-container a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\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 pointer-events: none;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left, .drop-target > .drop-target-dropzone > .drop-target-selection.right {\n width: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translate(100%, 0%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translate(0%, 100%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top, .drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n height: 50%;\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.custom-dragging {\n height: 24px;\n line-height: 24px;\n font-size: 11px;\n width: 100px;\n background-color: dodgerblue;\n color: ghostwhite;\n border-radius: 11px;\n position: absolute;\n padding-left: 10px;\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.active-tab .tab-action {\n background-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.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-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.active-tab .tab-action {\n background-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.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-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.dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\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.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}\n.pane-container .view .default-header > span {\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.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 .void-container {\n display: flex;\n flex-grow: 1;\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.dockview-react-part {\n height: 100%;\n width: 100%;\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}\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}\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.dragged {\n transform: translate3d(0px, 0px, 0px);\n /* 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.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-left: 10px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n width: 28px;\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 a:active:hover {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n}\n.tab .default-tab .action-container .tab-list .tab-action.disable-close {\n display: none;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\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}";
|
|
37
|
+
var css_248z = ".dockview-theme-dark {\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-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\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-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-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .actions-container a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\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-duration: 0.15s;\n transition-timing-function: ease-out;\n will-change: transform;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left {\n transform: translateX(-25%) scaleX(50%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translateX(25%) scaleX(50%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top {\n transform: translateY(-25%) scaleY(50%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translateY(25%) scaleY(50%);\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.custom-dragging {\n height: 24px;\n line-height: 24px;\n font-size: 11px;\n width: 100px;\n background-color: dodgerblue;\n color: ghostwhite;\n border-radius: 11px;\n position: absolute;\n padding-left: 10px;\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.active-tab .tab-action {\n background-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.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-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.active-tab .tab-action {\n background-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.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-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.dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\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.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}\n.pane-container .view .default-header > span {\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.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 .void-container {\n display: flex;\n flex-grow: 1;\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.dockview-react-part {\n height: 100%;\n width: 100%;\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}\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}\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.dragged {\n transform: translate3d(0px, 0px, 0px);\n /* 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.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-left: 10px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n width: 28px;\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 a:active:hover {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n}\n.tab .default-tab .action-container .tab-list .tab-action.disable-close {\n display: none;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\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}";
|
|
38
38
|
styleInject(css_248z);
|
|
39
39
|
|
|
40
|
+
class TransferObject {
|
|
41
|
+
constructor() {
|
|
42
|
+
//
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
class PanelTransfer extends TransferObject {
|
|
46
|
+
constructor(viewId, groupId, panelId) {
|
|
47
|
+
super();
|
|
48
|
+
this.viewId = viewId;
|
|
49
|
+
this.groupId = groupId;
|
|
50
|
+
this.panelId = panelId;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
class PaneTransfer extends TransferObject {
|
|
54
|
+
constructor(viewId, paneId) {
|
|
55
|
+
super();
|
|
56
|
+
this.viewId = viewId;
|
|
57
|
+
this.paneId = paneId;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
62
|
+
*/
|
|
63
|
+
class LocalSelectionTransfer {
|
|
64
|
+
constructor() {
|
|
65
|
+
// protect against external instantiation
|
|
66
|
+
}
|
|
67
|
+
static getInstance() {
|
|
68
|
+
return LocalSelectionTransfer.INSTANCE;
|
|
69
|
+
}
|
|
70
|
+
hasData(proto) {
|
|
71
|
+
return proto && proto === this.proto;
|
|
72
|
+
}
|
|
73
|
+
clearData(proto) {
|
|
74
|
+
if (this.hasData(proto)) {
|
|
75
|
+
this.proto = undefined;
|
|
76
|
+
this.data = undefined;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
getData(proto) {
|
|
80
|
+
if (this.hasData(proto)) {
|
|
81
|
+
return this.data;
|
|
82
|
+
}
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
setData(data, proto) {
|
|
86
|
+
if (proto) {
|
|
87
|
+
this.data = data;
|
|
88
|
+
this.proto = proto;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
LocalSelectionTransfer.INSTANCE = new LocalSelectionTransfer();
|
|
93
|
+
function getPanelData() {
|
|
94
|
+
const panelTransfer = LocalSelectionTransfer.getInstance();
|
|
95
|
+
const isPanelEvent = panelTransfer.hasData(PanelTransfer.prototype);
|
|
96
|
+
if (!isPanelEvent) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
return panelTransfer.getData(PanelTransfer.prototype)[0];
|
|
100
|
+
}
|
|
101
|
+
function getPaneData() {
|
|
102
|
+
const paneTransfer = LocalSelectionTransfer.getInstance();
|
|
103
|
+
const isPanelEvent = paneTransfer.hasData(PaneTransfer.prototype);
|
|
104
|
+
if (!isPanelEvent) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
return paneTransfer.getData(PaneTransfer.prototype)[0];
|
|
108
|
+
}
|
|
109
|
+
|
|
40
110
|
var Event;
|
|
41
111
|
(function (Event) {
|
|
42
112
|
Event.any = (...children) => {
|
|
@@ -126,116 +196,6 @@ class TickDelayedEvent {
|
|
|
126
196
|
}
|
|
127
197
|
}
|
|
128
198
|
|
|
129
|
-
var Disposable;
|
|
130
|
-
(function (Disposable) {
|
|
131
|
-
Disposable.NONE = {
|
|
132
|
-
dispose: () => {
|
|
133
|
-
// noop
|
|
134
|
-
},
|
|
135
|
-
};
|
|
136
|
-
})(Disposable || (Disposable = {}));
|
|
137
|
-
class CompositeDisposable {
|
|
138
|
-
constructor(...args) {
|
|
139
|
-
this.disposables = args;
|
|
140
|
-
}
|
|
141
|
-
static from(...args) {
|
|
142
|
-
return new CompositeDisposable(...args);
|
|
143
|
-
}
|
|
144
|
-
addDisposables(...args) {
|
|
145
|
-
args.forEach((arg) => this.disposables.push(arg));
|
|
146
|
-
}
|
|
147
|
-
dispose() {
|
|
148
|
-
this.disposables.forEach((arg) => arg.dispose());
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
class MutableDisposable {
|
|
152
|
-
constructor() {
|
|
153
|
-
this._disposable = Disposable.NONE;
|
|
154
|
-
}
|
|
155
|
-
set value(disposable) {
|
|
156
|
-
if (this._disposable) {
|
|
157
|
-
this._disposable.dispose();
|
|
158
|
-
}
|
|
159
|
-
this._disposable = disposable;
|
|
160
|
-
}
|
|
161
|
-
dispose() {
|
|
162
|
-
if (this._disposable) {
|
|
163
|
-
this._disposable.dispose();
|
|
164
|
-
this._disposable = Disposable.NONE;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
class TransferObject {
|
|
170
|
-
constructor() {
|
|
171
|
-
//
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
class PanelTransfer extends TransferObject {
|
|
175
|
-
constructor(viewId, groupId, panelId) {
|
|
176
|
-
super();
|
|
177
|
-
this.viewId = viewId;
|
|
178
|
-
this.groupId = groupId;
|
|
179
|
-
this.panelId = panelId;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
class PaneTransfer extends TransferObject {
|
|
183
|
-
constructor(viewId, paneId) {
|
|
184
|
-
super();
|
|
185
|
-
this.viewId = viewId;
|
|
186
|
-
this.paneId = paneId;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
191
|
-
*/
|
|
192
|
-
class LocalSelectionTransfer {
|
|
193
|
-
constructor() {
|
|
194
|
-
// protect against external instantiation
|
|
195
|
-
}
|
|
196
|
-
static getInstance() {
|
|
197
|
-
return LocalSelectionTransfer.INSTANCE;
|
|
198
|
-
}
|
|
199
|
-
hasData(proto) {
|
|
200
|
-
return proto && proto === this.proto;
|
|
201
|
-
}
|
|
202
|
-
clearData(proto) {
|
|
203
|
-
if (this.hasData(proto)) {
|
|
204
|
-
this.proto = undefined;
|
|
205
|
-
this.data = undefined;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
getData(proto) {
|
|
209
|
-
if (this.hasData(proto)) {
|
|
210
|
-
return this.data;
|
|
211
|
-
}
|
|
212
|
-
return undefined;
|
|
213
|
-
}
|
|
214
|
-
setData(data, proto) {
|
|
215
|
-
if (proto) {
|
|
216
|
-
this.data = data;
|
|
217
|
-
this.proto = proto;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
LocalSelectionTransfer.INSTANCE = new LocalSelectionTransfer();
|
|
222
|
-
function getPanelData() {
|
|
223
|
-
const panelTransfer = LocalSelectionTransfer.getInstance();
|
|
224
|
-
const isPanelEvent = panelTransfer.hasData(PanelTransfer.prototype);
|
|
225
|
-
if (!isPanelEvent) {
|
|
226
|
-
return undefined;
|
|
227
|
-
}
|
|
228
|
-
return panelTransfer.getData(PanelTransfer.prototype)[0];
|
|
229
|
-
}
|
|
230
|
-
function getPaneData() {
|
|
231
|
-
const paneTransfer = LocalSelectionTransfer.getInstance();
|
|
232
|
-
const isPanelEvent = paneTransfer.hasData(PaneTransfer.prototype);
|
|
233
|
-
if (!isPanelEvent) {
|
|
234
|
-
return undefined;
|
|
235
|
-
}
|
|
236
|
-
return paneTransfer.getData(PaneTransfer.prototype)[0];
|
|
237
|
-
}
|
|
238
|
-
|
|
239
199
|
class SplitviewApi {
|
|
240
200
|
constructor(component) {
|
|
241
201
|
this.component = component;
|
|
@@ -396,9 +356,6 @@ class GridviewApi {
|
|
|
396
356
|
get height() {
|
|
397
357
|
return this.component.height;
|
|
398
358
|
}
|
|
399
|
-
get onGridEvent() {
|
|
400
|
-
return this.component.onGridEvent;
|
|
401
|
-
}
|
|
402
359
|
get onDidLayoutChange() {
|
|
403
360
|
return this.component.onDidLayoutChange;
|
|
404
361
|
}
|
|
@@ -488,9 +445,6 @@ class DockviewApi {
|
|
|
488
445
|
get totalPanels() {
|
|
489
446
|
return this.component.totalPanels;
|
|
490
447
|
}
|
|
491
|
-
get onGridEvent() {
|
|
492
|
-
return this.component.onGridEvent;
|
|
493
|
-
}
|
|
494
448
|
get onDidActiveGroupChange() {
|
|
495
449
|
return this.component.onDidActiveGroupChange;
|
|
496
450
|
}
|
|
@@ -574,6 +528,46 @@ class DockviewApi {
|
|
|
574
528
|
}
|
|
575
529
|
}
|
|
576
530
|
|
|
531
|
+
var Disposable;
|
|
532
|
+
(function (Disposable) {
|
|
533
|
+
Disposable.NONE = {
|
|
534
|
+
dispose: () => {
|
|
535
|
+
// noop
|
|
536
|
+
},
|
|
537
|
+
};
|
|
538
|
+
})(Disposable || (Disposable = {}));
|
|
539
|
+
class CompositeDisposable {
|
|
540
|
+
constructor(...args) {
|
|
541
|
+
this.disposables = args;
|
|
542
|
+
}
|
|
543
|
+
static from(...args) {
|
|
544
|
+
return new CompositeDisposable(...args);
|
|
545
|
+
}
|
|
546
|
+
addDisposables(...args) {
|
|
547
|
+
args.forEach((arg) => this.disposables.push(arg));
|
|
548
|
+
}
|
|
549
|
+
dispose() {
|
|
550
|
+
this.disposables.forEach((arg) => arg.dispose());
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
class MutableDisposable {
|
|
554
|
+
constructor() {
|
|
555
|
+
this._disposable = Disposable.NONE;
|
|
556
|
+
}
|
|
557
|
+
set value(disposable) {
|
|
558
|
+
if (this._disposable) {
|
|
559
|
+
this._disposable.dispose();
|
|
560
|
+
}
|
|
561
|
+
this._disposable = disposable;
|
|
562
|
+
}
|
|
563
|
+
dispose() {
|
|
564
|
+
if (this._disposable) {
|
|
565
|
+
this._disposable.dispose();
|
|
566
|
+
this._disposable = Disposable.NONE;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
577
571
|
function watchElementResize(element, cb) {
|
|
578
572
|
const observer = new ResizeObserver((entires) => {
|
|
579
573
|
const firstEntry = entires[0];
|
|
@@ -1519,13 +1513,13 @@ class Splitview {
|
|
|
1519
1513
|
this._onDidSashEnd.dispose();
|
|
1520
1514
|
this._onDidAddView.dispose();
|
|
1521
1515
|
this._onDidRemoveView.dispose();
|
|
1522
|
-
this.element.remove();
|
|
1523
1516
|
for (let i = 0; i < this.element.children.length; i++) {
|
|
1524
1517
|
if (this.element.children.item(i) === this.element) {
|
|
1525
1518
|
this.element.removeChild(this.element);
|
|
1526
1519
|
break;
|
|
1527
1520
|
}
|
|
1528
1521
|
}
|
|
1522
|
+
this.element.remove();
|
|
1529
1523
|
}
|
|
1530
1524
|
}
|
|
1531
1525
|
|
|
@@ -1654,7 +1648,6 @@ class Paneview extends CompositeDisposable {
|
|
|
1654
1648
|
}
|
|
1655
1649
|
dispose() {
|
|
1656
1650
|
super.dispose();
|
|
1657
|
-
this.splitview.dispose();
|
|
1658
1651
|
if (this.animationTimer) {
|
|
1659
1652
|
clearTimeout(this.animationTimer);
|
|
1660
1653
|
this.animationTimer = undefined;
|
|
@@ -1663,6 +1656,7 @@ class Paneview extends CompositeDisposable {
|
|
|
1663
1656
|
paneItem.disposable.dispose();
|
|
1664
1657
|
});
|
|
1665
1658
|
this.paneItems = [];
|
|
1659
|
+
this.splitview.dispose();
|
|
1666
1660
|
this.element.remove();
|
|
1667
1661
|
}
|
|
1668
1662
|
}
|
|
@@ -2006,7 +2000,7 @@ class BranchNode extends CompositeDisposable {
|
|
|
2006
2000
|
: true,
|
|
2007
2001
|
};
|
|
2008
2002
|
}),
|
|
2009
|
-
size: this.
|
|
2003
|
+
size: this.size,
|
|
2010
2004
|
};
|
|
2011
2005
|
this.children = childDescriptors.map((c) => c.node);
|
|
2012
2006
|
this.splitview = new Splitview(this.element, {
|
|
@@ -2327,6 +2321,7 @@ class Gridview {
|
|
|
2327
2321
|
this.disposable.dispose();
|
|
2328
2322
|
this._onDidChange.dispose();
|
|
2329
2323
|
this.root.dispose();
|
|
2324
|
+
this.element.remove();
|
|
2330
2325
|
}
|
|
2331
2326
|
clear() {
|
|
2332
2327
|
const orientation = this.root.orientation;
|
|
@@ -3357,19 +3352,6 @@ class Groupview extends CompositeDisposable {
|
|
|
3357
3352
|
}
|
|
3358
3353
|
}
|
|
3359
3354
|
|
|
3360
|
-
var GroupChangeKind;
|
|
3361
|
-
(function (GroupChangeKind) {
|
|
3362
|
-
GroupChangeKind["ADD_PANEL"] = "ADD_PANEL";
|
|
3363
|
-
GroupChangeKind["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
3364
|
-
GroupChangeKind["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
3365
|
-
//
|
|
3366
|
-
GroupChangeKind["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
3367
|
-
GroupChangeKind["ADD_GROUP"] = "ADD_GROUP";
|
|
3368
|
-
GroupChangeKind["REMOVE_GROUP"] = "REMOVE_GROUP";
|
|
3369
|
-
//
|
|
3370
|
-
GroupChangeKind["LAYOUT_FROM_JSON"] = "LAYOUT_FROM_JSON";
|
|
3371
|
-
GroupChangeKind["LAYOUT"] = "LAYOUT";
|
|
3372
|
-
})(GroupChangeKind || (GroupChangeKind = {}));
|
|
3373
3355
|
const nextLayoutId = sequentialNumberGenerator();
|
|
3374
3356
|
function toTarget(direction) {
|
|
3375
3357
|
switch (direction) {
|
|
@@ -3392,9 +3374,6 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3392
3374
|
this._element = _element;
|
|
3393
3375
|
this._id = nextLayoutId.next();
|
|
3394
3376
|
this._groups = new Map();
|
|
3395
|
-
//
|
|
3396
|
-
this._onGridEvent = new Emitter();
|
|
3397
|
-
this.onGridEvent = this._onGridEvent.event;
|
|
3398
3377
|
this._onDidLayoutChange = new Emitter();
|
|
3399
3378
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3400
3379
|
this._onDidRemoveGroup = new Emitter();
|
|
@@ -3403,30 +3382,18 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3403
3382
|
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3404
3383
|
this._onDidActiveGroupChange = new Emitter();
|
|
3405
3384
|
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3385
|
+
this._bufferOnDidLayoutChange = new TickDelayedEvent();
|
|
3406
3386
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3407
3387
|
this.element.appendChild(this.gridview.element);
|
|
3408
3388
|
this.layout(0, 0, true); // set some elements height/widths
|
|
3409
3389
|
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3410
|
-
this.
|
|
3390
|
+
this._onDidLayoutChange.fire();
|
|
3411
3391
|
}));
|
|
3412
|
-
this.addDisposables((() => {
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
GroupChangeKind.REMOVE_GROUP,
|
|
3418
|
-
GroupChangeKind.ADD_PANEL,
|
|
3419
|
-
GroupChangeKind.REMOVE_PANEL,
|
|
3420
|
-
GroupChangeKind.GROUP_ACTIVE,
|
|
3421
|
-
GroupChangeKind.PANEL_ACTIVE,
|
|
3422
|
-
GroupChangeKind.LAYOUT,
|
|
3423
|
-
].includes(event.kind)) {
|
|
3424
|
-
tickDelayedEvent.fire();
|
|
3425
|
-
}
|
|
3426
|
-
}), tickDelayedEvent.onEvent(() => {
|
|
3427
|
-
this._onDidLayoutChange.fire();
|
|
3428
|
-
}), tickDelayedEvent);
|
|
3429
|
-
})());
|
|
3392
|
+
this.addDisposables(Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
|
|
3393
|
+
this._bufferOnDidLayoutChange.fire();
|
|
3394
|
+
}), this._bufferOnDidLayoutChange.onEvent(() => {
|
|
3395
|
+
this._onDidLayoutChange.fire();
|
|
3396
|
+
}), this._bufferOnDidLayoutChange);
|
|
3430
3397
|
}
|
|
3431
3398
|
get id() {
|
|
3432
3399
|
return this._id;
|
|
@@ -3463,14 +3430,13 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3463
3430
|
}
|
|
3464
3431
|
setVisible(panel, visible) {
|
|
3465
3432
|
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
3466
|
-
this.
|
|
3433
|
+
this._onDidLayoutChange.fire();
|
|
3467
3434
|
}
|
|
3468
3435
|
isVisible(panel) {
|
|
3469
3436
|
return this.gridview.isViewVisible(getGridLocation(panel.element));
|
|
3470
3437
|
}
|
|
3471
3438
|
doAddGroup(group, location = [0], size) {
|
|
3472
3439
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : Sizing.Distribute, location);
|
|
3473
|
-
this._onGridEvent.fire({ kind: GroupChangeKind.ADD_GROUP });
|
|
3474
3440
|
this._onDidAddGroup.fire(group);
|
|
3475
3441
|
this.doSetGroupActive(group);
|
|
3476
3442
|
}
|
|
@@ -3484,7 +3450,6 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3484
3450
|
item.disposable.dispose();
|
|
3485
3451
|
this._groups.delete(group.id);
|
|
3486
3452
|
}
|
|
3487
|
-
this._onGridEvent.fire({ kind: GroupChangeKind.REMOVE_GROUP });
|
|
3488
3453
|
this._onDidRemoveGroup.fire(group);
|
|
3489
3454
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
3490
3455
|
const groups = Array.from(this._groups.values());
|
|
@@ -3513,9 +3478,6 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3513
3478
|
}
|
|
3514
3479
|
}
|
|
3515
3480
|
this._activeGroup = group;
|
|
3516
|
-
this._onGridEvent.fire({
|
|
3517
|
-
kind: GroupChangeKind.GROUP_ACTIVE,
|
|
3518
|
-
});
|
|
3519
3481
|
this._onDidActiveGroupChange.fire(group);
|
|
3520
3482
|
}
|
|
3521
3483
|
removeGroup(group) {
|
|
@@ -3572,7 +3534,6 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3572
3534
|
}
|
|
3573
3535
|
dispose() {
|
|
3574
3536
|
super.dispose();
|
|
3575
|
-
this._onGridEvent.dispose();
|
|
3576
3537
|
this._onDidActiveGroupChange.dispose();
|
|
3577
3538
|
this._onDidAddGroup.dispose();
|
|
3578
3539
|
this._onDidRemoveGroup.dispose();
|
|
@@ -3754,6 +3715,10 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3754
3715
|
this.update({ params: { title } });
|
|
3755
3716
|
}));
|
|
3756
3717
|
}
|
|
3718
|
+
get params() {
|
|
3719
|
+
var _a;
|
|
3720
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
3721
|
+
}
|
|
3757
3722
|
get title() {
|
|
3758
3723
|
return this._title;
|
|
3759
3724
|
}
|
|
@@ -4430,7 +4395,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
4430
4395
|
this.onDidLayoutfromJSON = this._onDidLayoutfromJSON.event;
|
|
4431
4396
|
this._onDidActivePanelChange = new Emitter();
|
|
4432
4397
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4433
|
-
this.addDisposables(this._onTabInteractionEvent, this._onTabContextMenu, this._onDidDrop)
|
|
4398
|
+
this.addDisposables(this._onTabInteractionEvent, this._onTabContextMenu, this._onDidDrop, Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
4399
|
+
this._bufferOnDidLayoutChange.fire();
|
|
4400
|
+
}));
|
|
4434
4401
|
this._options = options;
|
|
4435
4402
|
if (!this.options.components) {
|
|
4436
4403
|
this.options.components = {};
|
|
@@ -4564,11 +4531,12 @@ class DockviewComponent extends BaseGrid {
|
|
|
4564
4531
|
};
|
|
4565
4532
|
}
|
|
4566
4533
|
fromJSON(data) {
|
|
4534
|
+
const groups = Array.from(this._groups.values()).map((_) => _.value);
|
|
4535
|
+
for (const group of groups) {
|
|
4536
|
+
// remove the group will automatically remove the panels
|
|
4537
|
+
this.removeGroup(group, true);
|
|
4538
|
+
}
|
|
4567
4539
|
this.gridview.clear();
|
|
4568
|
-
this.panels.forEach((panel) => {
|
|
4569
|
-
panel.dispose();
|
|
4570
|
-
});
|
|
4571
|
-
this._groups.clear();
|
|
4572
4540
|
if (!this.deserializer) {
|
|
4573
4541
|
throw new Error('invalid deserializer');
|
|
4574
4542
|
}
|
|
@@ -4592,7 +4560,6 @@ class DockviewComponent extends BaseGrid {
|
|
|
4592
4560
|
}
|
|
4593
4561
|
}
|
|
4594
4562
|
this.gridview.layout(this.width, this.height);
|
|
4595
|
-
this._onGridEvent.fire({ kind: GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4596
4563
|
this._onDidLayoutfromJSON.fire();
|
|
4597
4564
|
}
|
|
4598
4565
|
closeAllGroups() {
|
|
@@ -4642,13 +4609,13 @@ class DockviewComponent extends BaseGrid {
|
|
|
4642
4609
|
}
|
|
4643
4610
|
return panel;
|
|
4644
4611
|
}
|
|
4645
|
-
removePanel(panel) {
|
|
4612
|
+
removePanel(panel, options = { removeEmptyGroup: true }) {
|
|
4646
4613
|
const group = panel.group;
|
|
4647
4614
|
if (!group) {
|
|
4648
4615
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
4649
4616
|
}
|
|
4650
4617
|
group.model.removePanel(panel);
|
|
4651
|
-
if (group.model.size === 0) {
|
|
4618
|
+
if (group.model.size === 0 && options.removeEmptyGroup) {
|
|
4652
4619
|
this.removeGroup(group);
|
|
4653
4620
|
}
|
|
4654
4621
|
}
|
|
@@ -4680,16 +4647,14 @@ class DockviewComponent extends BaseGrid {
|
|
|
4680
4647
|
this.doAddGroup(group);
|
|
4681
4648
|
}
|
|
4682
4649
|
}
|
|
4683
|
-
removeGroup(group) {
|
|
4650
|
+
removeGroup(group, skipActive = false) {
|
|
4684
4651
|
const panels = [...group.model.panels]; // reassign since group panels will mutate
|
|
4685
|
-
|
|
4686
|
-
this.removePanel(panel
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
this._activeGroup = group;
|
|
4690
|
-
return;
|
|
4652
|
+
for (const panel of panels) {
|
|
4653
|
+
this.removePanel(panel, {
|
|
4654
|
+
removeEmptyGroup: false,
|
|
4655
|
+
});
|
|
4691
4656
|
}
|
|
4692
|
-
super.
|
|
4657
|
+
super.doRemoveGroup(group, { skipActive });
|
|
4693
4658
|
}
|
|
4694
4659
|
moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
|
|
4695
4660
|
var _a;
|
|
@@ -4744,15 +4709,11 @@ class DockviewComponent extends BaseGrid {
|
|
|
4744
4709
|
}
|
|
4745
4710
|
}
|
|
4746
4711
|
doSetGroupActive(group, skipFocus) {
|
|
4747
|
-
var _a, _b
|
|
4712
|
+
var _a, _b;
|
|
4748
4713
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
4749
4714
|
super.doSetGroupActive(group, skipFocus);
|
|
4750
4715
|
if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
|
|
4751
|
-
this.
|
|
4752
|
-
kind: GroupChangeKind.PANEL_ACTIVE,
|
|
4753
|
-
panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
|
|
4754
|
-
});
|
|
4755
|
-
this._onDidActivePanelChange.fire((_c = this._activeGroup) === null || _c === void 0 ? void 0 : _c.model.activePanel);
|
|
4716
|
+
this._onDidActivePanelChange.fire((_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel);
|
|
4756
4717
|
}
|
|
4757
4718
|
}
|
|
4758
4719
|
createGroup(options) {
|
|
@@ -4783,28 +4744,16 @@ class DockviewComponent extends BaseGrid {
|
|
|
4783
4744
|
}), view.model.onDidGroupChange((event) => {
|
|
4784
4745
|
switch (event.kind) {
|
|
4785
4746
|
case GroupChangeKind2.ADD_PANEL:
|
|
4786
|
-
this._onGridEvent.fire({
|
|
4787
|
-
kind: GroupChangeKind.ADD_PANEL,
|
|
4788
|
-
panel: event.panel,
|
|
4789
|
-
});
|
|
4790
4747
|
if (event.panel) {
|
|
4791
4748
|
this._onDidAddPanel.fire(event.panel);
|
|
4792
4749
|
}
|
|
4793
4750
|
break;
|
|
4794
4751
|
case GroupChangeKind2.REMOVE_PANEL:
|
|
4795
|
-
this._onGridEvent.fire({
|
|
4796
|
-
kind: GroupChangeKind.REMOVE_PANEL,
|
|
4797
|
-
panel: event.panel,
|
|
4798
|
-
});
|
|
4799
4752
|
if (event.panel) {
|
|
4800
4753
|
this._onDidRemovePanel.fire(event.panel);
|
|
4801
4754
|
}
|
|
4802
4755
|
break;
|
|
4803
4756
|
case GroupChangeKind2.PANEL_ACTIVE:
|
|
4804
|
-
this._onGridEvent.fire({
|
|
4805
|
-
kind: GroupChangeKind.PANEL_ACTIVE,
|
|
4806
|
-
panel: event.panel,
|
|
4807
|
-
});
|
|
4808
4757
|
this._onDidActivePanelChange.fire(event.panel);
|
|
4809
4758
|
break;
|
|
4810
4759
|
}
|
|
@@ -4975,7 +4924,6 @@ class GridviewComponent extends BaseGrid {
|
|
|
4975
4924
|
this.doSetGroupActive(panel);
|
|
4976
4925
|
}
|
|
4977
4926
|
}
|
|
4978
|
-
this._onGridEvent.fire({ kind: GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4979
4927
|
this._onDidLayoutfromJSON.fire();
|
|
4980
4928
|
}
|
|
4981
4929
|
movePanel(panel, options) {
|
|
@@ -5336,6 +5284,7 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5336
5284
|
value.dispose();
|
|
5337
5285
|
});
|
|
5338
5286
|
this.panels.clear();
|
|
5287
|
+
this.splitview.dispose();
|
|
5339
5288
|
super.dispose();
|
|
5340
5289
|
}
|
|
5341
5290
|
}
|
|
@@ -5925,6 +5874,10 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
5925
5874
|
queue.forEach((f) => f());
|
|
5926
5875
|
}
|
|
5927
5876
|
}
|
|
5877
|
+
dispose() {
|
|
5878
|
+
super.dispose();
|
|
5879
|
+
this.paneview.dispose();
|
|
5880
|
+
}
|
|
5928
5881
|
}
|
|
5929
5882
|
|
|
5930
5883
|
class SplitviewPanel extends BasePanelView {
|
|
@@ -6418,6 +6371,7 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
6418
6371
|
return () => {
|
|
6419
6372
|
disposable.dispose();
|
|
6420
6373
|
dockview.dispose();
|
|
6374
|
+
element.remove();
|
|
6421
6375
|
};
|
|
6422
6376
|
}, []);
|
|
6423
6377
|
React.useEffect(() => {
|
|
@@ -6428,6 +6382,14 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
6428
6382
|
frameworkComponents: props.components,
|
|
6429
6383
|
});
|
|
6430
6384
|
}, [props.components]);
|
|
6385
|
+
React.useEffect(() => {
|
|
6386
|
+
if (!dockviewRef.current) {
|
|
6387
|
+
return;
|
|
6388
|
+
}
|
|
6389
|
+
dockviewRef.current.updateOptions({
|
|
6390
|
+
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6391
|
+
});
|
|
6392
|
+
}, [props.watermarkComponent]);
|
|
6431
6393
|
React.useEffect(() => {
|
|
6432
6394
|
if (!dockviewRef.current) {
|
|
6433
6395
|
return;
|
|
@@ -6563,7 +6525,9 @@ const SplitviewReact = React.forwardRef((props, ref) => {
|
|
|
6563
6525
|
});
|
|
6564
6526
|
},
|
|
6565
6527
|
},
|
|
6566
|
-
proportionalLayout: props.proportionalLayout
|
|
6528
|
+
proportionalLayout: typeof props.proportionalLayout === 'boolean'
|
|
6529
|
+
? props.proportionalLayout
|
|
6530
|
+
: true,
|
|
6567
6531
|
styles: props.hideBorders
|
|
6568
6532
|
? { separatorBorder: 'transparent' }
|
|
6569
6533
|
: undefined,
|
|
@@ -6631,7 +6595,9 @@ const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
6631
6595
|
var _a;
|
|
6632
6596
|
const element = document.createElement('div');
|
|
6633
6597
|
const gridview = new GridviewComponent(element, {
|
|
6634
|
-
proportionalLayout:
|
|
6598
|
+
proportionalLayout: typeof props.proportionalLayout === 'boolean'
|
|
6599
|
+
? props.proportionalLayout
|
|
6600
|
+
: true,
|
|
6635
6601
|
orientation: props.orientation,
|
|
6636
6602
|
frameworkComponents: props.components,
|
|
6637
6603
|
frameworkComponentFactory: {
|
|
@@ -6654,6 +6620,7 @@ const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
6654
6620
|
gridviewRef.current = gridview;
|
|
6655
6621
|
return () => {
|
|
6656
6622
|
gridview.dispose();
|
|
6623
|
+
element.remove();
|
|
6657
6624
|
};
|
|
6658
6625
|
}, []);
|
|
6659
6626
|
React.useEffect(() => {
|
|
@@ -6789,4 +6756,4 @@ const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
6789
6756
|
});
|
|
6790
6757
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
6791
6758
|
|
|
6792
|
-
export { BaseGrid,
|
|
6759
|
+
export { BaseGrid, ContentContainer, DockviewApi, DockviewComponent, DockviewComponents, DockviewReact, Event, Gridview, GridviewApi, GridviewComponent, GridviewPanel, GridviewReact, GroupChangeKind2, Groupview, LayoutPriority, LocalSelectionTransfer, MouseEventKind, Orientation, PaneFramework, PaneTransfer, PanelTransfer, Paneview, PaneviewApi, PaneviewComponent, PaneviewPanel, PaneviewReact, Position, ReactPanelContentPart, ReactPanelHeaderPart, ReactPart, ReactPartContext, SashState, Sizing, Splitview, SplitviewApi, SplitviewComponent, SplitviewPanel, SplitviewReact, Tab$1 as Tab, getDirectionOrientation, getGridLocation, getLocationOrientation, getPaneData, getPanelData, getRelativeLocation, indexInParent, isGridBranchNode, isReactElement, orthogonal, toTarget, usePortalsLifecycle };
|