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