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,602 +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
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
29
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
30
|
-
if (!m) return o;
|
|
31
|
-
var i = m.call(o), r, ar = [], e;
|
|
32
|
-
try {
|
|
33
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
34
|
-
}
|
|
35
|
-
catch (error) { e = { error: error }; }
|
|
36
|
-
finally {
|
|
37
|
-
try {
|
|
38
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
39
|
-
}
|
|
40
|
-
finally { if (e) throw e.error; }
|
|
41
|
-
}
|
|
42
|
-
return ar;
|
|
43
|
-
};
|
|
44
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
45
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
46
|
-
if (ar || !(i in from)) {
|
|
47
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
48
|
-
ar[i] = from[i];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
52
|
-
};
|
|
53
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
exports.Overlay = void 0;
|
|
55
|
-
var dom_1 = require("../dom");
|
|
56
|
-
var events_1 = require("../events");
|
|
57
|
-
var lifecycle_1 = require("../lifecycle");
|
|
58
|
-
var math_1 = require("../math");
|
|
59
|
-
var AriaLevelTracker = /** @class */ (function () {
|
|
60
|
-
function AriaLevelTracker() {
|
|
61
|
-
this._orderedList = [];
|
|
62
|
-
}
|
|
63
|
-
AriaLevelTracker.prototype.push = function (element) {
|
|
64
|
-
this._orderedList = __spreadArray(__spreadArray([], __read(this._orderedList.filter(function (item) { return item !== element; })), false), [
|
|
65
|
-
element,
|
|
66
|
-
], false);
|
|
67
|
-
this.update();
|
|
68
|
-
};
|
|
69
|
-
AriaLevelTracker.prototype.destroy = function (element) {
|
|
70
|
-
this._orderedList = this._orderedList.filter(function (item) { return item !== element; });
|
|
71
|
-
this.update();
|
|
72
|
-
};
|
|
73
|
-
AriaLevelTracker.prototype.update = function () {
|
|
74
|
-
for (var i = 0; i < this._orderedList.length; i++) {
|
|
75
|
-
this._orderedList[i].setAttribute('aria-level', "".concat(i));
|
|
76
|
-
this._orderedList[i].style.zIndex =
|
|
77
|
-
"calc(var(--dv-overlay-z-index, 999) + ".concat(i * 2, ")");
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
return AriaLevelTracker;
|
|
81
|
-
}());
|
|
82
|
-
var arialLevelTracker = new AriaLevelTracker();
|
|
83
|
-
var Overlay = /** @class */ (function (_super) {
|
|
84
|
-
__extends(Overlay, _super);
|
|
85
|
-
function Overlay(options) {
|
|
86
|
-
var _this = _super.call(this) || this;
|
|
87
|
-
_this.options = options;
|
|
88
|
-
_this._element = document.createElement('div');
|
|
89
|
-
_this._onDidChange = new events_1.Emitter();
|
|
90
|
-
_this.onDidChange = _this._onDidChange.event;
|
|
91
|
-
_this._onDidChangeEnd = new events_1.Emitter();
|
|
92
|
-
_this.onDidChangeEnd = _this._onDidChangeEnd.event;
|
|
93
|
-
_this._onDidStartMoving = new events_1.Emitter();
|
|
94
|
-
/** Fires once per drag, the first time the float actually moves. */
|
|
95
|
-
_this.onDidStartMoving = _this._onDidStartMoving.event;
|
|
96
|
-
_this._dragMove = new lifecycle_1.MutableDisposable();
|
|
97
|
-
_this._dragCancelled = false;
|
|
98
|
-
_this.addDisposables(_this._onDidChange, _this._onDidChangeEnd, _this._onDidStartMoving, _this._dragMove);
|
|
99
|
-
_this._element.className = 'dv-resize-container';
|
|
100
|
-
// Floating groups are non-modal dialogs over the layout. The contained
|
|
101
|
-
// group(s) carry their own `role="region"` + label, so the dialog
|
|
102
|
-
// itself only needs role + modality here.
|
|
103
|
-
_this._element.setAttribute('role', 'dialog');
|
|
104
|
-
_this._element.setAttribute('aria-modal', 'false');
|
|
105
|
-
_this._isVisible = true;
|
|
106
|
-
_this.setupResize('top');
|
|
107
|
-
_this.setupResize('bottom');
|
|
108
|
-
_this.setupResize('left');
|
|
109
|
-
_this.setupResize('right');
|
|
110
|
-
_this.setupResize('topleft');
|
|
111
|
-
_this.setupResize('topright');
|
|
112
|
-
_this.setupResize('bottomleft');
|
|
113
|
-
_this.setupResize('bottomright');
|
|
114
|
-
if (_this.options.header) {
|
|
115
|
-
(0, dom_1.toggleClass)(_this._element, 'dv-resize-container-with-titlebar', true);
|
|
116
|
-
_this._element.appendChild(_this.options.header);
|
|
117
|
-
}
|
|
118
|
-
_this._element.appendChild(_this.options.content);
|
|
119
|
-
_this.options.container.appendChild(_this._element);
|
|
120
|
-
// if input bad resize within acceptable boundaries
|
|
121
|
-
_this.setBounds(__assign(__assign(__assign(__assign({ height: _this.options.height, width: _this.options.width }, ('top' in _this.options && { top: _this.options.top })), ('bottom' in _this.options && { bottom: _this.options.bottom })), ('left' in _this.options && { left: _this.options.left })), ('right' in _this.options && { right: _this.options.right })));
|
|
122
|
-
arialLevelTracker.push(_this._element);
|
|
123
|
-
return _this;
|
|
124
|
-
}
|
|
125
|
-
Object.defineProperty(Overlay.prototype, "minimumInViewportWidth", {
|
|
126
|
-
set: function (value) {
|
|
127
|
-
this.options.minimumInViewportWidth = value;
|
|
128
|
-
},
|
|
129
|
-
enumerable: false,
|
|
130
|
-
configurable: true
|
|
131
|
-
});
|
|
132
|
-
Object.defineProperty(Overlay.prototype, "minimumInViewportHeight", {
|
|
133
|
-
set: function (value) {
|
|
134
|
-
this.options.minimumInViewportHeight = value;
|
|
135
|
-
},
|
|
136
|
-
enumerable: false,
|
|
137
|
-
configurable: true
|
|
138
|
-
});
|
|
139
|
-
Object.defineProperty(Overlay.prototype, "element", {
|
|
140
|
-
get: function () {
|
|
141
|
-
return this._element;
|
|
142
|
-
},
|
|
143
|
-
enumerable: false,
|
|
144
|
-
configurable: true
|
|
145
|
-
});
|
|
146
|
-
Object.defineProperty(Overlay.prototype, "isVisible", {
|
|
147
|
-
get: function () {
|
|
148
|
-
return this._isVisible;
|
|
149
|
-
},
|
|
150
|
-
enumerable: false,
|
|
151
|
-
configurable: true
|
|
152
|
-
});
|
|
153
|
-
Object.defineProperty(Overlay.prototype, "headerHeight", {
|
|
154
|
-
/**
|
|
155
|
-
* Height of the optional drag-handle header, or 0 when none is present.
|
|
156
|
-
* Used to translate between the overlay's outer box and the content area
|
|
157
|
-
* available to the group beneath the header.
|
|
158
|
-
*/
|
|
159
|
-
get: function () {
|
|
160
|
-
var _a, _b;
|
|
161
|
-
return (_b = (_a = this.options.header) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
|
|
162
|
-
},
|
|
163
|
-
enumerable: false,
|
|
164
|
-
configurable: true
|
|
165
|
-
});
|
|
166
|
-
Overlay.prototype.setVisible = function (isVisible) {
|
|
167
|
-
if (isVisible === this.isVisible) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
this._isVisible = isVisible;
|
|
171
|
-
(0, dom_1.toggleClass)(this.element, 'dv-hidden', !this.isVisible);
|
|
172
|
-
};
|
|
173
|
-
Overlay.prototype.bringToFront = function () {
|
|
174
|
-
arialLevelTracker.push(this._element);
|
|
175
|
-
};
|
|
176
|
-
Overlay.prototype.setBounds = function (bounds) {
|
|
177
|
-
if (bounds === void 0) { bounds = {}; }
|
|
178
|
-
if (typeof bounds.height === 'number') {
|
|
179
|
-
this._element.style.height = "".concat(bounds.height, "px");
|
|
180
|
-
}
|
|
181
|
-
if (typeof bounds.width === 'number') {
|
|
182
|
-
this._element.style.width = "".concat(bounds.width, "px");
|
|
183
|
-
}
|
|
184
|
-
if ('top' in bounds && typeof bounds.top === 'number') {
|
|
185
|
-
this._element.style.top = "".concat(bounds.top, "px");
|
|
186
|
-
this._element.style.bottom = 'auto';
|
|
187
|
-
this.verticalAlignment = 'top';
|
|
188
|
-
}
|
|
189
|
-
if ('bottom' in bounds && typeof bounds.bottom === 'number') {
|
|
190
|
-
this._element.style.bottom = "".concat(bounds.bottom, "px");
|
|
191
|
-
this._element.style.top = 'auto';
|
|
192
|
-
this.verticalAlignment = 'bottom';
|
|
193
|
-
}
|
|
194
|
-
if ('left' in bounds && typeof bounds.left === 'number') {
|
|
195
|
-
this._element.style.left = "".concat(bounds.left, "px");
|
|
196
|
-
this._element.style.right = 'auto';
|
|
197
|
-
this.horiziontalAlignment = 'left';
|
|
198
|
-
}
|
|
199
|
-
if ('right' in bounds && typeof bounds.right === 'number') {
|
|
200
|
-
this._element.style.right = "".concat(bounds.right, "px");
|
|
201
|
-
this._element.style.left = 'auto';
|
|
202
|
-
this.horiziontalAlignment = 'right';
|
|
203
|
-
}
|
|
204
|
-
var containerRect = this.options.container.getBoundingClientRect();
|
|
205
|
-
var overlayRect = this._element.getBoundingClientRect();
|
|
206
|
-
// region: ensure bounds within allowable limits
|
|
207
|
-
// a minimum width of minimumViewportWidth must be inside the viewport
|
|
208
|
-
var xOffset = Math.max(0, this.getMinimumWidth(overlayRect.width));
|
|
209
|
-
// a minimum height of minimumViewportHeight must be inside the viewport
|
|
210
|
-
var yOffset = Math.max(0, this.getMinimumHeight(overlayRect.height));
|
|
211
|
-
if (this.verticalAlignment === 'top') {
|
|
212
|
-
var top_1 = (0, math_1.clamp)(overlayRect.top - containerRect.top, -yOffset, Math.max(0, containerRect.height - overlayRect.height + yOffset));
|
|
213
|
-
this._element.style.top = "".concat(top_1, "px");
|
|
214
|
-
this._element.style.bottom = 'auto';
|
|
215
|
-
}
|
|
216
|
-
if (this.verticalAlignment === 'bottom') {
|
|
217
|
-
var bottom = (0, math_1.clamp)(containerRect.bottom - overlayRect.bottom, -yOffset, Math.max(0, containerRect.height - overlayRect.height + yOffset));
|
|
218
|
-
this._element.style.bottom = "".concat(bottom, "px");
|
|
219
|
-
this._element.style.top = 'auto';
|
|
220
|
-
}
|
|
221
|
-
if (this.horiziontalAlignment === 'left') {
|
|
222
|
-
var left = (0, math_1.clamp)(overlayRect.left - containerRect.left, -xOffset, Math.max(0, containerRect.width - overlayRect.width + xOffset));
|
|
223
|
-
this._element.style.left = "".concat(left, "px");
|
|
224
|
-
this._element.style.right = 'auto';
|
|
225
|
-
}
|
|
226
|
-
if (this.horiziontalAlignment === 'right') {
|
|
227
|
-
var right = (0, math_1.clamp)(containerRect.right - overlayRect.right, -xOffset, Math.max(0, containerRect.width - overlayRect.width + xOffset));
|
|
228
|
-
this._element.style.right = "".concat(right, "px");
|
|
229
|
-
this._element.style.left = 'auto';
|
|
230
|
-
}
|
|
231
|
-
this._onDidChange.fire();
|
|
232
|
-
};
|
|
233
|
-
Overlay.prototype.toJSON = function () {
|
|
234
|
-
var container = this.options.container.getBoundingClientRect();
|
|
235
|
-
var element = this._element.getBoundingClientRect();
|
|
236
|
-
var result = {};
|
|
237
|
-
if (this.verticalAlignment === 'top') {
|
|
238
|
-
result.top = Number.parseFloat(this._element.style.top);
|
|
239
|
-
}
|
|
240
|
-
else if (this.verticalAlignment === 'bottom') {
|
|
241
|
-
result.bottom = Number.parseFloat(this._element.style.bottom);
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
result.top = element.top - container.top;
|
|
245
|
-
}
|
|
246
|
-
if (this.horiziontalAlignment === 'left') {
|
|
247
|
-
result.left = Number.parseFloat(this._element.style.left);
|
|
248
|
-
}
|
|
249
|
-
else if (this.horiziontalAlignment === 'right') {
|
|
250
|
-
result.right = Number.parseFloat(this._element.style.right);
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
result.left = element.left - container.left;
|
|
254
|
-
}
|
|
255
|
-
result.width = element.width;
|
|
256
|
-
result.height = element.height;
|
|
257
|
-
return result;
|
|
258
|
-
};
|
|
259
|
-
/**
|
|
260
|
-
* Abort an in-flight move-the-float drag. Used by the void container
|
|
261
|
-
* when a redock long-press fires after the move started, so the ghost
|
|
262
|
-
* gesture wins without the float continuing to follow the finger.
|
|
263
|
-
* Does not emit `onDidChangeEnd` because no change is being committed.
|
|
264
|
-
*/
|
|
265
|
-
Overlay.prototype.cancelPendingDrag = function () {
|
|
266
|
-
if (!this._dragMove.value) {
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
this._dragCancelled = true;
|
|
270
|
-
(0, dom_1.toggleClass)(this._element, 'dv-resize-container-dragging', false);
|
|
271
|
-
this._dragMove.value = lifecycle_1.Disposable.NONE;
|
|
272
|
-
};
|
|
273
|
-
Overlay.prototype.setupDrag = function (dragTarget, options) {
|
|
274
|
-
var _this = this;
|
|
275
|
-
if (options === void 0) { options = { inDragMode: false }; }
|
|
276
|
-
var track = function (captureTarget, pointerId) {
|
|
277
|
-
var _a, _b, _c;
|
|
278
|
-
var offset = null;
|
|
279
|
-
var hasMoved = false;
|
|
280
|
-
_this._dragCancelled = false;
|
|
281
|
-
// Snapshot once per drag — siblings don't move while this one drags.
|
|
282
|
-
var siblingBoxes = _this.options.transformDragPosition
|
|
283
|
-
? ((_c = (_b = (_a = _this.options).getSiblingBoxes) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [])
|
|
284
|
-
: [];
|
|
285
|
-
var iframes = (0, dom_1.disableIframePointEvents)();
|
|
286
|
-
if (captureTarget &&
|
|
287
|
-
typeof pointerId === 'number' &&
|
|
288
|
-
typeof captureTarget.setPointerCapture === 'function') {
|
|
289
|
-
try {
|
|
290
|
-
captureTarget.setPointerCapture(pointerId);
|
|
291
|
-
}
|
|
292
|
-
catch (_d) {
|
|
293
|
-
// ignore – non-fatal if the browser refuses capture
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
var end = function () {
|
|
297
|
-
(0, dom_1.toggleClass)(_this._element, 'dv-resize-container-dragging', false);
|
|
298
|
-
_this._dragMove.value = lifecycle_1.Disposable.NONE;
|
|
299
|
-
_this._onDidChangeEnd.fire();
|
|
300
|
-
};
|
|
301
|
-
_this._dragMove.value = new lifecycle_1.CompositeDisposable({
|
|
302
|
-
dispose: function () {
|
|
303
|
-
iframes.release();
|
|
304
|
-
if (captureTarget &&
|
|
305
|
-
typeof pointerId === 'number' &&
|
|
306
|
-
typeof captureTarget.releasePointerCapture ===
|
|
307
|
-
'function') {
|
|
308
|
-
try {
|
|
309
|
-
captureTarget.releasePointerCapture(pointerId);
|
|
310
|
-
}
|
|
311
|
-
catch (_a) {
|
|
312
|
-
// ignore – pointer may already be released
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
}, (0, events_1.addDisposableListener)(globalThis.window, 'pointermove', function (e) {
|
|
317
|
-
if (_this._dragCancelled) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
var containerRect = _this.options.container.getBoundingClientRect();
|
|
321
|
-
var x = e.clientX - containerRect.left;
|
|
322
|
-
var y = e.clientY - containerRect.top;
|
|
323
|
-
(0, dom_1.toggleClass)(_this._element, 'dv-resize-container-dragging', true);
|
|
324
|
-
var overlayRect = _this._element.getBoundingClientRect();
|
|
325
|
-
offset !== null && offset !== void 0 ? offset : (offset = {
|
|
326
|
-
x: e.clientX - overlayRect.left,
|
|
327
|
-
y: e.clientY - overlayRect.top,
|
|
328
|
-
});
|
|
329
|
-
var xOffset = Math.max(0, _this.getMinimumWidth(overlayRect.width));
|
|
330
|
-
var yOffset = Math.max(0, _this.getMinimumHeight(overlayRect.height));
|
|
331
|
-
var proposedTop = y - offset.y;
|
|
332
|
-
var proposedLeft = x - offset.x;
|
|
333
|
-
// Let a consumer nudge the proposed position (snapping,
|
|
334
|
-
// custom bounds) before the container clamp below.
|
|
335
|
-
if (_this.options.transformDragPosition) {
|
|
336
|
-
var adjusted = _this.options.transformDragPosition({
|
|
337
|
-
proposed: {
|
|
338
|
-
top: proposedTop,
|
|
339
|
-
left: proposedLeft,
|
|
340
|
-
width: overlayRect.width,
|
|
341
|
-
height: overlayRect.height,
|
|
342
|
-
},
|
|
343
|
-
container: {
|
|
344
|
-
width: containerRect.width,
|
|
345
|
-
height: containerRect.height,
|
|
346
|
-
},
|
|
347
|
-
others: siblingBoxes,
|
|
348
|
-
});
|
|
349
|
-
if (adjusted) {
|
|
350
|
-
proposedTop = adjusted.top;
|
|
351
|
-
proposedLeft = adjusted.left;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
var maxTop = Math.max(0, containerRect.height - overlayRect.height + yOffset);
|
|
355
|
-
var maxLeft = Math.max(0, containerRect.width - overlayRect.width + xOffset);
|
|
356
|
-
var top = (0, math_1.clamp)(proposedTop, -yOffset, maxTop);
|
|
357
|
-
var bottom = (0, math_1.clamp)(containerRect.height - overlayRect.height - proposedTop, -yOffset, maxTop);
|
|
358
|
-
var left = (0, math_1.clamp)(proposedLeft, -xOffset, maxLeft);
|
|
359
|
-
var right = (0, math_1.clamp)(containerRect.width - overlayRect.width - proposedLeft, -xOffset, maxLeft);
|
|
360
|
-
var bounds = {};
|
|
361
|
-
// Anchor to top or to bottom depending on which one is closer
|
|
362
|
-
if (top <= bottom) {
|
|
363
|
-
bounds.top = top;
|
|
364
|
-
}
|
|
365
|
-
else {
|
|
366
|
-
bounds.bottom = bottom;
|
|
367
|
-
}
|
|
368
|
-
// Anchor to left or to right depending on which one is closer
|
|
369
|
-
if (left <= right) {
|
|
370
|
-
bounds.left = left;
|
|
371
|
-
}
|
|
372
|
-
else {
|
|
373
|
-
bounds.right = right;
|
|
374
|
-
}
|
|
375
|
-
_this.setBounds(bounds);
|
|
376
|
-
if (!hasMoved) {
|
|
377
|
-
hasMoved = true;
|
|
378
|
-
_this._onDidStartMoving.fire();
|
|
379
|
-
}
|
|
380
|
-
}), (0, events_1.addDisposableListener)(globalThis.window, 'pointerup', end), (0, events_1.addDisposableListener)(globalThis.window, 'pointercancel', end));
|
|
381
|
-
};
|
|
382
|
-
this.addDisposables((0, events_1.addDisposableListener)(dragTarget, 'pointerdown', function (event) {
|
|
383
|
-
if (event.defaultPrevented) {
|
|
384
|
-
event.preventDefault();
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
// if somebody has marked this event then treat as a defaultPrevented
|
|
388
|
-
// without actually calling event.preventDefault()
|
|
389
|
-
if ((0, dom_1.quasiDefaultPrevented)(event)) {
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
track(dragTarget, event.pointerId);
|
|
393
|
-
}), (0, events_1.addDisposableListener)(this.options.content, 'pointerdown', function (event) {
|
|
394
|
-
if (event.defaultPrevented) {
|
|
395
|
-
return;
|
|
396
|
-
}
|
|
397
|
-
// if somebody has marked this event then treat as a defaultPrevented
|
|
398
|
-
// without actually calling event.preventDefault()
|
|
399
|
-
if ((0, dom_1.quasiDefaultPrevented)(event)) {
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
if (event.shiftKey) {
|
|
403
|
-
track(_this.options.content, event.pointerId);
|
|
404
|
-
}
|
|
405
|
-
}), (0, events_1.addDisposableListener)(this.options.content, 'pointerdown', function () {
|
|
406
|
-
arialLevelTracker.push(_this._element);
|
|
407
|
-
}, true));
|
|
408
|
-
if (options.inDragMode) {
|
|
409
|
-
track();
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
Overlay.prototype.setupResize = function (direction) {
|
|
413
|
-
var _this = this;
|
|
414
|
-
var resizeHandleElement = document.createElement('div');
|
|
415
|
-
resizeHandleElement.className = "dv-resize-handle-".concat(direction);
|
|
416
|
-
this._element.appendChild(resizeHandleElement);
|
|
417
|
-
var move = new lifecycle_1.MutableDisposable();
|
|
418
|
-
this.addDisposables(move, (0, events_1.addDisposableListener)(resizeHandleElement, 'pointerdown', function (e) {
|
|
419
|
-
e.preventDefault();
|
|
420
|
-
var startPosition = null;
|
|
421
|
-
var iframes = (0, dom_1.disableIframePointEvents)();
|
|
422
|
-
var pointerId = e.pointerId;
|
|
423
|
-
if (typeof resizeHandleElement.setPointerCapture === 'function') {
|
|
424
|
-
try {
|
|
425
|
-
resizeHandleElement.setPointerCapture(pointerId);
|
|
426
|
-
}
|
|
427
|
-
catch (_a) {
|
|
428
|
-
// ignore – non-fatal if the browser refuses capture
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
var end = function () {
|
|
432
|
-
move.dispose();
|
|
433
|
-
_this._onDidChangeEnd.fire();
|
|
434
|
-
};
|
|
435
|
-
move.value = new lifecycle_1.CompositeDisposable((0, events_1.addDisposableListener)(globalThis.window, 'pointermove', function (e) {
|
|
436
|
-
var containerRect = _this.options.container.getBoundingClientRect();
|
|
437
|
-
var overlayRect = _this._element.getBoundingClientRect();
|
|
438
|
-
var y = e.clientY - containerRect.top;
|
|
439
|
-
var x = e.clientX - containerRect.left;
|
|
440
|
-
// record the initial dimensions since as all subsequence moves are relative to this
|
|
441
|
-
startPosition !== null && startPosition !== void 0 ? startPosition : (startPosition = {
|
|
442
|
-
originalY: y,
|
|
443
|
-
originalHeight: overlayRect.height,
|
|
444
|
-
originalX: x,
|
|
445
|
-
originalWidth: overlayRect.width,
|
|
446
|
-
});
|
|
447
|
-
var top = undefined;
|
|
448
|
-
var bottom = undefined;
|
|
449
|
-
var height = undefined;
|
|
450
|
-
var left = undefined;
|
|
451
|
-
var right = undefined;
|
|
452
|
-
var width = undefined;
|
|
453
|
-
var moveTop = function () {
|
|
454
|
-
// When dragging top handle, constrain top position to prevent oversizing
|
|
455
|
-
var maxTop = startPosition.originalY +
|
|
456
|
-
startPosition.originalHeight >
|
|
457
|
-
containerRect.height
|
|
458
|
-
? Math.max(0, containerRect.height -
|
|
459
|
-
Overlay.MINIMUM_HEIGHT)
|
|
460
|
-
: Math.max(0, startPosition.originalY +
|
|
461
|
-
startPosition
|
|
462
|
-
.originalHeight -
|
|
463
|
-
Overlay.MINIMUM_HEIGHT);
|
|
464
|
-
top = (0, math_1.clamp)(y, 0, maxTop);
|
|
465
|
-
height =
|
|
466
|
-
startPosition.originalY +
|
|
467
|
-
startPosition.originalHeight -
|
|
468
|
-
top;
|
|
469
|
-
bottom = containerRect.height - top - height;
|
|
470
|
-
};
|
|
471
|
-
var moveBottom = function () {
|
|
472
|
-
top =
|
|
473
|
-
startPosition.originalY -
|
|
474
|
-
startPosition.originalHeight;
|
|
475
|
-
// When dragging bottom handle, constrain height to container height
|
|
476
|
-
var minHeight = top < 0 &&
|
|
477
|
-
typeof _this.options
|
|
478
|
-
.minimumInViewportHeight === 'number'
|
|
479
|
-
? -top +
|
|
480
|
-
_this.options.minimumInViewportHeight
|
|
481
|
-
: Overlay.MINIMUM_HEIGHT;
|
|
482
|
-
var maxHeight = containerRect.height - Math.max(0, top);
|
|
483
|
-
height = (0, math_1.clamp)(y - top, minHeight, maxHeight);
|
|
484
|
-
bottom = containerRect.height - top - height;
|
|
485
|
-
};
|
|
486
|
-
var moveLeft = function () {
|
|
487
|
-
var maxLeft = startPosition.originalX +
|
|
488
|
-
startPosition.originalWidth >
|
|
489
|
-
containerRect.width
|
|
490
|
-
? Math.max(0, containerRect.width -
|
|
491
|
-
Overlay.MINIMUM_WIDTH) // Prevent extending beyong right edge
|
|
492
|
-
: Math.max(0, startPosition.originalX +
|
|
493
|
-
startPosition.originalWidth -
|
|
494
|
-
Overlay.MINIMUM_WIDTH);
|
|
495
|
-
left = (0, math_1.clamp)(x, 0, maxLeft); // min is 0 (Not -Infinity) to prevent dragging beyond left edge
|
|
496
|
-
width =
|
|
497
|
-
startPosition.originalX +
|
|
498
|
-
startPosition.originalWidth -
|
|
499
|
-
left;
|
|
500
|
-
right = containerRect.width - left - width;
|
|
501
|
-
};
|
|
502
|
-
var moveRight = function () {
|
|
503
|
-
left =
|
|
504
|
-
startPosition.originalX -
|
|
505
|
-
startPosition.originalWidth;
|
|
506
|
-
// When dragging right handle, constrain width to container width
|
|
507
|
-
var minWidth = left < 0 &&
|
|
508
|
-
typeof _this.options
|
|
509
|
-
.minimumInViewportWidth === 'number'
|
|
510
|
-
? -left +
|
|
511
|
-
_this.options.minimumInViewportWidth
|
|
512
|
-
: Overlay.MINIMUM_WIDTH;
|
|
513
|
-
var maxWidth = containerRect.width - Math.max(0, left);
|
|
514
|
-
width = (0, math_1.clamp)(x - left, minWidth, maxWidth);
|
|
515
|
-
right = containerRect.width - left - width;
|
|
516
|
-
};
|
|
517
|
-
switch (direction) {
|
|
518
|
-
case 'top':
|
|
519
|
-
moveTop();
|
|
520
|
-
break;
|
|
521
|
-
case 'bottom':
|
|
522
|
-
moveBottom();
|
|
523
|
-
break;
|
|
524
|
-
case 'left':
|
|
525
|
-
moveLeft();
|
|
526
|
-
break;
|
|
527
|
-
case 'right':
|
|
528
|
-
moveRight();
|
|
529
|
-
break;
|
|
530
|
-
case 'topleft':
|
|
531
|
-
moveTop();
|
|
532
|
-
moveLeft();
|
|
533
|
-
break;
|
|
534
|
-
case 'topright':
|
|
535
|
-
moveTop();
|
|
536
|
-
moveRight();
|
|
537
|
-
break;
|
|
538
|
-
case 'bottomleft':
|
|
539
|
-
moveBottom();
|
|
540
|
-
moveLeft();
|
|
541
|
-
break;
|
|
542
|
-
case 'bottomright':
|
|
543
|
-
moveBottom();
|
|
544
|
-
moveRight();
|
|
545
|
-
break;
|
|
546
|
-
}
|
|
547
|
-
var bounds = {};
|
|
548
|
-
// Anchor to top or to bottom depending on which one is closer
|
|
549
|
-
if (top <= bottom) {
|
|
550
|
-
bounds.top = top;
|
|
551
|
-
}
|
|
552
|
-
else {
|
|
553
|
-
bounds.bottom = bottom;
|
|
554
|
-
}
|
|
555
|
-
// Anchor to left or to right depending on which one is closer
|
|
556
|
-
if (left <= right) {
|
|
557
|
-
bounds.left = left;
|
|
558
|
-
}
|
|
559
|
-
else {
|
|
560
|
-
bounds.right = right;
|
|
561
|
-
}
|
|
562
|
-
bounds.height = height;
|
|
563
|
-
bounds.width = width;
|
|
564
|
-
_this.setBounds(bounds);
|
|
565
|
-
}), {
|
|
566
|
-
dispose: function () {
|
|
567
|
-
iframes.release();
|
|
568
|
-
if (typeof resizeHandleElement.releasePointerCapture ===
|
|
569
|
-
'function') {
|
|
570
|
-
try {
|
|
571
|
-
resizeHandleElement.releasePointerCapture(pointerId);
|
|
572
|
-
}
|
|
573
|
-
catch (_a) {
|
|
574
|
-
// ignore – pointer may already be released
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
},
|
|
578
|
-
}, (0, events_1.addDisposableListener)(globalThis.window, 'pointerup', end), (0, events_1.addDisposableListener)(globalThis.window, 'pointercancel', end));
|
|
579
|
-
}));
|
|
580
|
-
};
|
|
581
|
-
Overlay.prototype.getMinimumWidth = function (width) {
|
|
582
|
-
if (typeof this.options.minimumInViewportWidth === 'number') {
|
|
583
|
-
return width - this.options.minimumInViewportWidth;
|
|
584
|
-
}
|
|
585
|
-
return 0;
|
|
586
|
-
};
|
|
587
|
-
Overlay.prototype.getMinimumHeight = function (height) {
|
|
588
|
-
if (typeof this.options.minimumInViewportHeight === 'number') {
|
|
589
|
-
return height - this.options.minimumInViewportHeight;
|
|
590
|
-
}
|
|
591
|
-
return 0;
|
|
592
|
-
};
|
|
593
|
-
Overlay.prototype.dispose = function () {
|
|
594
|
-
arialLevelTracker.destroy(this._element);
|
|
595
|
-
this._element.remove();
|
|
596
|
-
_super.prototype.dispose.call(this);
|
|
597
|
-
};
|
|
598
|
-
Overlay.MINIMUM_HEIGHT = 20;
|
|
599
|
-
Overlay.MINIMUM_WIDTH = 20;
|
|
600
|
-
return Overlay;
|
|
601
|
-
}(lifecycle_1.CompositeDisposable));
|
|
602
|
-
exports.Overlay = Overlay;
|