dockview-core 7.0.4 → 8.1.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/LICENCE.md +21 -0
- package/README.md +17 -86
- package/dist/cjs/api/component.api.d.ts +100 -9
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +45 -1
- package/dist/cjs/api/dockviewPanelApi.d.ts +21 -0
- package/dist/cjs/dismissableLayer.d.ts +57 -0
- package/dist/cjs/dnd/backend.d.ts +2 -2
- package/dist/cjs/dnd/dataTransfer.d.ts +1 -0
- package/dist/cjs/dnd/dropTargetAnchorContainer.d.ts +12 -0
- package/dist/cjs/dnd/droptarget.d.ts +94 -0
- package/dist/cjs/dnd/ghost.d.ts +1 -0
- package/dist/cjs/dnd/pointer/longPress.d.ts +2 -2
- package/dist/cjs/dnd/pointer/pointerDragController.d.ts +5 -2
- package/dist/cjs/dnd/pointer/pointerDragSource.d.ts +1 -1
- package/dist/cjs/dnd/pointer/pointerDropTarget.d.ts +30 -1
- package/dist/cjs/dnd/pointer/pointerGhost.d.ts +1 -1
- package/dist/cjs/dockview/accessibilityMessages.d.ts +6 -0
- package/dist/cjs/dockview/advancedDnDService.d.ts +31 -0
- package/dist/cjs/dockview/components/panel/content.d.ts +1 -1
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +2 -0
- package/dist/cjs/dockview/components/tab/tab.d.ts +2 -0
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +2 -2
- package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupChip.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.d.ts +73 -2
- package/dist/cjs/dockview/components/titlebar/tabGroups.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabReorderController.d.ts +295 -0
- package/dist/cjs/dockview/components/titlebar/tabs.d.ts +120 -50
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +48 -0
- package/dist/cjs/dockview/dndCapabilities.d.ts +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +307 -19
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +5 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +76 -2
- package/dist/cjs/dockview/dockviewPanel.d.ts +12 -0
- package/dist/cjs/dockview/dockviewShell.d.ts +48 -24
- package/dist/cjs/dockview/edgeGroupService.d.ts +20 -0
- package/dist/cjs/dockview/events.d.ts +6 -0
- package/dist/cjs/dockview/liveRegionService.d.ts +18 -5
- package/dist/cjs/dockview/moduleContracts.d.ts +485 -14
- package/dist/cjs/dockview/modules.d.ts +101 -22
- package/dist/cjs/dockview/options.d.ts +336 -30
- package/dist/cjs/dockview/optionsModules.d.ts +73 -0
- package/dist/cjs/dockview/popoutWindowService.d.ts +15 -10
- package/dist/cjs/dockview/rootDropTargetService.d.ts +11 -0
- package/dist/cjs/dockview/tabGroup.d.ts +3 -0
- package/dist/cjs/dockview/tabGroupAccent.d.ts +1 -1
- package/dist/cjs/dockview/tabGroupChipsService.d.ts +10 -0
- package/dist/cjs/dockview/theme.d.ts +2 -2
- package/dist/cjs/dockview/types.d.ts +3 -0
- package/dist/cjs/dom.d.ts +9 -1
- package/dist/cjs/events.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +2 -2
- package/dist/cjs/gridview/branchNode.d.ts +16 -0
- package/dist/cjs/gridview/gridview.d.ts +2 -0
- package/dist/cjs/index.d.ts +35 -29
- package/dist/cjs/lifecycle.d.ts +1 -0
- package/dist/cjs/overlay/overlay.d.ts +4 -2
- package/dist/cjs/overlay/overlayRenderContainer.d.ts +8 -0
- package/dist/cjs/paneview/paneview.d.ts +2 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +3 -0
- package/dist/cjs/paneview/paneviewPanel.d.ts +5 -0
- package/dist/cjs/scrollbar.d.ts +10 -0
- package/dist/cjs/splitview/viewItem.d.ts +10 -0
- package/dist/cjs/svg.d.ts +1 -0
- package/dist/cjs/types.d.ts +8 -0
- package/dist/dockview-core.js +18513 -19679
- package/dist/dockview-core.min.js +4138 -6
- package/dist/dockview-core.min.noStyle.js +6 -7
- package/dist/dockview-core.noStyle.js +18512 -19656
- package/dist/package/main.cjs.js +18123 -19267
- package/dist/package/main.cjs.min.js +6 -6
- package/dist/package/main.esm.min.mjs +6 -6
- package/dist/package/main.esm.mjs +18081 -19260
- package/package.json +81 -77
- package/dist/cjs/api/component.api.js +0 -1242
- package/dist/cjs/api/dockviewGroupPanelApi.js +0 -200
- package/dist/cjs/api/dockviewPanelApi.js +0 -172
- package/dist/cjs/api/entryPoints.js +0 -27
- package/dist/cjs/api/gridviewPanelApi.js +0 -45
- package/dist/cjs/api/panelApi.js +0 -133
- package/dist/cjs/api/paneviewPanelApi.js +0 -57
- package/dist/cjs/api/splitviewPanelApi.js +0 -47
- package/dist/cjs/array.js +0 -66
- package/dist/cjs/constants.js +0 -11
- package/dist/cjs/dnd/backend.js +0 -171
- package/dist/cjs/dnd/dataTransfer.js +0 -100
- package/dist/cjs/dnd/dnd.js +0 -74
- package/dist/cjs/dnd/dropOverlay.js +0 -197
- package/dist/cjs/dnd/dropTargetAnchorContainer.js +0 -104
- package/dist/cjs/dnd/droptarget.js +0 -362
- package/dist/cjs/dnd/ghost.js +0 -17
- package/dist/cjs/dnd/pointer/index.js +0 -13
- package/dist/cjs/dnd/pointer/longPress.js +0 -151
- package/dist/cjs/dnd/pointer/pointerDragController.js +0 -243
- package/dist/cjs/dnd/pointer/pointerDragSource.js +0 -197
- package/dist/cjs/dnd/pointer/pointerDropTarget.js +0 -198
- package/dist/cjs/dnd/pointer/pointerGhost.js +0 -44
- package/dist/cjs/dnd/pointer/types.js +0 -2
- package/dist/cjs/dockview/accessibilityMessages.js +0 -51
- package/dist/cjs/dockview/allModules.js +0 -25
- package/dist/cjs/dockview/components/panel/content.js +0 -213
- package/dist/cjs/dockview/components/popupService.js +0 -132
- package/dist/cjs/dockview/components/tab/defaultTab.js +0 -70
- package/dist/cjs/dockview/components/tab/tab.js +0 -281
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.js +0 -95
- package/dist/cjs/dockview/components/titlebar/groupDragSource.js +0 -218
- package/dist/cjs/dockview/components/titlebar/tabGroupChip.js +0 -104
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +0 -477
- package/dist/cjs/dockview/components/titlebar/tabGroups.js +0 -854
- package/dist/cjs/dockview/components/titlebar/tabOverflowControl.js +0 -19
- package/dist/cjs/dockview/components/titlebar/tabs.js +0 -2016
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +0 -458
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +0 -120
- package/dist/cjs/dockview/components/watermark/watermark.js +0 -40
- package/dist/cjs/dockview/deserializer.js +0 -39
- package/dist/cjs/dockview/dndCapabilities.js +0 -39
- package/dist/cjs/dockview/dockviewComponent.js +0 -3896
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +0 -70
- package/dist/cjs/dockview/dockviewGroupPanel.js +0 -204
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +0 -1514
- package/dist/cjs/dockview/dockviewPanel.js +0 -265
- package/dist/cjs/dockview/dockviewPanelModel.js +0 -105
- package/dist/cjs/dockview/dockviewShell.js +0 -744
- package/dist/cjs/dockview/edgeGroupService.js +0 -128
- package/dist/cjs/dockview/events.js +0 -67
- package/dist/cjs/dockview/floatingGroupService.js +0 -231
- package/dist/cjs/dockview/framework.js +0 -2
- package/dist/cjs/dockview/headerActionsService.js +0 -149
- package/dist/cjs/dockview/liveRegionService.js +0 -185
- package/dist/cjs/dockview/moduleContracts.js +0 -2
- package/dist/cjs/dockview/modules.js +0 -304
- package/dist/cjs/dockview/options.js +0 -103
- package/dist/cjs/dockview/popoutWindowService.js +0 -261
- package/dist/cjs/dockview/rootDropTargetService.js +0 -87
- package/dist/cjs/dockview/strictEventsSequencing.js +0 -63
- package/dist/cjs/dockview/tabGroup.js +0 -219
- package/dist/cjs/dockview/tabGroupAccent.js +0 -126
- package/dist/cjs/dockview/theme.js +0 -139
- package/dist/cjs/dockview/types.js +0 -2
- package/dist/cjs/dockview/validate.js +0 -76
- package/dist/cjs/dockview/watermarkService.js +0 -61
- package/dist/cjs/dom.js +0 -543
- package/dist/cjs/events.js +0 -296
- package/dist/cjs/framwork.js +0 -2
- package/dist/cjs/gridview/baseComponentGridview.js +0 -330
- package/dist/cjs/gridview/basePanelView.js +0 -162
- package/dist/cjs/gridview/branchNode.js +0 -372
- package/dist/cjs/gridview/gridview.js +0 -776
- package/dist/cjs/gridview/gridviewComponent.js +0 -363
- package/dist/cjs/gridview/gridviewPanel.js +0 -249
- package/dist/cjs/gridview/leafNode.js +0 -169
- package/dist/cjs/gridview/options.js +0 -17
- package/dist/cjs/gridview/types.js +0 -2
- package/dist/cjs/index.js +0 -105
- package/dist/cjs/lifecycle.js +0 -80
- package/dist/cjs/math.js +0 -38
- package/dist/cjs/overlay/overlay.js +0 -602
- package/dist/cjs/overlay/overlayRenderContainer.js +0 -309
- package/dist/cjs/panel/types.js +0 -2
- package/dist/cjs/paneview/defaultPaneviewHeader.js +0 -92
- package/dist/cjs/paneview/draggablePaneviewPanel.js +0 -141
- package/dist/cjs/paneview/options.js +0 -44
- package/dist/cjs/paneview/paneview.js +0 -203
- package/dist/cjs/paneview/paneviewComponent.js +0 -430
- package/dist/cjs/paneview/paneviewPanel.js +0 -275
- package/dist/cjs/popoutWindow.js +0 -244
- package/dist/cjs/resizable.js +0 -97
- package/dist/cjs/scrollbar.js +0 -169
- package/dist/cjs/splitview/options.js +0 -19
- package/dist/cjs/splitview/splitview.js +0 -999
- package/dist/cjs/splitview/splitviewComponent.js +0 -401
- package/dist/cjs/splitview/splitviewPanel.js +0 -179
- package/dist/cjs/splitview/viewItem.js +0 -119
- package/dist/cjs/svg.js +0 -43
- package/dist/cjs/types.js +0 -2
- package/dist/dockview-core.min.js.map +0 -1
- package/dist/dockview-core.min.noStyle.js.map +0 -1
- package/dist/esm/api/component.api.d.ts +0 -640
- package/dist/esm/api/component.api.js +0 -887
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +0 -109
- package/dist/esm/api/dockviewGroupPanelApi.js +0 -155
- package/dist/esm/api/dockviewPanelApi.d.ts +0 -84
- package/dist/esm/api/dockviewPanelApi.js +0 -124
- package/dist/esm/api/entryPoints.d.ts +0 -9
- package/dist/esm/api/entryPoints.js +0 -21
- package/dist/esm/api/gridviewPanelApi.d.ts +0 -37
- package/dist/esm/api/gridviewPanelApi.js +0 -23
- package/dist/esm/api/panelApi.d.ts +0 -100
- package/dist/esm/api/panelApi.js +0 -87
- package/dist/esm/api/paneviewPanelApi.d.ts +0 -26
- package/dist/esm/api/paneviewPanelApi.js +0 -27
- package/dist/esm/api/splitviewPanelApi.d.ts +0 -32
- package/dist/esm/api/splitviewPanelApi.js +0 -25
- package/dist/esm/array.d.ts +0 -13
- package/dist/esm/array.js +0 -57
- package/dist/esm/constants.d.ts +0 -8
- package/dist/esm/constants.js +0 -8
- package/dist/esm/dnd/backend.d.ts +0 -70
- package/dist/esm/dnd/backend.js +0 -148
- package/dist/esm/dnd/dataTransfer.d.ts +0 -31
- package/dist/esm/dnd/dataTransfer.js +0 -67
- package/dist/esm/dnd/dnd.d.ts +0 -32
- package/dist/esm/dnd/dnd.js +0 -51
- package/dist/esm/dnd/dropOverlay.d.ts +0 -20
- package/dist/esm/dnd/dropOverlay.js +0 -192
- package/dist/esm/dnd/dropTargetAnchorContainer.d.ts +0 -16
- package/dist/esm/dnd/dropTargetAnchorContainer.js +0 -73
- package/dist/esm/dnd/droptarget.d.ts +0 -116
- package/dist/esm/dnd/droptarget.js +0 -316
- package/dist/esm/dnd/ghost.d.ts +0 -4
- package/dist/esm/dnd/ghost.js +0 -14
- package/dist/esm/dnd/pointer/index.d.ts +0 -11
- package/dist/esm/dnd/pointer/index.js +0 -5
- package/dist/esm/dnd/pointer/longPress.d.ts +0 -32
- package/dist/esm/dnd/pointer/longPress.js +0 -127
- package/dist/esm/dnd/pointer/pointerDragController.d.ts +0 -60
- package/dist/esm/dnd/pointer/pointerDragController.js +0 -193
- package/dist/esm/dnd/pointer/pointerDragSource.d.ts +0 -61
- package/dist/esm/dnd/pointer/pointerDragSource.js +0 -173
- package/dist/esm/dnd/pointer/pointerDropTarget.d.ts +0 -39
- package/dist/esm/dnd/pointer/pointerDropTarget.js +0 -168
- package/dist/esm/dnd/pointer/pointerGhost.d.ts +0 -30
- package/dist/esm/dnd/pointer/pointerGhost.js +0 -39
- package/dist/esm/dnd/pointer/types.d.ts +0 -16
- package/dist/esm/dnd/pointer/types.js +0 -1
- package/dist/esm/dockview/accessibilityMessages.d.ts +0 -32
- package/dist/esm/dockview/accessibilityMessages.js +0 -30
- package/dist/esm/dockview/allModules.d.ts +0 -8
- package/dist/esm/dockview/allModules.js +0 -22
- package/dist/esm/dockview/components/panel/content.d.ts +0 -54
- package/dist/esm/dockview/components/panel/content.js +0 -185
- package/dist/esm/dockview/components/popupService.d.ts +0 -21
- package/dist/esm/dockview/components/popupService.js +0 -108
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -12
- package/dist/esm/dockview/components/tab/defaultTab.js +0 -43
- package/dist/esm/dockview/components/tab/tab.d.ts +0 -44
- package/dist/esm/dockview/components/tab/tab.js +0 -242
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +0 -34
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.js +0 -65
- package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +0 -51
- package/dist/esm/dockview/components/titlebar/groupDragSource.js +0 -178
- package/dist/esm/dockview/components/titlebar/tabGroupChip.d.ts +0 -37
- package/dist/esm/dockview/components/titlebar/tabGroupChip.js +0 -77
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.d.ts +0 -72
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +0 -360
- package/dist/esm/dockview/components/titlebar/tabGroups.d.ts +0 -107
- package/dist/esm/dockview/components/titlebar/tabGroups.js +0 -621
- package/dist/esm/dockview/components/titlebar/tabOverflowControl.d.ts +0 -8
- package/dist/esm/dockview/components/titlebar/tabOverflowControl.js +0 -16
- package/dist/esm/dockview/components/titlebar/tabs.d.ts +0 -167
- package/dist/esm/dockview/components/titlebar/tabs.js +0 -1653
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +0 -104
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +0 -359
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +0 -21
- package/dist/esm/dockview/components/titlebar/voidContainer.js +0 -92
- package/dist/esm/dockview/components/watermark/watermark.d.ts +0 -8
- package/dist/esm/dockview/components/watermark/watermark.js +0 -14
- package/dist/esm/dockview/deserializer.d.ts +0 -12
- package/dist/esm/dockview/deserializer.js +0 -34
- package/dist/esm/dockview/dndCapabilities.d.ts +0 -19
- package/dist/esm/dockview/dndCapabilities.js +0 -36
- package/dist/esm/dockview/dockviewComponent.d.ts +0 -626
- package/dist/esm/dockview/dockviewComponent.js +0 -3214
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +0 -45
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +0 -44
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +0 -35
- package/dist/esm/dockview/dockviewGroupPanel.js +0 -142
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +0 -358
- package/dist/esm/dockview/dockviewGroupPanelModel.js +0 -1180
- package/dist/esm/dockview/dockviewPanel.d.ts +0 -69
- package/dist/esm/dockview/dockviewPanel.js +0 -178
- package/dist/esm/dockview/dockviewPanelModel.d.ts +0 -37
- package/dist/esm/dockview/dockviewPanelModel.js +0 -81
- package/dist/esm/dockview/dockviewShell.d.ts +0 -150
- package/dist/esm/dockview/dockviewShell.js +0 -678
- package/dist/esm/dockview/edgeGroupService.d.ts +0 -38
- package/dist/esm/dockview/edgeGroupService.js +0 -63
- package/dist/esm/dockview/events.d.ts +0 -38
- package/dist/esm/dockview/events.js +0 -34
- package/dist/esm/dockview/floatingGroupService.d.ts +0 -37
- package/dist/esm/dockview/floatingGroupService.js +0 -150
- package/dist/esm/dockview/framework.d.ts +0 -65
- package/dist/esm/dockview/framework.js +0 -1
- package/dist/esm/dockview/headerActionsService.d.ts +0 -32
- package/dist/esm/dockview/headerActionsService.js +0 -86
- package/dist/esm/dockview/liveRegionService.d.ts +0 -53
- package/dist/esm/dockview/liveRegionService.js +0 -159
- package/dist/esm/dockview/moduleContracts.d.ts +0 -119
- package/dist/esm/dockview/moduleContracts.js +0 -1
- package/dist/esm/dockview/modules.d.ts +0 -110
- package/dist/esm/dockview/modules.js +0 -170
- package/dist/esm/dockview/options.d.ts +0 -474
- package/dist/esm/dockview/options.js +0 -77
- package/dist/esm/dockview/popoutWindowService.d.ts +0 -95
- package/dist/esm/dockview/popoutWindowService.js +0 -175
- package/dist/esm/dockview/rootDropTargetService.d.ts +0 -35
- package/dist/esm/dockview/rootDropTargetService.js +0 -82
- package/dist/esm/dockview/strictEventsSequencing.d.ts +0 -7
- package/dist/esm/dockview/strictEventsSequencing.js +0 -41
- package/dist/esm/dockview/tabGroup.d.ts +0 -99
- package/dist/esm/dockview/tabGroup.js +0 -144
- package/dist/esm/dockview/tabGroupAccent.d.ts +0 -65
- package/dist/esm/dockview/tabGroupAccent.js +0 -114
- package/dist/esm/dockview/theme.d.ts +0 -86
- package/dist/esm/dockview/theme.js +0 -136
- package/dist/esm/dockview/types.d.ts +0 -53
- package/dist/esm/dockview/types.js +0 -1
- package/dist/esm/dockview/validate.d.ts +0 -0
- package/dist/esm/dockview/validate.js +0 -76
- package/dist/esm/dockview/watermarkService.d.ts +0 -30
- package/dist/esm/dockview/watermarkService.js +0 -56
- package/dist/esm/dom.d.ts +0 -60
- package/dist/esm/dom.js +0 -375
- package/dist/esm/events.d.ts +0 -79
- package/dist/esm/events.js +0 -219
- package/dist/esm/framwork.d.ts +0 -4
- package/dist/esm/framwork.js +0 -1
- package/dist/esm/gridview/baseComponentGridview.d.ts +0 -111
- package/dist/esm/gridview/baseComponentGridview.js +0 -237
- package/dist/esm/gridview/basePanelView.d.ts +0 -40
- package/dist/esm/gridview/basePanelView.js +0 -91
- package/dist/esm/gridview/branchNode.d.ts +0 -57
- package/dist/esm/gridview/branchNode.js +0 -257
- package/dist/esm/gridview/gridview.d.ts +0 -158
- package/dist/esm/gridview/gridview.js +0 -681
- package/dist/esm/gridview/gridviewComponent.d.ts +0 -88
- package/dist/esm/gridview/gridviewComponent.js +0 -265
- package/dist/esm/gridview/gridviewPanel.d.ts +0 -77
- package/dist/esm/gridview/gridviewPanel.js +0 -182
- package/dist/esm/gridview/leafNode.d.ts +0 -34
- package/dist/esm/gridview/leafNode.js +0 -102
- package/dist/esm/gridview/options.d.ts +0 -15
- package/dist/esm/gridview/options.js +0 -14
- package/dist/esm/gridview/types.d.ts +0 -3
- package/dist/esm/gridview/types.js +0 -1
- package/dist/esm/index.d.ts +0 -58
- package/dist/esm/index.js +0 -44
- package/dist/esm/lifecycle.d.ts +0 -25
- package/dist/esm/lifecycle.js +0 -56
- package/dist/esm/math.d.ts +0 -5
- package/dist/esm/math.js +0 -32
- package/dist/esm/overlay/overlay.d.ts +0 -91
- package/dist/esm/overlay/overlay.js +0 -520
- package/dist/esm/overlay/overlayRenderContainer.d.ts +0 -24
- package/dist/esm/overlay/overlayRenderContainer.js +0 -249
- package/dist/esm/panel/types.d.ts +0 -33
- package/dist/esm/panel/types.js +0 -1
- package/dist/esm/paneview/defaultPaneviewHeader.d.ts +0 -21
- package/dist/esm/paneview/defaultPaneviewHeader.js +0 -65
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +0 -38
- package/dist/esm/paneview/draggablePaneviewPanel.js +0 -107
- package/dist/esm/paneview/options.d.ts +0 -30
- package/dist/esm/paneview/options.js +0 -22
- package/dist/esm/paneview/paneview.d.ts +0 -41
- package/dist/esm/paneview/paneview.js +0 -148
- package/dist/esm/paneview/paneviewComponent.d.ts +0 -133
- package/dist/esm/paneview/paneviewComponent.js +0 -306
- package/dist/esm/paneview/paneviewPanel.d.ts +0 -98
- package/dist/esm/paneview/paneviewPanel.js +0 -192
- package/dist/esm/popoutWindow.d.ts +0 -38
- package/dist/esm/popoutWindow.js +0 -170
- package/dist/esm/resizable.d.ts +0 -12
- package/dist/esm/resizable.js +0 -66
- package/dist/esm/scrollbar.d.ts +0 -15
- package/dist/esm/scrollbar.js +0 -139
- package/dist/esm/splitview/options.d.ts +0 -21
- package/dist/esm/splitview/options.js +0 -16
- package/dist/esm/splitview/splitview.d.ts +0 -145
- package/dist/esm/splitview/splitview.js +0 -770
- package/dist/esm/splitview/splitviewComponent.d.ts +0 -101
- package/dist/esm/splitview/splitviewComponent.js +0 -267
- package/dist/esm/splitview/splitviewPanel.d.ts +0 -45
- package/dist/esm/splitview/splitviewPanel.js +0 -108
- package/dist/esm/splitview/viewItem.d.ts +0 -25
- package/dist/esm/splitview/viewItem.js +0 -74
- package/dist/esm/svg.d.ts +0 -3
- package/dist/esm/svg.js +0 -31
- package/dist/esm/types.d.ts +0 -31
- package/dist/esm/types.js +0 -1
- package/dist/styles/dockview.css +0 -3436
|
@@ -1,678 +0,0 @@
|
|
|
1
|
-
import { Emitter } from '../events';
|
|
2
|
-
import { CompositeDisposable } from '../lifecycle';
|
|
3
|
-
import { LayoutPriority, Orientation, Splitview, } from '../splitview/splitview';
|
|
4
|
-
import { isInDocument, watchElementResize } from '../dom';
|
|
5
|
-
export class EdgeGroupView {
|
|
6
|
-
/**
|
|
7
|
-
* The effective (pre-gap) collapsed size: the measured tab-strip size when
|
|
8
|
-
* available, otherwise the configured/theme base.
|
|
9
|
-
*/
|
|
10
|
-
get _effectiveBaseCollapsed() {
|
|
11
|
-
var _a;
|
|
12
|
-
return (_a = this._measuredTabSize) !== null && _a !== void 0 ? _a : this._baseCollapsedSize;
|
|
13
|
-
}
|
|
14
|
-
get minimumSize() {
|
|
15
|
-
// When collapsed, lock size to collapsedSize so sash can't drag it open
|
|
16
|
-
if (this._isCollapsed) {
|
|
17
|
-
return this.collapsedSize;
|
|
18
|
-
}
|
|
19
|
-
// If the caller explicitly provides a minimumSize, respect it.
|
|
20
|
-
// Otherwise fall back to collapsedSize + 50 so the expanded state is
|
|
21
|
-
// visually distinguishable from the collapsed state.
|
|
22
|
-
return this._baseMinimumSize !== undefined
|
|
23
|
-
? this._baseMinimumSize + this._gapAdd
|
|
24
|
-
: this._effectiveBaseCollapsed + 50 + this._gapAdd;
|
|
25
|
-
}
|
|
26
|
-
get maximumSize() {
|
|
27
|
-
// When collapsed, lock size to collapsedSize so sash can't drag it open
|
|
28
|
-
return this._isCollapsed
|
|
29
|
-
? this.collapsedSize
|
|
30
|
-
: this._expandedMaximumSize;
|
|
31
|
-
}
|
|
32
|
-
get element() {
|
|
33
|
-
return this._group.element;
|
|
34
|
-
}
|
|
35
|
-
get isCollapsed() {
|
|
36
|
-
return this._isCollapsed;
|
|
37
|
-
}
|
|
38
|
-
get lastExpandedSize() {
|
|
39
|
-
return this._lastExpandedSize;
|
|
40
|
-
}
|
|
41
|
-
get collapsedSize() {
|
|
42
|
-
return this._effectiveBaseCollapsed + this._gapAdd;
|
|
43
|
-
}
|
|
44
|
-
constructor(options, group, orientation, gapAdd = 0) {
|
|
45
|
-
var _a, _b, _c;
|
|
46
|
-
this._onDidChange = new Emitter();
|
|
47
|
-
this.onDidChange = this._onDidChange.event;
|
|
48
|
-
this.snap = false;
|
|
49
|
-
this.priority = LayoutPriority.Low;
|
|
50
|
-
this._isCollapsed = false;
|
|
51
|
-
this._tabSizeDisposables = new CompositeDisposable();
|
|
52
|
-
this._group = group;
|
|
53
|
-
this._orientation = orientation;
|
|
54
|
-
group.element.classList.add('dv-edge-group');
|
|
55
|
-
group.element.dataset.testid = `dv-edge-group-${options.id}`;
|
|
56
|
-
this._baseCollapsedSize = (_a = options.collapsedSize) !== null && _a !== void 0 ? _a : 35;
|
|
57
|
-
this._baseMinimumSize = options.minimumSize;
|
|
58
|
-
this._gapAdd = gapAdd;
|
|
59
|
-
this._expandedMaximumSize =
|
|
60
|
-
(_b = options.maximumSize) !== null && _b !== void 0 ? _b : Number.POSITIVE_INFINITY;
|
|
61
|
-
this._lastExpandedSize = (_c = options.initialSize) !== null && _c !== void 0 ? _c : 200;
|
|
62
|
-
if (options.collapsed) {
|
|
63
|
-
this._isCollapsed = true;
|
|
64
|
-
group.element.classList.add('dv-edge-collapsed');
|
|
65
|
-
}
|
|
66
|
-
this._observeTabStrip();
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Watch the group's tab strip so the collapsed size follows the live tab
|
|
70
|
-
* height. The strip's cross-axis size (height for top/bottom, width for
|
|
71
|
-
* left/right) is exactly what a collapsed edge group should occupy; a
|
|
72
|
-
* ResizeObserver keeps them in sync when the tab height changes at runtime.
|
|
73
|
-
*/
|
|
74
|
-
_observeTabStrip() {
|
|
75
|
-
const strip = this._group.element.querySelector('.dv-tabs-and-actions-container');
|
|
76
|
-
if (!strip) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
this._tabSizeDisposables.addDisposables(watchElementResize(strip, () => {
|
|
80
|
-
this._applyMeasuredTabSize(this._orientation === 'vertical'
|
|
81
|
-
? strip.offsetHeight
|
|
82
|
-
: strip.offsetWidth);
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Apply a freshly-measured tab-strip cross size. When the group is
|
|
87
|
-
* collapsed this resizes it in the parent splitview so the collapsed strip
|
|
88
|
-
* always shows the full tab height.
|
|
89
|
-
*/
|
|
90
|
-
_applyMeasuredTabSize(size) {
|
|
91
|
-
if (size <= 0 || size === this._measuredTabSize) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
this._measuredTabSize = size;
|
|
95
|
-
if (this._isCollapsed) {
|
|
96
|
-
this._onDidChange.fire({ size: this.collapsedSize });
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
layout(size, orthogonalSize) {
|
|
100
|
-
// Track the last expanded size so we can restore it after collapsing
|
|
101
|
-
if (!this._isCollapsed) {
|
|
102
|
-
this._lastExpandedSize = size;
|
|
103
|
-
}
|
|
104
|
-
// horizontal (left/right): size=width, orthogonalSize=height → layout(width, height)
|
|
105
|
-
// vertical (top/bottom): size=height, orthogonalSize=width → layout(width, height)
|
|
106
|
-
if (this._orientation === 'horizontal') {
|
|
107
|
-
this._group.layout(size, orthogonalSize);
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
this._group.layout(orthogonalSize, size);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
setCollapsed(collapsed) {
|
|
114
|
-
if (this._isCollapsed === collapsed) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
this._isCollapsed = collapsed;
|
|
118
|
-
this._group.element.classList.toggle('dv-edge-collapsed', collapsed);
|
|
119
|
-
// ShellManager calls resizeView directly after this; no _onDidChange needed
|
|
120
|
-
}
|
|
121
|
-
setVisible(_visible) {
|
|
122
|
-
// visibility is managed by the parent splitview
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Restore the last-expanded size from serialized state without triggering
|
|
126
|
-
* a layout. Must be called before setCollapsed(true) during fromJSON so
|
|
127
|
-
* that expanding after deserialization restores the correct size.
|
|
128
|
-
*/
|
|
129
|
-
restoreExpandedSize(size) {
|
|
130
|
-
this._lastExpandedSize = size;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Apply a new base (pre-gap) collapsed size, base minimum size and gap
|
|
134
|
-
* contribution after a theme or gap change. Base values come from the
|
|
135
|
-
* original config; the ShellManager owns the gap arithmetic. A live
|
|
136
|
-
* measured tab size (if any) continues to win over the base collapsed size.
|
|
137
|
-
*/
|
|
138
|
-
updateSizing(baseCollapsedSize, baseMinimumSize, gapAdd) {
|
|
139
|
-
this._baseCollapsedSize = baseCollapsedSize;
|
|
140
|
-
this._baseMinimumSize = baseMinimumSize;
|
|
141
|
-
this._gapAdd = gapAdd;
|
|
142
|
-
}
|
|
143
|
-
dispose() {
|
|
144
|
-
this._tabSizeDisposables.dispose();
|
|
145
|
-
this._onDidChange.dispose();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
class CenterView {
|
|
149
|
-
get element() {
|
|
150
|
-
return this._dockviewElement;
|
|
151
|
-
}
|
|
152
|
-
constructor(_dockviewElement, _layoutDockview) {
|
|
153
|
-
this._dockviewElement = _dockviewElement;
|
|
154
|
-
this._layoutDockview = _layoutDockview;
|
|
155
|
-
this.priority = LayoutPriority.High;
|
|
156
|
-
this.minimumSize = 100;
|
|
157
|
-
this.maximumSize = Number.POSITIVE_INFINITY;
|
|
158
|
-
this._onDidChange = new Emitter();
|
|
159
|
-
this.onDidChange = this._onDidChange.event;
|
|
160
|
-
}
|
|
161
|
-
layout(size, orthogonalSize) {
|
|
162
|
-
// Lives in a VERTICAL middle-column splitview:
|
|
163
|
-
// size = height alloc, orthogonalSize = width
|
|
164
|
-
this._layoutDockview(orthogonalSize, size);
|
|
165
|
-
}
|
|
166
|
-
setVisible(_visible) {
|
|
167
|
-
// center is always visible
|
|
168
|
-
}
|
|
169
|
-
dispose() {
|
|
170
|
-
this._onDidChange.dispose();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* The vertical centre column: top (optional) | center | bottom (optional).
|
|
175
|
-
* This view sits between the left and right edge panels in the outer
|
|
176
|
-
* horizontal splitview, so its primary axis is width (horizontal).
|
|
177
|
-
*/
|
|
178
|
-
class MiddleColumnView {
|
|
179
|
-
get element() {
|
|
180
|
-
return this._element;
|
|
181
|
-
}
|
|
182
|
-
constructor(centerView, gap = 0) {
|
|
183
|
-
this._onDidChange = new Emitter();
|
|
184
|
-
this.onDidChange = this._onDidChange.event;
|
|
185
|
-
this.minimumSize = 100;
|
|
186
|
-
this.maximumSize = Number.POSITIVE_INFINITY;
|
|
187
|
-
this.priority = LayoutPriority.High;
|
|
188
|
-
this._element = document.createElement('div');
|
|
189
|
-
this._element.className = 'dv-shell-middle-column';
|
|
190
|
-
this._element.style.height = '100%';
|
|
191
|
-
this._element.style.width = '100%';
|
|
192
|
-
this._splitview = new Splitview(this._element, {
|
|
193
|
-
orientation: Orientation.VERTICAL,
|
|
194
|
-
proportionalLayout: false,
|
|
195
|
-
margin: gap,
|
|
196
|
-
});
|
|
197
|
-
this._centerIndex = 0;
|
|
198
|
-
this._splitview.addView(centerView, { type: 'distribute' }, 0);
|
|
199
|
-
}
|
|
200
|
-
addTopView(view, initialSize) {
|
|
201
|
-
// Insert before center
|
|
202
|
-
this._splitview.addView(view, initialSize, 0);
|
|
203
|
-
this._topIndex = 0;
|
|
204
|
-
this._centerIndex += 1;
|
|
205
|
-
if (this._bottomIndex !== undefined) {
|
|
206
|
-
this._bottomIndex += 1;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
addBottomView(view, initialSize) {
|
|
210
|
-
// Append after center (and any existing bottom — shouldn't happen but safe)
|
|
211
|
-
const newIndex = this._splitview.length;
|
|
212
|
-
this._splitview.addView(view, initialSize, newIndex);
|
|
213
|
-
this._bottomIndex = newIndex;
|
|
214
|
-
}
|
|
215
|
-
removeView(position) {
|
|
216
|
-
const index = position === 'top' ? this._topIndex : this._bottomIndex;
|
|
217
|
-
if (index === undefined) {
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
this._splitview.removeView(index);
|
|
221
|
-
if (position === 'top') {
|
|
222
|
-
this._topIndex = undefined;
|
|
223
|
-
// center (and bottom if present) shift down by one
|
|
224
|
-
this._centerIndex -= 1;
|
|
225
|
-
if (this._bottomIndex !== undefined) {
|
|
226
|
-
this._bottomIndex -= 1;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
this._bottomIndex = undefined;
|
|
231
|
-
// center and top are unaffected
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
layout(size, orthogonalSize) {
|
|
235
|
-
// Outer horizontal splitview: size = width, orthogonalSize = height
|
|
236
|
-
// Inner vertical splitview: layout(height, width)
|
|
237
|
-
this._splitview.layout(orthogonalSize, size);
|
|
238
|
-
}
|
|
239
|
-
setVisible(_visible) {
|
|
240
|
-
// middle column is always visible
|
|
241
|
-
}
|
|
242
|
-
setViewVisible(position, visible) {
|
|
243
|
-
const index = position === 'top' ? this._topIndex : this._bottomIndex;
|
|
244
|
-
if (index !== undefined) {
|
|
245
|
-
this._splitview.setViewVisible(index, visible);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
isViewVisible(position) {
|
|
249
|
-
const index = position === 'top' ? this._topIndex : this._bottomIndex;
|
|
250
|
-
if (index !== undefined) {
|
|
251
|
-
return this._splitview.isViewVisible(index);
|
|
252
|
-
}
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
getViewSize(position) {
|
|
256
|
-
const index = position === 'top' ? this._topIndex : this._bottomIndex;
|
|
257
|
-
if (index !== undefined) {
|
|
258
|
-
return this._splitview.getViewSize(index);
|
|
259
|
-
}
|
|
260
|
-
return 0;
|
|
261
|
-
}
|
|
262
|
-
resizeView(position, size) {
|
|
263
|
-
const index = position === 'top' ? this._topIndex : this._bottomIndex;
|
|
264
|
-
if (index !== undefined) {
|
|
265
|
-
this._splitview.resizeView(index, size);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
updateMargin(gap) {
|
|
269
|
-
this._splitview.margin = gap;
|
|
270
|
-
}
|
|
271
|
-
dispose() {
|
|
272
|
-
this._onDidChange.dispose();
|
|
273
|
-
this._splitview.dispose();
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
export class ShellManager {
|
|
277
|
-
constructor(container, dockviewElement, layoutGrid, gap = 0, defaultCollapsedSize = 35) {
|
|
278
|
-
this._disposables = new CompositeDisposable();
|
|
279
|
-
// Retained for updateTheme() recalculations.
|
|
280
|
-
this._viewConfigs = new Map();
|
|
281
|
-
this._currentWidth = 0;
|
|
282
|
-
this._currentHeight = 0;
|
|
283
|
-
this._gap = gap;
|
|
284
|
-
this._defaultCollapsedSize = defaultCollapsedSize;
|
|
285
|
-
this._shellElement = document.createElement('div');
|
|
286
|
-
this._shellElement.className = 'dv-shell';
|
|
287
|
-
this._shellElement.style.height = '100%';
|
|
288
|
-
this._shellElement.style.width = '100%';
|
|
289
|
-
this._shellElement.style.position = 'relative';
|
|
290
|
-
container.appendChild(this._shellElement);
|
|
291
|
-
const centerView = new CenterView(dockviewElement, layoutGrid);
|
|
292
|
-
this._middleColumn = new MiddleColumnView(centerView, gap);
|
|
293
|
-
this._outerSplitview = new Splitview(this._shellElement, {
|
|
294
|
-
orientation: Orientation.HORIZONTAL,
|
|
295
|
-
proportionalLayout: false,
|
|
296
|
-
margin: gap,
|
|
297
|
-
});
|
|
298
|
-
this._middleIndex = 0;
|
|
299
|
-
this._outerSplitview.addView(this._middleColumn, { type: 'distribute' }, 0);
|
|
300
|
-
this._disposables.addDisposables(watchElementResize(this._shellElement, (entry) => {
|
|
301
|
-
/**
|
|
302
|
-
* When the shell (or an ancestor) becomes hidden — e.g. a
|
|
303
|
-
* nested dockview whose `onlyWhenVisible` host panel is
|
|
304
|
-
* deactivated — the element collapses to (0, 0) or is detached
|
|
305
|
-
* from the DOM. Propagating that zero size would relayout the
|
|
306
|
-
* edge-group splitview at 0, clamping the low-priority edge
|
|
307
|
-
* groups down to their minimum size and destroying the user's
|
|
308
|
-
* sizing. Skip these cases so sizes are preserved while hidden;
|
|
309
|
-
* mirrors the guard in the `Resizable` base class. See #1495.
|
|
310
|
-
*
|
|
311
|
-
* offsetParent === null is equivalent to display: none on the
|
|
312
|
-
* element or one of its ancestors.
|
|
313
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
|
|
314
|
-
*/
|
|
315
|
-
if (!this._shellElement.offsetParent) {
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
if (!isInDocument(this._shellElement)) {
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
const width = Math.round(entry.contentRect.width);
|
|
322
|
-
const height = Math.round(entry.contentRect.height);
|
|
323
|
-
if (width === this._currentWidth &&
|
|
324
|
-
height === this._currentHeight) {
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
this._currentWidth = width;
|
|
328
|
-
this._currentHeight = height;
|
|
329
|
-
this.layout(width, height);
|
|
330
|
-
}), this._outerSplitview, this._middleColumn, centerView);
|
|
331
|
-
}
|
|
332
|
-
get element() {
|
|
333
|
-
return this._shellElement;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Add an edge group view at the given position. The view wraps the
|
|
337
|
-
* provided group element inside the shell's splitview layout.
|
|
338
|
-
* Throws if a group at this position is already registered.
|
|
339
|
-
*/
|
|
340
|
-
addEdgeView(position, options, group) {
|
|
341
|
-
if (this.hasEdgeGroup(position)) {
|
|
342
|
-
throw new Error(`dockview: edge group already registered at position '${position}'`);
|
|
343
|
-
}
|
|
344
|
-
this._viewConfigs.set(position, options);
|
|
345
|
-
// Recompute gap adjustments now that _viewConfigs has grown.
|
|
346
|
-
const outerN = 1 +
|
|
347
|
-
(this._viewConfigs.has('left') ? 1 : 0) +
|
|
348
|
-
(this._viewConfigs.has('right') ? 1 : 0);
|
|
349
|
-
const innerN = 1 +
|
|
350
|
-
(this._viewConfigs.has('top') ? 1 : 0) +
|
|
351
|
-
(this._viewConfigs.has('bottom') ? 1 : 0);
|
|
352
|
-
const outerGapAdd = outerN > 1 ? (this._gap * (outerN - 1)) / outerN : 0;
|
|
353
|
-
const innerGapAdd = innerN > 1 ? (this._gap * (innerN - 1)) / innerN : 0;
|
|
354
|
-
const isHorizontal = position === 'left' || position === 'right';
|
|
355
|
-
const gapAdd = isHorizontal ? outerGapAdd : innerGapAdd;
|
|
356
|
-
const orientation = isHorizontal ? 'horizontal' : 'vertical';
|
|
357
|
-
const view = new EdgeGroupView(Object.assign({ collapsedSize: this._defaultCollapsedSize }, options), group, orientation, gapAdd);
|
|
358
|
-
const initialSize = view.isCollapsed
|
|
359
|
-
? view.collapsedSize
|
|
360
|
-
: view.lastExpandedSize;
|
|
361
|
-
switch (position) {
|
|
362
|
-
case 'left':
|
|
363
|
-
// Insert before the middle column
|
|
364
|
-
this._outerSplitview.addView(view, initialSize, 0);
|
|
365
|
-
this._leftIndex = 0;
|
|
366
|
-
this._middleIndex += 1;
|
|
367
|
-
if (this._rightIndex !== undefined) {
|
|
368
|
-
this._rightIndex += 1;
|
|
369
|
-
}
|
|
370
|
-
this._leftView = view;
|
|
371
|
-
break;
|
|
372
|
-
case 'right':
|
|
373
|
-
// Append after the middle column
|
|
374
|
-
{
|
|
375
|
-
const idx = this._outerSplitview.length;
|
|
376
|
-
this._outerSplitview.addView(view, initialSize, idx);
|
|
377
|
-
this._rightIndex = idx;
|
|
378
|
-
this._rightView = view;
|
|
379
|
-
}
|
|
380
|
-
break;
|
|
381
|
-
case 'top':
|
|
382
|
-
this._middleColumn.addTopView(view, initialSize);
|
|
383
|
-
this._topView = view;
|
|
384
|
-
break;
|
|
385
|
-
case 'bottom':
|
|
386
|
-
this._middleColumn.addBottomView(view, initialSize);
|
|
387
|
-
this._bottomView = view;
|
|
388
|
-
break;
|
|
389
|
-
}
|
|
390
|
-
this._disposables.addDisposables(view);
|
|
391
|
-
// Recalculate gap adjustments for all views now that n has changed.
|
|
392
|
-
// updateTheme already guards the layout() call by _currentWidth/_currentHeight.
|
|
393
|
-
this.updateTheme(this._gap, this._defaultCollapsedSize);
|
|
394
|
-
return view;
|
|
395
|
-
}
|
|
396
|
-
layout(width, height) {
|
|
397
|
-
// Outer splitview is HORIZONTAL: layout(size=width, orthogonalSize=height)
|
|
398
|
-
this._outerSplitview.layout(width, height);
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* Called when the active theme changes. Updates splitview margins and
|
|
402
|
-
* edge-group collapsed sizes so the layout matches the new theme's gap
|
|
403
|
-
* and tab-strip dimensions.
|
|
404
|
-
*/
|
|
405
|
-
updateTheme(gap, defaultCollapsedSize) {
|
|
406
|
-
var _a, _b, _c, _d;
|
|
407
|
-
this._gap = gap;
|
|
408
|
-
this._defaultCollapsedSize = defaultCollapsedSize;
|
|
409
|
-
const outerN = 1 +
|
|
410
|
-
(this._viewConfigs.has('left') ? 1 : 0) +
|
|
411
|
-
(this._viewConfigs.has('right') ? 1 : 0);
|
|
412
|
-
const innerN = 1 +
|
|
413
|
-
(this._viewConfigs.has('top') ? 1 : 0) +
|
|
414
|
-
(this._viewConfigs.has('bottom') ? 1 : 0);
|
|
415
|
-
const outerGapAdd = outerN > 1 ? (gap * (outerN - 1)) / outerN : 0;
|
|
416
|
-
const innerGapAdd = innerN > 1 ? (gap * (innerN - 1)) / innerN : 0;
|
|
417
|
-
// Update splitview margins.
|
|
418
|
-
this._outerSplitview.margin = gap;
|
|
419
|
-
this._middleColumn.updateMargin(gap);
|
|
420
|
-
// Recompute effective collapsed sizes from the original config values.
|
|
421
|
-
const updateView = (view, baseCfg, gapAdd) => {
|
|
422
|
-
var _a;
|
|
423
|
-
const baseCS = (_a = baseCfg.collapsedSize) !== null && _a !== void 0 ? _a : defaultCollapsedSize;
|
|
424
|
-
view.updateSizing(baseCS, baseCfg.minimumSize, gapAdd);
|
|
425
|
-
};
|
|
426
|
-
const topCfg = this._viewConfigs.get('top');
|
|
427
|
-
if (this._topView && topCfg) {
|
|
428
|
-
updateView(this._topView, topCfg, innerGapAdd);
|
|
429
|
-
}
|
|
430
|
-
const bottomCfg = this._viewConfigs.get('bottom');
|
|
431
|
-
if (this._bottomView && bottomCfg) {
|
|
432
|
-
updateView(this._bottomView, bottomCfg, innerGapAdd);
|
|
433
|
-
}
|
|
434
|
-
const leftCfg = this._viewConfigs.get('left');
|
|
435
|
-
if (this._leftView && leftCfg) {
|
|
436
|
-
updateView(this._leftView, leftCfg, outerGapAdd);
|
|
437
|
-
}
|
|
438
|
-
const rightCfg = this._viewConfigs.get('right');
|
|
439
|
-
if (this._rightView && rightCfg) {
|
|
440
|
-
updateView(this._rightView, rightCfg, outerGapAdd);
|
|
441
|
-
}
|
|
442
|
-
// Resize currently-collapsed groups to their new collapsed size so
|
|
443
|
-
// they immediately match the new theme's tab-strip dimensions.
|
|
444
|
-
if (((_a = this._leftView) === null || _a === void 0 ? void 0 : _a.isCollapsed) && this._leftIndex !== undefined) {
|
|
445
|
-
this._outerSplitview.resizeView(this._leftIndex, this._leftView.collapsedSize);
|
|
446
|
-
}
|
|
447
|
-
if (((_b = this._rightView) === null || _b === void 0 ? void 0 : _b.isCollapsed) && this._rightIndex !== undefined) {
|
|
448
|
-
this._outerSplitview.resizeView(this._rightIndex, this._rightView.collapsedSize);
|
|
449
|
-
}
|
|
450
|
-
if ((_c = this._topView) === null || _c === void 0 ? void 0 : _c.isCollapsed) {
|
|
451
|
-
this._middleColumn.resizeView('top', this._topView.collapsedSize);
|
|
452
|
-
}
|
|
453
|
-
if ((_d = this._bottomView) === null || _d === void 0 ? void 0 : _d.isCollapsed) {
|
|
454
|
-
this._middleColumn.resizeView('bottom', this._bottomView.collapsedSize);
|
|
455
|
-
}
|
|
456
|
-
// Re-run layout with the current shell dimensions.
|
|
457
|
-
if (this._currentWidth > 0 && this._currentHeight > 0) {
|
|
458
|
-
this.layout(this._currentWidth, this._currentHeight);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
removeEdgeView(position) {
|
|
462
|
-
const view = this._getView(position);
|
|
463
|
-
if (!view) {
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
466
|
-
switch (position) {
|
|
467
|
-
case 'left':
|
|
468
|
-
this._outerSplitview.removeView(this._leftIndex);
|
|
469
|
-
this._leftIndex = undefined;
|
|
470
|
-
this._leftView = undefined;
|
|
471
|
-
// middle and right shift left by one
|
|
472
|
-
this._middleIndex -= 1;
|
|
473
|
-
if (this._rightIndex !== undefined) {
|
|
474
|
-
this._rightIndex -= 1;
|
|
475
|
-
}
|
|
476
|
-
break;
|
|
477
|
-
case 'right':
|
|
478
|
-
this._outerSplitview.removeView(this._rightIndex);
|
|
479
|
-
this._rightIndex = undefined;
|
|
480
|
-
this._rightView = undefined;
|
|
481
|
-
break;
|
|
482
|
-
case 'top':
|
|
483
|
-
this._middleColumn.removeView('top');
|
|
484
|
-
this._topView = undefined;
|
|
485
|
-
break;
|
|
486
|
-
case 'bottom':
|
|
487
|
-
this._middleColumn.removeView('bottom');
|
|
488
|
-
this._bottomView = undefined;
|
|
489
|
-
break;
|
|
490
|
-
}
|
|
491
|
-
// Deregister before disposing to avoid double-dispose when ShellManager
|
|
492
|
-
// itself is eventually disposed.
|
|
493
|
-
this._disposables.removeDisposable(view);
|
|
494
|
-
view.dispose();
|
|
495
|
-
this._viewConfigs.delete(position);
|
|
496
|
-
// Recalculate gap adjustments for remaining views.
|
|
497
|
-
this.updateTheme(this._gap, this._defaultCollapsedSize);
|
|
498
|
-
}
|
|
499
|
-
hasEdgeGroup(position) {
|
|
500
|
-
switch (position) {
|
|
501
|
-
case 'top':
|
|
502
|
-
return this._topView !== undefined;
|
|
503
|
-
case 'bottom':
|
|
504
|
-
return this._bottomView !== undefined;
|
|
505
|
-
case 'left':
|
|
506
|
-
return this._leftView !== undefined;
|
|
507
|
-
case 'right':
|
|
508
|
-
return this._rightView !== undefined;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
setEdgeGroupVisible(position, visible) {
|
|
512
|
-
switch (position) {
|
|
513
|
-
case 'left':
|
|
514
|
-
if (this._leftIndex !== undefined) {
|
|
515
|
-
this._outerSplitview.setViewVisible(this._leftIndex, visible);
|
|
516
|
-
}
|
|
517
|
-
break;
|
|
518
|
-
case 'right':
|
|
519
|
-
if (this._rightIndex !== undefined) {
|
|
520
|
-
this._outerSplitview.setViewVisible(this._rightIndex, visible);
|
|
521
|
-
}
|
|
522
|
-
break;
|
|
523
|
-
case 'top':
|
|
524
|
-
case 'bottom':
|
|
525
|
-
this._middleColumn.setViewVisible(position, visible);
|
|
526
|
-
break;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
isEdgeGroupVisible(position) {
|
|
530
|
-
switch (position) {
|
|
531
|
-
case 'left':
|
|
532
|
-
if (this._leftIndex !== undefined) {
|
|
533
|
-
return this._outerSplitview.isViewVisible(this._leftIndex);
|
|
534
|
-
}
|
|
535
|
-
return false;
|
|
536
|
-
case 'right':
|
|
537
|
-
if (this._rightIndex !== undefined) {
|
|
538
|
-
return this._outerSplitview.isViewVisible(this._rightIndex);
|
|
539
|
-
}
|
|
540
|
-
return false;
|
|
541
|
-
case 'top':
|
|
542
|
-
case 'bottom':
|
|
543
|
-
return this._middleColumn.isViewVisible(position);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
setEdgeGroupCollapsed(position, collapsed) {
|
|
547
|
-
const view = this._getView(position);
|
|
548
|
-
if (!view) {
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
view.setCollapsed(collapsed);
|
|
552
|
-
const targetSize = collapsed
|
|
553
|
-
? view.collapsedSize
|
|
554
|
-
: view.lastExpandedSize;
|
|
555
|
-
switch (position) {
|
|
556
|
-
case 'left':
|
|
557
|
-
if (this._leftIndex !== undefined) {
|
|
558
|
-
this._outerSplitview.resizeView(this._leftIndex, targetSize);
|
|
559
|
-
}
|
|
560
|
-
break;
|
|
561
|
-
case 'right':
|
|
562
|
-
if (this._rightIndex !== undefined) {
|
|
563
|
-
this._outerSplitview.resizeView(this._rightIndex, targetSize);
|
|
564
|
-
}
|
|
565
|
-
break;
|
|
566
|
-
case 'top':
|
|
567
|
-
case 'bottom':
|
|
568
|
-
this._middleColumn.resizeView(position, targetSize);
|
|
569
|
-
break;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
isEdgeGroupCollapsed(position) {
|
|
573
|
-
var _a, _b;
|
|
574
|
-
return (_b = (_a = this._getView(position)) === null || _a === void 0 ? void 0 : _a.isCollapsed) !== null && _b !== void 0 ? _b : false;
|
|
575
|
-
}
|
|
576
|
-
_getView(position) {
|
|
577
|
-
switch (position) {
|
|
578
|
-
case 'top':
|
|
579
|
-
return this._topView;
|
|
580
|
-
case 'bottom':
|
|
581
|
-
return this._bottomView;
|
|
582
|
-
case 'left':
|
|
583
|
-
return this._leftView;
|
|
584
|
-
case 'right':
|
|
585
|
-
return this._rightView;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
toJSON() {
|
|
589
|
-
const edgeGroups = {};
|
|
590
|
-
if (this._leftView && this._leftIndex !== undefined) {
|
|
591
|
-
edgeGroups.left = {
|
|
592
|
-
size: this._leftView.isCollapsed
|
|
593
|
-
? this._leftView.lastExpandedSize
|
|
594
|
-
: this._outerSplitview.getViewSize(this._leftIndex),
|
|
595
|
-
visible: this._outerSplitview.isViewVisible(this._leftIndex),
|
|
596
|
-
collapsed: this._leftView.isCollapsed || undefined,
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
if (this._rightView && this._rightIndex !== undefined) {
|
|
600
|
-
edgeGroups.right = {
|
|
601
|
-
size: this._rightView.isCollapsed
|
|
602
|
-
? this._rightView.lastExpandedSize
|
|
603
|
-
: this._outerSplitview.getViewSize(this._rightIndex),
|
|
604
|
-
visible: this._outerSplitview.isViewVisible(this._rightIndex),
|
|
605
|
-
collapsed: this._rightView.isCollapsed || undefined,
|
|
606
|
-
};
|
|
607
|
-
}
|
|
608
|
-
if (this._topView) {
|
|
609
|
-
edgeGroups.top = {
|
|
610
|
-
size: this._topView.isCollapsed
|
|
611
|
-
? this._topView.lastExpandedSize
|
|
612
|
-
: this._middleColumn.getViewSize('top'),
|
|
613
|
-
visible: this._middleColumn.isViewVisible('top'),
|
|
614
|
-
collapsed: this._topView.isCollapsed || undefined,
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
if (this._bottomView) {
|
|
618
|
-
edgeGroups.bottom = {
|
|
619
|
-
size: this._bottomView.isCollapsed
|
|
620
|
-
? this._bottomView.lastExpandedSize
|
|
621
|
-
: this._middleColumn.getViewSize('bottom'),
|
|
622
|
-
visible: this._middleColumn.isViewVisible('bottom'),
|
|
623
|
-
collapsed: this._bottomView.isCollapsed || undefined,
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
return edgeGroups;
|
|
627
|
-
}
|
|
628
|
-
fromJSON(data) {
|
|
629
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
630
|
-
if (data.left && this._leftIndex !== undefined) {
|
|
631
|
-
// Always restore the expanded size first. toJSON always records the
|
|
632
|
-
// expanded size (even when collapsed), so restoredExpandedSize must
|
|
633
|
-
// be applied before setCollapsed locks min/max to collapsedSize.
|
|
634
|
-
(_a = this._leftView) === null || _a === void 0 ? void 0 : _a.restoreExpandedSize(data.left.size);
|
|
635
|
-
(_b = this._leftView) === null || _b === void 0 ? void 0 : _b.setCollapsed((_c = data.left.collapsed) !== null && _c !== void 0 ? _c : false);
|
|
636
|
-
this._outerSplitview.resizeView(this._leftIndex, data.left.collapsed
|
|
637
|
-
? ((_e = (_d = this._leftView) === null || _d === void 0 ? void 0 : _d.collapsedSize) !== null && _e !== void 0 ? _e : data.left.size)
|
|
638
|
-
: data.left.size);
|
|
639
|
-
if (!data.left.visible) {
|
|
640
|
-
this._outerSplitview.setViewVisible(this._leftIndex, false);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
if (data.right && this._rightIndex !== undefined) {
|
|
644
|
-
(_f = this._rightView) === null || _f === void 0 ? void 0 : _f.restoreExpandedSize(data.right.size);
|
|
645
|
-
(_g = this._rightView) === null || _g === void 0 ? void 0 : _g.setCollapsed((_h = data.right.collapsed) !== null && _h !== void 0 ? _h : false);
|
|
646
|
-
this._outerSplitview.resizeView(this._rightIndex, data.right.collapsed
|
|
647
|
-
? ((_k = (_j = this._rightView) === null || _j === void 0 ? void 0 : _j.collapsedSize) !== null && _k !== void 0 ? _k : data.right.size)
|
|
648
|
-
: data.right.size);
|
|
649
|
-
if (!data.right.visible) {
|
|
650
|
-
this._outerSplitview.setViewVisible(this._rightIndex, false);
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
if (data.top) {
|
|
654
|
-
(_l = this._topView) === null || _l === void 0 ? void 0 : _l.restoreExpandedSize(data.top.size);
|
|
655
|
-
(_m = this._topView) === null || _m === void 0 ? void 0 : _m.setCollapsed((_o = data.top.collapsed) !== null && _o !== void 0 ? _o : false);
|
|
656
|
-
this._middleColumn.resizeView('top', data.top.collapsed
|
|
657
|
-
? ((_q = (_p = this._topView) === null || _p === void 0 ? void 0 : _p.collapsedSize) !== null && _q !== void 0 ? _q : data.top.size)
|
|
658
|
-
: data.top.size);
|
|
659
|
-
if (!data.top.visible) {
|
|
660
|
-
this._middleColumn.setViewVisible('top', false);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
if (data.bottom) {
|
|
664
|
-
(_r = this._bottomView) === null || _r === void 0 ? void 0 : _r.restoreExpandedSize(data.bottom.size);
|
|
665
|
-
(_s = this._bottomView) === null || _s === void 0 ? void 0 : _s.setCollapsed((_t = data.bottom.collapsed) !== null && _t !== void 0 ? _t : false);
|
|
666
|
-
this._middleColumn.resizeView('bottom', data.bottom.collapsed
|
|
667
|
-
? ((_v = (_u = this._bottomView) === null || _u === void 0 ? void 0 : _u.collapsedSize) !== null && _v !== void 0 ? _v : data.bottom.size)
|
|
668
|
-
: data.bottom.size);
|
|
669
|
-
if (!data.bottom.visible) {
|
|
670
|
-
this._middleColumn.setViewVisible('bottom', false);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
dispose() {
|
|
675
|
-
this._disposables.dispose();
|
|
676
|
-
this._shellElement.remove();
|
|
677
|
-
}
|
|
678
|
-
}
|