dockview-core 7.0.4 → 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
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { CompositeDisposable, IValueDisposable } from '../../../lifecycle';
|
|
2
|
+
import { DockviewComponent } from '../../dockviewComponent';
|
|
3
|
+
import { DockviewGroupPanel } from '../../dockviewGroupPanel';
|
|
4
|
+
import { DockviewHeaderDirection } from '../../options';
|
|
5
|
+
import { Tab } from '../tab/tab';
|
|
6
|
+
import { TabDropIndexEvent } from './tabsContainer';
|
|
7
|
+
import { TabGroupManager } from './tabGroups';
|
|
8
|
+
export interface TabAnimationState {
|
|
9
|
+
sourceTabId: string;
|
|
10
|
+
sourceIndex: number;
|
|
11
|
+
tabPositions: Map<string, DOMRect>;
|
|
12
|
+
/** Group-chip widths keyed by group ID, captured before collapse */
|
|
13
|
+
chipPositions: Map<string, number>;
|
|
14
|
+
currentInsertionIndex: number | null;
|
|
15
|
+
targetTabGroupId: string | null;
|
|
16
|
+
/** When set, the drag source is a group chip (entire group drag) */
|
|
17
|
+
sourceTabGroupId: string | null;
|
|
18
|
+
/** Cached panel IDs of the source group (avoids repeated lookups during drag) */
|
|
19
|
+
sourceGroupPanelIds: Set<string> | null;
|
|
20
|
+
/** Width of the group chip, captured before collapse */
|
|
21
|
+
sourceChipWidth: number;
|
|
22
|
+
/** Distance from cursor to the left edge of the drag image */
|
|
23
|
+
cursorOffsetFromDragLeft: number;
|
|
24
|
+
/** Total width of the dragged content (chip + tabs for groups, tab width for singles) */
|
|
25
|
+
sourceGapWidth: number;
|
|
26
|
+
/** Left edge of the tabs container at drag start */
|
|
27
|
+
containerLeft: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ITabReorderHost {
|
|
30
|
+
/** Live tab list (the `_tabs` array of the owning `Tabs`). */
|
|
31
|
+
readonly tabItems: IValueDisposable<Tab>[];
|
|
32
|
+
/** Panel-id → tab lookup (the `_tabMap` of the owning `Tabs`). */
|
|
33
|
+
readonly tabMap: Map<string, IValueDisposable<Tab>>;
|
|
34
|
+
/** The scrollable tab strip element (`.dv-tabs-container`). */
|
|
35
|
+
readonly tabsList: HTMLElement;
|
|
36
|
+
readonly direction: DockviewHeaderDirection;
|
|
37
|
+
readonly groupPanel: DockviewGroupPanel;
|
|
38
|
+
readonly component: DockviewComponent;
|
|
39
|
+
readonly tabGroupManager: TabGroupManager;
|
|
40
|
+
/** Fire the owning `Tabs`' drop event. */
|
|
41
|
+
fireDrop(event: TabDropIndexEvent): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Tab drag-reorder + FLIP animation subsystem extracted from `Tabs`. The DOM
|
|
45
|
+
* event wiring remains in `Tabs` and delegates the reorder/animation logic to
|
|
46
|
+
* this controller. All access back into `Tabs` goes through
|
|
47
|
+
* {@link ITabReorderHost}.
|
|
48
|
+
*/
|
|
49
|
+
export declare class TabReorderController extends CompositeDisposable {
|
|
50
|
+
private readonly host;
|
|
51
|
+
private _animState;
|
|
52
|
+
private readonly _pendingMarginCleanups;
|
|
53
|
+
private _pendingCollapse;
|
|
54
|
+
private _flipTransitionCleanup;
|
|
55
|
+
private _voidContainer;
|
|
56
|
+
private _extendedDropZone;
|
|
57
|
+
private _pointerInsideTabsList;
|
|
58
|
+
/** The tab element currently carrying a wrap-mode drop indicator, if any. */
|
|
59
|
+
private _wrapIndicatorEl;
|
|
60
|
+
private get _tabs();
|
|
61
|
+
private get _tabMap();
|
|
62
|
+
private get _tabsList();
|
|
63
|
+
private get _direction();
|
|
64
|
+
private get group();
|
|
65
|
+
private get accessor();
|
|
66
|
+
private get _tabGroupManager();
|
|
67
|
+
/** Whether the tab strip is in multi-row wrap layout
|
|
68
|
+
* (`MultiRowTabsModule`, `overflow.mode: 'wrap'`). In wrap, the 1-D
|
|
69
|
+
* gap/FLIP animation is suppressed and reorder uses a 2-D hit-test. */
|
|
70
|
+
private get _wrapMode();
|
|
71
|
+
get animState(): TabAnimationState | null;
|
|
72
|
+
set animState(value: TabAnimationState | null);
|
|
73
|
+
get pendingCollapse(): boolean;
|
|
74
|
+
set pendingCollapse(value: boolean);
|
|
75
|
+
set voidContainerElement(el: HTMLElement | null);
|
|
76
|
+
constructor(host: ITabReorderHost);
|
|
77
|
+
setExtendedDropZone(el: HTMLElement): void;
|
|
78
|
+
/**
|
|
79
|
+
* Allows external elements (e.g. void container, left actions) to push an
|
|
80
|
+
* insertion index into the animation while the cursor is outside the tabs
|
|
81
|
+
* list itself. Pass `null` to clear the indicator.
|
|
82
|
+
*/
|
|
83
|
+
setExternalInsertionIndex(index: number | null): void;
|
|
84
|
+
/**
|
|
85
|
+
* Called when the drag cursor leaves the entire header area (not just the
|
|
86
|
+
* tabs list). Clears animation state for cross-group drags, which never
|
|
87
|
+
* receive a `dragend` event on this tab list.
|
|
88
|
+
*/
|
|
89
|
+
clearExternalAnimState(): void;
|
|
90
|
+
snapshotTabPositions(): Map<string, DOMRect>;
|
|
91
|
+
private getAverageTabWidth;
|
|
92
|
+
/**
|
|
93
|
+
* Pointer-event entry point. The HTML5 path enters via the per-element
|
|
94
|
+
* `dragover` listener; this one hit-tests the global pointer-drag
|
|
95
|
+
* position against the tabs list and routes through the same shared
|
|
96
|
+
* `processDragOver` / `processDragLeave` helpers.
|
|
97
|
+
*/
|
|
98
|
+
handlePointerDragMove(clientX: number, clientY: number): void;
|
|
99
|
+
/**
|
|
100
|
+
* Pointer-side cleanup hook: when any pointer drag ends, reset the
|
|
101
|
+
* inside-strip flag and tear down any smooth-reorder anim state the
|
|
102
|
+
* dragover bridge may have installed.
|
|
103
|
+
*/
|
|
104
|
+
handlePointerDragEnd(e?: {
|
|
105
|
+
clientX: number;
|
|
106
|
+
clientY: number;
|
|
107
|
+
pointerEvent: PointerEvent;
|
|
108
|
+
}): void;
|
|
109
|
+
private isPointInsideTabsList;
|
|
110
|
+
/** Commit a smooth-mode intra-group reorder from the current insertion
|
|
111
|
+
* index (adjusted for the source's own position), then clear drag state.
|
|
112
|
+
* Used by the pointer backend for both single-row and wrap layouts. */
|
|
113
|
+
private commitPointerReorder;
|
|
114
|
+
/**
|
|
115
|
+
* Shared body of the dragover entry point. Refreshes stale anim state
|
|
116
|
+
* for a changed drag identity, initializes anim state for incoming
|
|
117
|
+
* cross-group drags, and dispatches to the gap-following math in
|
|
118
|
+
* `handleDragOver`. Returns true when this tabs list has taken
|
|
119
|
+
* ownership of the drag; HTML5 callers use this to gate
|
|
120
|
+
* `event.preventDefault()`.
|
|
121
|
+
*/
|
|
122
|
+
processDragOver(clientX: number, clientY?: number): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* If a previous drag's anim state lingers but the current drag is a
|
|
125
|
+
* different cross-group chip identity, drop the stale state so the new drag
|
|
126
|
+
* starts clean.
|
|
127
|
+
*/
|
|
128
|
+
private _dropStaleAnimState;
|
|
129
|
+
/**
|
|
130
|
+
* Create the anim state for an external (cross-group) tab or chip drag.
|
|
131
|
+
* Returns `true` when state was created, `false` when this drag should not
|
|
132
|
+
* be handled at the tabs-list level.
|
|
133
|
+
*/
|
|
134
|
+
private _initAnimStateForExternalDrag;
|
|
135
|
+
/** Anim state for an external group-chip drag (gap sized to the group). */
|
|
136
|
+
private _makeGroupDragAnimState;
|
|
137
|
+
/** Anim state for an external single-tab drag. */
|
|
138
|
+
private _makeTabDragAnimState;
|
|
139
|
+
/**
|
|
140
|
+
* Shared body of the dragleave entry point. Preserves anim state when
|
|
141
|
+
* the drag moves between tabs-list children, into the extended drop
|
|
142
|
+
* zone, or into the void container; tears it down otherwise.
|
|
143
|
+
*/
|
|
144
|
+
processDragLeave(related: Element | null): void;
|
|
145
|
+
handleDragOver(event: {
|
|
146
|
+
clientX: number;
|
|
147
|
+
clientY?: number;
|
|
148
|
+
}): void;
|
|
149
|
+
/**
|
|
150
|
+
* Build a lookup from the first panel ID of each non-source group → group
|
|
151
|
+
* ID, so the accumulation walk can add chip widths when it reaches a
|
|
152
|
+
* group's first tab.
|
|
153
|
+
*/
|
|
154
|
+
private _buildFirstPanelToGroupMap;
|
|
155
|
+
/**
|
|
156
|
+
* Walk the tabs left-to-right by their original widths and return the
|
|
157
|
+
* insertion slot for the drag image's left edge (null if no slot fits).
|
|
158
|
+
*/
|
|
159
|
+
private _computeDragOverInsertionIndex;
|
|
160
|
+
/**
|
|
161
|
+
* Rebuild the accumulated original width up to `insertionIndex`, walking the
|
|
162
|
+
* tabs exactly the way the accumulation loop does, so callers know the
|
|
163
|
+
* original right edge of the chip (if any) that precedes the insertion slot.
|
|
164
|
+
*/
|
|
165
|
+
private _accumulatedWidthUpTo;
|
|
166
|
+
/**
|
|
167
|
+
* Given a raw insertion index, snap it out of / into any tab group it falls
|
|
168
|
+
* within and resolve the target group (if the drop should merge into one).
|
|
169
|
+
*/
|
|
170
|
+
private _resolveInsertionAgainstTabGroups;
|
|
171
|
+
/**
|
|
172
|
+
* Evaluate a single tab group against the proposed insertion index.
|
|
173
|
+
* Returns the resolved `{ insertionIndex, targetTabGroupId }` when this
|
|
174
|
+
* group governs the slot (the caller stops iterating), or `null` when the
|
|
175
|
+
* group is irrelevant and the caller should keep looking.
|
|
176
|
+
*/
|
|
177
|
+
private _evaluateTabGroupForInsertion;
|
|
178
|
+
/**
|
|
179
|
+
* The index range this group occupies in the live tab list, excluding the
|
|
180
|
+
* source tab / source group tabs (so dragging a tab out of its own group
|
|
181
|
+
* doesn't inflate the range). Null when the group has no effective tabs or
|
|
182
|
+
* its bounds can't be located.
|
|
183
|
+
*/
|
|
184
|
+
private _resolveGroupRange;
|
|
185
|
+
/** Insertion target for a group-chip drag: a group can't be dropped inside
|
|
186
|
+
* another group, so snap out of the range; a just-before slot is kept. */
|
|
187
|
+
private _resolveGroupDragTarget;
|
|
188
|
+
/** Insertion target for a single-tab drag against a group: decide whether
|
|
189
|
+
* the drop merges into the group based on the cursor vs the chip edge. */
|
|
190
|
+
private _resolveTabDragTarget;
|
|
191
|
+
/**
|
|
192
|
+
* Whether every tab in the half-open range `[from, to)` is the source tab
|
|
193
|
+
* or one of the source group's tabs.
|
|
194
|
+
*/
|
|
195
|
+
private _onlySourceBetween;
|
|
196
|
+
/**
|
|
197
|
+
* Multi-row wrap drag-over: resolve the 2-D insertion slot and show a
|
|
198
|
+
* discrete drop indicator. No gap/FLIP animation (that's 1-D and fights the
|
|
199
|
+
* flow layout, so `applyDragOverTransforms`/`runFlipAnimation` no-op in wrap).
|
|
200
|
+
*/
|
|
201
|
+
private handleWrappedDragOver;
|
|
202
|
+
/**
|
|
203
|
+
* The insertion slot (index into the full tab list) for a pointer at
|
|
204
|
+
* `(clientX, clientY)` over a wrapped strip. Two axes:
|
|
205
|
+
* - horizontal header (rows): pick the row whose vertical span contains
|
|
206
|
+
* `clientY`, then the slot within it by x-midpoint;
|
|
207
|
+
* - vertical header (columns): pick the column whose horizontal span
|
|
208
|
+
* contains `clientX`, then the slot within it by y-midpoint.
|
|
209
|
+
* The pointer's cross-axis coordinate selects the line (nearest line if it
|
|
210
|
+
* falls in an inter-line gap); its main-axis coordinate selects the slot.
|
|
211
|
+
* Excludes the drag source so its own position doesn't bias the result; the
|
|
212
|
+
* drop path adjusts for the source offset.
|
|
213
|
+
*/
|
|
214
|
+
private computeWrappedInsertionIndex;
|
|
215
|
+
/**
|
|
216
|
+
* The wrapped drop candidates: each non-source tab's list index + live
|
|
217
|
+
* rect. The drag source (and any grouped tabs moving with it) are excluded
|
|
218
|
+
* so their own positions don't bias the hit-test.
|
|
219
|
+
*/
|
|
220
|
+
private _wrappedDragEntries;
|
|
221
|
+
/**
|
|
222
|
+
* Bucket entries into lines by cross-axis start (2px tolerance for sub-pixel
|
|
223
|
+
* rounding), sorted along the cross axis.
|
|
224
|
+
*/
|
|
225
|
+
private _bucketWrappedLines;
|
|
226
|
+
/** The line nearest `crossPointer` by cross-axis distance (gap fallback). */
|
|
227
|
+
private _nearestWrappedLine;
|
|
228
|
+
private updateWrapDropIndicator;
|
|
229
|
+
private clearWrapDropIndicator;
|
|
230
|
+
/**
|
|
231
|
+
* Batch-remove a CSS class from multiple elements instantly,
|
|
232
|
+
* forcing only a single reflow for the entire batch.
|
|
233
|
+
*/
|
|
234
|
+
private _removeClassInstantlyBatch;
|
|
235
|
+
/**
|
|
236
|
+
* Remove `dv-tab--dragging` from the source tab instantly so it
|
|
237
|
+
* regains its real width before FLIP snapshots.
|
|
238
|
+
*/
|
|
239
|
+
uncollapseSourceTab(sourceTabId: string): void;
|
|
240
|
+
applyDragOverTransforms(skipTransition?: boolean): void;
|
|
241
|
+
/** Gap width for the current drag: the whole group's span for a group
|
|
242
|
+
* drag, otherwise the source tab's own width. */
|
|
243
|
+
private _computeGapWidth;
|
|
244
|
+
/**
|
|
245
|
+
* When the insertion lands at or before a group's first tab, the chip is
|
|
246
|
+
* shifted so the gap appears before the entire group. Returns that chip
|
|
247
|
+
* element, or null when no chip should shift.
|
|
248
|
+
*
|
|
249
|
+
* A chip shifts when dropping outside the group (targetTabGroupId null), or
|
|
250
|
+
* when dropping inside a collapsed group (whose tabs are invisible, so
|
|
251
|
+
* putting the gap on them has no visual effect).
|
|
252
|
+
*/
|
|
253
|
+
private _computeChipToShift;
|
|
254
|
+
/**
|
|
255
|
+
* The chip to shift for a single group, or `undefined` to keep scanning the
|
|
256
|
+
* remaining groups. A defined result (the chip element, or null when the
|
|
257
|
+
* governing group has no shiftable chip) stops the scan.
|
|
258
|
+
*/
|
|
259
|
+
private _chipToShiftForGroup;
|
|
260
|
+
/** Reset non-source chip margins, then apply the gap margin to the chip or
|
|
261
|
+
* the first tab at/after the insertion index. */
|
|
262
|
+
private _applyGapMargins;
|
|
263
|
+
/** Pick the correct shifting class for tabs vs chips. */
|
|
264
|
+
private _shiftingClass;
|
|
265
|
+
/** Apply a margin-left value to an element, optionally bypassing CSS
|
|
266
|
+
* transitions for instant positioning. */
|
|
267
|
+
private _setMargin;
|
|
268
|
+
/** Clear an element's gap margin, animating it back to zero unless
|
|
269
|
+
* transitions are skipped. */
|
|
270
|
+
private _clearMargin;
|
|
271
|
+
resetTabTransforms(): void;
|
|
272
|
+
/**
|
|
273
|
+
* Commit a group-drag drop: clear drag classes, move the group
|
|
274
|
+
* in the model, and run a FLIP animation.
|
|
275
|
+
*/
|
|
276
|
+
commitGroupMove(sourceTabGroupId: string, insertionIndex: number): void;
|
|
277
|
+
private _clearGroupDragClasses;
|
|
278
|
+
resetDragAnimation(): void;
|
|
279
|
+
runFlipAnimation(firstPositions: Map<string, DOMRect>, sourceTabId: string, isCrossGroup?: boolean, animRange?: {
|
|
280
|
+
from: number;
|
|
281
|
+
to: number;
|
|
282
|
+
}): void;
|
|
283
|
+
/**
|
|
284
|
+
* Set a single tab's FLIP transform: the source tab slides in from the end
|
|
285
|
+
* on a cross-group insert; other in-range tabs slide from their first
|
|
286
|
+
* position to their last. Returns true if the tab will animate.
|
|
287
|
+
*/
|
|
288
|
+
private _applyFlipTransform;
|
|
289
|
+
/**
|
|
290
|
+
* Next frame, clear the transforms (triggering the CSS transition), track
|
|
291
|
+
* underlines through the slide, and drop the shifting classes once the
|
|
292
|
+
* transform transition ends.
|
|
293
|
+
*/
|
|
294
|
+
private _scheduleFlipReset;
|
|
295
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Event } from '../../../events';
|
|
2
|
-
import { CompositeDisposable } from '../../../lifecycle';
|
|
2
|
+
import { CompositeDisposable, IValueDisposable } from '../../../lifecycle';
|
|
3
3
|
import { DockviewComponent } from '../../dockviewComponent';
|
|
4
4
|
import { DockviewGroupPanel } from '../../dockviewGroupPanel';
|
|
5
5
|
import { DockviewWillShowOverlayLocationEvent } from '../../events';
|
|
@@ -7,27 +7,66 @@ import { IDockviewPanel } from '../../dockviewPanel';
|
|
|
7
7
|
import { DockviewHeaderDirection } from '../../options';
|
|
8
8
|
import { Tab } from '../tab/tab';
|
|
9
9
|
import { TabDragEvent, TabDropIndexEvent } from './tabsContainer';
|
|
10
|
-
|
|
10
|
+
import { TabGroupManager } from './tabGroups';
|
|
11
|
+
import { ITabReorderHost } from './tabReorderController';
|
|
12
|
+
export declare class Tabs extends CompositeDisposable implements ITabReorderHost {
|
|
11
13
|
private readonly group;
|
|
12
14
|
private readonly accessor;
|
|
13
15
|
private readonly _element;
|
|
14
16
|
private readonly _tabsList;
|
|
15
17
|
private readonly _observerDisposable;
|
|
18
|
+
private readonly _pointerActivation;
|
|
16
19
|
private readonly _scrollbar;
|
|
17
20
|
private _tabs;
|
|
18
21
|
private readonly _tabMap;
|
|
19
22
|
private selectedIndex;
|
|
20
23
|
private _showTabsOverflowControl;
|
|
24
|
+
/**
|
|
25
|
+
* Predicate that keeps a panel's tab out of the overflow dropdown
|
|
26
|
+
* regardless of visibility. Wired by the PinnedTabs module so pinned tabs
|
|
27
|
+
* never overflow. Defaults to a no-op so behaviour is unchanged when the
|
|
28
|
+
* module is absent. Must stay a pure lookup (no DOM reads) because it runs
|
|
29
|
+
* inside the overflow filter, which the `OverflowObserver` re-fires on every
|
|
30
|
+
* resize.
|
|
31
|
+
*/
|
|
32
|
+
private _overflowExclude;
|
|
33
|
+
/**
|
|
34
|
+
* Predicate that forces a panel's tab into the overflow dropdown regardless
|
|
35
|
+
* of horizontal fit, the complement of {@link _overflowExclude}. Wired by
|
|
36
|
+
* the MultiRowTabs module: in wrap mode tabs never clip horizontally (they
|
|
37
|
+
* wrap), so the `OverflowObserver` detects nothing; this routes the surplus
|
|
38
|
+
* rows beyond `overflow.maxRows` into the dropdown. Defaults to a no-op so
|
|
39
|
+
* behaviour is unchanged when the module is absent. Must stay a pure lookup
|
|
40
|
+
* (no DOM reads) because it runs inside the overflow filter.
|
|
41
|
+
*/
|
|
42
|
+
private _forcedOverflow;
|
|
43
|
+
/**
|
|
44
|
+
* When true, pinned (overflow-excluded) tabs stick to the left edge as the
|
|
45
|
+
* strip scrolls horizontally (Chrome-style frozen columns), wired by the
|
|
46
|
+
* PinnedTabs module in inline mode. Each pinned tab is given a cumulative
|
|
47
|
+
* `--dv-pinned-sticky-left` offset. Defaults to off so behaviour is
|
|
48
|
+
* unchanged when the module is absent.
|
|
49
|
+
*/
|
|
50
|
+
private _pinnedSticky;
|
|
51
|
+
/** Whether any tab currently carries the sticky styling; lets
|
|
52
|
+
* {@link _applyPinnedSticky} bail early when there is nothing to do (the
|
|
53
|
+
* common case for components that never enable the feature). */
|
|
54
|
+
private _hasPinnedStickyStyling;
|
|
21
55
|
private _direction;
|
|
22
|
-
private _animState;
|
|
23
|
-
private readonly _pendingMarginCleanups;
|
|
24
|
-
private _pendingCollapse;
|
|
25
|
-
private _flipTransitionCleanup;
|
|
26
|
-
private _voidContainer;
|
|
27
56
|
private _voidContainerListeners;
|
|
28
|
-
private _extendedDropZone;
|
|
29
|
-
private _pointerInsideTabsList;
|
|
30
57
|
private readonly _tabGroupManager;
|
|
58
|
+
private readonly _reorder;
|
|
59
|
+
private get _animState();
|
|
60
|
+
private set _animState(value);
|
|
61
|
+
private get _pendingCollapse();
|
|
62
|
+
private set _pendingCollapse(value);
|
|
63
|
+
get tabItems(): IValueDisposable<Tab>[];
|
|
64
|
+
get tabMap(): Map<string, IValueDisposable<Tab>>;
|
|
65
|
+
get tabsList(): HTMLElement;
|
|
66
|
+
get groupPanel(): DockviewGroupPanel;
|
|
67
|
+
get component(): DockviewComponent;
|
|
68
|
+
get tabGroupManager(): TabGroupManager;
|
|
69
|
+
fireDrop(event: TabDropIndexEvent): void;
|
|
31
70
|
private readonly _onTabDragStart;
|
|
32
71
|
readonly onTabDragStart: Event<TabDragEvent>;
|
|
33
72
|
private readonly _onDrop;
|
|
@@ -38,11 +77,58 @@ export declare class Tabs extends CompositeDisposable {
|
|
|
38
77
|
readonly onOverflowTabsChange: Event<{
|
|
39
78
|
tabs: string[];
|
|
40
79
|
tabGroups: string[];
|
|
80
|
+
/**
|
|
81
|
+
* Overflow-excluded (pinned) tabs that have themselves clipped out of
|
|
82
|
+
* the strip. Rendered in a dedicated "Pinned" section at the top of the
|
|
83
|
+
* dropdown so an overflowing pinned block stays reachable. Empty unless
|
|
84
|
+
* the {@link _overflowExclude} predicate is wired (PinnedTabs module).
|
|
85
|
+
*/
|
|
86
|
+
pinnedTabs: string[];
|
|
41
87
|
reset: boolean;
|
|
42
88
|
}>;
|
|
89
|
+
/**
|
|
90
|
+
* Register a predicate excluding panels from the overflow dropdown (pinned
|
|
91
|
+
* tabs). Re-evaluates the dropdown immediately if overflow is being
|
|
92
|
+
* observed. Passing `() => false` restores default behaviour.
|
|
93
|
+
*/
|
|
94
|
+
setOverflowExclude(fn: (panelId: string) => boolean): void;
|
|
95
|
+
/**
|
|
96
|
+
* Register a predicate that forces matching panels into the overflow
|
|
97
|
+
* dropdown regardless of horizontal fit (the MultiRowTabs surplus set, the
|
|
98
|
+
* rows beyond `overflow.maxRows`). Re-evaluates the dropdown immediately.
|
|
99
|
+
* Passing `() => false` restores default behaviour.
|
|
100
|
+
*/
|
|
101
|
+
setForcedOverflow(fn: (panelId: string) => boolean): void;
|
|
102
|
+
/** Re-evaluate the overflow dropdown now (e.g. after the exclusion set
|
|
103
|
+
* changed) instead of waiting for the next resize/scroll observer fire. */
|
|
104
|
+
refreshOverflow(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Enable/disable sticky-on-scroll for pinned tabs (inline mode), wired by
|
|
107
|
+
* the PinnedTabs module. When on, pinned (overflow-excluded) tabs are frozen
|
|
108
|
+
* to the left edge as the strip scrolls, each at the cumulative width of the
|
|
109
|
+
* pinned tabs before it; when off, the sticky styling is cleared. The
|
|
110
|
+
* offsets are scroll-invariant, so they are recomputed only on resize,
|
|
111
|
+
* horizontal scroll (a cheap self-heal after a reorder), and pinned-set
|
|
112
|
+
* changes, not continuously.
|
|
113
|
+
*/
|
|
114
|
+
setPinnedSticky(enabled: boolean): void;
|
|
115
|
+
/**
|
|
116
|
+
* Freeze the pinned (overflow-excluded) tabs to the left edge: give each the
|
|
117
|
+
* `dv-tab--pinned-sticky` class and a `--dv-pinned-sticky-left` offset so the
|
|
118
|
+
* CSS `position: sticky` rule holds it in place as the strip scrolls. Clears
|
|
119
|
+
* the styling from any tab that is no longer pinned, and from all tabs when
|
|
120
|
+
* the feature is off.
|
|
121
|
+
*/
|
|
122
|
+
private _applyPinnedSticky;
|
|
43
123
|
get showTabsOverflowControl(): boolean;
|
|
44
124
|
set showTabsOverflowControl(value: boolean);
|
|
45
125
|
get element(): HTMLElement;
|
|
126
|
+
/**
|
|
127
|
+
* The scrollable tab list (`.dv-tabs-container`) holding the tab elements,
|
|
128
|
+
* exposed (read-only) so the multi-row wrap controller can measure the
|
|
129
|
+
* wrapped row count and toggle the wrap class. Not the outer header element.
|
|
130
|
+
*/
|
|
131
|
+
get tabsListElement(): HTMLElement;
|
|
46
132
|
set voidContainer(el: HTMLElement | null);
|
|
47
133
|
/**
|
|
48
134
|
* Handle a drop that occurred on the void container (empty header
|
|
@@ -59,8 +145,11 @@ export declare class Tabs extends CompositeDisposable {
|
|
|
59
145
|
showTabsOverflowControl: boolean;
|
|
60
146
|
});
|
|
61
147
|
indexOf(id: string): number;
|
|
62
|
-
/** DOM id of the tab element for a panel
|
|
148
|
+
/** DOM id of the tab element for a panel, used for the tabpanel's `aria-labelledby`. */
|
|
63
149
|
getTabId(panelId: string): string | undefined;
|
|
150
|
+
/** Inverse of {@link getTabId}: the panel whose tab owns `element` (the tab
|
|
151
|
+
* itself or any descendant of it), or `undefined` for non-tab targets. */
|
|
152
|
+
getPanelForTab(element: Element): IDockviewPanel | undefined;
|
|
64
153
|
isActive(tab: Tab): boolean;
|
|
65
154
|
private _onKeyDown;
|
|
66
155
|
/**
|
|
@@ -70,9 +159,29 @@ export declare class Tabs extends CompositeDisposable {
|
|
|
70
159
|
private _closeTab;
|
|
71
160
|
/** Move the roving focus to the tab at `index` (updates tabindex + DOM focus). */
|
|
72
161
|
private _focusTab;
|
|
73
|
-
/** Move DOM focus to the active tab
|
|
162
|
+
/** Move DOM focus to the active tab, the entry point into the tablist. */
|
|
74
163
|
focusActiveTab(): void;
|
|
75
164
|
setActivePanel(panel: IDockviewPanel): void;
|
|
165
|
+
/**
|
|
166
|
+
* Scroll the active tab into view within its scroll container. Uses the
|
|
167
|
+
* element's own offset (relative to the container) rather than accumulating
|
|
168
|
+
* tab client sizes, which omits tab margins and any in-flow group chips
|
|
169
|
+
* between tabs and so undershoots the active tab's real position.
|
|
170
|
+
*/
|
|
171
|
+
private _scrollTabIntoView;
|
|
172
|
+
/**
|
|
173
|
+
* Activate a tab in response to a plain (non-shift) left pointerdown.
|
|
174
|
+
*
|
|
175
|
+
* With the HTML5 drag backend the tab is natively `draggable`, and a native
|
|
176
|
+
* drag arms from the same pointerdown+move gesture. Firefox aborts that
|
|
177
|
+
* pending drag if the pointerdown also moves focus / relayouts the tab strip
|
|
178
|
+
* synchronously — which `openPanel` does — so a drag started on an inactive
|
|
179
|
+
* tab never begins (issue #932). Defer the activation past the frame so
|
|
180
|
+
* `dragstart` arms first; a plain click (no drag) still activates on the
|
|
181
|
+
* next frame, which is imperceptible. The pointer backend has no native drag
|
|
182
|
+
* to pre-empt, so it activates synchronously as before.
|
|
183
|
+
*/
|
|
184
|
+
private _activateOnPointerDown;
|
|
76
185
|
openPanel(panel: IDockviewPanel, index?: number): void;
|
|
77
186
|
delete(id: string): void;
|
|
78
187
|
private addTab;
|
|
@@ -120,48 +229,9 @@ export declare class Tabs extends CompositeDisposable {
|
|
|
120
229
|
*/
|
|
121
230
|
clearExternalAnimState(): void;
|
|
122
231
|
private snapshotTabPositions;
|
|
123
|
-
private getAverageTabWidth;
|
|
124
|
-
/**
|
|
125
|
-
* Pointer-event entry point. The HTML5 path enters via the per-element
|
|
126
|
-
* `dragover` listener; this one hit-tests the global pointer-drag
|
|
127
|
-
* position against the tabs list and routes through the same shared
|
|
128
|
-
* `_processDragOver` / `_processDragLeave` helpers.
|
|
129
|
-
*/
|
|
130
|
-
private _handlePointerDragMove;
|
|
131
|
-
/**
|
|
132
|
-
* Shared body of the dragover entry point. Refreshes stale anim state
|
|
133
|
-
* for a changed drag identity, initializes anim state for incoming
|
|
134
|
-
* cross-group drags, and dispatches to the gap-following math in
|
|
135
|
-
* `handleDragOver`. Returns true when this tabs list has taken
|
|
136
|
-
* ownership of the drag — HTML5 callers use this to gate
|
|
137
|
-
* `event.preventDefault()`.
|
|
138
|
-
*/
|
|
139
|
-
private _processDragOver;
|
|
140
|
-
/**
|
|
141
|
-
* Shared body of the dragleave entry point. Preserves anim state when
|
|
142
|
-
* the drag moves between tabs-list children, into the extended drop
|
|
143
|
-
* zone, or into the void container; tears it down otherwise.
|
|
144
|
-
*/
|
|
145
|
-
private _processDragLeave;
|
|
146
232
|
private handleDragOver;
|
|
147
|
-
/**
|
|
148
|
-
* Batch-remove a CSS class from multiple elements instantly,
|
|
149
|
-
* forcing only a single reflow for the entire batch.
|
|
150
|
-
*/
|
|
151
|
-
private _removeClassInstantlyBatch;
|
|
152
|
-
/**
|
|
153
|
-
* Remove `dv-tab--dragging` from the source tab instantly so it
|
|
154
|
-
* regains its real width before FLIP snapshots.
|
|
155
|
-
*/
|
|
156
|
-
private _uncollapsSourceTab;
|
|
157
233
|
private applyDragOverTransforms;
|
|
158
234
|
private resetTabTransforms;
|
|
159
|
-
/**
|
|
160
|
-
* Commit a group-drag drop: clear drag classes, move the group
|
|
161
|
-
* in the model, and run a FLIP animation.
|
|
162
|
-
*/
|
|
163
235
|
private _commitGroupMove;
|
|
164
|
-
private _clearGroupDragClasses;
|
|
165
|
-
private resetDragAnimation;
|
|
166
236
|
private runFlipAnimation;
|
|
167
237
|
}
|
|
@@ -23,6 +23,8 @@ export interface GroupDragEvent {
|
|
|
23
23
|
}
|
|
24
24
|
export interface ITabsContainer extends IDisposable {
|
|
25
25
|
readonly element: HTMLElement;
|
|
26
|
+
/** The scrollable tab list element (`.dv-tabs-container`); see `Tabs.tabsListElement`. */
|
|
27
|
+
readonly tabsListElement: HTMLElement;
|
|
26
28
|
readonly panels: string[];
|
|
27
29
|
readonly size: number;
|
|
28
30
|
readonly onDrop: Event<TabDropIndexEvent>;
|
|
@@ -34,6 +36,7 @@ export interface ITabsContainer extends IDisposable {
|
|
|
34
36
|
delete(id: string): void;
|
|
35
37
|
indexOf(id: string): number;
|
|
36
38
|
getTabId(panelId: string): string | undefined;
|
|
39
|
+
getPanelForTab(element: Element): IDockviewPanel | undefined;
|
|
37
40
|
setActive(isGroupActive: boolean): void;
|
|
38
41
|
setActivePanel(panel: IDockviewPanel): void;
|
|
39
42
|
focusActiveTab(): void;
|
|
@@ -48,6 +51,13 @@ export interface ITabsContainer extends IDisposable {
|
|
|
48
51
|
updateDragAndDropState(): void;
|
|
49
52
|
updateTabGroups(): void;
|
|
50
53
|
refreshTabGroupAccent(): void;
|
|
54
|
+
setOverflowExclude(fn: (panelId: string) => boolean): void;
|
|
55
|
+
setForcedOverflow(fn: (panelId: string) => boolean): void;
|
|
56
|
+
setPinnedSticky(enabled: boolean): void;
|
|
57
|
+
refreshOverflow(): void;
|
|
58
|
+
setDropIndexResolver(fn: (panelId: string, index: number) => number): void;
|
|
59
|
+
resolveDropIndex(panelId: string, index: number): number;
|
|
60
|
+
setPinnedRow(el: HTMLElement | undefined): void;
|
|
51
61
|
}
|
|
52
62
|
export declare class TabsContainer extends CompositeDisposable implements ITabsContainer {
|
|
53
63
|
private readonly accessor;
|
|
@@ -63,9 +73,22 @@ export declare class TabsContainer extends CompositeDisposable implements ITabsC
|
|
|
63
73
|
private preActions;
|
|
64
74
|
private _hidden;
|
|
65
75
|
private _direction;
|
|
76
|
+
/**
|
|
77
|
+
* Clamps/redirects a header drop index, wired by the PinnedTabs module to
|
|
78
|
+
* keep drops on the correct side of the pin boundary. Identity by default
|
|
79
|
+
* so behaviour is unchanged when the module is absent.
|
|
80
|
+
*/
|
|
81
|
+
private _dropIndexResolver;
|
|
82
|
+
/** The pinned second-row element (PinnedTabs `separate-row` mode), owned by
|
|
83
|
+
* the module and mounted here. Undefined when there is no row. */
|
|
84
|
+
private _pinnedRow;
|
|
66
85
|
private dropdownPart;
|
|
67
86
|
private _overflowTabs;
|
|
68
87
|
private _overflowTabGroups;
|
|
88
|
+
/** Pinned tabs that have clipped out of the strip, rendered in a "Pinned"
|
|
89
|
+
* section at the top of the dropdown. Empty unless the PinnedTabs module is
|
|
90
|
+
* active and the pinned block itself overflows. */
|
|
91
|
+
private _overflowPinnedTabs;
|
|
69
92
|
private readonly _dropdownDisposable;
|
|
70
93
|
private readonly _onDrop;
|
|
71
94
|
readonly onDrop: Event<TabDropIndexEvent>;
|
|
@@ -81,6 +104,7 @@ export declare class TabsContainer extends CompositeDisposable implements ITabsC
|
|
|
81
104
|
get direction(): DockviewHeaderDirection;
|
|
82
105
|
set direction(value: DockviewHeaderDirection);
|
|
83
106
|
get element(): HTMLElement;
|
|
107
|
+
get tabsListElement(): HTMLElement;
|
|
84
108
|
constructor(accessor: DockviewComponent, group: DockviewGroupPanel);
|
|
85
109
|
show(): void;
|
|
86
110
|
hide(): void;
|
|
@@ -90,14 +114,38 @@ export declare class TabsContainer extends CompositeDisposable implements ITabsC
|
|
|
90
114
|
isActive(tab: Tab): boolean;
|
|
91
115
|
indexOf(id: string): number;
|
|
92
116
|
getTabId(panelId: string): string | undefined;
|
|
117
|
+
getPanelForTab(element: Element): IDockviewPanel | undefined;
|
|
93
118
|
setActive(_isGroupActive: boolean): void;
|
|
94
119
|
delete(id: string): void;
|
|
95
120
|
setActivePanel(panel: IDockviewPanel): void;
|
|
96
121
|
focusActiveTab(): void;
|
|
97
122
|
openPanel(panel: IDockviewPanel, index?: number): void;
|
|
98
123
|
closePanel(panel: IDockviewPanel): void;
|
|
124
|
+
setOverflowExclude(fn: (panelId: string) => boolean): void;
|
|
125
|
+
setForcedOverflow(fn: (panelId: string) => boolean): void;
|
|
126
|
+
setPinnedSticky(enabled: boolean): void;
|
|
127
|
+
refreshOverflow(): void;
|
|
128
|
+
setPinnedRow(el: HTMLElement | undefined): void;
|
|
129
|
+
setDropIndexResolver(fn: (panelId: string, index: number) => number): void;
|
|
130
|
+
resolveDropIndex(panelId: string, index: number): number;
|
|
99
131
|
private updateClassnames;
|
|
100
132
|
private toggleDropdown;
|
|
133
|
+
/**
|
|
134
|
+
* Build the core row/header builders + popover control shared by the free
|
|
135
|
+
* overflow list and the advanced overflow module. Everything the module
|
|
136
|
+
* needs to rebuild the dropdown body in a custom order lives here, so the
|
|
137
|
+
* row DOM, group-header DOM, click-to-activate, and (critically) the
|
|
138
|
+
* window-bound popover open/close stay in core, so the module never captures
|
|
139
|
+
* the wrong `window` for a popped-out group.
|
|
140
|
+
*/
|
|
141
|
+
private createOverflowRenderContext;
|
|
142
|
+
/**
|
|
143
|
+
* The free (module-absent) overflow list: the flat `.dv-tabs-overflow-container`
|
|
144
|
+
* body with a group header before the first member tab of each overflow
|
|
145
|
+
* group, in tab (DOM) order. Reuses the shared row/header builders so it
|
|
146
|
+
* stays identical to the advanced path's per-row DOM.
|
|
147
|
+
*/
|
|
148
|
+
private renderFreeOverflowList;
|
|
101
149
|
updateDragAndDropState(): void;
|
|
102
150
|
updateTabGroups(): void;
|
|
103
151
|
refreshTabGroupAccent(): void;
|
|
@@ -2,7 +2,7 @@ import { DockviewOptions } from './options';
|
|
|
2
2
|
/**
|
|
3
3
|
* Internal mapping of the user-facing `dndStrategy` option into the
|
|
4
4
|
* per-backend capability flags consumed by drag-source / drop-target
|
|
5
|
-
* construction sites. Not part of the public API
|
|
5
|
+
* construction sites. Not part of the public API; consumers only see
|
|
6
6
|
* the `dndStrategy` option itself.
|
|
7
7
|
*/
|
|
8
8
|
export interface DndCapabilities {
|