dockview-core 7.0.4 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENCE.md +21 -0
- package/README.md +17 -86
- package/dist/cjs/api/component.api.d.ts +100 -9
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +45 -1
- package/dist/cjs/api/dockviewPanelApi.d.ts +21 -0
- package/dist/cjs/dismissableLayer.d.ts +57 -0
- package/dist/cjs/dnd/backend.d.ts +2 -2
- package/dist/cjs/dnd/dataTransfer.d.ts +1 -0
- package/dist/cjs/dnd/dropTargetAnchorContainer.d.ts +12 -0
- package/dist/cjs/dnd/droptarget.d.ts +94 -0
- package/dist/cjs/dnd/ghost.d.ts +1 -0
- package/dist/cjs/dnd/pointer/longPress.d.ts +2 -2
- package/dist/cjs/dnd/pointer/pointerDragController.d.ts +5 -2
- package/dist/cjs/dnd/pointer/pointerDragSource.d.ts +1 -1
- package/dist/cjs/dnd/pointer/pointerDropTarget.d.ts +30 -1
- package/dist/cjs/dnd/pointer/pointerGhost.d.ts +1 -1
- package/dist/cjs/dockview/accessibilityMessages.d.ts +6 -0
- package/dist/cjs/dockview/advancedDnDService.d.ts +31 -0
- package/dist/cjs/dockview/components/panel/content.d.ts +1 -1
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +2 -0
- package/dist/cjs/dockview/components/tab/tab.d.ts +2 -0
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +2 -2
- package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupChip.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.d.ts +73 -2
- package/dist/cjs/dockview/components/titlebar/tabGroups.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabReorderController.d.ts +295 -0
- package/dist/cjs/dockview/components/titlebar/tabs.d.ts +120 -50
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +48 -0
- package/dist/cjs/dockview/dndCapabilities.d.ts +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +307 -19
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +5 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +76 -2
- package/dist/cjs/dockview/dockviewPanel.d.ts +12 -0
- package/dist/cjs/dockview/dockviewShell.d.ts +48 -24
- package/dist/cjs/dockview/edgeGroupService.d.ts +20 -0
- package/dist/cjs/dockview/events.d.ts +6 -0
- package/dist/cjs/dockview/liveRegionService.d.ts +18 -5
- package/dist/cjs/dockview/moduleContracts.d.ts +485 -14
- package/dist/cjs/dockview/modules.d.ts +101 -22
- package/dist/cjs/dockview/options.d.ts +336 -30
- package/dist/cjs/dockview/optionsModules.d.ts +73 -0
- package/dist/cjs/dockview/popoutWindowService.d.ts +15 -10
- package/dist/cjs/dockview/rootDropTargetService.d.ts +11 -0
- package/dist/cjs/dockview/tabGroup.d.ts +3 -0
- package/dist/cjs/dockview/tabGroupAccent.d.ts +1 -1
- package/dist/cjs/dockview/tabGroupChipsService.d.ts +10 -0
- package/dist/cjs/dockview/theme.d.ts +2 -2
- package/dist/cjs/dockview/types.d.ts +3 -0
- package/dist/cjs/dom.d.ts +9 -1
- package/dist/cjs/events.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +2 -2
- package/dist/cjs/gridview/branchNode.d.ts +16 -0
- package/dist/cjs/gridview/gridview.d.ts +2 -0
- package/dist/cjs/index.d.ts +35 -29
- package/dist/cjs/lifecycle.d.ts +1 -0
- package/dist/cjs/overlay/overlay.d.ts +4 -2
- package/dist/cjs/overlay/overlayRenderContainer.d.ts +8 -0
- package/dist/cjs/paneview/paneview.d.ts +2 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +3 -0
- package/dist/cjs/paneview/paneviewPanel.d.ts +5 -0
- package/dist/cjs/scrollbar.d.ts +10 -0
- package/dist/cjs/splitview/viewItem.d.ts +10 -0
- package/dist/cjs/svg.d.ts +1 -0
- package/dist/cjs/types.d.ts +8 -0
- package/dist/dockview-core.js +18513 -19679
- package/dist/dockview-core.min.js +4138 -6
- package/dist/dockview-core.min.noStyle.js +6 -7
- package/dist/dockview-core.noStyle.js +18512 -19656
- package/dist/package/main.cjs.js +18123 -19267
- package/dist/package/main.cjs.min.js +6 -6
- package/dist/package/main.esm.min.mjs +6 -6
- package/dist/package/main.esm.mjs +18081 -19260
- package/package.json +81 -77
- package/dist/cjs/api/component.api.js +0 -1242
- package/dist/cjs/api/dockviewGroupPanelApi.js +0 -200
- package/dist/cjs/api/dockviewPanelApi.js +0 -172
- package/dist/cjs/api/entryPoints.js +0 -27
- package/dist/cjs/api/gridviewPanelApi.js +0 -45
- package/dist/cjs/api/panelApi.js +0 -133
- package/dist/cjs/api/paneviewPanelApi.js +0 -57
- package/dist/cjs/api/splitviewPanelApi.js +0 -47
- package/dist/cjs/array.js +0 -66
- package/dist/cjs/constants.js +0 -11
- package/dist/cjs/dnd/backend.js +0 -171
- package/dist/cjs/dnd/dataTransfer.js +0 -100
- package/dist/cjs/dnd/dnd.js +0 -74
- package/dist/cjs/dnd/dropOverlay.js +0 -197
- package/dist/cjs/dnd/dropTargetAnchorContainer.js +0 -104
- package/dist/cjs/dnd/droptarget.js +0 -362
- package/dist/cjs/dnd/ghost.js +0 -17
- package/dist/cjs/dnd/pointer/index.js +0 -13
- package/dist/cjs/dnd/pointer/longPress.js +0 -151
- package/dist/cjs/dnd/pointer/pointerDragController.js +0 -243
- package/dist/cjs/dnd/pointer/pointerDragSource.js +0 -197
- package/dist/cjs/dnd/pointer/pointerDropTarget.js +0 -198
- package/dist/cjs/dnd/pointer/pointerGhost.js +0 -44
- package/dist/cjs/dnd/pointer/types.js +0 -2
- package/dist/cjs/dockview/accessibilityMessages.js +0 -51
- package/dist/cjs/dockview/allModules.js +0 -25
- package/dist/cjs/dockview/components/panel/content.js +0 -213
- package/dist/cjs/dockview/components/popupService.js +0 -132
- package/dist/cjs/dockview/components/tab/defaultTab.js +0 -70
- package/dist/cjs/dockview/components/tab/tab.js +0 -281
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.js +0 -95
- package/dist/cjs/dockview/components/titlebar/groupDragSource.js +0 -218
- package/dist/cjs/dockview/components/titlebar/tabGroupChip.js +0 -104
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +0 -477
- package/dist/cjs/dockview/components/titlebar/tabGroups.js +0 -854
- package/dist/cjs/dockview/components/titlebar/tabOverflowControl.js +0 -19
- package/dist/cjs/dockview/components/titlebar/tabs.js +0 -2016
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +0 -458
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +0 -120
- package/dist/cjs/dockview/components/watermark/watermark.js +0 -40
- package/dist/cjs/dockview/deserializer.js +0 -39
- package/dist/cjs/dockview/dndCapabilities.js +0 -39
- package/dist/cjs/dockview/dockviewComponent.js +0 -3896
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +0 -70
- package/dist/cjs/dockview/dockviewGroupPanel.js +0 -204
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +0 -1514
- package/dist/cjs/dockview/dockviewPanel.js +0 -265
- package/dist/cjs/dockview/dockviewPanelModel.js +0 -105
- package/dist/cjs/dockview/dockviewShell.js +0 -744
- package/dist/cjs/dockview/edgeGroupService.js +0 -128
- package/dist/cjs/dockview/events.js +0 -67
- package/dist/cjs/dockview/floatingGroupService.js +0 -231
- package/dist/cjs/dockview/framework.js +0 -2
- package/dist/cjs/dockview/headerActionsService.js +0 -149
- package/dist/cjs/dockview/liveRegionService.js +0 -185
- package/dist/cjs/dockview/moduleContracts.js +0 -2
- package/dist/cjs/dockview/modules.js +0 -304
- package/dist/cjs/dockview/options.js +0 -103
- package/dist/cjs/dockview/popoutWindowService.js +0 -261
- package/dist/cjs/dockview/rootDropTargetService.js +0 -87
- package/dist/cjs/dockview/strictEventsSequencing.js +0 -63
- package/dist/cjs/dockview/tabGroup.js +0 -219
- package/dist/cjs/dockview/tabGroupAccent.js +0 -126
- package/dist/cjs/dockview/theme.js +0 -139
- package/dist/cjs/dockview/types.js +0 -2
- package/dist/cjs/dockview/validate.js +0 -76
- package/dist/cjs/dockview/watermarkService.js +0 -61
- package/dist/cjs/dom.js +0 -543
- package/dist/cjs/events.js +0 -296
- package/dist/cjs/framwork.js +0 -2
- package/dist/cjs/gridview/baseComponentGridview.js +0 -330
- package/dist/cjs/gridview/basePanelView.js +0 -162
- package/dist/cjs/gridview/branchNode.js +0 -372
- package/dist/cjs/gridview/gridview.js +0 -776
- package/dist/cjs/gridview/gridviewComponent.js +0 -363
- package/dist/cjs/gridview/gridviewPanel.js +0 -249
- package/dist/cjs/gridview/leafNode.js +0 -169
- package/dist/cjs/gridview/options.js +0 -17
- package/dist/cjs/gridview/types.js +0 -2
- package/dist/cjs/index.js +0 -105
- package/dist/cjs/lifecycle.js +0 -80
- package/dist/cjs/math.js +0 -38
- package/dist/cjs/overlay/overlay.js +0 -602
- package/dist/cjs/overlay/overlayRenderContainer.js +0 -309
- package/dist/cjs/panel/types.js +0 -2
- package/dist/cjs/paneview/defaultPaneviewHeader.js +0 -92
- package/dist/cjs/paneview/draggablePaneviewPanel.js +0 -141
- package/dist/cjs/paneview/options.js +0 -44
- package/dist/cjs/paneview/paneview.js +0 -203
- package/dist/cjs/paneview/paneviewComponent.js +0 -430
- package/dist/cjs/paneview/paneviewPanel.js +0 -275
- package/dist/cjs/popoutWindow.js +0 -244
- package/dist/cjs/resizable.js +0 -97
- package/dist/cjs/scrollbar.js +0 -169
- package/dist/cjs/splitview/options.js +0 -19
- package/dist/cjs/splitview/splitview.js +0 -999
- package/dist/cjs/splitview/splitviewComponent.js +0 -401
- package/dist/cjs/splitview/splitviewPanel.js +0 -179
- package/dist/cjs/splitview/viewItem.js +0 -119
- package/dist/cjs/svg.js +0 -43
- package/dist/cjs/types.js +0 -2
- package/dist/dockview-core.min.js.map +0 -1
- package/dist/dockview-core.min.noStyle.js.map +0 -1
- package/dist/esm/api/component.api.d.ts +0 -640
- package/dist/esm/api/component.api.js +0 -887
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +0 -109
- package/dist/esm/api/dockviewGroupPanelApi.js +0 -155
- package/dist/esm/api/dockviewPanelApi.d.ts +0 -84
- package/dist/esm/api/dockviewPanelApi.js +0 -124
- package/dist/esm/api/entryPoints.d.ts +0 -9
- package/dist/esm/api/entryPoints.js +0 -21
- package/dist/esm/api/gridviewPanelApi.d.ts +0 -37
- package/dist/esm/api/gridviewPanelApi.js +0 -23
- package/dist/esm/api/panelApi.d.ts +0 -100
- package/dist/esm/api/panelApi.js +0 -87
- package/dist/esm/api/paneviewPanelApi.d.ts +0 -26
- package/dist/esm/api/paneviewPanelApi.js +0 -27
- package/dist/esm/api/splitviewPanelApi.d.ts +0 -32
- package/dist/esm/api/splitviewPanelApi.js +0 -25
- package/dist/esm/array.d.ts +0 -13
- package/dist/esm/array.js +0 -57
- package/dist/esm/constants.d.ts +0 -8
- package/dist/esm/constants.js +0 -8
- package/dist/esm/dnd/backend.d.ts +0 -70
- package/dist/esm/dnd/backend.js +0 -148
- package/dist/esm/dnd/dataTransfer.d.ts +0 -31
- package/dist/esm/dnd/dataTransfer.js +0 -67
- package/dist/esm/dnd/dnd.d.ts +0 -32
- package/dist/esm/dnd/dnd.js +0 -51
- package/dist/esm/dnd/dropOverlay.d.ts +0 -20
- package/dist/esm/dnd/dropOverlay.js +0 -192
- package/dist/esm/dnd/dropTargetAnchorContainer.d.ts +0 -16
- package/dist/esm/dnd/dropTargetAnchorContainer.js +0 -73
- package/dist/esm/dnd/droptarget.d.ts +0 -116
- package/dist/esm/dnd/droptarget.js +0 -316
- package/dist/esm/dnd/ghost.d.ts +0 -4
- package/dist/esm/dnd/ghost.js +0 -14
- package/dist/esm/dnd/pointer/index.d.ts +0 -11
- package/dist/esm/dnd/pointer/index.js +0 -5
- package/dist/esm/dnd/pointer/longPress.d.ts +0 -32
- package/dist/esm/dnd/pointer/longPress.js +0 -127
- package/dist/esm/dnd/pointer/pointerDragController.d.ts +0 -60
- package/dist/esm/dnd/pointer/pointerDragController.js +0 -193
- package/dist/esm/dnd/pointer/pointerDragSource.d.ts +0 -61
- package/dist/esm/dnd/pointer/pointerDragSource.js +0 -173
- package/dist/esm/dnd/pointer/pointerDropTarget.d.ts +0 -39
- package/dist/esm/dnd/pointer/pointerDropTarget.js +0 -168
- package/dist/esm/dnd/pointer/pointerGhost.d.ts +0 -30
- package/dist/esm/dnd/pointer/pointerGhost.js +0 -39
- package/dist/esm/dnd/pointer/types.d.ts +0 -16
- package/dist/esm/dnd/pointer/types.js +0 -1
- package/dist/esm/dockview/accessibilityMessages.d.ts +0 -32
- package/dist/esm/dockview/accessibilityMessages.js +0 -30
- package/dist/esm/dockview/allModules.d.ts +0 -8
- package/dist/esm/dockview/allModules.js +0 -22
- package/dist/esm/dockview/components/panel/content.d.ts +0 -54
- package/dist/esm/dockview/components/panel/content.js +0 -185
- package/dist/esm/dockview/components/popupService.d.ts +0 -21
- package/dist/esm/dockview/components/popupService.js +0 -108
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -12
- package/dist/esm/dockview/components/tab/defaultTab.js +0 -43
- package/dist/esm/dockview/components/tab/tab.d.ts +0 -44
- package/dist/esm/dockview/components/tab/tab.js +0 -242
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +0 -34
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.js +0 -65
- package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +0 -51
- package/dist/esm/dockview/components/titlebar/groupDragSource.js +0 -178
- package/dist/esm/dockview/components/titlebar/tabGroupChip.d.ts +0 -37
- package/dist/esm/dockview/components/titlebar/tabGroupChip.js +0 -77
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.d.ts +0 -72
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +0 -360
- package/dist/esm/dockview/components/titlebar/tabGroups.d.ts +0 -107
- package/dist/esm/dockview/components/titlebar/tabGroups.js +0 -621
- package/dist/esm/dockview/components/titlebar/tabOverflowControl.d.ts +0 -8
- package/dist/esm/dockview/components/titlebar/tabOverflowControl.js +0 -16
- package/dist/esm/dockview/components/titlebar/tabs.d.ts +0 -167
- package/dist/esm/dockview/components/titlebar/tabs.js +0 -1653
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +0 -104
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +0 -359
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +0 -21
- package/dist/esm/dockview/components/titlebar/voidContainer.js +0 -92
- package/dist/esm/dockview/components/watermark/watermark.d.ts +0 -8
- package/dist/esm/dockview/components/watermark/watermark.js +0 -14
- package/dist/esm/dockview/deserializer.d.ts +0 -12
- package/dist/esm/dockview/deserializer.js +0 -34
- package/dist/esm/dockview/dndCapabilities.d.ts +0 -19
- package/dist/esm/dockview/dndCapabilities.js +0 -36
- package/dist/esm/dockview/dockviewComponent.d.ts +0 -626
- package/dist/esm/dockview/dockviewComponent.js +0 -3214
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +0 -45
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +0 -44
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +0 -35
- package/dist/esm/dockview/dockviewGroupPanel.js +0 -142
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +0 -358
- package/dist/esm/dockview/dockviewGroupPanelModel.js +0 -1180
- package/dist/esm/dockview/dockviewPanel.d.ts +0 -69
- package/dist/esm/dockview/dockviewPanel.js +0 -178
- package/dist/esm/dockview/dockviewPanelModel.d.ts +0 -37
- package/dist/esm/dockview/dockviewPanelModel.js +0 -81
- package/dist/esm/dockview/dockviewShell.d.ts +0 -150
- package/dist/esm/dockview/dockviewShell.js +0 -678
- package/dist/esm/dockview/edgeGroupService.d.ts +0 -38
- package/dist/esm/dockview/edgeGroupService.js +0 -63
- package/dist/esm/dockview/events.d.ts +0 -38
- package/dist/esm/dockview/events.js +0 -34
- package/dist/esm/dockview/floatingGroupService.d.ts +0 -37
- package/dist/esm/dockview/floatingGroupService.js +0 -150
- package/dist/esm/dockview/framework.d.ts +0 -65
- package/dist/esm/dockview/framework.js +0 -1
- package/dist/esm/dockview/headerActionsService.d.ts +0 -32
- package/dist/esm/dockview/headerActionsService.js +0 -86
- package/dist/esm/dockview/liveRegionService.d.ts +0 -53
- package/dist/esm/dockview/liveRegionService.js +0 -159
- package/dist/esm/dockview/moduleContracts.d.ts +0 -119
- package/dist/esm/dockview/moduleContracts.js +0 -1
- package/dist/esm/dockview/modules.d.ts +0 -110
- package/dist/esm/dockview/modules.js +0 -170
- package/dist/esm/dockview/options.d.ts +0 -474
- package/dist/esm/dockview/options.js +0 -77
- package/dist/esm/dockview/popoutWindowService.d.ts +0 -95
- package/dist/esm/dockview/popoutWindowService.js +0 -175
- package/dist/esm/dockview/rootDropTargetService.d.ts +0 -35
- package/dist/esm/dockview/rootDropTargetService.js +0 -82
- package/dist/esm/dockview/strictEventsSequencing.d.ts +0 -7
- package/dist/esm/dockview/strictEventsSequencing.js +0 -41
- package/dist/esm/dockview/tabGroup.d.ts +0 -99
- package/dist/esm/dockview/tabGroup.js +0 -144
- package/dist/esm/dockview/tabGroupAccent.d.ts +0 -65
- package/dist/esm/dockview/tabGroupAccent.js +0 -114
- package/dist/esm/dockview/theme.d.ts +0 -86
- package/dist/esm/dockview/theme.js +0 -136
- package/dist/esm/dockview/types.d.ts +0 -53
- package/dist/esm/dockview/types.js +0 -1
- package/dist/esm/dockview/validate.d.ts +0 -0
- package/dist/esm/dockview/validate.js +0 -76
- package/dist/esm/dockview/watermarkService.d.ts +0 -30
- package/dist/esm/dockview/watermarkService.js +0 -56
- package/dist/esm/dom.d.ts +0 -60
- package/dist/esm/dom.js +0 -375
- package/dist/esm/events.d.ts +0 -79
- package/dist/esm/events.js +0 -219
- package/dist/esm/framwork.d.ts +0 -4
- package/dist/esm/framwork.js +0 -1
- package/dist/esm/gridview/baseComponentGridview.d.ts +0 -111
- package/dist/esm/gridview/baseComponentGridview.js +0 -237
- package/dist/esm/gridview/basePanelView.d.ts +0 -40
- package/dist/esm/gridview/basePanelView.js +0 -91
- package/dist/esm/gridview/branchNode.d.ts +0 -57
- package/dist/esm/gridview/branchNode.js +0 -257
- package/dist/esm/gridview/gridview.d.ts +0 -158
- package/dist/esm/gridview/gridview.js +0 -681
- package/dist/esm/gridview/gridviewComponent.d.ts +0 -88
- package/dist/esm/gridview/gridviewComponent.js +0 -265
- package/dist/esm/gridview/gridviewPanel.d.ts +0 -77
- package/dist/esm/gridview/gridviewPanel.js +0 -182
- package/dist/esm/gridview/leafNode.d.ts +0 -34
- package/dist/esm/gridview/leafNode.js +0 -102
- package/dist/esm/gridview/options.d.ts +0 -15
- package/dist/esm/gridview/options.js +0 -14
- package/dist/esm/gridview/types.d.ts +0 -3
- package/dist/esm/gridview/types.js +0 -1
- package/dist/esm/index.d.ts +0 -58
- package/dist/esm/index.js +0 -44
- package/dist/esm/lifecycle.d.ts +0 -25
- package/dist/esm/lifecycle.js +0 -56
- package/dist/esm/math.d.ts +0 -5
- package/dist/esm/math.js +0 -32
- package/dist/esm/overlay/overlay.d.ts +0 -91
- package/dist/esm/overlay/overlay.js +0 -520
- package/dist/esm/overlay/overlayRenderContainer.d.ts +0 -24
- package/dist/esm/overlay/overlayRenderContainer.js +0 -249
- package/dist/esm/panel/types.d.ts +0 -33
- package/dist/esm/panel/types.js +0 -1
- package/dist/esm/paneview/defaultPaneviewHeader.d.ts +0 -21
- package/dist/esm/paneview/defaultPaneviewHeader.js +0 -65
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +0 -38
- package/dist/esm/paneview/draggablePaneviewPanel.js +0 -107
- package/dist/esm/paneview/options.d.ts +0 -30
- package/dist/esm/paneview/options.js +0 -22
- package/dist/esm/paneview/paneview.d.ts +0 -41
- package/dist/esm/paneview/paneview.js +0 -148
- package/dist/esm/paneview/paneviewComponent.d.ts +0 -133
- package/dist/esm/paneview/paneviewComponent.js +0 -306
- package/dist/esm/paneview/paneviewPanel.d.ts +0 -98
- package/dist/esm/paneview/paneviewPanel.js +0 -192
- package/dist/esm/popoutWindow.d.ts +0 -38
- package/dist/esm/popoutWindow.js +0 -170
- package/dist/esm/resizable.d.ts +0 -12
- package/dist/esm/resizable.js +0 -66
- package/dist/esm/scrollbar.d.ts +0 -15
- package/dist/esm/scrollbar.js +0 -139
- package/dist/esm/splitview/options.d.ts +0 -21
- package/dist/esm/splitview/options.js +0 -16
- package/dist/esm/splitview/splitview.d.ts +0 -145
- package/dist/esm/splitview/splitview.js +0 -770
- package/dist/esm/splitview/splitviewComponent.d.ts +0 -101
- package/dist/esm/splitview/splitviewComponent.js +0 -267
- package/dist/esm/splitview/splitviewPanel.d.ts +0 -45
- package/dist/esm/splitview/splitviewPanel.js +0 -108
- package/dist/esm/splitview/viewItem.d.ts +0 -25
- package/dist/esm/splitview/viewItem.js +0 -74
- package/dist/esm/svg.d.ts +0 -3
- package/dist/esm/svg.js +0 -31
- package/dist/esm/types.d.ts +0 -31
- package/dist/esm/types.js +0 -1
- package/dist/styles/dockview.css +0 -3436
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Tab = void 0;
|
|
30
|
-
var events_1 = require("../../../events");
|
|
31
|
-
var lifecycle_1 = require("../../../lifecycle");
|
|
32
|
-
var dataTransfer_1 = require("../../../dnd/dataTransfer");
|
|
33
|
-
var dom_1 = require("../../../dom");
|
|
34
|
-
var backend_1 = require("../../../dnd/backend");
|
|
35
|
-
var longPress_1 = require("../../../dnd/pointer/longPress");
|
|
36
|
-
var dndCapabilities_1 = require("../../dndCapabilities");
|
|
37
|
-
var _tabId = 0;
|
|
38
|
-
/** Stable DOM id referenced by the tabpanel's `aria-labelledby`. */
|
|
39
|
-
var nextTabId = function () { return "dv-tab-".concat(_tabId++); };
|
|
40
|
-
var Tab = /** @class */ (function (_super) {
|
|
41
|
-
__extends(Tab, _super);
|
|
42
|
-
function Tab(panel, accessor, group) {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
var _this = _super.call(this) || this;
|
|
45
|
-
_this.panel = panel;
|
|
46
|
-
_this.accessor = accessor;
|
|
47
|
-
_this.group = group;
|
|
48
|
-
_this.content = undefined;
|
|
49
|
-
_this.panelTransfer = dataTransfer_1.LocalSelectionTransfer.getInstance();
|
|
50
|
-
_this._direction = 'horizontal';
|
|
51
|
-
_this._onPointDown = new events_1.Emitter();
|
|
52
|
-
_this.onPointerDown = _this._onPointDown.event;
|
|
53
|
-
_this._onTabClick = new events_1.Emitter();
|
|
54
|
-
_this.onTabClick = _this._onTabClick.event;
|
|
55
|
-
_this._onDropped = new events_1.Emitter();
|
|
56
|
-
_this.onDrop = _this._onDropped.event;
|
|
57
|
-
_this._onDragStart = new events_1.Emitter();
|
|
58
|
-
_this.onDragStart = _this._onDragStart.event;
|
|
59
|
-
_this._onDragEnd = new events_1.Emitter();
|
|
60
|
-
_this.onDragEnd = _this._onDragEnd.event;
|
|
61
|
-
var caps = (0, dndCapabilities_1.resolveDndCapabilities)(_this.accessor.options);
|
|
62
|
-
_this._element = document.createElement('div');
|
|
63
|
-
_this._element.className = 'dv-tab';
|
|
64
|
-
// Roving tabindex (WAI-ARIA Tabs pattern): only the active tab is in
|
|
65
|
-
// the tab order; `setActive` flips this. Inactive tabs are reachable
|
|
66
|
-
// via arrow keys, handled by the tab strip.
|
|
67
|
-
_this._element.tabIndex = -1;
|
|
68
|
-
_this._element.draggable = caps.html5;
|
|
69
|
-
// WAI-ARIA Tabs pattern. `aria-controls` points at the group's single
|
|
70
|
-
// tabpanel (the content container); `aria-selected` tracks activation.
|
|
71
|
-
_this._element.id = nextTabId();
|
|
72
|
-
_this._element.setAttribute('role', 'tab');
|
|
73
|
-
_this._element.setAttribute('aria-selected', 'false');
|
|
74
|
-
var contentContainerId = (_b = (_a = _this.group) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.contentContainerId;
|
|
75
|
-
if (contentContainerId) {
|
|
76
|
-
_this._element.setAttribute('aria-controls', contentContainerId);
|
|
77
|
-
}
|
|
78
|
-
(0, dom_1.toggleClass)(_this.element, 'dv-inactive-tab', true);
|
|
79
|
-
var canDisplayOverlay = function (event, position) {
|
|
80
|
-
var _a;
|
|
81
|
-
if (_this.group.locked) {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
var data = (0, dataTransfer_1.getPanelData)();
|
|
85
|
-
if (_this.accessor.id === (data === null || data === void 0 ? void 0 : data.viewId)) {
|
|
86
|
-
// Smooth-reorder takes over the in-flight visual when active,
|
|
87
|
-
// so individual tab overlays are suppressed for internal drags.
|
|
88
|
-
if (((_a = _this.accessor.options.theme) === null || _a === void 0 ? void 0 : _a.tabAnimation) === 'smooth') {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
return _this.group.model.canDisplayOverlay(event, position, 'tab');
|
|
94
|
-
};
|
|
95
|
-
_this.dropTarget = backend_1.html5Backend.createDropTarget(_this._element, {
|
|
96
|
-
acceptedTargetZones: ['left', 'right'],
|
|
97
|
-
overlayModel: _this._buildOverlayModel(),
|
|
98
|
-
canDisplayOverlay: canDisplayOverlay,
|
|
99
|
-
getOverrideTarget: function () { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
100
|
-
});
|
|
101
|
-
_this.pointerDropTarget = backend_1.pointerBackend.createDropTarget(_this._element, {
|
|
102
|
-
acceptedTargetZones: ['left', 'right'],
|
|
103
|
-
overlayModel: _this._buildOverlayModel(),
|
|
104
|
-
canDisplayOverlay: canDisplayOverlay,
|
|
105
|
-
getOverrideTarget: function () { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
106
|
-
});
|
|
107
|
-
var sharedDragOptions = {
|
|
108
|
-
getData: function () {
|
|
109
|
-
_this.panelTransfer.setData([
|
|
110
|
-
new dataTransfer_1.PanelTransfer(_this.accessor.id, _this.group.id, _this.panel.id),
|
|
111
|
-
], dataTransfer_1.PanelTransfer.prototype);
|
|
112
|
-
return {
|
|
113
|
-
dispose: function () {
|
|
114
|
-
_this.panelTransfer.clearData(dataTransfer_1.PanelTransfer.prototype);
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
},
|
|
118
|
-
// 30/-10 matches the HTML5 setDragImage offset that has been
|
|
119
|
-
// shipped for years; pointer backend wraps in PointerGhost,
|
|
120
|
-
// HTML5 backend feeds into setDragImage.
|
|
121
|
-
createGhost: function () { return ({
|
|
122
|
-
element: _this._buildGhostElement(),
|
|
123
|
-
offsetX: 30,
|
|
124
|
-
offsetY: -10,
|
|
125
|
-
}); },
|
|
126
|
-
onDragStart: function (event) {
|
|
127
|
-
var _a;
|
|
128
|
-
_this._onDragStart.fire(event);
|
|
129
|
-
if (!(event instanceof PointerEvent) &&
|
|
130
|
-
((_a = _this.accessor.options.theme) === null || _a === void 0 ? void 0 : _a.tabAnimation) === 'smooth') {
|
|
131
|
-
// Delay collapse to next frame so the browser
|
|
132
|
-
// captures the full drag image first.
|
|
133
|
-
requestAnimationFrame(function () {
|
|
134
|
-
(0, dom_1.toggleClass)(_this.element, 'dv-tab--dragging', true);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
onDragEnd: function (event) {
|
|
139
|
-
_this._onDragEnd.fire(event);
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
_this.html5DragSource = backend_1.html5Backend.createDragSource(_this._element, __assign(__assign({}, sharedDragOptions), { disabled: !caps.html5 }));
|
|
143
|
-
_this.pointerDragSource = backend_1.pointerBackend.createDragSource(_this._element, __assign(__assign({}, sharedDragOptions), { disabled: !caps.pointer, touchOnly: !caps.pointerHandlesMouse, isCancelled: function () {
|
|
144
|
-
return !(0, dndCapabilities_1.resolveDndCapabilities)(_this.accessor.options).pointer;
|
|
145
|
-
} }));
|
|
146
|
-
// Both droptargets feed the same downstream stream; consumers don't
|
|
147
|
-
// need to know which path produced the overlay.
|
|
148
|
-
_this.onWillShowOverlay = events_1.Event.any(_this.dropTarget.onWillShowOverlay, _this.pointerDropTarget.onWillShowOverlay);
|
|
149
|
-
_this.addDisposables(_this._onPointDown, _this._onTabClick, _this._onDropped, _this._onDragStart, _this._onDragEnd, _this.accessor.onDidOptionsChange(function () {
|
|
150
|
-
var model = _this._buildOverlayModel();
|
|
151
|
-
_this.dropTarget.setOverlayModel(model);
|
|
152
|
-
_this.pointerDropTarget.setOverlayModel(model);
|
|
153
|
-
}), (0, events_1.addDisposableListener)(_this._element, 'dragend', function () {
|
|
154
|
-
// The shared onDragEnd handler already fires _onDragEnd via
|
|
155
|
-
// the HTML5 backend; just strip the dragging class here.
|
|
156
|
-
(0, dom_1.toggleClass)(_this.element, 'dv-tab--dragging', false);
|
|
157
|
-
}), _this.html5DragSource, (0, events_1.addDisposableListener)(_this._element, 'pointerdown', function (event) {
|
|
158
|
-
_this._onPointDown.fire(event);
|
|
159
|
-
}), (0, events_1.addDisposableListener)(_this._element, 'click', function (event) {
|
|
160
|
-
_this._onTabClick.fire(event);
|
|
161
|
-
}), (0, events_1.addDisposableListener)(_this._element, 'contextmenu', function (event) {
|
|
162
|
-
var _a;
|
|
163
|
-
(_a = _this.accessor.contextMenuService) === null || _a === void 0 ? void 0 : _a.show(_this.panel, _this.group, event);
|
|
164
|
-
}), new longPress_1.LongPressDetector(_this._element, {
|
|
165
|
-
onLongPress: function (event) {
|
|
166
|
-
var _a;
|
|
167
|
-
// Don't let a subsequent finger move arm a drag on top
|
|
168
|
-
// of the just-opened menu.
|
|
169
|
-
_this.pointerDragSource.cancelPending();
|
|
170
|
-
(_a = _this.accessor.contextMenuService) === null || _a === void 0 ? void 0 : _a.show(_this.panel, _this.group, event);
|
|
171
|
-
},
|
|
172
|
-
}), _this.dropTarget.onDrop(function (event) {
|
|
173
|
-
_this._onDropped.fire(event);
|
|
174
|
-
}), _this.pointerDropTarget.onDrop(function (event) {
|
|
175
|
-
_this._onDropped.fire(event);
|
|
176
|
-
}), _this.dropTarget, _this.pointerDropTarget, _this.pointerDragSource);
|
|
177
|
-
return _this;
|
|
178
|
-
}
|
|
179
|
-
Object.defineProperty(Tab.prototype, "element", {
|
|
180
|
-
get: function () {
|
|
181
|
-
return this._element;
|
|
182
|
-
},
|
|
183
|
-
enumerable: false,
|
|
184
|
-
configurable: true
|
|
185
|
-
});
|
|
186
|
-
Tab.prototype.setActive = function (isActive) {
|
|
187
|
-
(0, dom_1.toggleClass)(this.element, 'dv-active-tab', isActive);
|
|
188
|
-
(0, dom_1.toggleClass)(this.element, 'dv-inactive-tab', !isActive);
|
|
189
|
-
this._element.setAttribute('aria-selected', isActive ? 'true' : 'false');
|
|
190
|
-
// Roving tabindex anchors to the active tab; arrow-key navigation in
|
|
191
|
-
// the tab strip moves the rover from there.
|
|
192
|
-
this._element.tabIndex = isActive ? 0 : -1;
|
|
193
|
-
};
|
|
194
|
-
Tab.prototype.setContent = function (part) {
|
|
195
|
-
if (this.content) {
|
|
196
|
-
this.content.element.remove();
|
|
197
|
-
}
|
|
198
|
-
this.content = part;
|
|
199
|
-
this._element.appendChild(this.content.element);
|
|
200
|
-
};
|
|
201
|
-
Tab.prototype._buildOverlayModel = function () {
|
|
202
|
-
var _a, _b, _c;
|
|
203
|
-
// An app-supplied model (the dropOverlayModel option) takes precedence
|
|
204
|
-
// over the theme-derived default for this tab.
|
|
205
|
-
var custom = (_b = (_a = this.accessor).resolveDropOverlayModel) === null || _b === void 0 ? void 0 : _b.call(_a, 'tab', this.group);
|
|
206
|
-
if (custom) {
|
|
207
|
-
return custom;
|
|
208
|
-
}
|
|
209
|
-
// 'line' themes render a 4px insertion strip at the tab edge via the
|
|
210
|
-
// anchor container's small-boundary path. 'fill' themes render a
|
|
211
|
-
// half-width highlighted area, so we disable the small-boundary path
|
|
212
|
-
// entirely (boundary = 0 ⟹ isSmall always false).
|
|
213
|
-
var smallBoundary = ((_c = this.accessor.options.theme) === null || _c === void 0 ? void 0 : _c.dndTabIndicator) === 'line'
|
|
214
|
-
? Number.POSITIVE_INFINITY
|
|
215
|
-
: 0;
|
|
216
|
-
return {
|
|
217
|
-
activationSize: { value: 50, type: 'percentage' },
|
|
218
|
-
smallWidthBoundary: smallBoundary,
|
|
219
|
-
smallHeightBoundary: smallBoundary,
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
Tab.prototype.setDirection = function (direction) {
|
|
223
|
-
this._direction = direction;
|
|
224
|
-
var zones = direction === 'vertical' ? ['top', 'bottom'] : ['left', 'right'];
|
|
225
|
-
this.dropTarget.setTargetZones(zones);
|
|
226
|
-
this.pointerDropTarget.setTargetZones(zones);
|
|
227
|
-
};
|
|
228
|
-
Tab.prototype.updateDragAndDropState = function () {
|
|
229
|
-
var caps = (0, dndCapabilities_1.resolveDndCapabilities)(this.accessor.options);
|
|
230
|
-
this._element.draggable = caps.html5;
|
|
231
|
-
this.html5DragSource.setDisabled(!caps.html5);
|
|
232
|
-
this.pointerDragSource.setDisabled(!caps.pointer);
|
|
233
|
-
this.pointerDragSource.setTouchOnly(!caps.pointerHandlesMouse);
|
|
234
|
-
};
|
|
235
|
-
/**
|
|
236
|
-
* Vertical tabs are flipped to horizontal so the ghost stays readable
|
|
237
|
-
* during the drag rather than appearing sideways-rotated.
|
|
238
|
-
*/
|
|
239
|
-
Tab.prototype._buildGhostElement = function () {
|
|
240
|
-
var style = getComputedStyle(this.element);
|
|
241
|
-
var newNode = this.element.cloneNode(true);
|
|
242
|
-
var isVertical = this._direction === 'vertical';
|
|
243
|
-
var verticalSkip = new Set([
|
|
244
|
-
'writing-mode',
|
|
245
|
-
'inline-size',
|
|
246
|
-
'block-size',
|
|
247
|
-
'min-inline-size',
|
|
248
|
-
'min-block-size',
|
|
249
|
-
'max-inline-size',
|
|
250
|
-
'max-block-size',
|
|
251
|
-
'margin-inline',
|
|
252
|
-
'margin-inline-start',
|
|
253
|
-
'margin-inline-end',
|
|
254
|
-
'margin-block',
|
|
255
|
-
'margin-block-start',
|
|
256
|
-
'margin-block-end',
|
|
257
|
-
'padding-inline',
|
|
258
|
-
'padding-inline-start',
|
|
259
|
-
'padding-inline-end',
|
|
260
|
-
'padding-block',
|
|
261
|
-
'padding-block-start',
|
|
262
|
-
'padding-block-end',
|
|
263
|
-
]);
|
|
264
|
-
Array.from(style).forEach(function (key) {
|
|
265
|
-
if (isVertical && verticalSkip.has(key)) {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
newNode.style.setProperty(key, style.getPropertyValue(key), style.getPropertyPriority(key));
|
|
269
|
-
});
|
|
270
|
-
if (isVertical) {
|
|
271
|
-
newNode.style.setProperty('writing-mode', 'horizontal-tb');
|
|
272
|
-
newNode.style.setProperty('width', style.height);
|
|
273
|
-
newNode.style.setProperty('height', style.width);
|
|
274
|
-
}
|
|
275
|
-
newNode.style.position = 'absolute';
|
|
276
|
-
newNode.classList.add('dv-tab-ghost-drag');
|
|
277
|
-
return newNode;
|
|
278
|
-
};
|
|
279
|
-
return Tab;
|
|
280
|
-
}(lifecycle_1.CompositeDisposable));
|
|
281
|
-
exports.Tab = Tab;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.FloatingTitleBar = void 0;
|
|
19
|
-
var events_1 = require("../../../events");
|
|
20
|
-
var lifecycle_1 = require("../../../lifecycle");
|
|
21
|
-
var dom_1 = require("../../../dom");
|
|
22
|
-
var groupDragSource_1 = require("./groupDragSource");
|
|
23
|
-
/**
|
|
24
|
-
* A dedicated, blank drag handle rendered above a floating group's tab bar.
|
|
25
|
-
*
|
|
26
|
-
* It plays the same dual role the tab-bar void container plays today: a plain
|
|
27
|
-
* pointer-drag moves the floating window (wired by the overlay via
|
|
28
|
-
* `setupDrag`), while a shift+drag (mouse) or long-press (touch) detaches the
|
|
29
|
-
* group to redock it into the grid. The redock half is provided by the shared
|
|
30
|
-
* {@link GroupDragSource}; the move half is owned by the overlay.
|
|
31
|
-
*
|
|
32
|
-
* The bar is intentionally contentless — styling is driven entirely through
|
|
33
|
-
* the `--dv-floating-titlebar-*` theme variables.
|
|
34
|
-
*/
|
|
35
|
-
var FloatingTitleBar = /** @class */ (function (_super) {
|
|
36
|
-
__extends(FloatingTitleBar, _super);
|
|
37
|
-
function FloatingTitleBar(accessor, group) {
|
|
38
|
-
var _this = _super.call(this) || this;
|
|
39
|
-
_this.accessor = accessor;
|
|
40
|
-
_this._onDragStart = new events_1.Emitter();
|
|
41
|
-
_this.onDragStart = _this._onDragStart.event;
|
|
42
|
-
_this._group = group;
|
|
43
|
-
_this._element = document.createElement('div');
|
|
44
|
-
_this._element.className = 'dv-floating-titlebar';
|
|
45
|
-
_this.addDisposables(_this._onDragStart, (0, events_1.addDisposableListener)(_this._element, 'pointerdown', function () {
|
|
46
|
-
_this.accessor.doSetGroupActive(_this._group);
|
|
47
|
-
}),
|
|
48
|
-
// Shift+pointerdown marks the event so the overlay's
|
|
49
|
-
// move-the-float drag doesn't fire alongside the HTML5 redock
|
|
50
|
-
// drag. See VoidContainer for the same disambiguation.
|
|
51
|
-
(0, events_1.addDisposableListener)(_this._element, 'pointerdown', function (e) {
|
|
52
|
-
if (e.shiftKey) {
|
|
53
|
-
(0, dom_1.quasiPreventDefault)(e);
|
|
54
|
-
}
|
|
55
|
-
}, true));
|
|
56
|
-
_this.dragSource = new groupDragSource_1.GroupDragSource({
|
|
57
|
-
element: _this._element,
|
|
58
|
-
accessor: _this.accessor,
|
|
59
|
-
// resolve lazily so the drag source follows anchor reassignment
|
|
60
|
-
group: function () { return _this._group; },
|
|
61
|
-
});
|
|
62
|
-
_this.addDisposables(_this.dragSource, _this.dragSource.onDragStart(function (event) {
|
|
63
|
-
_this._onDragStart.fire(event);
|
|
64
|
-
}));
|
|
65
|
-
return _this;
|
|
66
|
-
}
|
|
67
|
-
Object.defineProperty(FloatingTitleBar.prototype, "element", {
|
|
68
|
-
get: function () {
|
|
69
|
-
return this._element;
|
|
70
|
-
},
|
|
71
|
-
enumerable: false,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(FloatingTitleBar.prototype, "group", {
|
|
75
|
-
/** The window's current anchor group — the one this bar drags/activates. */
|
|
76
|
-
get: function () {
|
|
77
|
-
return this._group;
|
|
78
|
-
},
|
|
79
|
-
enumerable: false,
|
|
80
|
-
configurable: true
|
|
81
|
-
});
|
|
82
|
-
/**
|
|
83
|
-
* Retarget the bar at a new anchor group. Called when the original anchor
|
|
84
|
-
* leaves a multi-group floating window and another member is promoted, so
|
|
85
|
-
* the bar keeps activating/redocking a group that actually lives here.
|
|
86
|
-
*/
|
|
87
|
-
FloatingTitleBar.prototype.setGroup = function (group) {
|
|
88
|
-
this._group = group;
|
|
89
|
-
};
|
|
90
|
-
FloatingTitleBar.prototype.updateDragAndDropState = function () {
|
|
91
|
-
this.dragSource.updateDragAndDropState();
|
|
92
|
-
};
|
|
93
|
-
return FloatingTitleBar;
|
|
94
|
-
}(lifecycle_1.CompositeDisposable));
|
|
95
|
-
exports.FloatingTitleBar = FloatingTitleBar;
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.FLOATING_REDOCK_INITIATION_DELAY_MS = exports.GroupDragSource = void 0;
|
|
30
|
-
var dataTransfer_1 = require("../../../dnd/dataTransfer");
|
|
31
|
-
var backend_1 = require("../../../dnd/backend");
|
|
32
|
-
var events_1 = require("../../../events");
|
|
33
|
-
var lifecycle_1 = require("../../../lifecycle");
|
|
34
|
-
var dom_1 = require("../../../dom");
|
|
35
|
-
var dndCapabilities_1 = require("../../dndCapabilities");
|
|
36
|
-
// Floating-group redock via touch: require a deliberate long press so the
|
|
37
|
-
// "move the float around" gesture doesn't double-trigger the redock ghost.
|
|
38
|
-
// Infinity pressTolerance disables the pre-arm flick override; any motion
|
|
39
|
-
// during the wait is treated as drag-the-float, not redock intent.
|
|
40
|
-
var FLOATING_REDOCK_INITIATION_DELAY_MS = 500;
|
|
41
|
-
exports.FLOATING_REDOCK_INITIATION_DELAY_MS = FLOATING_REDOCK_INITIATION_DELAY_MS;
|
|
42
|
-
/**
|
|
43
|
-
* The drag-source half of a group drag handle: html5 + pointer drag sources
|
|
44
|
-
* that publish a group-level `PanelTransfer`, the "Multiple Panels (N)" ghost,
|
|
45
|
-
* and the floating-group disambiguation that keeps the redock gesture from
|
|
46
|
-
* firing alongside the overlay's move-the-float gesture.
|
|
47
|
-
*
|
|
48
|
-
* Shared by the tab-bar void container and the dedicated floating title bar so
|
|
49
|
-
* both grab handles redock identically.
|
|
50
|
-
*/
|
|
51
|
-
var GroupDragSource = /** @class */ (function (_super) {
|
|
52
|
-
__extends(GroupDragSource, _super);
|
|
53
|
-
function GroupDragSource(options) {
|
|
54
|
-
var _a, _b, _c;
|
|
55
|
-
var _this = _super.call(this) || this;
|
|
56
|
-
_this.panelTransfer = dataTransfer_1.LocalSelectionTransfer.getInstance();
|
|
57
|
-
_this._onDragStart = new events_1.Emitter();
|
|
58
|
-
_this.onDragStart = _this._onDragStart.event;
|
|
59
|
-
_this._element = options.element;
|
|
60
|
-
_this.accessor = options.accessor;
|
|
61
|
-
var group = options.group;
|
|
62
|
-
_this.groupAccessor = typeof group === 'function' ? group : function () { return group; };
|
|
63
|
-
_this.isFloatingMoveHandle =
|
|
64
|
-
(_a = options.isFloatingMoveHandle) !== null && _a !== void 0 ? _a : (function () { return true; });
|
|
65
|
-
var caps = (0, dndCapabilities_1.resolveDndCapabilities)(_this.accessor.options);
|
|
66
|
-
_this._element.draggable = caps.html5;
|
|
67
|
-
(0, dom_1.toggleClass)(_this._element, 'dv-draggable', caps.html5 || caps.pointer);
|
|
68
|
-
_this.addDisposables(_this._onDragStart);
|
|
69
|
-
var buildMultiPanelsGhost = function () {
|
|
70
|
-
var ghostEl = document.createElement('div');
|
|
71
|
-
var style = globalThis.getComputedStyle(_this._element);
|
|
72
|
-
var bgColor = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-background-color');
|
|
73
|
-
var color = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-color');
|
|
74
|
-
ghostEl.style.backgroundColor = bgColor;
|
|
75
|
-
ghostEl.style.color = color;
|
|
76
|
-
ghostEl.style.padding = '2px 8px';
|
|
77
|
-
ghostEl.style.height = '24px';
|
|
78
|
-
ghostEl.style.fontSize = '11px';
|
|
79
|
-
ghostEl.style.lineHeight = '20px';
|
|
80
|
-
ghostEl.style.borderRadius = '12px';
|
|
81
|
-
ghostEl.style.whiteSpace = 'nowrap';
|
|
82
|
-
ghostEl.style.boxSizing = 'border-box';
|
|
83
|
-
// HTML5 setDragImage snapshots the element as appended to the
|
|
84
|
-
// document; a default block-level div would stretch to the
|
|
85
|
-
// body's width and render as a viewport-wide bar.
|
|
86
|
-
ghostEl.style.display = 'inline-block';
|
|
87
|
-
ghostEl.textContent = "Multiple Panels (".concat(_this.group.size, ")");
|
|
88
|
-
return ghostEl;
|
|
89
|
-
};
|
|
90
|
-
var buildGhostSpec = function () {
|
|
91
|
-
var _a, _b;
|
|
92
|
-
// The custom-ghost resolution (createGroupDragGhostComponent) is
|
|
93
|
-
// owned by the AdvancedDnD module; core keeps the default chip and
|
|
94
|
-
// falls back to it when no custom ghost is produced (incl. when
|
|
95
|
-
// the module is absent).
|
|
96
|
-
var customGhost = (_b = (_a = _this.accessor).buildGroupDragGhost) === null || _b === void 0 ? void 0 : _b.call(_a, _this.group);
|
|
97
|
-
if (customGhost) {
|
|
98
|
-
return customGhost;
|
|
99
|
-
}
|
|
100
|
-
return {
|
|
101
|
-
element: buildMultiPanelsGhost(),
|
|
102
|
-
offsetX: 30,
|
|
103
|
-
offsetY: -10,
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
var sharedDragOptions = {
|
|
107
|
-
getData: function () {
|
|
108
|
-
_this.panelTransfer.setData([new dataTransfer_1.PanelTransfer(_this.accessor.id, _this.group.id, null)], dataTransfer_1.PanelTransfer.prototype);
|
|
109
|
-
return {
|
|
110
|
-
dispose: function () {
|
|
111
|
-
_this.panelTransfer.clearData(dataTransfer_1.PanelTransfer.prototype);
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
},
|
|
115
|
-
createGhost: buildGhostSpec,
|
|
116
|
-
onDragStart: function (event) {
|
|
117
|
-
_this._onDragStart.fire(event);
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
_this.html5DragSource = backend_1.html5Backend.createDragSource(_this._element, __assign(__assign({}, sharedDragOptions), { disabled: !caps.html5, isCancelled: function (event) {
|
|
121
|
-
// HTML5: when this element is the floating window's move
|
|
122
|
-
// handle, redock needs shift+drag (otherwise click-and-drag
|
|
123
|
-
// conflicts with moving the float). A non-move-handle (e.g. the
|
|
124
|
-
// void container when a title bar moves the float) redocks with
|
|
125
|
-
// a plain drag, like a group in the main grid.
|
|
126
|
-
if (_this.group.api.location.type === 'floating' &&
|
|
127
|
-
_this.isFloatingMoveHandle() &&
|
|
128
|
-
!event.shiftKey) {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
if (_this.group.api.location.type === 'edge' &&
|
|
132
|
-
_this.group.size === 0) {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
return false;
|
|
136
|
-
} }));
|
|
137
|
-
// Only the move handle needs the touch disambiguation; other handles
|
|
138
|
-
// redock with the normal grid press behaviour.
|
|
139
|
-
var isFloating = function () {
|
|
140
|
-
var _a, _b, _c;
|
|
141
|
-
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' &&
|
|
142
|
-
_this.isFloatingMoveHandle();
|
|
143
|
-
};
|
|
144
|
-
_this.pointerDragSource = backend_1.pointerBackend.createDragSource(_this._element, __assign(__assign({}, sharedDragOptions), { disabled: !caps.pointer, touchOnly: !caps.pointerHandlesMouse,
|
|
145
|
-
// Floating groups share this element with the overlay's
|
|
146
|
-
// move-the-float drag. Without a longer hold + tolerance
|
|
147
|
-
// override, both gestures commit simultaneously and the
|
|
148
|
-
// user sees the float follow their finger *and* a ghost.
|
|
149
|
-
touchInitiationDelay: function () {
|
|
150
|
-
return isFloating() ? FLOATING_REDOCK_INITIATION_DELAY_MS : 250;
|
|
151
|
-
}, pressTolerance: function () { return (isFloating() ? Infinity : 8); }, isCancelled: function () {
|
|
152
|
-
if (!(0, dndCapabilities_1.resolveDndCapabilities)(_this.accessor.options).pointer) {
|
|
153
|
-
return true;
|
|
154
|
-
}
|
|
155
|
-
// Pointer: long-press IS the deliberate gesture, so
|
|
156
|
-
// floating groups don't need the shift gate.
|
|
157
|
-
if (_this.group.api.location.type === 'edge' &&
|
|
158
|
-
_this.group.size === 0) {
|
|
159
|
-
return true;
|
|
160
|
-
}
|
|
161
|
-
return false;
|
|
162
|
-
}, onDragStart: function (event) {
|
|
163
|
-
var _a;
|
|
164
|
-
// Redock just committed — abort any in-flight overlay
|
|
165
|
-
// move so the float stops following the finger while
|
|
166
|
-
// the ghost takes over.
|
|
167
|
-
(_a = _this.getFloatingOverlay()) === null || _a === void 0 ? void 0 : _a.cancelPendingDrag();
|
|
168
|
-
_this._onDragStart.fire(event);
|
|
169
|
-
} }));
|
|
170
|
-
// Mirror direction: once the overlay's move-the-float gesture has
|
|
171
|
-
// actually moved something, cancel the pending redock arm so the
|
|
172
|
-
// ghost doesn't appear mid-drag if the user holds past 500ms.
|
|
173
|
-
var overlayMoveSub = new lifecycle_1.MutableDisposable();
|
|
174
|
-
var refreshOverlayMoveSub = function () {
|
|
175
|
-
var overlay = _this.getFloatingOverlay();
|
|
176
|
-
overlayMoveSub.value = overlay
|
|
177
|
-
? overlay.onDidStartMoving(function () {
|
|
178
|
-
_this.pointerDragSource.cancelPending();
|
|
179
|
-
})
|
|
180
|
-
: lifecycle_1.Disposable.NONE;
|
|
181
|
-
};
|
|
182
|
-
refreshOverlayMoveSub();
|
|
183
|
-
_this.addDisposables(overlayMoveSub);
|
|
184
|
-
var locationChange = (_c = (_b = _this.group) === null || _b === void 0 ? void 0 : _b.api) === null || _c === void 0 ? void 0 : _c.onDidLocationChange;
|
|
185
|
-
if (locationChange) {
|
|
186
|
-
_this.addDisposables(locationChange(refreshOverlayMoveSub));
|
|
187
|
-
}
|
|
188
|
-
_this.addDisposables(_this.html5DragSource, _this.pointerDragSource);
|
|
189
|
-
return _this;
|
|
190
|
-
}
|
|
191
|
-
Object.defineProperty(GroupDragSource.prototype, "group", {
|
|
192
|
-
// Resolved lazily so a retargetable handle (the floating title bar) always
|
|
193
|
-
// drags the window's *current* anchor group, not the one captured here.
|
|
194
|
-
get: function () {
|
|
195
|
-
return this.groupAccessor();
|
|
196
|
-
},
|
|
197
|
-
enumerable: false,
|
|
198
|
-
configurable: true
|
|
199
|
-
});
|
|
200
|
-
GroupDragSource.prototype.updateDragAndDropState = function () {
|
|
201
|
-
var caps = (0, dndCapabilities_1.resolveDndCapabilities)(this.accessor.options);
|
|
202
|
-
this._element.draggable = caps.html5;
|
|
203
|
-
(0, dom_1.toggleClass)(this._element, 'dv-draggable', caps.html5 || caps.pointer);
|
|
204
|
-
this.html5DragSource.setDisabled(!caps.html5);
|
|
205
|
-
this.pointerDragSource.setDisabled(!caps.pointer);
|
|
206
|
-
this.pointerDragSource.setTouchOnly(!caps.pointerHandlesMouse);
|
|
207
|
-
};
|
|
208
|
-
GroupDragSource.prototype.getFloatingOverlay = function () {
|
|
209
|
-
var _this = this;
|
|
210
|
-
var _a, _b;
|
|
211
|
-
if (!this.group) {
|
|
212
|
-
return undefined;
|
|
213
|
-
}
|
|
214
|
-
return (_b = (_a = this.accessor.floatingGroups) === null || _a === void 0 ? void 0 : _a.find(function (fg) { return fg.group === _this.group; })) === null || _b === void 0 ? void 0 : _b.overlay;
|
|
215
|
-
};
|
|
216
|
-
return GroupDragSource;
|
|
217
|
-
}(lifecycle_1.CompositeDisposable));
|
|
218
|
-
exports.GroupDragSource = GroupDragSource;
|