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,77 +0,0 @@
|
|
|
1
|
-
import { addDisposableListener, Emitter } from '../../../events';
|
|
2
|
-
import { CompositeDisposable } from '../../../lifecycle';
|
|
3
|
-
import { toggleClass } from '../../../dom';
|
|
4
|
-
import { applyTabGroupAccent, } from '../../tabGroupAccent';
|
|
5
|
-
import { LongPressDetector } from '../../../dnd/pointer/longPress';
|
|
6
|
-
/**
|
|
7
|
-
* Visual chip for a tab group. Owns the DOM element, label, click /
|
|
8
|
-
* context-menu interactions, and exposes a long-press gesture as a
|
|
9
|
-
* second `onContextMenu` source. Drag-and-drop wiring lives in
|
|
10
|
-
* `TabGroupManager` — the manager constructs the drag sources on this
|
|
11
|
-
* chip's element so it can include tabs-list context (custom group
|
|
12
|
-
* drag image, tab-group transfer payload).
|
|
13
|
-
*/
|
|
14
|
-
export class TabGroupChip extends CompositeDisposable {
|
|
15
|
-
get element() {
|
|
16
|
-
return this._element;
|
|
17
|
-
}
|
|
18
|
-
constructor(_palette) {
|
|
19
|
-
super();
|
|
20
|
-
this._palette = _palette;
|
|
21
|
-
this._onClick = new Emitter();
|
|
22
|
-
this.onClick = this._onClick.event;
|
|
23
|
-
this._onContextMenu = new Emitter();
|
|
24
|
-
/** Fires on right-click and on touch long-press. */
|
|
25
|
-
this.onContextMenu = this._onContextMenu.event;
|
|
26
|
-
this._element = document.createElement('div');
|
|
27
|
-
this._element.className = 'dv-tab-group-chip';
|
|
28
|
-
this._element.tabIndex = 0;
|
|
29
|
-
this._label = document.createElement('span');
|
|
30
|
-
this._label.className = 'dv-tab-group-chip-label';
|
|
31
|
-
this._element.appendChild(this._label);
|
|
32
|
-
this.addDisposables(this._onClick, this._onContextMenu, new LongPressDetector(this._element, {
|
|
33
|
-
onLongPress: (event) => {
|
|
34
|
-
this._onContextMenu.fire(event);
|
|
35
|
-
},
|
|
36
|
-
}), addDisposableListener(this._element, 'click', (event) => {
|
|
37
|
-
this._onClick.fire(event);
|
|
38
|
-
}), addDisposableListener(this._element, 'contextmenu', (event) => {
|
|
39
|
-
this._onContextMenu.fire(event);
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
init(params) {
|
|
43
|
-
this._tabGroup = params.tabGroup;
|
|
44
|
-
this.updateColor(params.tabGroup.color);
|
|
45
|
-
this.updateLabel(params.tabGroup.label);
|
|
46
|
-
this.updateCollapsed(params.tabGroup.collapsed);
|
|
47
|
-
this.addDisposables(params.tabGroup.onDidChange(() => {
|
|
48
|
-
if (this._tabGroup) {
|
|
49
|
-
this.updateColor(this._tabGroup.color);
|
|
50
|
-
this.updateLabel(this._tabGroup.label);
|
|
51
|
-
}
|
|
52
|
-
}), params.tabGroup.onDidCollapseChange((collapsed) => {
|
|
53
|
-
this.updateCollapsed(collapsed);
|
|
54
|
-
}), this._onClick.event(() => {
|
|
55
|
-
var _a;
|
|
56
|
-
(_a = this._tabGroup) === null || _a === void 0 ? void 0 : _a.toggle();
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
update(params) {
|
|
60
|
-
this._tabGroup = params.tabGroup;
|
|
61
|
-
this.updateColor(params.tabGroup.color);
|
|
62
|
-
this.updateLabel(params.tabGroup.label);
|
|
63
|
-
this.updateCollapsed(params.tabGroup.collapsed);
|
|
64
|
-
}
|
|
65
|
-
updateColor(color) {
|
|
66
|
-
var _a;
|
|
67
|
-
applyTabGroupAccent(this._element, color, this._palette);
|
|
68
|
-
toggleClass(this._element, 'dv-tab-group-chip--accent-off', ((_a = this._palette) === null || _a === void 0 ? void 0 : _a.enabled) === false);
|
|
69
|
-
}
|
|
70
|
-
updateLabel(label) {
|
|
71
|
-
this._label.textContent = label;
|
|
72
|
-
toggleClass(this._label, 'dv-tab-group-chip-label--empty', !label);
|
|
73
|
-
}
|
|
74
|
-
updateCollapsed(collapsed) {
|
|
75
|
-
toggleClass(this._element, 'dv-tab-group-chip--collapsed', collapsed);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { IValueDisposable } from '../../../lifecycle';
|
|
2
|
-
import { DockviewHeaderDirection, DockviewHeaderPosition } from '../../options';
|
|
3
|
-
import { Tab } from '../tab/tab';
|
|
4
|
-
import { ITabGroup } from '../../tabGroup';
|
|
5
|
-
import { TabGroupColorPalette } from '../../tabGroupAccent';
|
|
6
|
-
export interface TabGroupIndicatorContext {
|
|
7
|
-
readonly tabsList: HTMLElement;
|
|
8
|
-
getTabGroups(): readonly ITabGroup[];
|
|
9
|
-
getActivePanelId(): string | undefined;
|
|
10
|
-
getTabMap(): Map<string, IValueDisposable<Tab>>;
|
|
11
|
-
getChipElement(groupId: string): HTMLElement | undefined;
|
|
12
|
-
getDirection(): DockviewHeaderDirection;
|
|
13
|
-
getHeaderPosition(): DockviewHeaderPosition;
|
|
14
|
-
getColorPalette(): TabGroupColorPalette | undefined;
|
|
15
|
-
}
|
|
16
|
-
export interface ITabGroupIndicator {
|
|
17
|
-
readonly underlines: ReadonlyMap<string, HTMLElement>;
|
|
18
|
-
positionUnderlines(): void;
|
|
19
|
-
trackUnderlines(): void;
|
|
20
|
-
syncUnderlineElements(activeGroupIds: Set<string>): void;
|
|
21
|
-
getUnderline(groupId: string): HTMLElement | undefined;
|
|
22
|
-
dispose(): void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Shared positioning logic for tab group indicators.
|
|
26
|
-
* Subclasses implement `applyShape` to control the visual output.
|
|
27
|
-
*/
|
|
28
|
-
declare abstract class BaseTabGroupIndicator implements ITabGroupIndicator {
|
|
29
|
-
protected readonly _ctx: TabGroupIndicatorContext;
|
|
30
|
-
protected readonly _underlines: Map<string, HTMLElement>;
|
|
31
|
-
private _rafId;
|
|
32
|
-
get underlines(): ReadonlyMap<string, HTMLElement>;
|
|
33
|
-
constructor(_ctx: TabGroupIndicatorContext);
|
|
34
|
-
positionUnderlines(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Continuously reposition underlines every frame for the duration
|
|
37
|
-
* of a tab transition (~200ms), so the underline tracks tab sizes.
|
|
38
|
-
*/
|
|
39
|
-
trackUnderlines(): void;
|
|
40
|
-
syncUnderlineElements(activeGroupIds: Set<string>): void;
|
|
41
|
-
getUnderline(groupId: string): HTMLElement | undefined;
|
|
42
|
-
dispose(): void;
|
|
43
|
-
/**
|
|
44
|
-
* Apply the visual shape to the underline element.
|
|
45
|
-
* Called once per tab group per frame with the computed geometry.
|
|
46
|
-
*/
|
|
47
|
-
protected abstract applyShape(underline: HTMLElement, tg: ITabGroup, startEdge: number, span: number, containerCrossSize: number, activePanelId: string | undefined, containerRect: DOMRect, isVertical: boolean): void;
|
|
48
|
-
private _positionUnderlinesSync;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Chrome-style wrap-around indicator using SVG paths.
|
|
52
|
-
*/
|
|
53
|
-
export declare class WrapTabGroupIndicator extends BaseTabGroupIndicator {
|
|
54
|
-
private _applyStraightLine;
|
|
55
|
-
/**
|
|
56
|
-
* Chrome-style wrap-around underline: a stroked SVG path that runs
|
|
57
|
-
* along the bottom (or left edge in vertical mode), curving up and
|
|
58
|
-
* over the active tab with rounded corners.
|
|
59
|
-
*
|
|
60
|
-
* The SVG and path elements are created once per underline and reused;
|
|
61
|
-
* only the `d`, `stroke`, and viewport attributes are updated each frame.
|
|
62
|
-
*/
|
|
63
|
-
protected applyShape(underline: HTMLElement, tg: ITabGroup, groupStart: number, groupSpan: number, containerCrossSize: number, activePanelId: string | undefined, containerRect: DOMRect, isVertical: boolean): void;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Flat continuous bar indicator — no wrap-around, just a colored line
|
|
67
|
-
* spanning the full tab group width.
|
|
68
|
-
*/
|
|
69
|
-
export declare class NoneTabGroupIndicator extends BaseTabGroupIndicator {
|
|
70
|
-
protected applyShape(underline: HTMLElement, tg: ITabGroup, _startEdge: number, span: number, _containerCrossSize: number, _activePanelId: string | undefined, _containerRect: DOMRect, isVertical: boolean): void;
|
|
71
|
-
}
|
|
72
|
-
export {};
|
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
import { resolveTabGroupAccent, } from '../../tabGroupAccent';
|
|
2
|
-
/**
|
|
3
|
-
* Shared positioning logic for tab group indicators.
|
|
4
|
-
* Subclasses implement `applyShape` to control the visual output.
|
|
5
|
-
*/
|
|
6
|
-
class BaseTabGroupIndicator {
|
|
7
|
-
get underlines() {
|
|
8
|
-
return this._underlines;
|
|
9
|
-
}
|
|
10
|
-
constructor(_ctx) {
|
|
11
|
-
this._ctx = _ctx;
|
|
12
|
-
this._underlines = new Map();
|
|
13
|
-
this._rafId = null;
|
|
14
|
-
}
|
|
15
|
-
positionUnderlines() {
|
|
16
|
-
requestAnimationFrame(() => {
|
|
17
|
-
this._positionUnderlinesSync();
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Continuously reposition underlines every frame for the duration
|
|
22
|
-
* of a tab transition (~200ms), so the underline tracks tab sizes.
|
|
23
|
-
*/
|
|
24
|
-
trackUnderlines() {
|
|
25
|
-
if (this._rafId !== null) {
|
|
26
|
-
cancelAnimationFrame(this._rafId);
|
|
27
|
-
}
|
|
28
|
-
const start = performance.now();
|
|
29
|
-
const duration = 250; // slightly longer than transition to ensure we catch the end
|
|
30
|
-
const tick = () => {
|
|
31
|
-
this._positionUnderlinesSync();
|
|
32
|
-
if (performance.now() - start < duration) {
|
|
33
|
-
this._rafId = requestAnimationFrame(tick);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this._rafId = null;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
this._rafId = requestAnimationFrame(tick);
|
|
40
|
-
}
|
|
41
|
-
syncUnderlineElements(activeGroupIds) {
|
|
42
|
-
// Ensure underline elements exist for active groups
|
|
43
|
-
for (const groupId of activeGroupIds) {
|
|
44
|
-
if (!this._underlines.has(groupId)) {
|
|
45
|
-
const underline = document.createElement('div');
|
|
46
|
-
underline.className = 'dv-tab-group-underline';
|
|
47
|
-
this._ctx.tabsList.appendChild(underline);
|
|
48
|
-
this._underlines.set(groupId, underline);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// Remove underlines for dissolved groups
|
|
52
|
-
for (const [groupId, el] of this._underlines) {
|
|
53
|
-
if (!activeGroupIds.has(groupId)) {
|
|
54
|
-
el.remove();
|
|
55
|
-
this._underlines.delete(groupId);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
getUnderline(groupId) {
|
|
60
|
-
return this._underlines.get(groupId);
|
|
61
|
-
}
|
|
62
|
-
dispose() {
|
|
63
|
-
if (this._rafId !== null) {
|
|
64
|
-
cancelAnimationFrame(this._rafId);
|
|
65
|
-
this._rafId = null;
|
|
66
|
-
}
|
|
67
|
-
for (const [, el] of this._underlines) {
|
|
68
|
-
el.remove();
|
|
69
|
-
}
|
|
70
|
-
this._underlines.clear();
|
|
71
|
-
}
|
|
72
|
-
_positionUnderlinesSync() {
|
|
73
|
-
const containerRect = this._ctx.tabsList.getBoundingClientRect();
|
|
74
|
-
const tabGroups = this._ctx.getTabGroups();
|
|
75
|
-
const isVertical = this._ctx.getDirection() === 'vertical';
|
|
76
|
-
const containerCrossSize = isVertical
|
|
77
|
-
? containerRect.width
|
|
78
|
-
: containerRect.height;
|
|
79
|
-
const activePanelId = this._ctx.getActivePanelId();
|
|
80
|
-
const tabMap = this._ctx.getTabMap();
|
|
81
|
-
for (const tg of tabGroups) {
|
|
82
|
-
const underline = this._underlines.get(tg.id);
|
|
83
|
-
if (!underline) {
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
const panelIds = tg.panelIds;
|
|
87
|
-
if (panelIds.length === 0) {
|
|
88
|
-
underline.style.display = 'none';
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
underline.style.display = '';
|
|
92
|
-
const chipEl = this._ctx.getChipElement(tg.id);
|
|
93
|
-
// In vertical mode, compute top/bottom edges; in horizontal, left/right.
|
|
94
|
-
let startEdge;
|
|
95
|
-
if (chipEl) {
|
|
96
|
-
const chipRect = chipEl.getBoundingClientRect();
|
|
97
|
-
const chipStyle = getComputedStyle(chipEl);
|
|
98
|
-
const leadingMargin = isVertical
|
|
99
|
-
? Number.parseFloat(chipStyle.marginTop) || 0
|
|
100
|
-
: Number.parseFloat(chipStyle.marginLeft) || 0;
|
|
101
|
-
startEdge = isVertical
|
|
102
|
-
? chipRect.top - containerRect.top - leadingMargin
|
|
103
|
-
: chipRect.left - containerRect.left - leadingMargin;
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
const firstPanelId = panelIds[0];
|
|
107
|
-
const firstTabEntry = tabMap.get(firstPanelId);
|
|
108
|
-
if (firstTabEntry) {
|
|
109
|
-
const firstRect = firstTabEntry.value.element.getBoundingClientRect();
|
|
110
|
-
startEdge = isVertical
|
|
111
|
-
? firstRect.top - containerRect.top
|
|
112
|
-
: firstRect.left - containerRect.left;
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
startEdge = 0;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
// Measure the actual last tab position (follows CSS transitions in real-time)
|
|
119
|
-
const lastPanelId = panelIds[panelIds.length - 1];
|
|
120
|
-
const lastTabEntry = tabMap.get(lastPanelId);
|
|
121
|
-
if (!lastTabEntry) {
|
|
122
|
-
if (isVertical) {
|
|
123
|
-
underline.style.top = `${startEdge}px`;
|
|
124
|
-
underline.style.height = '0px';
|
|
125
|
-
underline.style.left = '';
|
|
126
|
-
underline.style.width = '';
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
underline.style.left = `${startEdge}px`;
|
|
130
|
-
underline.style.width = '0px';
|
|
131
|
-
underline.style.top = '';
|
|
132
|
-
underline.style.height = '';
|
|
133
|
-
}
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
const lastTabRect = lastTabEntry.value.element.getBoundingClientRect();
|
|
137
|
-
let endEdge = isVertical
|
|
138
|
-
? lastTabRect.bottom - containerRect.top
|
|
139
|
-
: lastTabRect.right - containerRect.left;
|
|
140
|
-
let span = endEdge - startEdge;
|
|
141
|
-
// During collapse or expand: converge both edges toward chip center
|
|
142
|
-
const isAnimating = tg.collapsed ||
|
|
143
|
-
tg.panelIds.some((pid) => {
|
|
144
|
-
const te = tabMap.get(pid);
|
|
145
|
-
return te === null || te === void 0 ? void 0 : te.value.element.classList.contains('dv-tab--group-expanding');
|
|
146
|
-
});
|
|
147
|
-
if (isAnimating && chipEl) {
|
|
148
|
-
const chipRect = chipEl.getBoundingClientRect();
|
|
149
|
-
const chipCenter = isVertical
|
|
150
|
-
? chipRect.top + chipRect.height / 2 - containerRect.top
|
|
151
|
-
: chipRect.left + chipRect.width / 2 - containerRect.left;
|
|
152
|
-
// Sum of current visible tab sizes (shrinking or growing)
|
|
153
|
-
let currentTabSize = 0;
|
|
154
|
-
let fullTabSize = 0;
|
|
155
|
-
for (const pid of tg.panelIds) {
|
|
156
|
-
const te = tabMap.get(pid);
|
|
157
|
-
if (!te)
|
|
158
|
-
continue;
|
|
159
|
-
const el = te.value.element;
|
|
160
|
-
if (isVertical) {
|
|
161
|
-
currentTabSize += el.getBoundingClientRect().height;
|
|
162
|
-
fullTabSize += el.scrollHeight;
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
currentTabSize += el.getBoundingClientRect().width;
|
|
166
|
-
fullTabSize += el.scrollWidth;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
// progress: 0 when tabs at 0 size, 1 when fully open
|
|
170
|
-
const progress = fullTabSize > 0
|
|
171
|
-
? Math.min(1, currentTabSize / fullTabSize)
|
|
172
|
-
: 0;
|
|
173
|
-
// Interpolate start and end edges toward chip center
|
|
174
|
-
startEdge = chipCenter + (startEdge - chipCenter) * progress;
|
|
175
|
-
endEdge = chipCenter + (endEdge - chipCenter) * progress;
|
|
176
|
-
span = Math.max(0, endEdge - startEdge);
|
|
177
|
-
}
|
|
178
|
-
if (isVertical) {
|
|
179
|
-
underline.style.top = `${startEdge}px`;
|
|
180
|
-
underline.style.height = `${Math.max(0, span)}px`;
|
|
181
|
-
// Clear horizontal properties
|
|
182
|
-
underline.style.left = '';
|
|
183
|
-
underline.style.width = '';
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
underline.style.left = `${startEdge}px`;
|
|
187
|
-
underline.style.width = `${Math.max(0, span)}px`;
|
|
188
|
-
// Clear vertical properties
|
|
189
|
-
underline.style.top = '';
|
|
190
|
-
underline.style.height = '';
|
|
191
|
-
}
|
|
192
|
-
this.applyShape(underline, tg, startEdge, span, containerCrossSize, activePanelId, containerRect, isVertical);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Chrome-style wrap-around indicator using SVG paths.
|
|
198
|
-
*/
|
|
199
|
-
export class WrapTabGroupIndicator extends BaseTabGroupIndicator {
|
|
200
|
-
_applyStraightLine(svg, path, underline, t, mainSize, isVertical) {
|
|
201
|
-
if (isVertical) {
|
|
202
|
-
svg.setAttribute('width', String(t));
|
|
203
|
-
svg.setAttribute('height', String(mainSize));
|
|
204
|
-
underline.style.width = `${t}px`;
|
|
205
|
-
underline.style.height = `${mainSize}px`;
|
|
206
|
-
path.setAttribute('d', `M ${t / 2},0 L ${t / 2},${mainSize}`);
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
svg.setAttribute('width', String(mainSize));
|
|
210
|
-
svg.setAttribute('height', String(t));
|
|
211
|
-
underline.style.width = `${mainSize}px`;
|
|
212
|
-
underline.style.height = `${t}px`;
|
|
213
|
-
path.setAttribute('d', `M 0,${t / 2} L ${mainSize},${t / 2}`);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Chrome-style wrap-around underline: a stroked SVG path that runs
|
|
218
|
-
* along the bottom (or left edge in vertical mode), curving up and
|
|
219
|
-
* over the active tab with rounded corners.
|
|
220
|
-
*
|
|
221
|
-
* The SVG and path elements are created once per underline and reused;
|
|
222
|
-
* only the `d`, `stroke`, and viewport attributes are updated each frame.
|
|
223
|
-
*/
|
|
224
|
-
applyShape(underline, tg, groupStart, groupSpan, containerCrossSize, activePanelId, containerRect, isVertical) {
|
|
225
|
-
const t = 2; // line thickness in px
|
|
226
|
-
const crossSize = containerCrossSize;
|
|
227
|
-
const mainSize = groupSpan;
|
|
228
|
-
const color = resolveTabGroupAccent(tg.color, this._ctx.getColorPalette());
|
|
229
|
-
if (mainSize <= 0 || crossSize <= 0 || color === undefined) {
|
|
230
|
-
underline.style.display = 'none';
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
underline.style.display = '';
|
|
234
|
-
// Find the active tab within this group
|
|
235
|
-
let activeTabEntry;
|
|
236
|
-
if (activePanelId && tg.panelIds.includes(activePanelId)) {
|
|
237
|
-
activeTabEntry = this._ctx.getTabMap().get(activePanelId);
|
|
238
|
-
}
|
|
239
|
-
// Ensure SVG + path child exists (created once, reused)
|
|
240
|
-
let svg = underline.firstElementChild;
|
|
241
|
-
let path;
|
|
242
|
-
if ((svg === null || svg === void 0 ? void 0 : svg.tagName) === 'svg') {
|
|
243
|
-
path = svg.firstElementChild;
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
underline.replaceChildren();
|
|
247
|
-
svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
248
|
-
svg.style.display = 'block';
|
|
249
|
-
path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
250
|
-
path.setAttribute('fill', 'none');
|
|
251
|
-
svg.appendChild(path);
|
|
252
|
-
underline.appendChild(svg);
|
|
253
|
-
}
|
|
254
|
-
path.setAttribute('stroke', color);
|
|
255
|
-
path.setAttribute('stroke-width', String(t));
|
|
256
|
-
if (!activeTabEntry) {
|
|
257
|
-
this._applyStraightLine(svg, path, underline, t, mainSize, isVertical);
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
const activeRect = activeTabEntry.value.element.getBoundingClientRect();
|
|
261
|
-
// Compute active tab start/end relative to the group start
|
|
262
|
-
let aStart;
|
|
263
|
-
let aEnd;
|
|
264
|
-
if (isVertical) {
|
|
265
|
-
aStart = Math.max(0, activeRect.top - containerRect.top - groupStart);
|
|
266
|
-
aEnd = Math.min(mainSize, activeRect.bottom - containerRect.top - groupStart);
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
aStart = Math.max(0, activeRect.left - containerRect.left - groupStart);
|
|
270
|
-
aEnd = Math.min(mainSize, activeRect.right - containerRect.left - groupStart);
|
|
271
|
-
}
|
|
272
|
-
if (aEnd <= aStart) {
|
|
273
|
-
this._applyStraightLine(svg, path, underline, t, mainSize, isVertical);
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
const r = 6; // corner radius
|
|
277
|
-
const half = t / 2;
|
|
278
|
-
const headerPosition = this._ctx.getHeaderPosition();
|
|
279
|
-
if (isVertical) {
|
|
280
|
-
const svgW = crossSize;
|
|
281
|
-
const svgH = mainSize;
|
|
282
|
-
svg.setAttribute('width', String(svgW));
|
|
283
|
-
svg.setAttribute('height', String(svgH));
|
|
284
|
-
underline.style.width = `${svgW}px`;
|
|
285
|
-
underline.style.height = `${svgH}px`;
|
|
286
|
-
// right header: indicator on the left edge (invert x sides)
|
|
287
|
-
const isRightHeader = headerPosition === 'right';
|
|
288
|
-
const xNear = isRightHeader ? svgW - half : half;
|
|
289
|
-
const xFar = isRightHeader ? half : svgW - half;
|
|
290
|
-
const cd = isRightHeader ? -1 : 1; // curve direction
|
|
291
|
-
const d = [
|
|
292
|
-
`M ${xNear},0`,
|
|
293
|
-
`L ${xNear},${aStart - r}`,
|
|
294
|
-
`Q ${xNear},${aStart} ${xNear + cd * r},${aStart}`,
|
|
295
|
-
`L ${xFar - cd * r},${aStart}`,
|
|
296
|
-
`Q ${xFar},${aStart} ${xFar},${aStart + r}`,
|
|
297
|
-
`L ${xFar},${aEnd - r}`,
|
|
298
|
-
`Q ${xFar},${aEnd} ${xFar - cd * r},${aEnd}`,
|
|
299
|
-
`L ${xNear + cd * r},${aEnd}`,
|
|
300
|
-
`Q ${xNear},${aEnd} ${xNear},${aEnd + r}`,
|
|
301
|
-
`L ${xNear},${svgH}`,
|
|
302
|
-
].join(' ');
|
|
303
|
-
path.setAttribute('d', d);
|
|
304
|
-
}
|
|
305
|
-
else {
|
|
306
|
-
const svgW = mainSize;
|
|
307
|
-
const svgH = crossSize;
|
|
308
|
-
svg.setAttribute('width', String(svgW));
|
|
309
|
-
svg.setAttribute('height', String(svgH));
|
|
310
|
-
underline.style.width = `${svgW}px`;
|
|
311
|
-
underline.style.height = `${svgH}px`;
|
|
312
|
-
// bottom header: indicator on the top edge (invert y sides)
|
|
313
|
-
const isBottomHeader = headerPosition === 'bottom';
|
|
314
|
-
const yNear = isBottomHeader ? half : svgH - half;
|
|
315
|
-
const yFar = isBottomHeader ? svgH - half : half;
|
|
316
|
-
const cd = isBottomHeader ? 1 : -1; // curve direction
|
|
317
|
-
const d = [
|
|
318
|
-
`M 0,${yNear}`,
|
|
319
|
-
`L ${aStart - r},${yNear}`,
|
|
320
|
-
`Q ${aStart},${yNear} ${aStart},${yNear + cd * r}`,
|
|
321
|
-
`L ${aStart},${yFar - cd * r}`,
|
|
322
|
-
`Q ${aStart},${yFar} ${aStart + r},${yFar}`,
|
|
323
|
-
`L ${aEnd - r},${yFar}`,
|
|
324
|
-
`Q ${aEnd},${yFar} ${aEnd},${yFar - cd * r}`,
|
|
325
|
-
`L ${aEnd},${yNear + cd * r}`,
|
|
326
|
-
`Q ${aEnd},${yNear} ${aEnd + r},${yNear}`,
|
|
327
|
-
`L ${svgW},${yNear}`,
|
|
328
|
-
].join(' ');
|
|
329
|
-
path.setAttribute('d', d);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Flat continuous bar indicator — no wrap-around, just a colored line
|
|
335
|
-
* spanning the full tab group width.
|
|
336
|
-
*/
|
|
337
|
-
export class NoneTabGroupIndicator extends BaseTabGroupIndicator {
|
|
338
|
-
applyShape(underline, tg, _startEdge, span, _containerCrossSize, _activePanelId, _containerRect, isVertical) {
|
|
339
|
-
const t = 2; // line thickness in px
|
|
340
|
-
const color = resolveTabGroupAccent(tg.color, this._ctx.getColorPalette());
|
|
341
|
-
if (span <= 0 || color === undefined) {
|
|
342
|
-
underline.style.display = 'none';
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
underline.style.display = '';
|
|
346
|
-
// Clear any SVG content left over from a mode switch
|
|
347
|
-
if (underline.firstElementChild) {
|
|
348
|
-
underline.replaceChildren();
|
|
349
|
-
}
|
|
350
|
-
underline.style.backgroundColor = color;
|
|
351
|
-
if (isVertical) {
|
|
352
|
-
underline.style.width = `${t}px`;
|
|
353
|
-
underline.style.height = `${span}px`;
|
|
354
|
-
}
|
|
355
|
-
else {
|
|
356
|
-
underline.style.width = `${span}px`;
|
|
357
|
-
underline.style.height = `${t}px`;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { IDragSource } from '../../../dnd/backend';
|
|
2
|
-
import { IDisposable, IValueDisposable } from '../../../lifecycle';
|
|
3
|
-
import { DockviewComponent } from '../../dockviewComponent';
|
|
4
|
-
import { DockviewGroupPanel } from '../../dockviewGroupPanel';
|
|
5
|
-
import { DockviewHeaderDirection } from '../../options';
|
|
6
|
-
import { Tab } from '../tab/tab';
|
|
7
|
-
import { ITabGroup } from '../../tabGroup';
|
|
8
|
-
import { ITabGroupChipRenderer } from '../../framework';
|
|
9
|
-
import { Droptarget, DroptargetEvent } from '../../../dnd/droptarget';
|
|
10
|
-
export interface TabGroupManagerContext {
|
|
11
|
-
readonly group: DockviewGroupPanel;
|
|
12
|
-
readonly accessor: DockviewComponent;
|
|
13
|
-
readonly tabsList: HTMLElement;
|
|
14
|
-
getTabs(): IValueDisposable<Tab>[];
|
|
15
|
-
getTabMap(): Map<string, IValueDisposable<Tab>>;
|
|
16
|
-
getDirection(): DockviewHeaderDirection;
|
|
17
|
-
}
|
|
18
|
-
export interface TabGroupManagerCallbacks {
|
|
19
|
-
onChipContextMenu(tabGroup: ITabGroup, event: MouseEvent): void;
|
|
20
|
-
onChipDragStart(tabGroup: ITabGroup, chip: ITabGroupChipRenderer, event: DragEvent | PointerEvent): void;
|
|
21
|
-
/**
|
|
22
|
-
* HTML5 chip dragend only. Pointer dragend is handled centrally via
|
|
23
|
-
* `PointerDragController.onDragEnd` in `tabs.ts`.
|
|
24
|
-
*/
|
|
25
|
-
onChipDragEnd?(tabGroup: ITabGroup, chip: ITabGroupChipRenderer, event: DragEvent | PointerEvent): void;
|
|
26
|
-
onChipDrop(tabGroup: ITabGroup, event: DroptargetEvent): void;
|
|
27
|
-
}
|
|
28
|
-
interface ChipRendererEntry {
|
|
29
|
-
chip: ITabGroupChipRenderer;
|
|
30
|
-
/**
|
|
31
|
-
* Created by the manager so it can be toggled live on strategy changes.
|
|
32
|
-
* Undefined between an in-flight drag being torn down by
|
|
33
|
-
* `disposeChipDrag` and the following `update()` re-arming it — the chip
|
|
34
|
-
* element outlives a within-group move even though its drag sources do
|
|
35
|
-
* not. (#1410)
|
|
36
|
-
*/
|
|
37
|
-
html5DragSource: IDragSource | undefined;
|
|
38
|
-
pointerDragSource: IDragSource | undefined;
|
|
39
|
-
/** Disposes the two drag sources + their shared dragend listener. */
|
|
40
|
-
dragSourcesDisposable: IDisposable | undefined;
|
|
41
|
-
disposable: IDisposable;
|
|
42
|
-
dropTarget: Droptarget;
|
|
43
|
-
}
|
|
44
|
-
export declare class TabGroupManager {
|
|
45
|
-
private readonly _ctx;
|
|
46
|
-
private readonly _callbacks;
|
|
47
|
-
private readonly _chipRenderers;
|
|
48
|
-
private _indicator;
|
|
49
|
-
private _skipNextCollapseAnimation;
|
|
50
|
-
private readonly _pendingTransitionCleanups;
|
|
51
|
-
get chipRenderers(): ReadonlyMap<string, ChipRendererEntry>;
|
|
52
|
-
get groupUnderlines(): ReadonlyMap<string, HTMLElement>;
|
|
53
|
-
get skipNextCollapseAnimation(): boolean;
|
|
54
|
-
set skipNextCollapseAnimation(value: boolean);
|
|
55
|
-
constructor(_ctx: TabGroupManagerContext, _callbacks: TabGroupManagerCallbacks);
|
|
56
|
-
/**
|
|
57
|
-
* Synchronize chip elements and CSS classes for all tab groups
|
|
58
|
-
* in the parent group model. Call after any tab group mutation.
|
|
59
|
-
*/
|
|
60
|
-
update(): void;
|
|
61
|
-
/**
|
|
62
|
-
* Re-read the active palette and re-apply colors to chips, tabs and
|
|
63
|
-
* the indicator. Called when `tabGroupColors` / `tabGroupAccent`
|
|
64
|
-
* options change at runtime.
|
|
65
|
-
*/
|
|
66
|
-
refreshAccents(): void;
|
|
67
|
-
positionAllChips(): void;
|
|
68
|
-
updateDirection(): void;
|
|
69
|
-
snapshotChipWidths(): Map<string, number>;
|
|
70
|
-
positionUnderlines(): void;
|
|
71
|
-
trackUnderlines(): void;
|
|
72
|
-
setGroupDragImage(event: DragEvent, tabGroup: ITabGroup, chipEl: HTMLElement): void;
|
|
73
|
-
cleanupTransition(panelId: string): void;
|
|
74
|
-
updateDragAndDropState(): void;
|
|
75
|
-
/**
|
|
76
|
-
* Synchronously dispose the chip drag sources for an in-flight chip
|
|
77
|
-
* drag. Called from `_commitGroupMove` so the transfer payload +
|
|
78
|
-
* iframe shield are released BEFORE the cross-group move detaches
|
|
79
|
-
* the chip (chip dispose is scheduled on a microtask via
|
|
80
|
-
* `_scheduleTabGroupUpdate`, which is too late for callers that read
|
|
81
|
-
* `getPanelData()` synchronously after the move).
|
|
82
|
-
*
|
|
83
|
-
* A cross-group move dissolves the source chip entirely, but a
|
|
84
|
-
* within-group reorder keeps the same chip element — so the sources are
|
|
85
|
-
* cleared to `undefined` here and the subsequent `update()` re-arms them
|
|
86
|
-
* via `_ensureChipForGroup`. Without that re-arm the chip would fire a
|
|
87
|
-
* native `dragstart` (the element keeps `draggable=true`) but never set
|
|
88
|
-
* a transfer payload, leaving the group permanently undraggable after
|
|
89
|
-
* its first move. (#1410)
|
|
90
|
-
*/
|
|
91
|
-
disposeChipDrag(tabGroupId: string): void;
|
|
92
|
-
/** Cloned chip rect used as the pointer follow-finger ghost. */
|
|
93
|
-
private _buildChipGhostElement;
|
|
94
|
-
disposeAll(): void;
|
|
95
|
-
private _ensureIndicator;
|
|
96
|
-
/**
|
|
97
|
-
* Create the HTML5 + pointer drag sources for a chip (and the direct
|
|
98
|
-
* dragend listener that clears the transfer synchronously). Extracted so
|
|
99
|
-
* both the initial chip build and the post-move re-arm in
|
|
100
|
-
* `_ensureChipForGroup` share one wiring path. (#1410)
|
|
101
|
-
*/
|
|
102
|
-
private _createChipDragSources;
|
|
103
|
-
private _ensureChipForGroup;
|
|
104
|
-
private _positionChipForGroup;
|
|
105
|
-
private _updateTabGroupClasses;
|
|
106
|
-
}
|
|
107
|
-
export {};
|