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
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { addDisposableListener, Emitter, Event } from '../../../events';
|
|
2
|
-
import { CompositeDisposable } from '../../../lifecycle';
|
|
3
|
-
import { getPanelData, LocalSelectionTransfer, PanelTransfer, } from '../../../dnd/dataTransfer';
|
|
4
|
-
import { toggleClass } from '../../../dom';
|
|
5
|
-
import { html5Backend, pointerBackend, } from '../../../dnd/backend';
|
|
6
|
-
import { LongPressDetector } from '../../../dnd/pointer/longPress';
|
|
7
|
-
import { resolveDndCapabilities } from '../../dndCapabilities';
|
|
8
|
-
let _tabId = 0;
|
|
9
|
-
/** Stable DOM id referenced by the tabpanel's `aria-labelledby`. */
|
|
10
|
-
const nextTabId = () => `dv-tab-${_tabId++}`;
|
|
11
|
-
export class Tab extends CompositeDisposable {
|
|
12
|
-
get element() {
|
|
13
|
-
return this._element;
|
|
14
|
-
}
|
|
15
|
-
constructor(panel, accessor, group) {
|
|
16
|
-
var _a, _b;
|
|
17
|
-
super();
|
|
18
|
-
this.panel = panel;
|
|
19
|
-
this.accessor = accessor;
|
|
20
|
-
this.group = group;
|
|
21
|
-
this.content = undefined;
|
|
22
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
23
|
-
this._direction = 'horizontal';
|
|
24
|
-
this._onPointDown = new Emitter();
|
|
25
|
-
this.onPointerDown = this._onPointDown.event;
|
|
26
|
-
this._onTabClick = new Emitter();
|
|
27
|
-
this.onTabClick = this._onTabClick.event;
|
|
28
|
-
this._onDropped = new Emitter();
|
|
29
|
-
this.onDrop = this._onDropped.event;
|
|
30
|
-
this._onDragStart = new Emitter();
|
|
31
|
-
this.onDragStart = this._onDragStart.event;
|
|
32
|
-
this._onDragEnd = new Emitter();
|
|
33
|
-
this.onDragEnd = this._onDragEnd.event;
|
|
34
|
-
const caps = resolveDndCapabilities(this.accessor.options);
|
|
35
|
-
this._element = document.createElement('div');
|
|
36
|
-
this._element.className = 'dv-tab';
|
|
37
|
-
// Roving tabindex (WAI-ARIA Tabs pattern): only the active tab is in
|
|
38
|
-
// the tab order; `setActive` flips this. Inactive tabs are reachable
|
|
39
|
-
// via arrow keys, handled by the tab strip.
|
|
40
|
-
this._element.tabIndex = -1;
|
|
41
|
-
this._element.draggable = caps.html5;
|
|
42
|
-
// WAI-ARIA Tabs pattern. `aria-controls` points at the group's single
|
|
43
|
-
// tabpanel (the content container); `aria-selected` tracks activation.
|
|
44
|
-
this._element.id = nextTabId();
|
|
45
|
-
this._element.setAttribute('role', 'tab');
|
|
46
|
-
this._element.setAttribute('aria-selected', 'false');
|
|
47
|
-
const contentContainerId = (_b = (_a = this.group) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.contentContainerId;
|
|
48
|
-
if (contentContainerId) {
|
|
49
|
-
this._element.setAttribute('aria-controls', contentContainerId);
|
|
50
|
-
}
|
|
51
|
-
toggleClass(this.element, 'dv-inactive-tab', true);
|
|
52
|
-
const canDisplayOverlay = (event, position) => {
|
|
53
|
-
var _a;
|
|
54
|
-
if (this.group.locked) {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
const data = getPanelData();
|
|
58
|
-
if (this.accessor.id === (data === null || data === void 0 ? void 0 : data.viewId)) {
|
|
59
|
-
// Smooth-reorder takes over the in-flight visual when active,
|
|
60
|
-
// so individual tab overlays are suppressed for internal drags.
|
|
61
|
-
if (((_a = this.accessor.options.theme) === null || _a === void 0 ? void 0 : _a.tabAnimation) === 'smooth') {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
return this.group.model.canDisplayOverlay(event, position, 'tab');
|
|
67
|
-
};
|
|
68
|
-
this.dropTarget = html5Backend.createDropTarget(this._element, {
|
|
69
|
-
acceptedTargetZones: ['left', 'right'],
|
|
70
|
-
overlayModel: this._buildOverlayModel(),
|
|
71
|
-
canDisplayOverlay,
|
|
72
|
-
getOverrideTarget: () => { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
73
|
-
});
|
|
74
|
-
this.pointerDropTarget = pointerBackend.createDropTarget(this._element, {
|
|
75
|
-
acceptedTargetZones: ['left', 'right'],
|
|
76
|
-
overlayModel: this._buildOverlayModel(),
|
|
77
|
-
canDisplayOverlay,
|
|
78
|
-
getOverrideTarget: () => { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
79
|
-
});
|
|
80
|
-
const sharedDragOptions = {
|
|
81
|
-
getData: () => {
|
|
82
|
-
this.panelTransfer.setData([
|
|
83
|
-
new PanelTransfer(this.accessor.id, this.group.id, this.panel.id),
|
|
84
|
-
], PanelTransfer.prototype);
|
|
85
|
-
return {
|
|
86
|
-
dispose: () => {
|
|
87
|
-
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
|
-
// 30/-10 matches the HTML5 setDragImage offset that has been
|
|
92
|
-
// shipped for years; pointer backend wraps in PointerGhost,
|
|
93
|
-
// HTML5 backend feeds into setDragImage.
|
|
94
|
-
createGhost: () => ({
|
|
95
|
-
element: this._buildGhostElement(),
|
|
96
|
-
offsetX: 30,
|
|
97
|
-
offsetY: -10,
|
|
98
|
-
}),
|
|
99
|
-
onDragStart: (event) => {
|
|
100
|
-
var _a;
|
|
101
|
-
this._onDragStart.fire(event);
|
|
102
|
-
if (!(event instanceof PointerEvent) &&
|
|
103
|
-
((_a = this.accessor.options.theme) === null || _a === void 0 ? void 0 : _a.tabAnimation) === 'smooth') {
|
|
104
|
-
// Delay collapse to next frame so the browser
|
|
105
|
-
// captures the full drag image first.
|
|
106
|
-
requestAnimationFrame(() => {
|
|
107
|
-
toggleClass(this.element, 'dv-tab--dragging', true);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
onDragEnd: (event) => {
|
|
112
|
-
this._onDragEnd.fire(event);
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
this.html5DragSource = html5Backend.createDragSource(this._element, Object.assign(Object.assign({}, sharedDragOptions), { disabled: !caps.html5 }));
|
|
116
|
-
this.pointerDragSource = pointerBackend.createDragSource(this._element, Object.assign(Object.assign({}, sharedDragOptions), { disabled: !caps.pointer, touchOnly: !caps.pointerHandlesMouse, isCancelled: () => !resolveDndCapabilities(this.accessor.options).pointer }));
|
|
117
|
-
// Both droptargets feed the same downstream stream; consumers don't
|
|
118
|
-
// need to know which path produced the overlay.
|
|
119
|
-
this.onWillShowOverlay = Event.any(this.dropTarget.onWillShowOverlay, this.pointerDropTarget.onWillShowOverlay);
|
|
120
|
-
this.addDisposables(this._onPointDown, this._onTabClick, this._onDropped, this._onDragStart, this._onDragEnd, this.accessor.onDidOptionsChange(() => {
|
|
121
|
-
const model = this._buildOverlayModel();
|
|
122
|
-
this.dropTarget.setOverlayModel(model);
|
|
123
|
-
this.pointerDropTarget.setOverlayModel(model);
|
|
124
|
-
}), addDisposableListener(this._element, 'dragend', () => {
|
|
125
|
-
// The shared onDragEnd handler already fires _onDragEnd via
|
|
126
|
-
// the HTML5 backend; just strip the dragging class here.
|
|
127
|
-
toggleClass(this.element, 'dv-tab--dragging', false);
|
|
128
|
-
}), this.html5DragSource, addDisposableListener(this._element, 'pointerdown', (event) => {
|
|
129
|
-
this._onPointDown.fire(event);
|
|
130
|
-
}), addDisposableListener(this._element, 'click', (event) => {
|
|
131
|
-
this._onTabClick.fire(event);
|
|
132
|
-
}), addDisposableListener(this._element, 'contextmenu', (event) => {
|
|
133
|
-
var _a;
|
|
134
|
-
(_a = this.accessor.contextMenuService) === null || _a === void 0 ? void 0 : _a.show(this.panel, this.group, event);
|
|
135
|
-
}), new LongPressDetector(this._element, {
|
|
136
|
-
onLongPress: (event) => {
|
|
137
|
-
var _a;
|
|
138
|
-
// Don't let a subsequent finger move arm a drag on top
|
|
139
|
-
// of the just-opened menu.
|
|
140
|
-
this.pointerDragSource.cancelPending();
|
|
141
|
-
(_a = this.accessor.contextMenuService) === null || _a === void 0 ? void 0 : _a.show(this.panel, this.group, event);
|
|
142
|
-
},
|
|
143
|
-
}), this.dropTarget.onDrop((event) => {
|
|
144
|
-
this._onDropped.fire(event);
|
|
145
|
-
}), this.pointerDropTarget.onDrop((event) => {
|
|
146
|
-
this._onDropped.fire(event);
|
|
147
|
-
}), this.dropTarget, this.pointerDropTarget, this.pointerDragSource);
|
|
148
|
-
}
|
|
149
|
-
setActive(isActive) {
|
|
150
|
-
toggleClass(this.element, 'dv-active-tab', isActive);
|
|
151
|
-
toggleClass(this.element, 'dv-inactive-tab', !isActive);
|
|
152
|
-
this._element.setAttribute('aria-selected', isActive ? 'true' : 'false');
|
|
153
|
-
// Roving tabindex anchors to the active tab; arrow-key navigation in
|
|
154
|
-
// the tab strip moves the rover from there.
|
|
155
|
-
this._element.tabIndex = isActive ? 0 : -1;
|
|
156
|
-
}
|
|
157
|
-
setContent(part) {
|
|
158
|
-
if (this.content) {
|
|
159
|
-
this.content.element.remove();
|
|
160
|
-
}
|
|
161
|
-
this.content = part;
|
|
162
|
-
this._element.appendChild(this.content.element);
|
|
163
|
-
}
|
|
164
|
-
_buildOverlayModel() {
|
|
165
|
-
var _a, _b, _c;
|
|
166
|
-
// An app-supplied model (the dropOverlayModel option) takes precedence
|
|
167
|
-
// over the theme-derived default for this tab.
|
|
168
|
-
const custom = (_b = (_a = this.accessor).resolveDropOverlayModel) === null || _b === void 0 ? void 0 : _b.call(_a, 'tab', this.group);
|
|
169
|
-
if (custom) {
|
|
170
|
-
return custom;
|
|
171
|
-
}
|
|
172
|
-
// 'line' themes render a 4px insertion strip at the tab edge via the
|
|
173
|
-
// anchor container's small-boundary path. 'fill' themes render a
|
|
174
|
-
// half-width highlighted area, so we disable the small-boundary path
|
|
175
|
-
// entirely (boundary = 0 ⟹ isSmall always false).
|
|
176
|
-
const smallBoundary = ((_c = this.accessor.options.theme) === null || _c === void 0 ? void 0 : _c.dndTabIndicator) === 'line'
|
|
177
|
-
? Number.POSITIVE_INFINITY
|
|
178
|
-
: 0;
|
|
179
|
-
return {
|
|
180
|
-
activationSize: { value: 50, type: 'percentage' },
|
|
181
|
-
smallWidthBoundary: smallBoundary,
|
|
182
|
-
smallHeightBoundary: smallBoundary,
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
setDirection(direction) {
|
|
186
|
-
this._direction = direction;
|
|
187
|
-
const zones = direction === 'vertical' ? ['top', 'bottom'] : ['left', 'right'];
|
|
188
|
-
this.dropTarget.setTargetZones(zones);
|
|
189
|
-
this.pointerDropTarget.setTargetZones(zones);
|
|
190
|
-
}
|
|
191
|
-
updateDragAndDropState() {
|
|
192
|
-
const caps = resolveDndCapabilities(this.accessor.options);
|
|
193
|
-
this._element.draggable = caps.html5;
|
|
194
|
-
this.html5DragSource.setDisabled(!caps.html5);
|
|
195
|
-
this.pointerDragSource.setDisabled(!caps.pointer);
|
|
196
|
-
this.pointerDragSource.setTouchOnly(!caps.pointerHandlesMouse);
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Vertical tabs are flipped to horizontal so the ghost stays readable
|
|
200
|
-
* during the drag rather than appearing sideways-rotated.
|
|
201
|
-
*/
|
|
202
|
-
_buildGhostElement() {
|
|
203
|
-
const style = getComputedStyle(this.element);
|
|
204
|
-
const newNode = this.element.cloneNode(true);
|
|
205
|
-
const isVertical = this._direction === 'vertical';
|
|
206
|
-
const verticalSkip = new Set([
|
|
207
|
-
'writing-mode',
|
|
208
|
-
'inline-size',
|
|
209
|
-
'block-size',
|
|
210
|
-
'min-inline-size',
|
|
211
|
-
'min-block-size',
|
|
212
|
-
'max-inline-size',
|
|
213
|
-
'max-block-size',
|
|
214
|
-
'margin-inline',
|
|
215
|
-
'margin-inline-start',
|
|
216
|
-
'margin-inline-end',
|
|
217
|
-
'margin-block',
|
|
218
|
-
'margin-block-start',
|
|
219
|
-
'margin-block-end',
|
|
220
|
-
'padding-inline',
|
|
221
|
-
'padding-inline-start',
|
|
222
|
-
'padding-inline-end',
|
|
223
|
-
'padding-block',
|
|
224
|
-
'padding-block-start',
|
|
225
|
-
'padding-block-end',
|
|
226
|
-
]);
|
|
227
|
-
Array.from(style).forEach((key) => {
|
|
228
|
-
if (isVertical && verticalSkip.has(key)) {
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
newNode.style.setProperty(key, style.getPropertyValue(key), style.getPropertyPriority(key));
|
|
232
|
-
});
|
|
233
|
-
if (isVertical) {
|
|
234
|
-
newNode.style.setProperty('writing-mode', 'horizontal-tb');
|
|
235
|
-
newNode.style.setProperty('width', style.height);
|
|
236
|
-
newNode.style.setProperty('height', style.width);
|
|
237
|
-
}
|
|
238
|
-
newNode.style.position = 'absolute';
|
|
239
|
-
newNode.classList.add('dv-tab-ghost-drag');
|
|
240
|
-
return newNode;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { DockviewComponent } from '../../dockviewComponent';
|
|
2
|
-
import { CompositeDisposable } from '../../../lifecycle';
|
|
3
|
-
import { DockviewGroupPanel } from '../../dockviewGroupPanel';
|
|
4
|
-
/**
|
|
5
|
-
* A dedicated, blank drag handle rendered above a floating group's tab bar.
|
|
6
|
-
*
|
|
7
|
-
* It plays the same dual role the tab-bar void container plays today: a plain
|
|
8
|
-
* pointer-drag moves the floating window (wired by the overlay via
|
|
9
|
-
* `setupDrag`), while a shift+drag (mouse) or long-press (touch) detaches the
|
|
10
|
-
* group to redock it into the grid. The redock half is provided by the shared
|
|
11
|
-
* {@link GroupDragSource}; the move half is owned by the overlay.
|
|
12
|
-
*
|
|
13
|
-
* The bar is intentionally contentless — styling is driven entirely through
|
|
14
|
-
* the `--dv-floating-titlebar-*` theme variables.
|
|
15
|
-
*/
|
|
16
|
-
export declare class FloatingTitleBar extends CompositeDisposable {
|
|
17
|
-
private readonly accessor;
|
|
18
|
-
private readonly _element;
|
|
19
|
-
private readonly dragSource;
|
|
20
|
-
private _group;
|
|
21
|
-
private readonly _onDragStart;
|
|
22
|
-
readonly onDragStart: import("../../../events").Event<PointerEvent | DragEvent>;
|
|
23
|
-
get element(): HTMLElement;
|
|
24
|
-
/** The window's current anchor group — the one this bar drags/activates. */
|
|
25
|
-
get group(): DockviewGroupPanel;
|
|
26
|
-
/**
|
|
27
|
-
* Retarget the bar at a new anchor group. Called when the original anchor
|
|
28
|
-
* leaves a multi-group floating window and another member is promoted, so
|
|
29
|
-
* the bar keeps activating/redocking a group that actually lives here.
|
|
30
|
-
*/
|
|
31
|
-
setGroup(group: DockviewGroupPanel): void;
|
|
32
|
-
constructor(accessor: DockviewComponent, group: DockviewGroupPanel);
|
|
33
|
-
updateDragAndDropState(): void;
|
|
34
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { addDisposableListener, Emitter } from '../../../events';
|
|
2
|
-
import { CompositeDisposable } from '../../../lifecycle';
|
|
3
|
-
import { quasiPreventDefault } from '../../../dom';
|
|
4
|
-
import { GroupDragSource } from './groupDragSource';
|
|
5
|
-
/**
|
|
6
|
-
* A dedicated, blank drag handle rendered above a floating group's tab bar.
|
|
7
|
-
*
|
|
8
|
-
* It plays the same dual role the tab-bar void container plays today: a plain
|
|
9
|
-
* pointer-drag moves the floating window (wired by the overlay via
|
|
10
|
-
* `setupDrag`), while a shift+drag (mouse) or long-press (touch) detaches the
|
|
11
|
-
* group to redock it into the grid. The redock half is provided by the shared
|
|
12
|
-
* {@link GroupDragSource}; the move half is owned by the overlay.
|
|
13
|
-
*
|
|
14
|
-
* The bar is intentionally contentless — styling is driven entirely through
|
|
15
|
-
* the `--dv-floating-titlebar-*` theme variables.
|
|
16
|
-
*/
|
|
17
|
-
export class FloatingTitleBar extends CompositeDisposable {
|
|
18
|
-
get element() {
|
|
19
|
-
return this._element;
|
|
20
|
-
}
|
|
21
|
-
/** The window's current anchor group — the one this bar drags/activates. */
|
|
22
|
-
get group() {
|
|
23
|
-
return this._group;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Retarget the bar at a new anchor group. Called when the original anchor
|
|
27
|
-
* leaves a multi-group floating window and another member is promoted, so
|
|
28
|
-
* the bar keeps activating/redocking a group that actually lives here.
|
|
29
|
-
*/
|
|
30
|
-
setGroup(group) {
|
|
31
|
-
this._group = group;
|
|
32
|
-
}
|
|
33
|
-
constructor(accessor, group) {
|
|
34
|
-
super();
|
|
35
|
-
this.accessor = accessor;
|
|
36
|
-
this._onDragStart = new Emitter();
|
|
37
|
-
this.onDragStart = this._onDragStart.event;
|
|
38
|
-
this._group = group;
|
|
39
|
-
this._element = document.createElement('div');
|
|
40
|
-
this._element.className = 'dv-floating-titlebar';
|
|
41
|
-
this.addDisposables(this._onDragStart, addDisposableListener(this._element, 'pointerdown', () => {
|
|
42
|
-
this.accessor.doSetGroupActive(this._group);
|
|
43
|
-
}),
|
|
44
|
-
// Shift+pointerdown marks the event so the overlay's
|
|
45
|
-
// move-the-float drag doesn't fire alongside the HTML5 redock
|
|
46
|
-
// drag. See VoidContainer for the same disambiguation.
|
|
47
|
-
addDisposableListener(this._element, 'pointerdown', (e) => {
|
|
48
|
-
if (e.shiftKey) {
|
|
49
|
-
quasiPreventDefault(e);
|
|
50
|
-
}
|
|
51
|
-
}, true));
|
|
52
|
-
this.dragSource = new GroupDragSource({
|
|
53
|
-
element: this._element,
|
|
54
|
-
accessor: this.accessor,
|
|
55
|
-
// resolve lazily so the drag source follows anchor reassignment
|
|
56
|
-
group: () => this._group,
|
|
57
|
-
});
|
|
58
|
-
this.addDisposables(this.dragSource, this.dragSource.onDragStart((event) => {
|
|
59
|
-
this._onDragStart.fire(event);
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
updateDragAndDropState() {
|
|
63
|
-
this.dragSource.updateDragAndDropState();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { DockviewComponent } from '../../dockviewComponent';
|
|
2
|
-
import { CompositeDisposable } from '../../../lifecycle';
|
|
3
|
-
import { DockviewGroupPanel } from '../../dockviewGroupPanel';
|
|
4
|
-
declare const FLOATING_REDOCK_INITIATION_DELAY_MS = 500;
|
|
5
|
-
export interface GroupDragSourceOptions {
|
|
6
|
-
readonly element: HTMLElement;
|
|
7
|
-
readonly accessor: DockviewComponent;
|
|
8
|
-
/**
|
|
9
|
-
* The group this handle drags. Pass a function when the handle outlives the
|
|
10
|
-
* group it represents and can be retargeted — e.g. a floating window's
|
|
11
|
-
* dedicated title bar, whose anchor group is reassigned when the original
|
|
12
|
-
* anchor leaves a multi-group window. A fixed reference (the tab-bar void
|
|
13
|
-
* container, which lives inside its own group's DOM) is also accepted.
|
|
14
|
-
*/
|
|
15
|
-
readonly group: DockviewGroupPanel | (() => DockviewGroupPanel);
|
|
16
|
-
/**
|
|
17
|
-
* Whether this element is the floating window's move handle. Only the move
|
|
18
|
-
* handle needs the floating disambiguation (shift for mouse / long-press
|
|
19
|
-
* for touch) that keeps the redock gesture from firing alongside the
|
|
20
|
-
* move-the-float gesture. Other handles on a floating group (e.g. the tab
|
|
21
|
-
* bar's void container when a dedicated title bar is the move handle) drag
|
|
22
|
-
* to redock with a plain drag, exactly like a group in the main grid.
|
|
23
|
-
* Defaults to `() => true`.
|
|
24
|
-
*/
|
|
25
|
-
readonly isFloatingMoveHandle?: () => boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The drag-source half of a group drag handle: html5 + pointer drag sources
|
|
29
|
-
* that publish a group-level `PanelTransfer`, the "Multiple Panels (N)" ghost,
|
|
30
|
-
* and the floating-group disambiguation that keeps the redock gesture from
|
|
31
|
-
* firing alongside the overlay's move-the-float gesture.
|
|
32
|
-
*
|
|
33
|
-
* Shared by the tab-bar void container and the dedicated floating title bar so
|
|
34
|
-
* both grab handles redock identically.
|
|
35
|
-
*/
|
|
36
|
-
export declare class GroupDragSource extends CompositeDisposable {
|
|
37
|
-
private readonly _element;
|
|
38
|
-
private readonly accessor;
|
|
39
|
-
private readonly groupAccessor;
|
|
40
|
-
private readonly html5DragSource;
|
|
41
|
-
private readonly pointerDragSource;
|
|
42
|
-
private readonly panelTransfer;
|
|
43
|
-
private readonly _onDragStart;
|
|
44
|
-
readonly onDragStart: import("../../../events").Event<PointerEvent | DragEvent>;
|
|
45
|
-
private readonly isFloatingMoveHandle;
|
|
46
|
-
private get group();
|
|
47
|
-
constructor(options: GroupDragSourceOptions);
|
|
48
|
-
updateDragAndDropState(): void;
|
|
49
|
-
private getFloatingOverlay;
|
|
50
|
-
}
|
|
51
|
-
export { FLOATING_REDOCK_INITIATION_DELAY_MS };
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { LocalSelectionTransfer, PanelTransfer, } from '../../../dnd/dataTransfer';
|
|
2
|
-
import { html5Backend, pointerBackend, } from '../../../dnd/backend';
|
|
3
|
-
import { Emitter } from '../../../events';
|
|
4
|
-
import { CompositeDisposable, Disposable, MutableDisposable, } from '../../../lifecycle';
|
|
5
|
-
import { toggleClass } from '../../../dom';
|
|
6
|
-
import { resolveDndCapabilities } from '../../dndCapabilities';
|
|
7
|
-
// Floating-group redock via touch: require a deliberate long press so the
|
|
8
|
-
// "move the float around" gesture doesn't double-trigger the redock ghost.
|
|
9
|
-
// Infinity pressTolerance disables the pre-arm flick override; any motion
|
|
10
|
-
// during the wait is treated as drag-the-float, not redock intent.
|
|
11
|
-
const FLOATING_REDOCK_INITIATION_DELAY_MS = 500;
|
|
12
|
-
/**
|
|
13
|
-
* The drag-source half of a group drag handle: html5 + pointer drag sources
|
|
14
|
-
* that publish a group-level `PanelTransfer`, the "Multiple Panels (N)" ghost,
|
|
15
|
-
* and the floating-group disambiguation that keeps the redock gesture from
|
|
16
|
-
* firing alongside the overlay's move-the-float gesture.
|
|
17
|
-
*
|
|
18
|
-
* Shared by the tab-bar void container and the dedicated floating title bar so
|
|
19
|
-
* both grab handles redock identically.
|
|
20
|
-
*/
|
|
21
|
-
export class GroupDragSource extends CompositeDisposable {
|
|
22
|
-
// Resolved lazily so a retargetable handle (the floating title bar) always
|
|
23
|
-
// drags the window's *current* anchor group, not the one captured here.
|
|
24
|
-
get group() {
|
|
25
|
-
return this.groupAccessor();
|
|
26
|
-
}
|
|
27
|
-
constructor(options) {
|
|
28
|
-
var _a, _b, _c;
|
|
29
|
-
super();
|
|
30
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
31
|
-
this._onDragStart = new Emitter();
|
|
32
|
-
this.onDragStart = this._onDragStart.event;
|
|
33
|
-
this._element = options.element;
|
|
34
|
-
this.accessor = options.accessor;
|
|
35
|
-
const group = options.group;
|
|
36
|
-
this.groupAccessor = typeof group === 'function' ? group : () => group;
|
|
37
|
-
this.isFloatingMoveHandle =
|
|
38
|
-
(_a = options.isFloatingMoveHandle) !== null && _a !== void 0 ? _a : (() => true);
|
|
39
|
-
const caps = resolveDndCapabilities(this.accessor.options);
|
|
40
|
-
this._element.draggable = caps.html5;
|
|
41
|
-
toggleClass(this._element, 'dv-draggable', caps.html5 || caps.pointer);
|
|
42
|
-
this.addDisposables(this._onDragStart);
|
|
43
|
-
const buildMultiPanelsGhost = () => {
|
|
44
|
-
const ghostEl = document.createElement('div');
|
|
45
|
-
const style = globalThis.getComputedStyle(this._element);
|
|
46
|
-
const bgColor = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-background-color');
|
|
47
|
-
const color = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-color');
|
|
48
|
-
ghostEl.style.backgroundColor = bgColor;
|
|
49
|
-
ghostEl.style.color = color;
|
|
50
|
-
ghostEl.style.padding = '2px 8px';
|
|
51
|
-
ghostEl.style.height = '24px';
|
|
52
|
-
ghostEl.style.fontSize = '11px';
|
|
53
|
-
ghostEl.style.lineHeight = '20px';
|
|
54
|
-
ghostEl.style.borderRadius = '12px';
|
|
55
|
-
ghostEl.style.whiteSpace = 'nowrap';
|
|
56
|
-
ghostEl.style.boxSizing = 'border-box';
|
|
57
|
-
// HTML5 setDragImage snapshots the element as appended to the
|
|
58
|
-
// document; a default block-level div would stretch to the
|
|
59
|
-
// body's width and render as a viewport-wide bar.
|
|
60
|
-
ghostEl.style.display = 'inline-block';
|
|
61
|
-
ghostEl.textContent = `Multiple Panels (${this.group.size})`;
|
|
62
|
-
return ghostEl;
|
|
63
|
-
};
|
|
64
|
-
const buildGhostSpec = () => {
|
|
65
|
-
var _a, _b;
|
|
66
|
-
// The custom-ghost resolution (createGroupDragGhostComponent) is
|
|
67
|
-
// owned by the AdvancedDnD module; core keeps the default chip and
|
|
68
|
-
// falls back to it when no custom ghost is produced (incl. when
|
|
69
|
-
// the module is absent).
|
|
70
|
-
const customGhost = (_b = (_a = this.accessor).buildGroupDragGhost) === null || _b === void 0 ? void 0 : _b.call(_a, this.group);
|
|
71
|
-
if (customGhost) {
|
|
72
|
-
return customGhost;
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
element: buildMultiPanelsGhost(),
|
|
76
|
-
offsetX: 30,
|
|
77
|
-
offsetY: -10,
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
const sharedDragOptions = {
|
|
81
|
-
getData: () => {
|
|
82
|
-
this.panelTransfer.setData([new PanelTransfer(this.accessor.id, this.group.id, null)], PanelTransfer.prototype);
|
|
83
|
-
return {
|
|
84
|
-
dispose: () => {
|
|
85
|
-
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
},
|
|
89
|
-
createGhost: buildGhostSpec,
|
|
90
|
-
onDragStart: (event) => {
|
|
91
|
-
this._onDragStart.fire(event);
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
this.html5DragSource = html5Backend.createDragSource(this._element, Object.assign(Object.assign({}, sharedDragOptions), { disabled: !caps.html5, isCancelled: (event) => {
|
|
95
|
-
// HTML5: when this element is the floating window's move
|
|
96
|
-
// handle, redock needs shift+drag (otherwise click-and-drag
|
|
97
|
-
// conflicts with moving the float). A non-move-handle (e.g. the
|
|
98
|
-
// void container when a title bar moves the float) redocks with
|
|
99
|
-
// a plain drag, like a group in the main grid.
|
|
100
|
-
if (this.group.api.location.type === 'floating' &&
|
|
101
|
-
this.isFloatingMoveHandle() &&
|
|
102
|
-
!event.shiftKey) {
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
if (this.group.api.location.type === 'edge' &&
|
|
106
|
-
this.group.size === 0) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
return false;
|
|
110
|
-
} }));
|
|
111
|
-
// Only the move handle needs the touch disambiguation; other handles
|
|
112
|
-
// redock with the normal grid press behaviour.
|
|
113
|
-
const isFloating = () => {
|
|
114
|
-
var _a, _b, _c;
|
|
115
|
-
return ((_c = (_b = (_a = this.group) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.location) === null || _c === void 0 ? void 0 : _c.type) === 'floating' &&
|
|
116
|
-
this.isFloatingMoveHandle();
|
|
117
|
-
};
|
|
118
|
-
this.pointerDragSource = pointerBackend.createDragSource(this._element, Object.assign(Object.assign({}, sharedDragOptions), { disabled: !caps.pointer, touchOnly: !caps.pointerHandlesMouse,
|
|
119
|
-
// Floating groups share this element with the overlay's
|
|
120
|
-
// move-the-float drag. Without a longer hold + tolerance
|
|
121
|
-
// override, both gestures commit simultaneously and the
|
|
122
|
-
// user sees the float follow their finger *and* a ghost.
|
|
123
|
-
touchInitiationDelay: () => isFloating() ? FLOATING_REDOCK_INITIATION_DELAY_MS : 250, pressTolerance: () => (isFloating() ? Infinity : 8), isCancelled: () => {
|
|
124
|
-
if (!resolveDndCapabilities(this.accessor.options).pointer) {
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
// Pointer: long-press IS the deliberate gesture, so
|
|
128
|
-
// floating groups don't need the shift gate.
|
|
129
|
-
if (this.group.api.location.type === 'edge' &&
|
|
130
|
-
this.group.size === 0) {
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
return false;
|
|
134
|
-
}, onDragStart: (event) => {
|
|
135
|
-
var _a;
|
|
136
|
-
// Redock just committed — abort any in-flight overlay
|
|
137
|
-
// move so the float stops following the finger while
|
|
138
|
-
// the ghost takes over.
|
|
139
|
-
(_a = this.getFloatingOverlay()) === null || _a === void 0 ? void 0 : _a.cancelPendingDrag();
|
|
140
|
-
this._onDragStart.fire(event);
|
|
141
|
-
} }));
|
|
142
|
-
// Mirror direction: once the overlay's move-the-float gesture has
|
|
143
|
-
// actually moved something, cancel the pending redock arm so the
|
|
144
|
-
// ghost doesn't appear mid-drag if the user holds past 500ms.
|
|
145
|
-
const overlayMoveSub = new MutableDisposable();
|
|
146
|
-
const refreshOverlayMoveSub = () => {
|
|
147
|
-
const overlay = this.getFloatingOverlay();
|
|
148
|
-
overlayMoveSub.value = overlay
|
|
149
|
-
? overlay.onDidStartMoving(() => {
|
|
150
|
-
this.pointerDragSource.cancelPending();
|
|
151
|
-
})
|
|
152
|
-
: Disposable.NONE;
|
|
153
|
-
};
|
|
154
|
-
refreshOverlayMoveSub();
|
|
155
|
-
this.addDisposables(overlayMoveSub);
|
|
156
|
-
const locationChange = (_c = (_b = this.group) === null || _b === void 0 ? void 0 : _b.api) === null || _c === void 0 ? void 0 : _c.onDidLocationChange;
|
|
157
|
-
if (locationChange) {
|
|
158
|
-
this.addDisposables(locationChange(refreshOverlayMoveSub));
|
|
159
|
-
}
|
|
160
|
-
this.addDisposables(this.html5DragSource, this.pointerDragSource);
|
|
161
|
-
}
|
|
162
|
-
updateDragAndDropState() {
|
|
163
|
-
const caps = resolveDndCapabilities(this.accessor.options);
|
|
164
|
-
this._element.draggable = caps.html5;
|
|
165
|
-
toggleClass(this._element, 'dv-draggable', caps.html5 || caps.pointer);
|
|
166
|
-
this.html5DragSource.setDisabled(!caps.html5);
|
|
167
|
-
this.pointerDragSource.setDisabled(!caps.pointer);
|
|
168
|
-
this.pointerDragSource.setTouchOnly(!caps.pointerHandlesMouse);
|
|
169
|
-
}
|
|
170
|
-
getFloatingOverlay() {
|
|
171
|
-
var _a, _b;
|
|
172
|
-
if (!this.group) {
|
|
173
|
-
return undefined;
|
|
174
|
-
}
|
|
175
|
-
return (_b = (_a = this.accessor.floatingGroups) === null || _a === void 0 ? void 0 : _a.find((fg) => fg.group === this.group)) === null || _b === void 0 ? void 0 : _b.overlay;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
export { FLOATING_REDOCK_INITIATION_DELAY_MS };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Event } from '../../../events';
|
|
2
|
-
import { CompositeDisposable } from '../../../lifecycle';
|
|
3
|
-
import { ITabGroup } from '../../tabGroup';
|
|
4
|
-
import { TabGroupColorPalette } from '../../tabGroupAccent';
|
|
5
|
-
import { ITabGroupChipRenderer } from '../../framework';
|
|
6
|
-
import { DockviewApi } from '../../../api/component.api';
|
|
7
|
-
/**
|
|
8
|
-
* Visual chip for a tab group. Owns the DOM element, label, click /
|
|
9
|
-
* context-menu interactions, and exposes a long-press gesture as a
|
|
10
|
-
* second `onContextMenu` source. Drag-and-drop wiring lives in
|
|
11
|
-
* `TabGroupManager` — the manager constructs the drag sources on this
|
|
12
|
-
* chip's element so it can include tabs-list context (custom group
|
|
13
|
-
* drag image, tab-group transfer payload).
|
|
14
|
-
*/
|
|
15
|
-
export declare class TabGroupChip extends CompositeDisposable implements ITabGroupChipRenderer {
|
|
16
|
-
private readonly _palette?;
|
|
17
|
-
private readonly _element;
|
|
18
|
-
private readonly _label;
|
|
19
|
-
private _tabGroup;
|
|
20
|
-
private readonly _onClick;
|
|
21
|
-
readonly onClick: Event<MouseEvent>;
|
|
22
|
-
private readonly _onContextMenu;
|
|
23
|
-
/** Fires on right-click and on touch long-press. */
|
|
24
|
-
readonly onContextMenu: Event<MouseEvent>;
|
|
25
|
-
get element(): HTMLElement;
|
|
26
|
-
constructor(_palette?: TabGroupColorPalette | undefined);
|
|
27
|
-
init(params: {
|
|
28
|
-
tabGroup: ITabGroup;
|
|
29
|
-
api: DockviewApi;
|
|
30
|
-
}): void;
|
|
31
|
-
update(params: {
|
|
32
|
-
tabGroup: ITabGroup;
|
|
33
|
-
}): void;
|
|
34
|
-
private updateColor;
|
|
35
|
-
private updateLabel;
|
|
36
|
-
private updateCollapsed;
|
|
37
|
-
}
|