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,192 +0,0 @@
|
|
|
1
|
-
import { PaneviewPanelApiImpl } from '../api/paneviewPanelApi';
|
|
2
|
-
import { addClasses, removeClasses } from '../dom';
|
|
3
|
-
import { addDisposableListener, Emitter } from '../events';
|
|
4
|
-
import { BasePanelView, } from '../gridview/basePanelView';
|
|
5
|
-
import { Orientation } from '../splitview/splitview';
|
|
6
|
-
export class PaneviewPanel extends BasePanelView {
|
|
7
|
-
set orientation(value) {
|
|
8
|
-
this._orientation = value;
|
|
9
|
-
}
|
|
10
|
-
get orientation() {
|
|
11
|
-
return this._orientation;
|
|
12
|
-
}
|
|
13
|
-
get minimumSize() {
|
|
14
|
-
const headerSize = this.headerSize;
|
|
15
|
-
const expanded = this.isExpanded();
|
|
16
|
-
const minimumBodySize = expanded ? this._minimumBodySize : 0;
|
|
17
|
-
return headerSize + minimumBodySize;
|
|
18
|
-
}
|
|
19
|
-
get maximumSize() {
|
|
20
|
-
const headerSize = this.headerSize;
|
|
21
|
-
const expanded = this.isExpanded();
|
|
22
|
-
const maximumBodySize = expanded ? this._maximumBodySize : 0;
|
|
23
|
-
return headerSize + maximumBodySize;
|
|
24
|
-
}
|
|
25
|
-
get size() {
|
|
26
|
-
return this._size;
|
|
27
|
-
}
|
|
28
|
-
get orthogonalSize() {
|
|
29
|
-
return this._orthogonalSize;
|
|
30
|
-
}
|
|
31
|
-
set orthogonalSize(size) {
|
|
32
|
-
this._orthogonalSize = size;
|
|
33
|
-
}
|
|
34
|
-
get minimumBodySize() {
|
|
35
|
-
return this._minimumBodySize;
|
|
36
|
-
}
|
|
37
|
-
set minimumBodySize(value) {
|
|
38
|
-
this._minimumBodySize = typeof value === 'number' ? value : 0;
|
|
39
|
-
}
|
|
40
|
-
get maximumBodySize() {
|
|
41
|
-
return this._maximumBodySize;
|
|
42
|
-
}
|
|
43
|
-
set maximumBodySize(value) {
|
|
44
|
-
this._maximumBodySize =
|
|
45
|
-
typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
|
|
46
|
-
}
|
|
47
|
-
get headerVisible() {
|
|
48
|
-
return this._headerVisible;
|
|
49
|
-
}
|
|
50
|
-
set headerVisible(value) {
|
|
51
|
-
this._headerVisible = value;
|
|
52
|
-
this.header.style.display = value ? '' : 'none';
|
|
53
|
-
}
|
|
54
|
-
constructor(options) {
|
|
55
|
-
super(options.id, options.component, new PaneviewPanelApiImpl(options.id, options.component));
|
|
56
|
-
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
57
|
-
this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
|
|
58
|
-
this._onDidChange = new Emitter();
|
|
59
|
-
this.onDidChange = this._onDidChange.event;
|
|
60
|
-
this._orthogonalSize = 0;
|
|
61
|
-
this._size = 0;
|
|
62
|
-
this._isExpanded = false;
|
|
63
|
-
this.api.pane = this; // TODO cannot use 'this' before 'super'
|
|
64
|
-
this.api.initialize(this);
|
|
65
|
-
this.headerSize = options.headerSize;
|
|
66
|
-
this.headerComponent = options.headerComponent;
|
|
67
|
-
this._minimumBodySize = options.minimumBodySize;
|
|
68
|
-
this._maximumBodySize = options.maximumBodySize;
|
|
69
|
-
this._isExpanded = options.isExpanded;
|
|
70
|
-
this._headerVisible = options.isHeaderVisible;
|
|
71
|
-
this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
|
|
72
|
-
this._orientation = options.orientation;
|
|
73
|
-
this.element.classList.add('dv-pane');
|
|
74
|
-
this.addDisposables(this.api.onWillVisibilityChange((event) => {
|
|
75
|
-
const { isVisible } = event;
|
|
76
|
-
const { accessor } = this._params;
|
|
77
|
-
accessor.setVisible(this, isVisible);
|
|
78
|
-
}), this.api.onDidSizeChange((event) => {
|
|
79
|
-
this._onDidChange.fire({ size: event.size });
|
|
80
|
-
}), addDisposableListener(this.element, 'mouseenter', (ev) => {
|
|
81
|
-
this.api._onMouseEnter.fire(ev);
|
|
82
|
-
}), addDisposableListener(this.element, 'mouseleave', (ev) => {
|
|
83
|
-
this.api._onMouseLeave.fire(ev);
|
|
84
|
-
}));
|
|
85
|
-
this.addDisposables(this._onDidChangeExpansionState, this.onDidChangeExpansionState((isPanelExpanded) => {
|
|
86
|
-
this.api._onDidExpansionChange.fire({
|
|
87
|
-
isExpanded: isPanelExpanded,
|
|
88
|
-
});
|
|
89
|
-
}), this.api.onDidFocusChange((e) => {
|
|
90
|
-
if (!this.header) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if (e.isFocused) {
|
|
94
|
-
addClasses(this.header, 'focused');
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
removeClasses(this.header, 'focused');
|
|
98
|
-
}
|
|
99
|
-
}));
|
|
100
|
-
this.renderOnce();
|
|
101
|
-
}
|
|
102
|
-
setVisible(isVisible) {
|
|
103
|
-
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
104
|
-
}
|
|
105
|
-
setActive(isActive) {
|
|
106
|
-
this.api._onDidActiveChange.fire({ isActive });
|
|
107
|
-
}
|
|
108
|
-
isExpanded() {
|
|
109
|
-
return this._isExpanded;
|
|
110
|
-
}
|
|
111
|
-
setExpanded(expanded) {
|
|
112
|
-
if (this._isExpanded === expanded) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
this._isExpanded = expanded;
|
|
116
|
-
if (expanded) {
|
|
117
|
-
if (this.animationTimer) {
|
|
118
|
-
clearTimeout(this.animationTimer);
|
|
119
|
-
}
|
|
120
|
-
if (this.body) {
|
|
121
|
-
this.element.appendChild(this.body);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
this.animationTimer = setTimeout(() => {
|
|
126
|
-
var _a;
|
|
127
|
-
(_a = this.body) === null || _a === void 0 ? void 0 : _a.remove();
|
|
128
|
-
}, 200);
|
|
129
|
-
}
|
|
130
|
-
this._onDidChange.fire(expanded ? { size: this.width } : {});
|
|
131
|
-
this._onDidChangeExpansionState.fire(expanded);
|
|
132
|
-
}
|
|
133
|
-
layout(size, orthogonalSize) {
|
|
134
|
-
this._size = size;
|
|
135
|
-
this._orthogonalSize = orthogonalSize;
|
|
136
|
-
const [width, height] = this.orientation === Orientation.HORIZONTAL
|
|
137
|
-
? [size, orthogonalSize]
|
|
138
|
-
: [orthogonalSize, size];
|
|
139
|
-
super.layout(width, height);
|
|
140
|
-
}
|
|
141
|
-
init(parameters) {
|
|
142
|
-
var _a, _b;
|
|
143
|
-
super.init(parameters);
|
|
144
|
-
if (typeof parameters.minimumBodySize === 'number') {
|
|
145
|
-
this.minimumBodySize = parameters.minimumBodySize;
|
|
146
|
-
}
|
|
147
|
-
if (typeof parameters.maximumBodySize === 'number') {
|
|
148
|
-
this.maximumBodySize = parameters.maximumBodySize;
|
|
149
|
-
}
|
|
150
|
-
this.bodyPart = this.getBodyComponent();
|
|
151
|
-
this.headerPart = this.getHeaderComponent();
|
|
152
|
-
this.bodyPart.init(Object.assign(Object.assign({}, parameters), { api: this.api }));
|
|
153
|
-
this.headerPart.init(Object.assign(Object.assign({}, parameters), { api: this.api }));
|
|
154
|
-
(_a = this.body) === null || _a === void 0 ? void 0 : _a.append(this.bodyPart.element);
|
|
155
|
-
(_b = this.header) === null || _b === void 0 ? void 0 : _b.append(this.headerPart.element);
|
|
156
|
-
if (typeof parameters.isExpanded === 'boolean') {
|
|
157
|
-
this.setExpanded(parameters.isExpanded);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
toJSON() {
|
|
161
|
-
const params = this._params;
|
|
162
|
-
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
163
|
-
}
|
|
164
|
-
renderOnce() {
|
|
165
|
-
this.header = document.createElement('div');
|
|
166
|
-
this.header.tabIndex = 0;
|
|
167
|
-
this.header.className = 'dv-pane-header';
|
|
168
|
-
this.header.style.height = `${this.headerSize}px`;
|
|
169
|
-
this.header.style.lineHeight = `${this.headerSize}px`;
|
|
170
|
-
this.header.style.minHeight = `${this.headerSize}px`;
|
|
171
|
-
this.header.style.maxHeight = `${this.headerSize}px`;
|
|
172
|
-
this.element.appendChild(this.header);
|
|
173
|
-
this.body = document.createElement('div');
|
|
174
|
-
this.body.className = 'dv-pane-body';
|
|
175
|
-
this.element.appendChild(this.body);
|
|
176
|
-
}
|
|
177
|
-
// TODO slightly hacky by-pass of the component to create a body and header component
|
|
178
|
-
getComponent() {
|
|
179
|
-
return {
|
|
180
|
-
update: (params) => {
|
|
181
|
-
var _a, _b;
|
|
182
|
-
(_a = this.bodyPart) === null || _a === void 0 ? void 0 : _a.update({ params });
|
|
183
|
-
(_b = this.headerPart) === null || _b === void 0 ? void 0 : _b.update({ params });
|
|
184
|
-
},
|
|
185
|
-
dispose: () => {
|
|
186
|
-
var _a, _b;
|
|
187
|
-
(_a = this.bodyPart) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
188
|
-
(_b = this.headerPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
189
|
-
},
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { CspNonceProvider } from './dom';
|
|
2
|
-
import { CompositeDisposable } from './lifecycle';
|
|
3
|
-
import { Box } from './types';
|
|
4
|
-
export type PopoutWindowOptions = {
|
|
5
|
-
url: string;
|
|
6
|
-
onDidOpen?: (event: {
|
|
7
|
-
id: string;
|
|
8
|
-
window: Window;
|
|
9
|
-
}) => void;
|
|
10
|
-
onWillClose?: (event: {
|
|
11
|
-
id: string;
|
|
12
|
-
window: Window;
|
|
13
|
-
}) => void;
|
|
14
|
-
nonce?: CspNonceProvider;
|
|
15
|
-
} & Box;
|
|
16
|
-
/**
|
|
17
|
-
* Reject popout URLs that aren't same-origin http(s). Blocks `javascript:`,
|
|
18
|
-
* `data:`, `blob:`, `vbscript:`, and cross-origin URLs that would otherwise
|
|
19
|
-
* execute in a context the browser still associates with the opener via
|
|
20
|
-
* `window.opener`.
|
|
21
|
-
*/
|
|
22
|
-
export declare function assertSameOriginPopoutUrl(url: string): void;
|
|
23
|
-
export declare class PopoutWindow extends CompositeDisposable {
|
|
24
|
-
private readonly target;
|
|
25
|
-
private readonly className;
|
|
26
|
-
private readonly options;
|
|
27
|
-
private readonly _onWillClose;
|
|
28
|
-
readonly onWillClose: import("./events").Event<void>;
|
|
29
|
-
private readonly _onDidClose;
|
|
30
|
-
readonly onDidClose: import("./events").Event<void>;
|
|
31
|
-
private _window;
|
|
32
|
-
get window(): Window | null;
|
|
33
|
-
constructor(target: string, className: string, options: PopoutWindowOptions);
|
|
34
|
-
dimensions(): Box | null;
|
|
35
|
-
close(): void;
|
|
36
|
-
open(): Promise<HTMLElement | null>;
|
|
37
|
-
private createPopoutWindowContainer;
|
|
38
|
-
}
|
package/dist/esm/popoutWindow.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { addStyles } from './dom';
|
|
11
|
-
import { Emitter, addDisposableListener } from './events';
|
|
12
|
-
import { CompositeDisposable, Disposable } from './lifecycle';
|
|
13
|
-
/**
|
|
14
|
-
* Reject popout URLs that aren't same-origin http(s). Blocks `javascript:`,
|
|
15
|
-
* `data:`, `blob:`, `vbscript:`, and cross-origin URLs that would otherwise
|
|
16
|
-
* execute in a context the browser still associates with the opener via
|
|
17
|
-
* `window.opener`.
|
|
18
|
-
*/
|
|
19
|
-
export function assertSameOriginPopoutUrl(url) {
|
|
20
|
-
let resolved;
|
|
21
|
-
try {
|
|
22
|
-
resolved = new URL(url, globalThis.location.href);
|
|
23
|
-
}
|
|
24
|
-
catch (_a) {
|
|
25
|
-
throw new Error(`dockview: invalid popout URL: ${url}`);
|
|
26
|
-
}
|
|
27
|
-
const protocolOk = resolved.protocol === 'http:' || resolved.protocol === 'https:';
|
|
28
|
-
if (!protocolOk || resolved.origin !== globalThis.location.origin) {
|
|
29
|
-
throw new Error(`dockview: popout URL must be same-origin http(s); got: ${url}`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export class PopoutWindow extends CompositeDisposable {
|
|
33
|
-
get window() {
|
|
34
|
-
var _a, _b;
|
|
35
|
-
return (_b = (_a = this._window) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null;
|
|
36
|
-
}
|
|
37
|
-
constructor(target, className, options) {
|
|
38
|
-
super();
|
|
39
|
-
this.target = target;
|
|
40
|
-
this.className = className;
|
|
41
|
-
this.options = options;
|
|
42
|
-
this._onWillClose = new Emitter();
|
|
43
|
-
this.onWillClose = this._onWillClose.event;
|
|
44
|
-
this._onDidClose = new Emitter();
|
|
45
|
-
this.onDidClose = this._onDidClose.event;
|
|
46
|
-
this._window = null;
|
|
47
|
-
this.addDisposables(this._onWillClose, this._onDidClose, {
|
|
48
|
-
dispose: () => {
|
|
49
|
-
this.close();
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
dimensions() {
|
|
54
|
-
if (!this._window) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
const left = this._window.value.screenX;
|
|
58
|
-
const top = this._window.value.screenY;
|
|
59
|
-
const width = this._window.value.innerWidth;
|
|
60
|
-
const height = this._window.value.innerHeight;
|
|
61
|
-
return { top, left, width, height };
|
|
62
|
-
}
|
|
63
|
-
close() {
|
|
64
|
-
var _a, _b;
|
|
65
|
-
if (this._window) {
|
|
66
|
-
this._onWillClose.fire();
|
|
67
|
-
(_b = (_a = this.options).onWillClose) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
68
|
-
id: this.target,
|
|
69
|
-
window: this._window.value,
|
|
70
|
-
});
|
|
71
|
-
this._window.disposable.dispose();
|
|
72
|
-
this._window = null;
|
|
73
|
-
this._onDidClose.fire();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
open() {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
var _a, _b;
|
|
79
|
-
if (this._window) {
|
|
80
|
-
throw new Error('instance of popout window is already open');
|
|
81
|
-
}
|
|
82
|
-
const url = `${this.options.url}`;
|
|
83
|
-
assertSameOriginPopoutUrl(url);
|
|
84
|
-
const features = Object.entries({
|
|
85
|
-
top: this.options.top,
|
|
86
|
-
left: this.options.left,
|
|
87
|
-
width: this.options.width,
|
|
88
|
-
height: this.options.height,
|
|
89
|
-
})
|
|
90
|
-
.map(([key, value]) => `${key}=${value}`)
|
|
91
|
-
.join(',');
|
|
92
|
-
/**
|
|
93
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/open
|
|
94
|
-
*/
|
|
95
|
-
const externalWindow = window.open(url, this.target, features);
|
|
96
|
-
if (!externalWindow) {
|
|
97
|
-
/**
|
|
98
|
-
* Popup blocked
|
|
99
|
-
*/
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
const disposable = new CompositeDisposable();
|
|
103
|
-
this._window = { value: externalWindow, disposable };
|
|
104
|
-
disposable.addDisposables(Disposable.from(() => {
|
|
105
|
-
externalWindow.close();
|
|
106
|
-
}), addDisposableListener(globalThis.window, 'beforeunload', () => {
|
|
107
|
-
/**
|
|
108
|
-
* before the main window closes we should close this popup too
|
|
109
|
-
* to be good citizens
|
|
110
|
-
*
|
|
111
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
|
|
112
|
-
*/
|
|
113
|
-
this.close();
|
|
114
|
-
}));
|
|
115
|
-
const container = this.createPopoutWindowContainer();
|
|
116
|
-
if (this.className) {
|
|
117
|
-
container.classList.add(this.className);
|
|
118
|
-
}
|
|
119
|
-
(_b = (_a = this.options).onDidOpen) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
120
|
-
id: this.target,
|
|
121
|
-
window: externalWindow,
|
|
122
|
-
});
|
|
123
|
-
return new Promise((resolve, reject) => {
|
|
124
|
-
externalWindow.addEventListener('unload', (e) => {
|
|
125
|
-
// if page fails to load before unloading
|
|
126
|
-
// this.close();
|
|
127
|
-
});
|
|
128
|
-
externalWindow.addEventListener('load', () => {
|
|
129
|
-
/**
|
|
130
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
|
|
131
|
-
*/
|
|
132
|
-
try {
|
|
133
|
-
const externalDocument = externalWindow.document;
|
|
134
|
-
externalDocument.title = document.title;
|
|
135
|
-
externalDocument.body.appendChild(container);
|
|
136
|
-
addStyles(externalDocument, globalThis.document.styleSheets, {
|
|
137
|
-
nonce: this.options.nonce,
|
|
138
|
-
});
|
|
139
|
-
/**
|
|
140
|
-
* beforeunload must be registered after load for reasons I could not determine
|
|
141
|
-
* otherwise the beforeunload event will not fire when the window is closed
|
|
142
|
-
*/
|
|
143
|
-
addDisposableListener(externalWindow, 'beforeunload', () => {
|
|
144
|
-
/**
|
|
145
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
|
|
146
|
-
*/
|
|
147
|
-
this.close();
|
|
148
|
-
});
|
|
149
|
-
resolve(container);
|
|
150
|
-
}
|
|
151
|
-
catch (err) {
|
|
152
|
-
// only except this is the DOM isn't setup. e.g. in a in correctly configured test
|
|
153
|
-
reject(err);
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
createPopoutWindowContainer() {
|
|
160
|
-
const el = document.createElement('div');
|
|
161
|
-
el.classList.add('dv-popout-window');
|
|
162
|
-
el.id = 'dv-popout-window';
|
|
163
|
-
el.style.position = 'absolute';
|
|
164
|
-
el.style.width = '100%';
|
|
165
|
-
el.style.height = '100%';
|
|
166
|
-
el.style.top = '0px';
|
|
167
|
-
el.style.left = '0px';
|
|
168
|
-
return el;
|
|
169
|
-
}
|
|
170
|
-
}
|
package/dist/esm/resizable.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CompositeDisposable } from './lifecycle';
|
|
2
|
-
export declare abstract class Resizable extends CompositeDisposable {
|
|
3
|
-
private readonly _element;
|
|
4
|
-
private _disableResizing;
|
|
5
|
-
private _lastWidth;
|
|
6
|
-
private _lastHeight;
|
|
7
|
-
get element(): HTMLElement;
|
|
8
|
-
get disableResizing(): boolean;
|
|
9
|
-
set disableResizing(value: boolean);
|
|
10
|
-
constructor(parentElement: HTMLElement, disableResizing?: boolean);
|
|
11
|
-
abstract layout(width: number, height: number): void;
|
|
12
|
-
}
|
package/dist/esm/resizable.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { isInDocument, watchElementResize } from './dom';
|
|
2
|
-
import { CompositeDisposable } from './lifecycle';
|
|
3
|
-
export class Resizable extends CompositeDisposable {
|
|
4
|
-
get element() {
|
|
5
|
-
return this._element;
|
|
6
|
-
}
|
|
7
|
-
get disableResizing() {
|
|
8
|
-
return this._disableResizing;
|
|
9
|
-
}
|
|
10
|
-
set disableResizing(value) {
|
|
11
|
-
this._disableResizing = value;
|
|
12
|
-
}
|
|
13
|
-
constructor(parentElement, disableResizing = false) {
|
|
14
|
-
super();
|
|
15
|
-
this._lastWidth = -1;
|
|
16
|
-
this._lastHeight = -1;
|
|
17
|
-
this._disableResizing = disableResizing;
|
|
18
|
-
this._element = parentElement;
|
|
19
|
-
this.addDisposables(watchElementResize(this._element, (entry) => {
|
|
20
|
-
if (this.isDisposed) {
|
|
21
|
-
/**
|
|
22
|
-
* resize is delayed through requestAnimationFrame so there is a small chance
|
|
23
|
-
* the component has already been disposed of
|
|
24
|
-
*/
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (this.disableResizing) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (!this._element.offsetParent) {
|
|
31
|
-
/**
|
|
32
|
-
* offsetParent === null is equivalent to display: none being set on the element or one
|
|
33
|
-
* of it's parents. In the display: none case the size will become (0, 0) which we do
|
|
34
|
-
* not want to propagate.
|
|
35
|
-
*
|
|
36
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
|
|
37
|
-
*
|
|
38
|
-
* You could use checkVisibility() but at the time of writing it's not supported across
|
|
39
|
-
* all Browsers
|
|
40
|
-
*
|
|
41
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility
|
|
42
|
-
*/
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (!isInDocument(this._element)) {
|
|
46
|
-
/**
|
|
47
|
-
* since the event is dispatched through requestAnimationFrame there is a small chance
|
|
48
|
-
* the component is no longer attached to the DOM, if that is the case the dimensions
|
|
49
|
-
* are mostly likely all zero and meaningless. we should skip this case.
|
|
50
|
-
*/
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
// Round to integers to absorb sub-pixel jitter from
|
|
54
|
-
// fractional devicePixelRatio (e.g. multi-monitor setups),
|
|
55
|
-
// which would otherwise re-fire layout in a feedback loop.
|
|
56
|
-
const width = Math.round(entry.contentRect.width);
|
|
57
|
-
const height = Math.round(entry.contentRect.height);
|
|
58
|
-
if (width === this._lastWidth && height === this._lastHeight) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
this._lastWidth = width;
|
|
62
|
-
this._lastHeight = height;
|
|
63
|
-
this.layout(width, height);
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
}
|
package/dist/esm/scrollbar.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CompositeDisposable } from './lifecycle';
|
|
2
|
-
export declare class Scrollbar extends CompositeDisposable {
|
|
3
|
-
private readonly scrollableElement;
|
|
4
|
-
private readonly _element;
|
|
5
|
-
private readonly _scrollbar;
|
|
6
|
-
private _scrollOffset;
|
|
7
|
-
private _animationTimer;
|
|
8
|
-
private _orientation;
|
|
9
|
-
static readonly MouseWheelSpeed = 1;
|
|
10
|
-
get element(): HTMLElement;
|
|
11
|
-
get orientation(): 'horizontal' | 'vertical';
|
|
12
|
-
set orientation(value: 'horizontal' | 'vertical');
|
|
13
|
-
constructor(scrollableElement: HTMLElement);
|
|
14
|
-
private calculateScrollbarStyles;
|
|
15
|
-
}
|
package/dist/esm/scrollbar.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { addClasses, removeClasses, toggleClass, watchElementResize, } from './dom';
|
|
2
|
-
import { addDisposableListener } from './events';
|
|
3
|
-
import { CompositeDisposable } from './lifecycle';
|
|
4
|
-
import { clamp } from './math';
|
|
5
|
-
export class Scrollbar extends CompositeDisposable {
|
|
6
|
-
get element() {
|
|
7
|
-
return this._element;
|
|
8
|
-
}
|
|
9
|
-
get orientation() {
|
|
10
|
-
return this._orientation;
|
|
11
|
-
}
|
|
12
|
-
set orientation(value) {
|
|
13
|
-
if (this._orientation === value) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
this._scrollOffset = 0;
|
|
17
|
-
this._orientation = value;
|
|
18
|
-
removeClasses(this._scrollbar, 'dv-scrollbar-vertical', 'dv-scrollbar-horizontal');
|
|
19
|
-
if (value === 'vertical') {
|
|
20
|
-
addClasses(this._scrollbar, 'dv-scrollbar-vertical');
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
addClasses(this._scrollbar, 'dv-scrollbar-horizontal');
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
constructor(scrollableElement) {
|
|
27
|
-
super();
|
|
28
|
-
this.scrollableElement = scrollableElement;
|
|
29
|
-
this._scrollOffset = 0;
|
|
30
|
-
this._orientation = 'horizontal';
|
|
31
|
-
this._element = document.createElement('div');
|
|
32
|
-
this._element.className = 'dv-scrollable';
|
|
33
|
-
this._scrollbar = document.createElement('div');
|
|
34
|
-
this._scrollbar.className = 'dv-scrollbar dv-scrollbar-horizontal';
|
|
35
|
-
this.element.appendChild(scrollableElement);
|
|
36
|
-
this.element.appendChild(this._scrollbar);
|
|
37
|
-
this.addDisposables(addDisposableListener(this.element, 'wheel', (event) => {
|
|
38
|
-
this._scrollOffset += event.deltaY * Scrollbar.MouseWheelSpeed;
|
|
39
|
-
this.calculateScrollbarStyles();
|
|
40
|
-
}), addDisposableListener(this._scrollbar, 'pointerdown', (event) => {
|
|
41
|
-
event.preventDefault();
|
|
42
|
-
toggleClass(this.element, 'dv-scrollable-scrolling', true);
|
|
43
|
-
const originalClient = this._orientation === 'horizontal'
|
|
44
|
-
? event.clientX
|
|
45
|
-
: event.clientY;
|
|
46
|
-
const originalScrollOffset = this._scrollOffset;
|
|
47
|
-
const onPointerMove = (event) => {
|
|
48
|
-
const delta = this._orientation === 'horizontal'
|
|
49
|
-
? event.clientX - originalClient
|
|
50
|
-
: event.clientY - originalClient;
|
|
51
|
-
const clientSize = this._orientation === 'horizontal'
|
|
52
|
-
? this.element.clientWidth
|
|
53
|
-
: this.element.clientHeight;
|
|
54
|
-
const scrollSize = this._orientation === 'horizontal'
|
|
55
|
-
? this.scrollableElement.scrollWidth
|
|
56
|
-
: this.scrollableElement.scrollHeight;
|
|
57
|
-
const p = clientSize / scrollSize;
|
|
58
|
-
this._scrollOffset = originalScrollOffset + delta / p;
|
|
59
|
-
this.calculateScrollbarStyles();
|
|
60
|
-
};
|
|
61
|
-
const doc = this.element.ownerDocument;
|
|
62
|
-
const onEnd = () => {
|
|
63
|
-
toggleClass(this.element, 'dv-scrollable-scrolling', false);
|
|
64
|
-
doc.removeEventListener('pointermove', onPointerMove);
|
|
65
|
-
doc.removeEventListener('pointerup', onEnd);
|
|
66
|
-
doc.removeEventListener('pointercancel', onEnd);
|
|
67
|
-
};
|
|
68
|
-
doc.addEventListener('pointermove', onPointerMove);
|
|
69
|
-
doc.addEventListener('pointerup', onEnd);
|
|
70
|
-
doc.addEventListener('pointercancel', onEnd);
|
|
71
|
-
}), addDisposableListener(this.element, 'scroll', () => {
|
|
72
|
-
this.calculateScrollbarStyles();
|
|
73
|
-
}), addDisposableListener(this.scrollableElement, 'scroll', () => {
|
|
74
|
-
this._scrollOffset =
|
|
75
|
-
this._orientation === 'horizontal'
|
|
76
|
-
? this.scrollableElement.scrollLeft
|
|
77
|
-
: this.scrollableElement.scrollTop;
|
|
78
|
-
this.calculateScrollbarStyles();
|
|
79
|
-
}), watchElementResize(this.element, () => {
|
|
80
|
-
toggleClass(this.element, 'dv-scrollable-resizing', true);
|
|
81
|
-
if (this._animationTimer) {
|
|
82
|
-
clearTimeout(this._animationTimer);
|
|
83
|
-
}
|
|
84
|
-
this._animationTimer = setTimeout(() => {
|
|
85
|
-
clearTimeout(this._animationTimer);
|
|
86
|
-
toggleClass(this.element, 'dv-scrollable-resizing', false);
|
|
87
|
-
}, 500);
|
|
88
|
-
this.calculateScrollbarStyles();
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
calculateScrollbarStyles() {
|
|
92
|
-
const clientSize = this._orientation === 'horizontal'
|
|
93
|
-
? this.element.clientWidth
|
|
94
|
-
: this.element.clientHeight;
|
|
95
|
-
const scrollSize = this._orientation === 'horizontal'
|
|
96
|
-
? this.scrollableElement.scrollWidth
|
|
97
|
-
: this.scrollableElement.scrollHeight;
|
|
98
|
-
const hasScrollbar = scrollSize > clientSize;
|
|
99
|
-
if (hasScrollbar) {
|
|
100
|
-
const px = clientSize * (clientSize / scrollSize);
|
|
101
|
-
if (this._orientation === 'horizontal') {
|
|
102
|
-
this._scrollbar.style.width = `${px}px`;
|
|
103
|
-
this._scrollbar.style.height = '';
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
this._scrollbar.style.height = `${px}px`;
|
|
107
|
-
this._scrollbar.style.width = '';
|
|
108
|
-
}
|
|
109
|
-
this._scrollOffset = clamp(this._scrollOffset, 0, scrollSize - clientSize);
|
|
110
|
-
if (this._orientation === 'horizontal') {
|
|
111
|
-
this.scrollableElement.scrollLeft = this._scrollOffset;
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
this.scrollableElement.scrollTop = this._scrollOffset;
|
|
115
|
-
}
|
|
116
|
-
const percentageComplete = this._scrollOffset / (scrollSize - clientSize);
|
|
117
|
-
if (this._orientation === 'horizontal') {
|
|
118
|
-
this._scrollbar.style.left = `${(clientSize - px) * percentageComplete}px`;
|
|
119
|
-
this._scrollbar.style.top = '';
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
this._scrollbar.style.top = `${(clientSize - px) * percentageComplete}px`;
|
|
123
|
-
this._scrollbar.style.left = '';
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
if (this._orientation === 'horizontal') {
|
|
128
|
-
this._scrollbar.style.width = '0px';
|
|
129
|
-
this._scrollbar.style.left = '0px';
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
this._scrollbar.style.height = '0px';
|
|
133
|
-
this._scrollbar.style.top = '0px';
|
|
134
|
-
}
|
|
135
|
-
this._scrollOffset = 0;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
Scrollbar.MouseWheelSpeed = 1;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PanelInitParameters } from '../panel/types';
|
|
2
|
-
import { SplitViewOptions, LayoutPriority } from './splitview';
|
|
3
|
-
import { SplitviewPanel } from './splitviewPanel';
|
|
4
|
-
import { SplitviewComponent } from './splitviewComponent';
|
|
5
|
-
import { CreateComponentOptions } from '../dockview/options';
|
|
6
|
-
export interface PanelViewInitParameters extends PanelInitParameters {
|
|
7
|
-
minimumSize?: number;
|
|
8
|
-
maximumSize?: number;
|
|
9
|
-
snap?: boolean;
|
|
10
|
-
priority?: LayoutPriority;
|
|
11
|
-
accessor: SplitviewComponent;
|
|
12
|
-
}
|
|
13
|
-
export interface SplitviewOptions extends SplitViewOptions {
|
|
14
|
-
disableAutoResizing?: boolean;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface SplitviewFrameworkOptions {
|
|
18
|
-
createComponent: (options: CreateComponentOptions) => SplitviewPanel;
|
|
19
|
-
}
|
|
20
|
-
export type SplitviewComponentOptions = SplitviewOptions & SplitviewFrameworkOptions;
|
|
21
|
-
export declare const PROPERTY_KEYS_SPLITVIEW: (keyof SplitviewOptions)[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const PROPERTY_KEYS_SPLITVIEW = (() => {
|
|
2
|
-
/**
|
|
3
|
-
* by readong the keys from an empty value object TypeScript will error
|
|
4
|
-
* when we add or remove new properties to `DockviewOptions`
|
|
5
|
-
*/
|
|
6
|
-
const properties = {
|
|
7
|
-
orientation: undefined,
|
|
8
|
-
descriptor: undefined,
|
|
9
|
-
proportionalLayout: undefined,
|
|
10
|
-
styles: undefined,
|
|
11
|
-
margin: undefined,
|
|
12
|
-
disableAutoResizing: undefined,
|
|
13
|
-
className: undefined,
|
|
14
|
-
};
|
|
15
|
-
return Object.keys(properties);
|
|
16
|
-
})();
|